File tree 6 files changed +7
-7
lines changed
test/kotlin/no/nav/syfo/pdl
6 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ data class PdlResponse(
6
6
)
7
7
8
8
data class HentPerson (
9
- val foedsel : List <Foedsel >? ,
9
+ val foedselsdato : List <Foedsel >? ,
10
10
)
11
11
12
12
data class Foedsel (
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import no.nav.syfo.pdl.client.model.IdentInformasjon
5
5
6
6
data class PdlPerson (
7
7
val identer : List <IdentInformasjon >,
8
- val foedsel : List <Foedsel >? ,
8
+ val foedselsdato : List <Foedsel >? ,
9
9
) {
10
10
val fnr: String? = identer.firstOrNull { it.gruppe == " FOLKEREGISTERIDENT" }?.ident
11
11
val aktorId: String? = identer.firstOrNull { it.gruppe == " AKTORID" }?.ident
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ class PdlPersonService(
40
40
41
41
return PdlPerson (
42
42
pdlResponse.data.hentIdenter.identer,
43
- foedsel = pdlResponse.data.hentPerson.foedsel
43
+ foedselsdato = pdlResponse.data.hentPerson.foedselsdato
44
44
)
45
45
}
46
46
}
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ class RuleService(
77
77
*/
78
78
79
79
val pdlPerson = pdlPersonService.getPdlPerson(legeerklaring.pasient.fnr, loggingMeta)
80
- val fodsel = pdlPerson.foedsel ?.firstOrNull()
80
+ val fodsel = pdlPerson.foedselsdato ?.firstOrNull()
81
81
val borndate =
82
82
if (fodsel?.foedselsdato?.isNotEmpty() == true ) {
83
83
log.info(" Extracting borndate from PDL date" )
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ query($ident: ID!){
7
7
}
8
8
}
9
9
hentPerson (ident : $ident ) {
10
- foedsel {
10
+ foedselsdato {
11
11
foedselsdato
12
12
}
13
13
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class PdlServiceTest {
47
47
48
48
val person = runBlocking { pdlService.getPdlPerson(" 01245678901" , loggingMeta) }
49
49
assertEquals(" 01245678901" , person.fnr)
50
- assertEquals(" 1900-01-01" , person.foedsel ?.firstOrNull()?.foedselsdato)
50
+ assertEquals(" 1900-01-01" , person.foedselsdato ?.firstOrNull()?.foedselsdato)
51
51
}
52
52
53
53
@Test
@@ -73,7 +73,7 @@ class PdlServiceTest {
73
73
PdlResponse (
74
74
hentPerson =
75
75
HentPerson (
76
- foedsel = emptyList(),
76
+ foedselsdato = emptyList(),
77
77
),
78
78
hentIdenter = Identliste (emptyList()),
79
79
),
You can’t perform that action at this time.
0 commit comments