HAALCENTRAAL English translation
BRP API / Personen / Features / kinderen-gba

consulting children

# language: en

@gba
Feature: consulting children
  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 gba 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   |

    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 gba 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 gba 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' with the following 'naam' data
      | naam          | waarde |
      | geslachtsnaam | .      |
	  
    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 gba 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 gba 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: the person has no child
      Given the person with citizen service number '000000061' has the following data
      | naam                            | waarde          |
      | voornamen (02.10)               | Daan            |
      When gba 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 gba 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

    Scenario: No child, but this is under investigation
      Given the person with citizen service number '000000061' has a 'kind' with the following data
      | naam                            | waarde           |
      | gemeente document (82.10)       | 0518             |
      | datum document (82.20)          | 20040105         |
      | aanduiding in onderzoek (83.10) | 090000           |
      | datum ingang onderzoek (83.20)  | 20230114         |
      | beschrijving document (82.30)   | D27894-2004-A782 |
      | ingangsdatum geldigheid (85.10) | 20031107         |
      | datum van opneming (86.10)      | 20040112         |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000061                       |
      | fields              | kinderen                        |
      Then the response has a person without 'kind' 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                           |
#      The e2e automation code does not yet support entering more than 1 PL record, so for now the following Given steps have been commented out.
#      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 gba 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: a stillborn child is not supplied.
    This is the case where Registratie betrekking (89.10) has a value.

    # A stillborn child may be supplied only where the consumer is authorized for it (authorization item 35.95.14).
    # At present the API has no field in which it can be indicated that a child was stillborn.
    # For the time being there are no consumers of the API who are authorized for a stillborn child.
    # Until there is a consumer with authorization for 35.95.14, that authorization has been built and an indication of stillbirth has been added, a stillborn child must not be supplied.
    # See #855.
    
    Scenario: the person has a stillborn child and a living child
      Given the person with citizen service number '000000073' has a 'kind' with the following data
      | voornamen (02.10) |
      | Bert              |
      And the person has another 'kind' with the following data
      | voornamen (02.10) | registratie betrekking (89.10) |
      | Ernie             | L                              |
      When gba persons are searched with the following parameters
      | naam                | waarde                          |
      | type                | RaadpleegMetBurgerservicenummer |
      | burgerservicenummer | 000000073                       |
      | fields              | kinderen.naam.voornamen         |
      Then the response has a person with a 'kind' with the following 'naam' data
      | naam      | waarde |
      | voornamen | Bert   |