HAALCENTRAAL English translation
BRP API / Personen / Features / gegeven-stap-definities-overlijden

Overlijden Given step definitions

#language: en

@stap-documentatie
Feature: Overlijden Given step definitions

  Background:
    Given the 1st 'SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl' statement has the result '9999'
    And the 2nd 'SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl' statement has the result '10000'

  Scenario: the person has the following 'overlijden' data
    Given the person with citizen service number '000000012' has the following data
    | naam                  | waarde |
    | geslachtsnaam (02.40) | Jansen |
    And the person has the following 'overlijden' data
    | datum overlijden (08.10) |
    | 20020701                 |
    Then the generated SQL statements are
    | stap | categorie    | text                                                                                                                                                  | values                      |
    | 1    | inschrijving | INSERT INTO public.lo3_pl(pl_id,mutatie_dt,geheim_ind) VALUES((SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl),current_timestamp,$1) RETURNING * | 0                           |
    |      | persoon      | INSERT INTO public.lo3_pl_persoon(pl_id,stapel_nr,volg_nr,persoon_type,burger_service_nr,geslachts_naam) VALUES($1,$2,$3,$4,$5,$6)                    | 9999,0,0,P,000000012,Jansen |
    |      | overlijden   | INSERT INTO public.lo3_pl_overlijden(pl_id,volg_nr,overlijden_datum) VALUES($1,$2,$3)                                                                 | 9999,0,20020701             |

  Scenario: the 'overlijden' has been corrected to the following data
    Given the person with citizen service number '000000012' has the following 'overlijden' data
    | datum overlijden (08.10) | plaats overlijden (08.20) | land overlijden (08.30) |
    | 20020701                 | 0344                      | 5018                    |
    And the 'overlijden' has been corrected to the following data
    | gemeente document (82.10) |
    | 0518                      |
    Then the generated SQL statements are
    | stap | categorie    | text                                                                                                                                                  | values                      |
    | 1    | inschrijving | INSERT INTO public.lo3_pl(pl_id,mutatie_dt,geheim_ind) VALUES((SELECT COALESCE(MAX(pl_id), 0)+1 FROM public.lo3_pl),current_timestamp,$1) RETURNING * | 0                           |
    |      | persoon      | INSERT INTO public.lo3_pl_persoon(pl_id,stapel_nr,volg_nr,persoon_type,burger_service_nr) VALUES($1,$2,$3,$4,$5)                                      | 9999,0,0,P,000000012        |
    |      | overlijden   | INSERT INTO public.lo3_pl_overlijden(pl_id,volg_nr,overlijden_datum,overlijden_plaats,overlijden_land_code,onjuist_ind) VALUES($1,$2,$3,$4,$5,$6)     | 9999,1,20020701,0344,5018,O |
    |      |              | INSERT INTO public.lo3_pl_overlijden(pl_id,volg_nr,doc_gemeente_code) VALUES($1,$2,$3)                                                                | 9999,0,0518                 |