supplying the indication that verblijfplaats is under investigation for an occupant when consulting occupancy on a reference date
#language: en Feature: supplying the indication that verblijfplaats is under investigation for an occupant when consulting occupancy on a reference date As a consumer of the Bewoning API I want to receive an indication where the verblijfplaats data of an occupant is under investigation so that I can use this information in my process Background: Given address 'A1' has the following data | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) | | 0800 | 0800010000000001 | And address 'A2' has the following data | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) | | 0800 | 0800010000000002 | Rule: the fact that the 'identificatiecode verblijfplaats' and/or 'datum aanvang adreshouding' data of a person is under investigation is translated into the inOnderzoek field of an occupant with value true Scenario Outline: '<type>' is under investigation Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | | 0800 | 20100818 | <aanduiding in onderzoek> | 20200401 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2020-01-01 | | datumTot | 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2020-01-01 tot 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | inOnderzoek | | 000000024 | true | Examples: | aanduiding in onderzoek | type | | 080000 | hele categorie verblijfplaats | | 081000 | hele groep adreshouding | | 081010 | functie adres | | 081030 | datum aanvang adreshouding | | 081100 | hele groep adres | | 081180 | identificatiecode verblijfplaats | Scenario Outline: '<type>' of the previous verblijfplaats is under investigation Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | | 0800 | 20100818 | <aanduiding in onderzoek> | 20200401 | And the person was subsequently registered at address 'A2' with the following data | datum aanvang adreshouding (10.30) | | 20210803 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2020-01-01 | | datumTot | 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2020-01-01 tot 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | inOnderzoek | | 000000024 | true | Examples: | aanduiding in onderzoek | type | | 580000 | hele categorie verblijfplaats | | 581000 | hele groep adreshouding | | 581010 | functie adres | | 581030 | datum aanvang adreshouding | | 581100 | hele groep adres | | 581180 | identificatiecode verblijfplaats | Scenario Outline: '<type>' is under investigation Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | | 0800 | 20100818 | <aanduiding in onderzoek> | 20200401 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2020-01-01 | | datumTot | 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2020-01-01 tot 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000024 | Examples: | aanduiding in onderzoek | type | | 080900 | hele groep gemeente | | 080910 | gemeente van inschrijving | | 080920 | datum inschrijving in de gemeente | | 081110 | straatnaam | | 081115 | naam openbare ruimte | | 081190 | identificatiecode nummeraanduiding | | 081200 | hele groep locatie | | 081400 | hele groep immigratie | | 081410 | land vanwaar ingeschreven | | 081420 | datum vestiging in Nederland | | 088500 | hele groep geldigheid | | 088510 | datum ingang geldigheid | Scenario: investigation designation 'vastgesteld verblijft niet meer op adres' is not supplied Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | | 0800 | 20100818 | 089999 | 20220401 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2020-01-01 | | datumTot | 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2020-01-01 tot 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000024 | Scenario: investigation designation 'vastgesteld verblijft niet meer op adres' on the previous verblijfplaats is not supplied Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | | 0800 | 20100818 | 589999 | 20210730 | And the person was subsequently registered at address 'A2' with the following data | datum aanvang adreshouding (10.30) | | 20210803 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | 2020-01-01 | | datumTot | 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | 2020-01-01 tot 2021-07-01 | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000024 | Rule: the start date of the investigation is not relevant to whether or not the inOnderzoek field is supplied with value true Scenario Outline: 'hele categorie verblijfplaats' is under investigation and <scenario> Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | | 0800 | 20100818 | 080000 | 20200401 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | <van> | | datumTot | <tot> | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | <van> tot <tot> | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | inOnderzoek | | 000000024 | true | Examples: | van | tot | scenario | | 2020-01-01 | 2020-02-01 | periode ligt vóór datum ingang onderzoek | | 2020-03-01 | 2020-05-01 | periode bevat de datum ingang onderzoek | | 2020-05-01 | 2020-07-01 | periode ligt na datum ingang onderzoek | Rule: an investigation that has ended is never translated into the inOnderzoek field, not even where the reference date falls within the investigation period Scenario Outline: the investigation of 'hele categorie verblijfplaats' has ended and <scenario> Given the person with citizen service number '000000024' is registered at address 'A1' with the following data | gemeente van inschrijving (09.10) | datum aanvang adreshouding (10.30) | aanduiding in onderzoek (83.10) | datum ingang onderzoek (83.20) | datum einde onderzoek (83.30) | | 0800 | 20100818 | 080000 | 20200401 | 20200801 | When occupancy is searched with the following parameters | naam | waarde | | type | BewoningMetPeriode | | datumVan | <van> | | datumTot | <tot> | | adresseerbaarObjectIdentificatie | 0800010000000001 | Then the response has an occupancy with the following data | naam | waarde | | periode | <van> tot <tot> | | adresseerbaarObjectIdentificatie | 0800010000000001 | And the occupancy has an occupant with the following data | burgerservicenummer | | 000000024 | Examples: | van | tot | scenario | | 2020-01-01 | 2020-04-01 | periode ligt vóór datum ingang onderzoek | | 2020-03-01 | 2020-09-01 | periode begint vóór datum ingang onderzoek en eindigt na datum einde onderzoek | | 2020-05-01 | 2020-07-01 | periode valt tussen datum ingang onderzoek en datum einde onderzoek | | 2020-09-01 | 2020-10-01 | periode ligt na datum einde onderzoek |