Skip to content

Commit

Permalink
PDL foedselsdato isf foedsel (#2539)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolarsen authored Jun 16, 2024
1 parent e1b7a17 commit 7d8955b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<sonar.projectKey>navikt_fp-formidling</sonar.projectKey>

<!-- Felles artefakter -->
<felles.version>7.2.0</felles.version>
<felles.version>7.2.1</felles.version>
<prosesstask.version>5.0.9</prosesstask.version>
<kontrakter.version>9.1.15</kontrakter.version>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import no.nav.foreldrepenger.fpformidling.typer.PersonIdent;
import no.nav.pdl.Doedsfall;
import no.nav.pdl.DoedsfallResponseProjection;
import no.nav.pdl.Foedsel;
import no.nav.pdl.FoedselResponseProjection;
import no.nav.pdl.Foedselsdato;
import no.nav.pdl.FoedselsdatoResponseProjection;
import no.nav.pdl.Folkeregisterpersonstatus;
import no.nav.pdl.FolkeregisterpersonstatusResponseProjection;
import no.nav.pdl.HentIdenterQueryRequest;
Expand Down Expand Up @@ -93,17 +93,17 @@ public Personinfo hentPersoninfo(FagsakYtelseType ytelseType, AktørId aktørId,
var query = new HentPersonQueryRequest();
query.setIdent(aktørId.getId());
var projection = new PersonResponseProjection().navn(new NavnResponseProjection().fornavn().mellomnavn().etternavn())
.foedsel(new FoedselResponseProjection().foedselsdato())
.foedselsdato(new FoedselsdatoResponseProjection().foedselsdato())
.doedsfall(new DoedsfallResponseProjection().doedsdato())
.kjoenn(new KjoennResponseProjection().kjoenn())
.folkeregisterpersonstatus(new FolkeregisterpersonstatusResponseProjection().forenkletStatus());

var ytelse = utledYtelse(ytelseType);
var person = pdlKlient.hentPerson(ytelse, query, projection);

var fødselsdato = person.getFoedsel()
var fødselsdato = person.getFoedselsdato()
.stream()
.map(Foedsel::getFoedselsdato)
.map(Foedselsdato::getFoedselsdato)
.filter(Objects::nonNull)
.findFirst()
.map(d -> LocalDate.parse(d, DateTimeFormatter.ISO_LOCAL_DATE))
Expand Down

0 comments on commit 7d8955b

Please sign in to comment.