HAALCENTRAAL English translation
BRP API / Personen / Features / kinderen

Consulting the children of a person

# language: en

Feature: Consulting the children of a person
  The children of a person are supplied, if requested with the fields parameter.
  This contains a few identifying properties of the children.

  Rule: the current data of children is supplied

    Scenario: the name of a child has been corrected
      Given the person with citizen service number '000000012' has a 'kind' with the following data
      | voornamen (02.10) | voorvoegsel (02.30) | geslachtsnaam (02.40) |
      | William           | de                  | Boer                  |
      And the 'kind' has been corrected to the following data
      | voornamen (02.10) | voorvoegsel (02.30) | geslachtsnaam (02.40) |
      | William           | de                  | Vries                 |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000012                       |
      | fields              | kinderen.naam                   |
      Then the response has a person with a 'kind' with the following data
      | naam               | waarde  |
      | naam.voornamen     | William |
      | naam.voorvoegsel   | de      |
      | naam.geslachtsnaam | Vries   |
      | naam.voorletters   | W.      |

    Scenario: change of name of the child
      Given the person with citizen service number '000000024' has a 'kind' with the following data
      | voornamen (02.10) |
      | Celeke Lodivica   |
      And the 'kind' has been changed to the following data
      | voornamen (02.10) |
      | Vica              |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000024                       |
      | fields              | kinderen.naam.voornamen         |
      Then the response has a person with a 'kind' with the following data
      | naam           | waarde |
      | naam.voornamen | Vica   |

  Rule: A child is returned only where at least one item of data in the identification numbers (group 01), naam (group 02) or geboorte (group 03) of the child has a value.
    - Where in a category kind data has been recorded only in group 81 or 82, 85 and 86, this child is not included in the answer
    - Where an item of data has a default value (meaning that the value is unknown), such as "." (period) for surname or "00000000" for date of birth, that counts here as the existence of a value and the child is supplied.
    - Where, as a result of the fields parameter used in the request, the child in the response has no item of data with a value, the child is supplied without data (that is, as an empty object)

    Scenario: the existence of the child is known, a field with an unknown value is requested with fields
      Given the person with citizen service number '000000036' has a 'kind' with the following data
      | geslachtsnaam (02.40) | geboortedatum (03.10) | 
      | .                     | 00000000              |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000036                       |
      | fields              | kinderen.naam                   |
      Then the response has a person with a 'kind' without 'naam' data

    Scenario: the existence of the child is known, a field with an unknown value is not requested with fields
      Given the person with citizen service number '000000048' has a 'kind' with the following data
      | geslachtsnaam (02.40) | geboortedatum (03.10) | 
      | .                     | 00000000              |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000048                       |
      | fields              | kinderen.burgerservicenummer    |
      Then the response has a person with a 'kind' without data

    Scenario: denial of parenthood, revocation of adoption and annulment of an acknowledgement
      Given the person with citizen service number '000000061' has a 'kind' with the following data
      | naam                            | waarde          |
      | voornamen (02.10)               | Daan            |
      | voorvoegsel (02.30)             | de              |
      | geslachtsnaam (02.40)           | Vries           |
      | geboortedatum (03.10)           | 20031107        | 
      | gemeente document (82.10)       | 0518            | 
      | datum document (82.20)          | 20031109        | 
      | beschrijving document (82.30)   | PL gerelateerde | 
      | ingangsdatum geldigheid (85.10) | 20031107        | 
      | datum van opneming (86.10)      | 20031109        |
      And the 'kind' has been corrected to the following data
      | naam                            | waarde           |
      | gemeente document (82.10)       | 0518             |
      | datum document (82.20)          | 20040105         | 
      | beschrijving document (82.30)   | D27894-2004-A782 | 
      | ingangsdatum geldigheid (85.10) | 20031107         | 
      | datum van opneming (86.10)      | 20040112         |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000061                       |
      | fields              | kinderen                        |
      Then the response has a person without 'kind' data

    Scenario: using fields to request an item of data without a value
      Given the person with citizen service number '000000073' has a 'kind' with the following data
      | voornamen (02.10) | geslachtsnaam (02.40) |
      | Bert              | Jansen                |
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000073                       |
      | fields              | kinderen.burgerservicenummer    |
      Then the response has a person with a 'kind' without data

  Rule: the child 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 child

    Scenario: The child has undergone a change of gender and a change of name, but the person requested does not recognize this
      Given the person with citizen service number '000000085' has a 'kind' with the following data
      | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) |
      | 000000097                   | Karel             | M                           |
      And the 'kind' has been changed to the following data
      | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) |
      | 000000097                   | Charlotte         | V                           |
      And the 'kind' has been changed to the following data
      | burgerservicenummer (01.20) | voornamen (02.10) | geslachtsaanduiding (04.10) |
      | 000000097                   | Karel             | M                           |
      And the person with citizen service number '000000097' has the following data
      | voornamen (02.10) | geslachtsaanduiding (04.10) |
      | Karel             | M                           |
      And the person has been changed to the following data
      | voornamen (02.10) | geslachtsaanduiding (04.10) |
      | Charlotte         | V                           |
      When persons are searched with the following parameters
      | naam                | waarde                                               |
      | type                | RaadpleegMetBurgerservicenummer                      |
      | burgerservicenummer | 000000085                                            |
      | fields              | kinderen.burgerservicenummer,kinderen.naam.voornamen |
      Then the response has a person with a 'kind' with the following data
      | naam                | waarde    |
      | burgerservicenummer | 000000097 |
      | naam.voornamen      | Karel     |

  Rule: Where a child has only "onbekend" values, a 'kind' without data is supplied.
    - Where none of the child data requested with fields has a value, but other data of the child does, a 'kind' without data is also supplied.

    Scenario: The child is entirely unknown
      Given the person with citizen service number '000000176' has a 'kind' with the following data
      | geslachtsnaam (02.40) | geboortedatum (03.10) | geboorteplaats (03.20) | geboorteland (03.30) |
      | .                     | 00000000              | 0000                   | 0000                 |
      When persons are searched with the following parameters
      | naam                | waarde                                 |
      | type                | RaadpleegMetBurgerservicenummer        |
      | burgerservicenummer | 000000176                              |
      | fields              | kinderen.naam,kinderen.geboorte.plaats |
      Then the response has a person with a 'kind' without 'naam' data
      And the 'kind' has no 'geboorte' data

    Scenario: Only fields without a value have been requested with fields
      Given the person with citizen service number '000000176' has a 'kind' with the following data
      | geslachtsnaam (02.40) | geboortedatum (03.10) | 
      | Ali bin Mohammed      | 19750730              | 
      When persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000176                       |
      | fields              | kinderen.naam.voornamen         |
      Then the response has a person with a 'kind' without 'naam' data