Consulting the parents of a person
# language: en Feature: Consulting the parents of a person Parents can be supplied for a person. This contains data about the family-law relationship plus a few identifying properties of the parent. Rule: The parent in category 2 has ouderAanduiding "1" and the parent in category 3 has ouderAanduiding "2" Scenario: The person has two parents Given the person with citizen service number '000000152' has a parent '1' with the following data | voornamen (02.10) | | Lisette | And the person has a parent '2' with the following data | voornamen (02.10) | | Guîllaumé | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000152 | | fields | ouders.ouderAanduiding,ouders.naam.voornamen | Then the response has a person with a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 1 | | naam.voornamen | Lisette | And the person has a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 2 | | naam.voornamen | Guîllaumé | Rule: the current data of parents is supplied Scenario: parent data corrected Given the person with citizen service number '000000164' has a parent '1' with the following data | voornamen (02.10) | | Chantal | And the person has a parent '2' with the following data | voornamen (02.10) | | Christiaan | And the parent '2' has been corrected to the following data | voornamen (02.10) | | Mark | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000164 | | fields | ouders.ouderAanduiding,ouders.naam.voornamen | Then the response has a person with a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 1 | | naam.voornamen | Chantal | And the person has a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 2 | | naam.voornamen | Mark | Scenario: change of gender of the parent Given the person with citizen service number '000000176' has a parent '1' with the following data | voornamen (02.10) | geslachtsaanduiding (04.10) | | Noa | V | And the person has a parent '2' with the following data | voornamen (02.10) | geslachtsaanduiding (04.10) | | John | M | And the parent '2' has been changed to the following data | voornamen (02.10) | geslachtsaanduiding (04.10) | | Johanna | V | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000176 | | fields | ouders.ouderAanduiding,ouders.naam.voornamen,ouders.geslacht | Then the response has a person with a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 1 | | geslacht.code | V | | geslacht.omschrijving | vrouw | | naam.voornamen | Noa | And the person has a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 2 | | geslacht.code | V | | geslacht.omschrijving | vrouw | | naam.voornamen | Johanna | Scenario: adoption Given the person with citizen service number '000000188' has a parent '1' with the following data | voornamen (02.10) | datum ingang familierechtelijke betrekking (62.10) | | Me'Lisa | 20170106 | And the parent '1' has been corrected to the following data | voornamen (02.10) | datum ingang familierechtelijke betrekking (62.10) | | Olivia Ghislaine | 20190317 | And the person has a parent '2' with the following data | datum ingang familierechtelijke betrekking (62.10) | | 00000000 | And the parent '2' has been corrected to the following data | voornamen (02.10) | datum ingang familierechtelijke betrekking (62.10) | | Kevin | 20190317 | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000188 | | fields | ouders.ouderAanduiding,ouders.naam.voornamen,ouders.datumIngangFamilierechtelijkeBetrekking | Then the response has a person with a 'ouder' with the following data | naam | waarde | | naam.voornamen | Olivia Ghislaine | | ouderAanduiding | 1 | | datumIngangFamilierechtelijkeBetrekking.type | Datum | | datumIngangFamilierechtelijkeBetrekking.datum | 2019-03-17 | | datumIngangFamilierechtelijkeBetrekking.langFormaat | 17 maart 2019 | And the person has a 'ouder' with the following data | naam | waarde | | naam.voornamen | Kevin | | ouderAanduiding | 2 | | datumIngangFamilierechtelijkeBetrekking.type | Datum | | datumIngangFamilierechtelijkeBetrekking.datum | 2019-03-17 | | datumIngangFamilierechtelijkeBetrekking.langFormaat | 17 maart 2019 | Scenario: denial followed by acknowledgement Given the person with citizen service number '000000206' has a parent '1' with the following data | voornamen (02.10) | | Chantal | And the person has a parent '2' with the following data | voornamen (02.10) | | Mark | And the parent '2' has been corrected to the following data | voornamen (02.10) | | | And the parent '2' has been corrected to the following data | voornamen (02.10) | | Wieger | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000206 | | fields | ouders.ouderAanduiding,ouders.naam.voornamen | Then the response has a person with a 'ouder' with the following data | naam | waarde | | naam.voornamen | Chantal | | ouderAanduiding | 1 | And the person has a 'ouder' with the following data | naam | waarde | | naam.voornamen | Wieger | | ouderAanduiding | 2 | Rule: the parent data supplied is the data as recorded on the personal record of the person requested # When consulting a person, only data from the personal record of the person requested is used, never data from the personal record of the parent Scenario: The parent has undergone a change of gender, but the person requested does not recognize this Given the person with citizen service number '000000218' has a parent '1' with the following data | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) | | 000007896 | Ellen | V | And the person has a parent '2' with the following data | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) | | 000007897 | Karel | M | And the parent '2' has been corrected to the following data | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) | | 000007897 | Charlotte | V | And the parent '2' has been corrected to the following data | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) | | 000007897 | Karel | M | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000218 | | fields | ouders.ouderAanduiding,ouders.burgerservicenummer,ouders.geslacht,ouders.naam.voornamen | Then the response has a person with a 'ouder' with the following data | naam | waarde | | burgerservicenummer | 000007896 | | geslacht.code | V | | geslacht.omschrijving | vrouw | | naam.voornamen | Ellen | | ouderAanduiding | 1 | And the person has a 'ouder' with the following data | naam | waarde | | burgerservicenummer | 000007897 | | geslacht.code | M | | geslacht.omschrijving | man | | naam.voornamen | Karel | | ouderAanduiding | 2 | Rule: Where data has been recorded only in group 81, 82, 83, 84, 85 and/or 86 and no data in group 1, 2, 3, 4 or 62, the parent is not included Use of the fields parameter has no effect on the supply of a parent Scenario: foundling (an unknown parent with ouderaanduiding "1" and no parent with ouderaanduiding "2") Given the person with citizen service number '000000231' has a parent '1' with the following data | datum ingang familierechtelijke betrekking (62.10) | geslachtsnaam (02.40) | geslachtsaanduiding (04.10) | | 20190614 | . | V | And the person has a parent '2' with the following data | aktenummer (81.20) | datum ingang geldigheid (85.10) | | DOC1234 | 20160518 | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000231 | | fields | ouders | Then the response has a person with a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 1 | | geslacht.code | V | | geslacht.omschrijving | vrouw | | datumIngangFamilierechtelijkeBetrekking.type | Datum | | datumIngangFamilierechtelijkeBetrekking.datum | 2019-06-14 | | datumIngangFamilierechtelijkeBetrekking.langFormaat | 14 juni 2019 | And the 'ouder' has no 'naam' data Scenario: an entirely unknown parent Given the person with citizen service number '000000243' has a parent '1' with the following data | geslachtsnaam (02.40) | datum ingang familierechtelijke betrekking (62.10) | | . | 00000000 | And the person has a parent '2' with the following data | aktenummer (81.20) | datum ingang geldigheid (85.10) | | DOC1234 | 20160518 | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000243 | | fields | ouders | Then the response has a person with a 'ouder' with the following data | naam | waarde | | ouderAanduiding | 1 | | datumIngangFamilierechtelijkeBetrekking.type | DatumOnbekend | | datumIngangFamilierechtelijkeBetrekking.onbekend | true | | datumIngangFamilierechtelijkeBetrekking.langFormaat | onbekend | And the 'ouder' has no 'naam' data Scenario: a parent with data only in groups 81 and 85 Given the person with citizen service number '000000255' has a parent '1' with the following data | geslachtsnaam (02.40) | geslachtsaanduiding (04.10) | datum ingang familierechtelijke betrekking (62.10) | | Jansen | V | 20190614 | And the person has a parent '2' with the following data | aktenummer (81.20) | datum ingang geldigheid (85.10) | | DOC1234 | 20160518 | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000255 | | fields | ouders | Then the response has a person with a 'ouder' with the following data | naam | waarde | | naam.geslachtsnaam | Jansen | | ouderAanduiding | 1 | | geslacht.code | V | | geslacht.omschrijving | vrouw | | datumIngangFamilierechtelijkeBetrekking.type | Datum | | datumIngangFamilierechtelijkeBetrekking.datum | 2019-06-14 | | datumIngangFamilierechtelijkeBetrekking.langFormaat | 14 juni 2019 | Rule: Where data has been registered for the parent but none of the data requested with fields has a value, a 'ouders' without data is supplied Scenario: using fields to request data without a value Given the person with citizen service number '000000292' has a parent '1' with the following data | geslachtsnaam (02.40) | geslachtsaanduiding (04.10) | datum ingang familierechtelijke betrekking (62.10) | | Ibin binti Yalniz | V | 20190614 | When persons are searched with the following parameters | naam | waarde | | type | RaadpleegMetBurgerservicenummer | | burgerservicenummer | 000000292 | | fields | ouders.naam.voornamen,ouders.geboorte.datum | Then the response has a person with a 'ouder' with an empty 'naam' object