From b3197e4272cb65fe8b89051903f4f2f5a3cde59e Mon Sep 17 00:00:00 2001 From: kristenhaerum Date: Mon, 2 Sep 2024 09:45:55 +0200 Subject: [PATCH] Rydde opplysningstype foedsel #deploy-person-search-service Renamed `FoedselDTO` and related classes to `FoedselsdatoDTO` for better clarity. Updated corresponding references in various parts of the codebase to reflect this change. --- .../personsearchservice/domain/Person.java | 9 +++---- ...edselModel.java => FoedselsdatoModel.java} | 2 +- .../model/HentPersonModel.java | 2 +- .../service/utils/AlderUtils.java | 10 +++---- .../consumer/v1/PdlApiConsumer.java | 4 +-- .../consumer/v1/PdlTestdataConsumer.java | 2 +- ...d.java => OpprettFoedselsdatoCommand.java} | 10 +++---- .../{FoedselDTO.java => FoedselsdatoDTO.java} | 2 +- .../{Foedsel.java => Foedselsdato.java} | 2 +- .../consumer/v1/pdl/graphql/HentPerson.java | 27 +++++++------------ .../consumer/v1/pdl/graphql/Kjoenn.java | 14 ++++++++++ .../apps/personservice/domain/Person.java | 12 ++++----- .../main/resources/pdl/pdl-api-schema.graphql | 6 +++++ .../resources/pdl/pdlPerson2Query.graphql | 13 --------- .../main/resources/pdl/pdlPersonQuery.graphql | 2 +- .../src/main/resources/pdl/pdlQuery.graphql | 3 ++- .../main/resources/pdl/pdlbolkquery.graphql | 13 --------- .../{FoedselDTO.java => FoedselsdatoDTO.java} | 2 +- .../dto/personsearchservice/v1/PersonDTO.java | 2 +- ...selSearch.java => FoedselsdatoSearch.java} | 2 +- .../v1/search/PersonSearch.java | 4 +-- 21 files changed, 65 insertions(+), 78 deletions(-) rename apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/{FoedselModel.java => FoedselsdatoModel.java} (83%) rename apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/{OpprettFoedselCommand.java => OpprettFoedselsdatoCommand.java} (86%) rename apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/{FoedselDTO.java => FoedselsdatoDTO.java} (92%) rename apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/{Foedsel.java => Foedselsdato.java} (87%) create mode 100644 apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Kjoenn.java rename libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/{FoedselDTO.java => FoedselsdatoDTO.java} (90%) rename libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/{FoedselSearch.java => FoedselsdatoSearch.java} (89%) diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/domain/Person.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/domain/Person.java index 8e8ed82547d..900cd610ba0 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/domain/Person.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/domain/Person.java @@ -1,15 +1,14 @@ package no.nav.registre.testnorge.personsearchservice.domain; import no.nav.registre.testnorge.personsearchservice.model.DoedsfallModel; -import no.nav.registre.testnorge.personsearchservice.model.FoedselModel; +import no.nav.registre.testnorge.personsearchservice.model.FoedselsdatoModel; import no.nav.registre.testnorge.personsearchservice.model.KjoennModel; import no.nav.registre.testnorge.personsearchservice.model.NavnModel; import no.nav.registre.testnorge.personsearchservice.model.Response; -import no.nav.registre.testnorge.personsearchservice.model.SivilstandModel; import no.nav.registre.testnorge.personsearchservice.model.StatsborgerskapModel; import no.nav.registre.testnorge.personsearchservice.model.WithMetadata; import no.nav.testnav.libs.dto.personsearchservice.v1.DoedsfallDTO; -import no.nav.testnav.libs.dto.personsearchservice.v1.FoedselDTO; +import no.nav.testnav.libs.dto.personsearchservice.v1.FoedselsdatoDTO; import no.nav.testnav.libs.dto.personsearchservice.v1.FolkeregisterpersonstatusDTO; import no.nav.testnav.libs.dto.personsearchservice.v1.PersonDTO; import no.nav.testnav.libs.dto.personsearchservice.v1.SivilstandDTO; @@ -73,7 +72,7 @@ private String getEtternavn() { } private LocalDate getFoedselsdato() { - return getCurrent(response.getHentPerson().getFoedsel()).map(FoedselModel::getFoedselsdato).orElse(null); + return getCurrent(response.getHentPerson().getFoedselsdato()).map(FoedselsdatoModel::getFoedselsdato).orElse(null); } private LocalDate getDoedsdato() { @@ -147,7 +146,7 @@ public PersonDTO toDTO() { .ident(getIdent()) .kjoenn(getKjoenn()) .tags(getTags()) - .foedsel(FoedselDTO.builder().foedselsdato(getFoedselsdato()).build()) + .foedselsdato(FoedselsdatoDTO.builder().foedselsdato(getFoedselsdato()).build()) .doedsfall(DoedsfallDTO.builder().doedsdato(getDoedsdato()).build()) .sivilstand(getSivilstand()) .statsborgerskap(toDTO(statsborgerskap)) diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/FoedselModel.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/FoedselsdatoModel.java similarity index 83% rename from apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/FoedselModel.java rename to apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/FoedselsdatoModel.java index 918a317697a..0f0fbadf94c 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/FoedselModel.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/FoedselsdatoModel.java @@ -9,7 +9,7 @@ @Value @AllArgsConstructor @NoArgsConstructor(force = true) -public class FoedselModel implements WithMetadata { +public class FoedselsdatoModel implements WithMetadata { LocalDate foedselsdato; Metadata metadata; } diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/HentPersonModel.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/HentPersonModel.java index 310ec6f751d..bdef5331943 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/HentPersonModel.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/model/HentPersonModel.java @@ -12,7 +12,7 @@ public class HentPersonModel { List navn; List kjoenn; - List foedsel; + List foedselsdato; List doedsfall; List sivilstand; List statsborgerskap; diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/AlderUtils.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/AlderUtils.java index e7c61b07ee1..852521cd90c 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/AlderUtils.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/AlderUtils.java @@ -18,11 +18,11 @@ public class AlderUtils { public static void addAlderQueries(BoolQueryBuilder queryBuilder, PersonSearch search) { addAlderQuery(queryBuilder, search); - addFoedselQuery(queryBuilder, search); + addFoedselsdatoQuery(queryBuilder, search); } - private static void addFoedselQuery(BoolQueryBuilder queryBuilder, PersonSearch search) { - Optional.ofNullable(search.getFoedsel()) + private static void addFoedselsdatoQuery(BoolQueryBuilder queryBuilder, PersonSearch search) { + Optional.ofNullable(search.getFoedselsdato()) .ifPresent(value -> { var tom = isNull(value.getTom()) ? LocalDate.now() : value.getTom(); queryFoedselsdato(value.getFom(), tom, queryBuilder); @@ -35,9 +35,9 @@ private static void addAlderQuery(BoolQueryBuilder queryBuilder, PersonSearch se } private static void queryFoedselsdato(LocalDate fom, LocalDate tom, BoolQueryBuilder queryBuilder) { - getBetween(fom, tom, "hentPerson.foedsel.foedselsdato") + getBetween(fom, tom, "hentPerson.foedselsdato.foedselsdato") .ifPresent(rangeQueryBuilder -> queryBuilder.must(QueryBuilders.nestedQuery( - "hentPerson.foedsel", + "hentPerson.foedselsdato", rangeQueryBuilder, ScoreMode.Avg )) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlApiConsumer.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlApiConsumer.java index 65143c79100..013ee54ef6b 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlApiConsumer.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlApiConsumer.java @@ -104,7 +104,7 @@ private boolean isPresent(String ident, PdlAktoer pdlAktoer, String miljoe, Set< var person = pdlAktoer.getData().getHentPerson(); log.info("Sjekker ident {} i miljø {}, med PDL opplysningId {}, sjekkes for mottatt opplysningId {}", ident, miljoe, nonNull(person) ? - Stream.of(person.getNavn(), person.getFoedsel(), person.getFolkeregisteridentifikator(), person.getFolkeregisterpersonstatus(), person.getBostedsadresse()) + Stream.of(person.getNavn(), person.getFoedselsdato(), person.getKjoenn(), person.getFolkeregisterpersonstatus()) .flatMap(Collection::stream) .map(MetadataDTO::getMetadata) .map(MetadataDTO.Metadata::getOpplysningsId) @@ -117,7 +117,7 @@ private boolean isPresent(String ident, PdlAktoer pdlAktoer, String miljoe, Set< if (nonNull(opplysningId)) { resultat = nonNull(person) && - Stream.of(person.getNavn(), person.getFoedsel(), person.getFolkeregisteridentifikator(), person.getFolkeregisterpersonstatus(), person.getBostedsadresse()) + Stream.of(person.getNavn(), person.getFoedselsdato(), person.getKjoenn(), person.getFolkeregisterpersonstatus()) .flatMap(Collection::stream) .map(MetadataDTO::getMetadata) .map(MetadataDTO.Metadata::getOpplysningsId) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlTestdataConsumer.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlTestdataConsumer.java index ed8dfdbb406..b8be9ed41ad 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlTestdataConsumer.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/PdlTestdataConsumer.java @@ -67,7 +67,7 @@ private void opprettAdresse(Person person, String kilde, AccessToken token) { private void opprettFoedsel(Person person, String kilde, AccessToken token) { person.toFoedselDTO(kilde) - .ifPresent(value -> new OpprettFoedselCommand(webClient, value, token.getTokenValue(), person.getIdent()).call()); + .ifPresent(value -> new OpprettFoedselsdatoCommand(webClient, value, token.getTokenValue(), person.getIdent()).call()); } private void opprettTags(Person person, AccessToken token) { diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/OpprettFoedselCommand.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/OpprettFoedselsdatoCommand.java similarity index 86% rename from apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/OpprettFoedselCommand.java rename to apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/OpprettFoedselsdatoCommand.java index da9ac841055..33aac5f9ed9 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/OpprettFoedselCommand.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/command/OpprettFoedselsdatoCommand.java @@ -1,7 +1,7 @@ package no.nav.testnav.apps.personservice.consumer.v1.command; import lombok.RequiredArgsConstructor; -import no.nav.testnav.apps.personservice.consumer.v1.pdl.FoedselDTO; +import no.nav.testnav.apps.personservice.consumer.v1.pdl.FoedselsdatoDTO; import no.nav.testnav.apps.personservice.consumer.v1.pdl.HendelseDTO; import no.nav.testnav.apps.personservice.consumer.v1.header.PdlHeaders; import no.nav.testnav.libs.commands.utils.WebClientFilter; @@ -16,20 +16,20 @@ import java.util.concurrent.Callable; @RequiredArgsConstructor -public class OpprettFoedselCommand implements Callable> { +public class OpprettFoedselsdatoCommand implements Callable> { private final WebClient webClient; - private final FoedselDTO dto; + private final FoedselsdatoDTO dto; private final String token; private final String ident; @Override public Mono call() { return webClient.post() - .uri("/pdl-testdata/api/v1/bestilling/foedsel") + .uri("/pdl-testdata/api/v1/bestilling/foedselsdato") .accept(MediaType.APPLICATION_JSON) .header(PdlHeaders.NAV_PERSONIDENT, ident) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .body(BodyInserters.fromPublisher(Mono.just(dto), FoedselDTO.class)) + .body(BodyInserters.fromPublisher(Mono.just(dto), FoedselsdatoDTO.class)) .retrieve() .bodyToMono(HendelseDTO.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/FoedselDTO.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/FoedselsdatoDTO.java similarity index 92% rename from apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/FoedselDTO.java rename to apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/FoedselsdatoDTO.java index 881476cc785..239a953a230 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/FoedselDTO.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/FoedselsdatoDTO.java @@ -11,7 +11,7 @@ @Builder @AllArgsConstructor @NoArgsConstructor(force = true) -public class FoedselDTO { +public class FoedselsdatoDTO { Integer foedselsaar; LocalDate foedselsdato; String kilde; diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedselsdato.java similarity index 87% rename from apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java rename to apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedselsdato.java index df16825967a..04c0fe923ac 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedsel.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Foedselsdato.java @@ -11,7 +11,7 @@ @Value @AllArgsConstructor @NoArgsConstructor(force = true) -public class Foedsel extends MetadataDTO { +public class Foedselsdato extends MetadataDTO { LocalDate foedselsdato; } diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/HentPerson.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/HentPerson.java index 35844269932..357530c2afc 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/HentPerson.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/HentPerson.java @@ -14,7 +14,8 @@ @NoArgsConstructor(force = true) public class HentPerson { List navn; - List foedsel; + List kjoenn; + List foedselsdato; List bostedsadresse; List folkeregisteridentifikator; List folkeregisterpersonstatus; @@ -27,20 +28,20 @@ public List getNavn() { return navn; } - public List getFoedsel() { + public List getFoedselsdato() { - if (isNull(foedsel)) { - foedsel = new ArrayList<>(); + if (isNull(foedselsdato)) { + foedselsdato = new ArrayList<>(); } - return foedsel; + return foedselsdato; } - public List getBostedsadresse() { + public List getKjoenn() { - if (isNull(bostedsadresse)) { - bostedsadresse = new ArrayList<>(); + if (isNull(kjoenn)) { + kjoenn = new ArrayList<>(); } - return bostedsadresse; + return kjoenn; } public List getFolkeregisteridentifikator() { @@ -50,12 +51,4 @@ public List getFolkeregisteridentifikator() { } return folkeregisteridentifikator; } - - public List getFolkeregisterpersonstatus() { - - if (isNull(folkeregisterpersonstatus)) { - folkeregisterpersonstatus = new ArrayList<>(); - } - return folkeregisterpersonstatus; - } } diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Kjoenn.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Kjoenn.java new file mode 100644 index 00000000000..50c46eb5ea3 --- /dev/null +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v1/pdl/graphql/Kjoenn.java @@ -0,0 +1,14 @@ +package no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql; + +import lombok.AllArgsConstructor; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import lombok.Value; + +@EqualsAndHashCode(callSuper = true) +@Value +@AllArgsConstructor +@NoArgsConstructor(force = true) +public class Kjoenn extends MetadataDTO { + String kjoenn; +} diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/domain/Person.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/domain/Person.java index 493b1ae261d..95424b4b649 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/domain/Person.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/domain/Person.java @@ -5,8 +5,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import no.nav.testnav.apps.personservice.consumer.v1.pdl.FoedselDTO; -import no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql.Foedsel; +import no.nav.testnav.apps.personservice.consumer.v1.pdl.FoedselsdatoDTO; +import no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql.Foedselsdato; import no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql.Folkeregisteridentifikator; import no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql.HentPerson; import no.nav.testnav.apps.personservice.consumer.v1.pdl.graphql.Navn; @@ -45,14 +45,14 @@ public Person(PersonDTO dto) { public Person(PdlPerson pdlPerson) { HentPerson person = pdlPerson.getData().getHentPerson(); Optional navn = person.getNavn().stream().findFirst(); - Optional foedsel = person.getFoedsel().stream().findFirst(); + Optional foedsel = person.getFoedselsdato().stream().findFirst(); ident = person.getFolkeregisteridentifikator() .stream() .findFirst() .map(Folkeregisteridentifikator::getIdentifikasjonsnummer) .orElse(null); - foedselsdato = foedsel.map(Foedsel::getFoedselsdato).orElse(null); + foedselsdato = foedsel.map(Foedselsdato::getFoedselsdato).orElse(null); fornavn = navn.map(Navn::getFornavn).orElse(null); mellomnavn = navn.map(Navn::getMellomnavn).orElse(null); etternavn = navn.map(Navn::getEtternavn).orElse(null); @@ -75,13 +75,13 @@ public PersonDTO toDTO() { .build(); } - public Optional toFoedselDTO(String kilde) { + public Optional toFoedselDTO(String kilde) { if (foedselsdato == null) { return Optional.empty(); } return Optional.of( - FoedselDTO + FoedselsdatoDTO .builder() .foedselsaar(foedselsdato.getYear()) .foedselsdato(foedselsdato) diff --git a/apps/person-service/src/main/resources/pdl/pdl-api-schema.graphql b/apps/person-service/src/main/resources/pdl/pdl-api-schema.graphql index d0209854938..cc4a8c90344 100644 --- a/apps/person-service/src/main/resources/pdl/pdl-api-schema.graphql +++ b/apps/person-service/src/main/resources/pdl/pdl-api-schema.graphql @@ -432,6 +432,11 @@ type Navn { originaltNavn: OriginaltNavn } +type Navspersonidentifikator { + identifikasjonsnummer: String! + metadata: Metadata! +} + type Opphold { folkeregistermetadata: Folkeregistermetadata! metadata: Metadata! @@ -479,6 +484,7 @@ type Person { kontaktadresse(historikk: Boolean = false): [Kontaktadresse!]! kontaktinformasjonForDoedsbo(historikk: Boolean = false): [KontaktinformasjonForDoedsbo!]! navn(historikk: Boolean = false): [Navn!]! + navspersonidentifikator(historikk: Boolean = false): [Navspersonidentifikator!]! opphold(historikk: Boolean = false): [Opphold!]! oppholdsadresse(historikk: Boolean = false): [Oppholdsadresse!]! rettsligHandleevne(historikk: Boolean = false): [RettsligHandleevne!]! diff --git a/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql b/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql index d0e5586ec6b..0d82bbdf215 100644 --- a/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql +++ b/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql @@ -346,19 +346,6 @@ query($ident: ID!, $historikk: Boolean!) { ...metadataDetails } }, - foedsel { - foedselsaar, - foedselsdato, - foedeland, - foedested, - foedekommune, - folkeregistermetadata { - ...folkeregistermetadataDetails - } - metadata { - ...metadataDetails - } - }, foedested { foedested, foedekommune, diff --git a/apps/person-service/src/main/resources/pdl/pdlPersonQuery.graphql b/apps/person-service/src/main/resources/pdl/pdlPersonQuery.graphql index cac59339c69..4b4068538ff 100644 --- a/apps/person-service/src/main/resources/pdl/pdlPersonQuery.graphql +++ b/apps/person-service/src/main/resources/pdl/pdlPersonQuery.graphql @@ -6,7 +6,7 @@ query($ident1: ID!) { opplysningsId } } - foedsel { + foedselsdato { metadata { opplysningsId } diff --git a/apps/person-service/src/main/resources/pdl/pdlQuery.graphql b/apps/person-service/src/main/resources/pdl/pdlQuery.graphql index 0d940372b26..e3eb68b9eb5 100644 --- a/apps/person-service/src/main/resources/pdl/pdlQuery.graphql +++ b/apps/person-service/src/main/resources/pdl/pdlQuery.graphql @@ -17,8 +17,9 @@ query ($ident: ID!, $historikk: Boolean) { ...vegadresseDetails } }, - foedsel { + foedselsdato{ foedselsdato + foedselsaar }, folkeregisteridentifikator(historikk: $historikk) { identifikasjonsnummer, diff --git a/apps/person-service/src/main/resources/pdl/pdlbolkquery.graphql b/apps/person-service/src/main/resources/pdl/pdlbolkquery.graphql index 054a824a9ed..e3036e802ad 100644 --- a/apps/person-service/src/main/resources/pdl/pdlbolkquery.graphql +++ b/apps/person-service/src/main/resources/pdl/pdlbolkquery.graphql @@ -353,19 +353,6 @@ query($identer: [ID!]!) { ...metadataDetails } }, - foedsel { - foedselsaar, - foedselsdato, - foedeland, - foedested, - foedekommune, - folkeregistermetadata { - ...folkeregistermetadataDetails - } - metadata { - ...metadataDetails - } - }, foedselsdato { foedselsaar, foedselsdato, diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/FoedselDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/FoedselsdatoDTO.java similarity index 90% rename from libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/FoedselDTO.java rename to libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/FoedselsdatoDTO.java index 69cd54b5fe8..dec5d6a402d 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/FoedselDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/FoedselsdatoDTO.java @@ -11,6 +11,6 @@ @Builder @AllArgsConstructor @NoArgsConstructor(force = true) -public class FoedselDTO { +public class FoedselsdatoDTO { LocalDate foedselsdato; } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/PersonDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/PersonDTO.java index 28dff78cf7a..a9cd503d978 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/PersonDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/PersonDTO.java @@ -19,7 +19,7 @@ public class PersonDTO { String ident; String aktorId; List tags; - FoedselDTO foedsel; + FoedselsdatoDTO foedselsdato; DoedsfallDTO doedsfall; SivilstandDTO sivilstand; StatsborgerskapDTO statsborgerskap; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/FoedselSearch.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/FoedselsdatoSearch.java similarity index 89% rename from libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/FoedselSearch.java rename to libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/FoedselsdatoSearch.java index e6af7d7c3af..da132b0cf25 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/FoedselSearch.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/FoedselsdatoSearch.java @@ -9,7 +9,7 @@ @Value @AllArgsConstructor @NoArgsConstructor(force = true) -public class FoedselSearch { +public class FoedselsdatoSearch { LocalDate fom; LocalDate tom; } diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/PersonSearch.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/PersonSearch.java index 835775d9910..29112ee7574 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/PersonSearch.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/personsearchservice/v1/search/PersonSearch.java @@ -2,8 +2,8 @@ import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.NoArgsConstructor; import lombok.Data; +import lombok.NoArgsConstructor; import java.util.List; @@ -22,7 +22,7 @@ public class PersonSearch { String randomSeed; Boolean kunLevende; List identer; - FoedselSearch foedsel; + FoedselsdatoSearch foedselsdato; SivilstandSearch sivilstand; NasjonalitetSearch nasjonalitet; AlderSearch alder;