Skip to content

Commit

Permalink
Oppdatering for sykemelding #deploy-test-dolly-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
krharum committed Nov 28, 2023
1 parent 6dbf498 commit 7728e4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public Flux<ClientFuture> gjenopprett(RsDollyUtvidetBestilling bestilling, Dolly
.map(this::getPersonData)
.flatMap(persondata -> Mono.zip(
getPdlPerson(persondata),
getNavEnhetId(persondata)))
getNavEnhetNr(persondata)))
.doOnNext(utvidetPersondata -> {
if (utvidetPersondata.getT1().isEmpty()) {
log.warn("Persondata for {} gir tom response fra PDL", dollyPerson.getIdent());
Expand Down Expand Up @@ -205,7 +205,7 @@ private static Mono<List<PdlPersonBolk.PersonBolk>> getPdlPerson(Flux<PdlPersonB
.collectList();
}

private Mono<String> getNavEnhetId(Flux<PdlPersonBolk.Data> persondata) {
private Mono<String> getNavEnhetNr(Flux<PdlPersonBolk.Data> persondata) {

return persondata
.map(PdlPersonBolk.Data::getHentGeografiskTilknytningBolk)
Expand Down Expand Up @@ -372,7 +372,7 @@ private Flux<PensjonforvalterResponse> lagreAlderspensjon(PensjonData pensjonDat
}));
}

private Flux<PensjonforvalterResponse> lagreUforetrygd(PensjonData pensjondata, String navEnhetId,
private Flux<PensjonforvalterResponse> lagreUforetrygd(PensjonData pensjondata, String navEnhetNr,
String ident, Set<String> miljoer, boolean isOpprettEndre,
Long bestillingId, List<String> isTpsSyncEnv) {

Expand All @@ -389,7 +389,7 @@ private Flux<PensjonforvalterResponse> lagreUforetrygd(PensjonData pensjondata,
var context = MappingContextUtils.getMappingContext();
context.setProperty(IDENT, ident);
context.setProperty(MILJOER, List.of(miljoe));
context.setProperty(NAV_ENHET, navEnhetId);
context.setProperty(NAV_ENHET, navEnhetNr);
return Flux.just(mapperFacade.map(uforetrygd, PensjonUforetrygdRequest.class, context))
.flatMap(request -> pensjonforvalterConsumer.lagreUforetrygd(request)
.map(response -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public void mapAtoB(PdlPersonBolk.Data persondata, Pasient pasient, MappingConte
.findFirst().orElse(new PdlPerson.Navn()), pasient);
pasient.setAdresse(mapperFacade.map(person.getPerson().getBostedsadresse().stream()
.findFirst().orElse(new BostedadresseDTO()), Adresse.class, context));
pasient.setFoedselsdato(person.getPerson().getFoedsel().getFirst().getFoedselsdato());

pasient.setTelefon(person.getPerson().getTelefonnummer().stream()
.filter(telefonnummer -> telefonnummer.getPrioritet() == 1)
Expand Down
2 changes: 2 additions & 0 deletions apps/dolly-backend/src/main/resources/application-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,7 @@ consumers:
url: https://testnav-organisasjon-service.intern.dev.nav.no
testnav-synt-sykemelding-api:
url: https://testnav-synt-sykemelding-api.intern.dev.nav.no
testnav-sykemelding-api:
url: http://testnav-sykemelding-api.intern.dev.nav.no
testnav-miljoer-service:
url: https://testnav-miljoer-service.intern.dev.nav.no

0 comments on commit 7728e4b

Please sign in to comment.