HAALCENTRAAL English translation
BRP API / Personen / Features / summary

Determining the aanhef

# language: en

Feature: Determining the aanhef
  As a consumer of the BRP API I want to be able to request the aanhef (the introductory sentence of a letter or email) for a person
  So that I can address the person correctly and consistently
  
  # In the tables below the abbreviations mean:
  # GA = "Geachte mevrouw", "Geachte heer", "Geachte" followed by the initials
  # VL = initials
  # VV = voorvoegselGeslachtsnaam (surname prefix)
  # GN = surname
  # VP = voorvoegselGeslachtsnaam of the partner
  # GP = surname of the partner

Rule: The aanhef of a person without a partner is composed by combining geslacht, the voorletters, voorvoegsels and geslachtsnaam.
  - GA: The aanhef is preceded by "Geachte" followed by "mevrouw", "heer" or the initials, depending on the gender:
    | geslacht | aanhef begint met (GA) |
    | M        | Geachte heer           |
    | V        | Geachte mevrouw        |
    | O        | Geachte VL             |
  - VV: Surname prefix of the person, beginning with a capital letter, except where initials precede it (gender O)
  - GN: the surname of the person
  - Where a name component has no value or an empty value, the superfluous space is not included: no leading space, no trailing space, no double space, no space after a hyphen

  Scenario Outline: Aanhef for a person with a voorletter, voorvoegsel and geslachtsnaam with geslacht <voorbeeld>
    Given the person with citizen service number '000000140' has the following data
    | naam                           | waarde      |
    | geslachtsaanduiding (04.10)    | <geslacht>  |
    | voornamen (02.10)              | Robin Melle |
    | voorvoegsel (02.30)            | van         | 
    | geslachtsnaam (02.40)          | Puffelen    |
    | aanduiding naamgebruik (61.10) | E           |
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000140                       |
    | fields              | adressering.aanhef              |
    Then the response has a person with the following 'adressering' data
    | naam   | waarde   |
    | aanhef | <aanhef> |

    Examples:
    | voorbeeld | geslacht | aanhef                       |
    | man       | M        | Geachte heer Van Puffelen    |
    | vrouw     | V        | Geachte mevrouw Van Puffelen |
    | onbekend  | O        | Geachte R.M. van Puffelen    |

  Scenario Outline: Aanhef for a person with voorletters and geslachtsnaam with geslacht <voorbeeld>
    Given the person with citizen service number '000000139' has the following data
    | naam                           | waarde     |
    | geslachtsaanduiding (04.10)    | <geslacht> |
    | voornamen (02.10)              | Jo Rene    |
    | geslachtsnaam (02.40)          | Groenen    |
    | aanduiding naamgebruik (61.10) | E          |
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000139                       |
    | fields              | adressering.aanhef              |
    Then the response has a person with the following 'adressering' data
    | naam   | waarde   |
    | aanhef | <aanhef> |

    Examples:
    | voorbeeld | geslacht | aanhef                  |
    | man       | M        | Geachte heer Groenen    |
    | vrouw     | V        | Geachte mevrouw Groenen |
    | onbekend  | O        | Geachte J.R. Groenen    |

  Scenario Outline: Aanhef of a person who has never had a marriage or partnership, with aanduidingNaamgebruik "<aanduidingNaamgebruik>"
    Given the person with citizen service number '000000139' has the following data
    | naam                           | waarde                  |
    | geslachtsaanduiding (04.10)    | V                       |
    | voorvoegsel (02.30)            | in het                  |
    | geslachtsnaam (02.40)          | Veld                    |
    | aanduiding naamgebruik (61.10) | <aanduidingNaamgebruik> |
    And the person has no (former) partner
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000139                       |
    | fields              | adressering.aanhef              |
    Then the response has a person with the following 'adressering' data
    | naam   | waarde                      |
    | aanhef | Geachte mevrouw In het Veld |

    Examples:
    | aanduidingNaamgebruik |
    | E                     |
    | P                     |
    | V                     |
    | N                     |
    
Rule: The aanhef of a person with a (former) partner is composed by combining geslacht, the voorletters, voorvoegsels and geslachtsnaam.
  - The aanhef is preceded by "Geachte" followed by "mevrouw", "heer" or the initials, depending on the gender:
    | geslacht | aanhef begint met (GA) |
    | M        | Geachte heer           |
    | V        | Geachte mevrouw        |
    | O        | Geachte VL             |
  - The aanhef is composed from the name components of the person and of any (former) partner, on the basis of aanduidingNaamgebruik:
    | aanduidingNaamgebruik | aanhef         |
    | E                     | GA VV GN       |
    | P                     | GA VP GP       |
    | V                     | GA VP GP-VV GN |
    | N                     | GA VV GN-VP GP |
  - A prefix directly after "Geachte mevrouw" or "Geachte heer" begins with a capital letter
  - Where a name component has no value or an empty value, the superfluous space is not included: no leading space, no trailing space, no double space, no space after a hyphen

  Scenario Outline: Aanhef of a person with a (former) partner, with aanduidingNaamgebruik "<naamgebruik>"
    Given the person with citizen service number '000000152' has the following data
    | naam                           | waarde          |
    | geslachtsaanduiding (04.10)    | V               |
    | voorvoegsel (02.30)            | <voorvoegsel>   |
    | geslachtsnaam (02.40)          | <geslachtsnaam> |
    | aanduiding naamgebruik (61.10) | <naamgebruik>   |
    And the person has a 'partner' with the following data
    | naam                  | waarde                  |
    | voorvoegsel (02.30)   | <partner voorvoegsel>   |
    | geslachtsnaam (02.40) | <partner geslachtsnaam> |
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000152                       |
    | fields              | adressering.aanhef              |
    Then the response has a person with the following 'adressering' data
    | naam   | waarde   |
    | aanhef | <aanhef> |

    Examples:
    | naamgebruik | voorvoegsel | geslachtsnaam | partner voorvoegsel | partner geslachtsnaam | aanhef                                 |
    | E           | in het      | Veld          | van                 | Velzen                | Geachte mevrouw In het Veld            |
    | E           |             | Groenen       |                     | Groenink              | Geachte mevrouw Groenen                |
    | P           | in het      | Veld          | van                 | Velzen                | Geachte mevrouw Van Velzen             |
    | P           |             | Groenen       |                     | Groenink              | Geachte mevrouw Groenink               |
    | V           | in het      | Veld          | van                 | Velzen                | Geachte mevrouw Van Velzen-in het Veld |
    | V           |             | Groenen       |                     | Groenink              | Geachte mevrouw Groenink-Groenen       |
    | N           | in het      | Veld          | van                 | Velzen                | Geachte mevrouw In het Veld-van Velzen |
    | N           |             | Groenen       |                     | Groenink              | Geachte mevrouw Groenen-Groenink       |