New Zealand NHI IG
1.4.1 - Release

New Zealand NHI IG - Local Development build (v1.4.1) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Create Patient Compliance Testing

NHI Create Patient tests

Reference Purpose – Demonstrate that the Input values Expected outcome Mandatory
NHI-Create-Patient-1 Application can create a new patient with the minimum set of patient information Create a patient with a fictitious identity (this can be done using http://www.fakenamegenerator.com/)
  • Name
    • Given only
    • Source - PPRT
  • Address
    • Validated
  • Date of Birth
    • Date
    • Source - BRCT
  • Gender
    • other
  • Ethnicity
    • 32100 (Cook Islands Maori) and,
    • 12948 (South African) and,
    • 32100 (Cook Islands Maori)
  • New Zealand Citizenship Status
    • Status - yes
    • Source - BRCT
  • Input: Minimum set of patient information can be provided
  • Output: New NHI is displayed with minimum dataset
  • Output: All patient information can be displayed
  • Mandatory
    NHI-Create-Patient-2 Application can create a new patient with the minimum set of patient information Create a patient with a fictitious identity
    • Name
      • Family only
      • Source NPRF
    • Address
      • Validated
    • Date of Birth
      • Date
      • Source - NPRF
    • Gender
      • unknown
    • Ethnicity - see below
    • New Zealand Citizenship Status
      • Status - no
      • Source - NPRF
  • Input: Minimum set of patient information can be provided
  • Output: New NHI is displayed with minimum dataset
  • Output: All patient information can be displayed
  • Mandatory
    NHI-Create-Patient-3 Application can create a new patient with the minimum set of patient information Create a patient with:
    • Name
      • Given, other given and family
      • Source NPRF
    • Address
      • Validated
    • Date of Birth
      • Date month and year only
      • Source - NPRF
    • Gender
      • code - female
      • original-text (optional)
    • Ethnicity
      • 97777 (response unidentifiable)
    • New Zealand Citizenship Status
      • Status - unknown
      • Source - NPRF
    Create a fictitious identity (this can be done using http://www.fakenamegenerator.com/)
  • Input: Minimum set of patient information can be provided
  • Output: New NHI is displayed with minimum dataset
  • Output: All patient information can be displayed
  • Mandatory
    NHI-Create-Patient-4 Application can supply additional identity information when creating a patient, including the fields:
    • Date of death
    • Birthplace
    Create a patient with the minimum set of patient information and the additional details below
    • Date of death - if applicable
      • Date
      • Information source
    • Birthplace
      • Country of birth
      • Information source
      • Place of birth
  • Input: Additional identity information can be provided
  • Output: New NHI is displayed with minimum dataset
  • Output: All patient information can be displayed
  • Mandatory
    NHI-Create-Patient-5 Application can create a patient with an unvalidated patient address Create a patient with minimum set of patient information, with an unvalidated patient address
    Do all
    1. OSEA
    2. UKWN
    3. NFAB
    4. NOSVC
    5. OTHER
  • Input: All unvalidated address reasons can be provided
  • Output: New NHI is displayed with minimum dataset
  • Output: All patient information can be displayed
  • Mandatory

    NHI Create Patient error tests

    Reference Purpose – Demonstrate that the Input values Expected outcome Mandatory
    NHI-Create-Patient-error-1
    Mandatory information
    application will show the correct error when attempting to create a patient with a mandaotory attribute missing Attempt to create a patient with a piece of mandatory information missing Do all
    1. Name
    2. Date of birth
    3. Gender
    4. Ethnicity
    5. NZ Citizenship
    6. Address
    Error: EM07201 "Patient name is a required field"
    Error: EM07201 "Patient Date of birth is a required field"
    Error: EM07201 "Patient gender is a required field"
    Error: EM07201 "Patient Ethnicity is a required field"
    Error: EM07201 "Patient NZ Citizenship is a required field"
    Error: EM07201 "Patient Address is a required field"
    Mandatory
    NHI-Create-Patient-error-2
    Address
    Application will show the correct error when attempting to create a patient with an eSAM validated address where the nz address id does not match the first line of the validated address
    • address-line: 24 Ranglesey Place
    • nz-address-id: 1199146
    • address-type: physical
    Error: "address-line must match the espatial value: ..." Mandatory
    NHI-Create-Patient-error-3
    Address
    Application will show the correct error when attempting to create a patient with the following unvalidated address without a domicile code
    • not-validated-address-reason: NOSVC
    • address-type: physical
    • address-line-1: 74 Chancellor Street"
    • address-suburb: Richmond
    • address-city: Christchurch
    • address-country-code: NZ
    Error: "Invalid codeset value"
    This will be updated in an upcming release - EM02210 - An unvalidated residential address must have a notional domicile code
    Mandatory
    NHI-Create-Patient-error-4
    Address
    Application will show the correct error when attempting to create a patient with an address with invalid characters
    • not-validated-address-reason: OTHER
    • address-type: physical
    • address-line-1: 11 L$nnet Street
    • address-suburb: Taihape
    • address-city: Taihape
    • address-domicile-code: 4720
    • address-country-code: NZ
    Error: "Invalid request body" Mandatory
    NHI-Create-Patient-error-5
    Address
    Application will show the correct error when attempting to create a patient with an address that does not contain address line 1
    • not-validated-address-reason: OTHER
    • address-type: physical
    • address-line-2: 11 Linnet Street
    • address-suburb: Taihape
    • address-city: Taihape
    • address-domicile-code: 4720
    • address-country-code: NZ
    Error: "Patient address-line-1 is required" Optional
    NHI-Create-Patient-error-6
    Address
    Application will show the correct error when attempting to create a patient with an address missing a not validated reason
    • address-type: physical
    • address-line-1: 11 Linnet Street
    • address-suburb: Taihape
    • address-city: Taihape
    • address-domicile-code: 4720
    • address-country-code: NZ
    Error: "Address not validated reason is required" optional
    NHI-Create-Patient-error-7
    Name
    application can display an error when no given and family name is present Attempt to create a patient with no family or given name
    • Name use = nickname
    • Source = PPRT
    • Don't insert a family or given name
    Output: EM02101 - "A Patient name must contain either a given or family name, a preferred name flag and an information source" mandatory
    NHI-Create-Patient-error-8
    Name
    application can display an error when the given or family name contains special characters e.g. # @ % Attempt to create a patient with a fictitious name (with special character) Output: "Invalid request body" mandatory
    NHI-Create-Patient-error-9
    Name
    application can display an error when a given or family name begins with a number e.g. 1Smith Attempt to create a patient with a fictitious name (with a number as the first character) Output: EM02107 "A Patient’s given and family name must start with a letter of the alphabet or an apostrophe" mandatory
    NHI-Create-Patient-error-10
    Name
    application can display an error when a given or family name contains only whitespace/s Attempt to create a patient with a name (containing only whitespace) Output: EM02110 "Each populated Patient Name field must contain at least one letter" mandatory
    NHI-Create-Patient-error-11
    Name
    application can display an error when no information source Attempt to create a patient with a fictitious name
    • Name use = nickname
    • source = PPRT
    • Don't insert a information-source
    Output: EM02101 - "A Patient name must contain either a given or family name, a preferred name flag and an information source." mandatory
    NHI-Create-Patient-error-12
    Name
    application can display an error when an invalid source is provided Attempt to create a patient with a registered name source
    • source = BREG (Birth Register)
    Output: EM07229 - "The patient name can only be set to a registered value by an authorised agency" mandatory
    NHI-Create-Patient-error-13
    Name
    application can display an error when no preferred-name-flag Attempt to create a patient with no preferred flag
    • Name use = nickname
    • source = PPRT
    • don't insert a preferred-name flag
    Output: EM02101 - "A Patient name must contain either a given or family name, a preferred name flag and an information source." optional
    NHI-Create-Patient-error-14
    Name
    application can display an error when preferred-name = false Attempt to create a patient with preferred flag = false
    • Name use = nickname
    • source = PPRT
    • preferred-name = false
    Output: EM02101 - "A Patient name must contain either a given or family name, a preferred name and an information source." optional
    NHI-Create-Patient-error-15
    Name
    application can display an error when a Babyof name is supplied with a use other than 'temp' and a source other than 'NPRF' Attempt to create a patient with babyof name
    • Name use = nickname
    • source = PPRT
    Output: EM07225 - "name-use-extra is conditional on source = NPRF and name use = temp" mandatory
    NHI-Create-Patient-error-16
    Ethnicity
    application can display an error when attempting to create a patient with invalid ethnicity information
    contains multiple residual codes (9xxxx)
    Create a Patient with the ethnicities below:
    • 97777 (response unidentifiable)
    • and 99999 (not stated)
    Output: EM02301 - "A Patient must have at least one valid ethnicity code, only one instance of each selected ethnicity, and no more than one ‘unspecified’ ethnicity code" mandatory
    NHI-Create-Patient-error-17
    Ethnicity
    application can display an error when attempting to create a patient with invalid ethnicity information
    set of supplied ethnicities that includes a duplicate ethnicity
    Create a Patient with the ethnicities below:
    • 32100 (Cook Islands Maori) and,
    • 12948 (South African) and,
    • 32100 (Cook Islands Maori)
    Output: EM02301 - "A Patient must have at least one valid ethnicity code, only one instance of each selected ethnicity, and no more than one ‘unspecified’ ethnicity code" mandatory
    NHI-Create-Patient-error-18
    Gender
    application can display an error when attempting to create a patient with a gender-original-text and no gender value Attempt to create a patient with a gender-original-text (and not gender) Output: EM07201 - "Is a required field - Patient.gender" mandatory
    NHI-Create-Patient-error-19
    Citizenship
    application can display an error when attempting to create a patient with a NZ Citizenship information source without a NZ Citizenship status Choose an NZ Citizenship information source to supply but do not add NZ Citizenship status The format of the message is invalid (EM01002) Mandatory
    NHI-Create-Patient-error-20
    Citizenship
    application can display an error when when attempting to create a patient with a registered Citizenship information source Attempt to create a patient with a citizenship
    • Citizenship = yes
    • Attempt to add source = DIA
    Output: EM07229 "Patient NZ Citizenship can only be set to a ‘Registered’ value by an authorised agency" mandatory
    NHI-Create-Patient-error-21
    Date of birth
    application will show the correct error when attempting to create a patient with a bithdate in the future Date of birth: A future date EM07212 - Patient Date of birth cannot be a future date Mandatory
    NHI-Create-Patient-error-22
    Date of birth
    application can display an error when when attempting to create a patient with a registered Date of birth information source Attempt to create a patient with Date of birth source = BREG
    • Attempt to add source = BREG
    Output: EM07229 "Patient Date of birth can only be set to a ‘Registered’ value by an authorised agency" mandatory
    NHI-Create-Patient-error-23
    Birthplace
    Application will show the correct error when attempting to create a patient with a place of birth but no country of birth Place of Birth: London
    Do not supply a country of birth
    EM07202 - A place of birth must only be populated if a country of birth is populated Mandatory
    NHI-Create-Patient-error-24
    Birthplace
    Application will show the correct error when attempting to create a patient with no information source
    • Place of Birth: Whangarei
    • Country of Birth: New Zealand
    • Source: Do not add a source
    EM07202 - A place of birth must only be populated if a place of birth source is populated Mandatory
    NHI-Create-Patient-error-25
    Birthplace
    Application will show the correct error when attempting to create a patient with no information source
    • Source: PPRT
    EM07202 - A place of birth source must only be populated if birth locality information is populated Mandatory

    NHI Create Patient - death date

    Reference Purpose – Demonstrate that the Input values Expected outcome Mandatory
    NHI-Create-Patient-date-death application can create a patient with a date of death Create a patient with date of death
    • Input: date of death can be included when creating patient
    • Output: New NHI is displayed with minimum dataset
    • Output: NHI clearly shows patient deceased
    • Output: Information source added as: TBC
    Mandatory
    NHI-Create-Patient-death-date-error-1 application will show the correct error when attempting to create a patient with a date of birth after the date of death supplied
    • Date of birth: Todays date
    • Date of death = Todays date -1
    EM07215 - Patient Date of Death must be greater than, or equal to Patient Date of Birth Mandatory
    NHI-Create-Patient-death-date-error-2 application will show the correct error when attempting to create a patient with a date of death in the future
    • Date of death = future date
    • Source: TBC
    EM07212 - Patient Date of Death date cannot be a future date Mandatory
    NHI-Create-Patient-death-date-error-3 application will show the correct error when attempting to create a patient with a date of death with no source
    • Date of death = todays date
    • Source: Don't add a source
    EM07202 - A date of death must only be populated if a date of death source is populated Mandatory