HAALCENTRAAL English translation
BRP API / Personen / Features / fields-datum

requesting a date field with fields

# language: en
Feature: requesting a date field with fields

  Rule: Requesting one or more fields of a 'datum' field supplies all fields of that 'datum' field

    Scenario Outline: a 'VolledigeDatum' field is requested
      Given the person with citizen service number '000000152' has the following data
        | geboortedatum (03.10) |
        |              19561115 |
      When persons are searched with the following parameters
        | naam                | waarde                          |
        | type                | RaadpleegMetBurgerservicenummer |
        | burgerservicenummer |                       000000152 |
        | fields              | <fields>                        |
      Then the response has a person with the following 'geboorte' data
        | naam              | waarde           |
        | datum.type        | Datum            |
        | datum.datum       |       1956-11-15 |
        | datum.langFormaat | 15 november 1956 |

      Examples:
        | fields                                   |
        | geboorte.datum                           |
        | geboorte.datum.type                      |
        | geboorte.datum.datum                     |
        | geboorte.datum.langFormaat               |
        | geboorte.datum.jaar                      |
        | geboorte.datum.maand                     |
        | geboorte.datum.onbekend                  |
        | geboorte.datum.jaar,geboorte.datum.maand |

    Scenario Outline: a 'JaarMaandDatum' field is requested
      Given the person with citizen service number '000000153' has the following data
        | geboortedatum (03.10) |
        |              19780300 |
      When persons are searched with the following parameters
        | naam                | waarde                          |
        | type                | RaadpleegMetBurgerservicenummer |
        | burgerservicenummer |                       000000153 |
        | fields              | <fields>                        |
      Then the response has a person with the following 'geboorte' data
        | naam              | waarde         |
        | datum.type        | JaarMaandDatum |
        | datum.jaar        |           1978 |
        | datum.maand       |              3 |
        | datum.langFormaat | maart 1978     |

      Examples:
        | fields                                   |
        | geboorte.datum                           |
        | geboorte.datum.type                      |
        | geboorte.datum.datum                     |
        | geboorte.datum.langFormaat               |
        | geboorte.datum.jaar                      |
        | geboorte.datum.maand                     |
        | geboorte.datum.onbekend                  |
        | geboorte.datum.jaar,geboorte.datum.maand |

    Scenario Outline: a 'JaarDatum' field is requested
      Given the person with citizen service number '000000154' has the following data
        | geboortedatum (03.10) |
        |              19680000 |
      When persons are searched with the following parameters
        | naam                | waarde                          |
        | type                | RaadpleegMetBurgerservicenummer |
        | burgerservicenummer |                       000000154 |
        | fields              | <fields>                        |
      Then the response has a person with the following 'geboorte' data
        | naam              | waarde    |
        | datum.type        | JaarDatum |
        | datum.jaar        |      1968 |
        | datum.langFormaat |      1968 |

      Examples:
        | fields                                   |
        | geboorte.datum                           |
        | geboorte.datum.type                      |
        | geboorte.datum.datum                     |
        | geboorte.datum.langFormaat               |
        | geboorte.datum.jaar                      |
        | geboorte.datum.maand                     |
        | geboorte.datum.onbekend                  |
        | geboorte.datum.jaar,geboorte.datum.maand |

    Scenario Outline: a 'DatumOnbekend' field is requested
      Given the person with citizen service number '000000155' has the following data
        | geboortedatum (03.10) |
        |              00000000 |
      When persons are searched with the following parameters
        | naam                | waarde                          |
        | type                | RaadpleegMetBurgerservicenummer |
        | burgerservicenummer |                       000000155 |
        | fields              | <fields>                        |
      Then the response has a person with the following 'geboorte' data
        | naam              | waarde        |
        | datum.type        | DatumOnbekend |
        | datum.onbekend    | true          |
        | datum.langFormaat | onbekend      |

      Examples:
        | fields                                   |
        | geboorte.datum                           |
        | geboorte.datum.type                      |
        | geboorte.datum.datum                     |
        | geboorte.datum.langFormaat               |
        | geboorte.datum.jaar                      |
        | geboorte.datum.maand                     |
        | geboorte.datum.onbekend                  |
        | geboorte.datum.jaar,geboorte.datum.maand |