Skip to content

Commit

Permalink
Mer DTO endringer og logging
Browse files Browse the repository at this point in the history
#deploy-test-sykemelding-api
  • Loading branch information
stigus committed Dec 6, 2024
1 parent 52f7ddb commit 1fc27ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package no.nav.registre.testnorge.sykemelding.provider;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import no.nav.registre.testnorge.sykemelding.domain.ApplicationInfo;
import no.nav.registre.testnorge.sykemelding.domain.Sykemelding;
import no.nav.registre.testnorge.sykemelding.service.SykemeldingService;
Expand All @@ -17,6 +18,7 @@
@RestController
@RequestMapping("/api/v1/sykemeldinger")
@RequiredArgsConstructor
@Slf4j
public class SykemeldingController {

private final SykemeldingService sykemeldingService;
Expand All @@ -30,6 +32,7 @@ public SykemeldingResponseDTO create(@RequestBody SykemeldingDTO dto) {

@PostMapping(value = "/validate")
public Mono<ValidationResultDTO> validate(@RequestBody SykemeldingDTO dto) {
log.info("Mottok sykemelding: {}", dto);

SykemeldingRequestValidator.validate(dto);
return sykemeldingService.validate(new Sykemelding(dto, applicationInfo));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package no.nav.testnav.libs.dto.sykemelding.v1;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
Expand All @@ -18,27 +17,17 @@
@AllArgsConstructor
public class SykemeldingDTO {

@JsonProperty
private LocalDate startDato;
@JsonProperty
private PasientDTO pasient;
@JsonProperty
private HelsepersonellDTO helsepersonell;
@JsonProperty
private ArbeidsgiverDTO arbeidsgiver;
@JsonProperty
private Boolean manglendeTilretteleggingPaaArbeidsplassen;
private List<PeriodeDTO> perioder;
@JsonProperty
private OrganisasjonDTO sender;
@JsonProperty
private OrganisasjonDTO mottaker;
@JsonProperty
private DiagnoseDTO hovedDiagnose;
private List<DiagnoseDTO> biDiagnoser;
@JsonProperty
private DetaljerDTO detaljer;
@JsonProperty
private Boolean umiddelbarBistand;
private List<UtdypendeOpplysningerDTO> utdypendeOpplysninger;

Expand Down

0 comments on commit 1fc27ec

Please sign in to comment.