New Zealand NHI IG
1.6.5 - Release

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

## Resource Profile: Create NHI Patient

Official URL: http://hl7.org.nz/fhir/StructureDefinition/CreateNhiPatient | Version: 1.6.5
Active as of 2026-02-09 | Computable Name: CreateNhiPatient

The information to be supplied when requesting that a new Patient resource be created in the NHI.

Describe information to be supplied when requesting that a new Patient resource be created in the NHI

Usages:

- Examples for this Profile: Patient/create1, Patient/create2-error- and Patient/create3-errors

You can also check for usages in the FHIR IG Statistics

### Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

- Key Elements Table
- Differential Table
- Snapshot Table
- Statistics/References
- All

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Patient | C | 0..* | NhiPatient | Information about an individual or animal receiving health care services Constraints: nz-pat-1, nhi-nz-pat-1, nhi-nz-pat-2, nhi-nz-pat-3, nhi-nz-pat-4, nhi-nz-pat-5, nhi-nz-pat-6, EM02106, EM02201, EM02101, EM07225, EM07212, EM07212-1, EM07215
Slices for contained |  | 0..* | Resource | Contained, inline Resources Slice: Unordered, Closed by type:$this
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:ethnicity |  | 1..6 | (Complex) | NZ Ethnicity URL: http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Hip_ethnicity_lvl_4 (2.0) (required)
extension:nzCitizen |  | 1..1 | (Complex) | NZ Citizenship URL: http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:status |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "status"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship status (preferred)
extension:source |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship"
extension:birthPlace |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/birth-place
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:country |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "country"
extension:place-of-birth |  | 0..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "place-of-birth"
extension:source |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
value[x] |  | 1..1 | CodeableConcept | Value of extension Binding: Country of Birth Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/birth-place"
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
Slices for identifier | Σ | 0..* | Identifier | An identifier for this patient Slice: Unordered, Closed by value:system
name | Σ C | 1..1 | HumanName | A name associated with the patient Constraints: EM07225
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Name Information Source (required)
extension:preferred |  | 1..1 | boolean | Preferred URL: http://hl7.org/fhir/StructureDefinition/iso21090-preferred
extension:nhi-name-use-extra |  | 0..1 | CodeableConcept | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/name-use-extra Binding: NHI Name Use Extra (required)
use | ?!Σ | 0..1 | code | temp | nickname | maiden Binding: NameUse (required): The use of a human name.
given | Σ | 0..2 | string | Given name and other given name(s) This repeating element order: Given Names appear in the correct order for presenting the name
prefix | Σ | 0..1 | string | Parts that come before the name Binding: Name Prefix Codes (required) This repeating element order: Prefixes appear in the correct order for presenting the name
gender | Σ | 1..1 | code | male | female | other | unknown Binding: AdministrativeGender (required): The gender of a person used for administrative purposes.
Slices for extension |  |  |  | Content/Rules for all slices
extension:originalText |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/gender-original-text
birthDate | Σ | 1..1 | date | The date of birth for the individual
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Birth Information Source (required)
deceased[x] | ?!Σ | 0..1 | dateTime | Indicates if the individual is deceased or not
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Death Information Source (required)
address |  | 1..1 | NhiAddress | An address expressed using postal conventions (as opposed to GPS or other location definition formats)
Slices for extension |  |  |  | Content/Rules for all slices
extension:nz-geocode |  | 0..1 | (Complex) | A geocode using the NZ specific datum (reference point) URL: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
extension:suburb |  | 0..1 | string | The suburb part of the address URL: http://hl7.org.nz/fhir/StructureDefinition/suburb
extension:building-name |  | 0..1 | string | The name of the building URL: http://hl7.org.nz/fhir/StructureDefinition/building-name
extension:domicile-code |  | 0..1 | CodeableConcept | The domicile code associated with this address URL: http://hl7.org.nz/fhir/StructureDefinition/domicile-code Binding: Domicile Code (preferred)
extension:notValidatedAddressReason |  | 0..1 | CodeableConcept | The reason an address was not validated URL: http://hl7.org.nz/fhir/StructureDefinition/not-validated-address-reason Binding: Address Not Validated Reason (preferred)
extension:nz-address-id |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nz-address-id
extension:nz-address-derived |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nhi-address-derived
use | ?!Σ | 1..1 | code | home | work | temp | old | billing - purpose of this address Binding: NHI Address Use Codes (required) Example General: home
type | Σ | 1..1 | code | postal | physical Binding: NHI Address Type Codes (required) Example General: both
line | Σ | 1..2 | string | Street name, number, direction & P.O. Box etc. This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Patient.extension:ethnicity.​value[x]:valueCodeableConcept | Base | required | HPI 4 digit ethnicity codes | 📍2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:nzCitizen.​extension:status.value[x]:valueCodeableConcept | Base | preferred | NZ Citizenship status | 📦1.1.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.extension:nzCitizen.​extension:source.value[x]:valueCodeableConcept | Base | required | NZ Citizenship Information Source | 📦1.1 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:birthPlace.​extension:source.value[x] | Base | required | Country of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.identifier:NHI.​use | Base | required | Valid use values for NHI | 📦2.0.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.name.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Name Information Source | 📦1.3 | HIP FHIR Common Terminology Guide v1.9
Patient.name.use | Base | required | NameUse | 📍4.0.1 | FHIR Std.
Patient.name.prefix | Base | required | Name Prefix Codes | 📦2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.telecom.use | Base | required | NHI ContactPoint Use Codes | 📦1.6.5 | This IG
Patient.gender | Base | required | AdministrativeGender | 📍4.0.1 | FHIR Std.
Patient.birthDate.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.deceased[x].​extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Death Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.address.use | Base | required | NHI Address Use Codes | 📦1.0.0 | HIP FHIR Common Terminology Guide v1.9
Patient.address.type | Base | required | NHI Address Type Codes | 📦1.0 | HIP FHIR Common Terminology Guide v1.9
Patient.communication.​language | Base | preferred | Common Languages | 📦4.0.1 | FHIR Std.
Patient.link.type | Base | required | LinkType | 📍4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
EM02101 | error | Patient | A Patient name must contain either a given or family name | `Patient.name.all(given.exists() and family.exists())`
EM02106 | error | Patient | A Patient must have an active Preferred Name | `Patient.name.extension.where((url = 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred') and (valueBoolean=true)).count()=1`
EM02201 | error | Patient | A Patient must have a primary residential address | `Patient.address.where( (use = 'home') and (type = 'physical')).count()=1`
EM07212 | error | Patient | birthdate must be after 1 January 1900, and not a future date | `(birthDate > @1900-01-01) and (birthDate < now())`
EM07212-1 | error | Patient | Date of Death cannot be a future date | `deceasedDateTime < now()`
EM07215 | error | Patient | Date of Death must be greater than, or equal to Date of Birth | `deceasedDateTime >= birthDate`
EM07225 | error | Patient, Patient.name | If name-use-extra is supplied name-use must be temp, and source NPRF | `name.where(use='temp').exists() implies (extension.where((url='http://hl7.org.nz/fhir/StructureDefinition/information-source') and (valueCodeableConcept.coding.code ='NPRF')).exists())`
dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Patient | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
nhi-nz-pat-1 | error | Patient | only allows certain name name use values | `Patient.name.where( (use.empty()) or (use='nickname') or (use = 'maiden') or (use = 'temp') )`
nhi-nz-pat-2 | error | Patient | home phone 0..1 | `Patient.telecom.where(use='home' and system = 'phone').count() < 2`
nhi-nz-pat-3 | error | Patient | mobile phone 0..1 | `Patient.telecom.where(use='mobile' and system = 'phone').count() < 2`
nhi-nz-pat-4 | error | Patient | email 0..1 | `Patient.telecom.where(system = 'email').count() < 2`
nhi-nz-pat-5 | error | Patient | character restrictions for contact context | `Patient.telecom.extension[context].valueString.all(matches('^[-a-zA-Z0-9@:%._~#=?&\/]*$'))`
nhi-nz-pat-6 | error | Patient | Contact context must be less than 256 characters | `Patient.telecom.extension[context].256.all(length()<256)`
nz-pat-1 | error | Patient | only a single official NHI | `Patient.identifier.where(system='https://standards.digital.health.nz/ns/nhi-id' and use='official').count() < 2`

This structure is derived from NhiPatient

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Patient | C | 0..* | NhiPatient | Information about an individual or animal receiving health care services Constraints: EM02106, EM02201, EM02101, EM07225, EM07212, EM07212-1, EM07215
implicitRules |  | 0..0 |  | A set of rules under which this content was created
language |  | 0..0 |  | Language of the resource content
Slices for contained |  |  |  | Content/Rules for all slices
contained:GP |  | 0..0 |  | Contained resource for the Patient's enrolled general Practitioner
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:ethnicity |  | 1..6 | Nz_ethnicity | NZ Ethnicity
extension:nzCitizen |  | 1..1 | Nz_citizenship | NZ Citizenship
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:status |  | 1..1 | Extension | Extension
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
extension:source |  | 1..1 | Extension | Extension
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
extension:dhb |  | 0..0 |  | District Health Board linked to a NZ Healthcare Service, Location or Patient
extension:birthPlace |  | 0..1 | BirthPlace | Extension
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:country |  | 1..1 | Extension | Extension
extension:source |  | 1..1 | Extension | Extension
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for identifier |  |  |  | Content/Rules for all slices
identifier:NHI |  | 0..0 |  | An identifier for this patient
name | C | 1..1 | HumanName | A name associated with the patient Constraints: EM07225
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:information-source |  | 1..1 | Information_source | Information Source
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
prefix |  | 0..1 | string | Parts that come before the name
telecom |  | 0..0 |  | The Paient's contact details
gender |  | 1..1 | code | male | female | other | unknown
birthDate |  | 1..1 | date | The date of birth for the individual
extension |  | 1..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:information-source |  | 1..1 | Information_source | Information Source
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
deceased[x] |  |  |  |
extension |  | 1..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:information-source |  | 1..1 | Information_source | Information Source
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
address |  | 1..1 | NhiAddress | An address expressed using postal conventions (as opposed to GPS or other location definition formats)
use |  | 1..1 | code | home | work | temp | old | billing - purpose of this address
line |  | 1..2 | string | Street name, number, direction & P.O. Box etc.
generalPractitioner |  | 0..0 |  | Reference for the Patient's enrolled general Practitioner
Documentation for this format

#### Constraints

Id | Grade | Path(s) | Description | Expression
EM02101 | error | Patient | A Patient name must contain either a given or family name | `Patient.name.all(given.exists() and family.exists())`
EM02106 | error | Patient | A Patient must have an active Preferred Name | `Patient.name.extension.where((url = 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred') and (valueBoolean=true)).count()=1`
EM02201 | error | Patient | A Patient must have a primary residential address | `Patient.address.where( (use = 'home') and (type = 'physical')).count()=1`
EM07212 | error | Patient | birthdate must be after 1 January 1900, and not a future date | `(birthDate > @1900-01-01) and (birthDate < now())`
EM07212-1 | error | Patient | Date of Death cannot be a future date | `deceasedDateTime < now()`
EM07215 | error | Patient | Date of Death must be greater than, or equal to Date of Birth | `deceasedDateTime >= birthDate`
EM07225 | error | Patient, Patient.name | If name-use-extra is supplied name-use must be temp, and source NPRF | `name.where(use='temp').exists() implies (extension.where((url='http://hl7.org.nz/fhir/StructureDefinition/information-source') and (valueCodeableConcept.coding.code ='NPRF')).exists())`

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Patient | C | 0..* | NhiPatient | Information about an individual or animal receiving health care services Constraints: nz-pat-1, nhi-nz-pat-1, nhi-nz-pat-2, nhi-nz-pat-3, nhi-nz-pat-4, nhi-nz-pat-5, nhi-nz-pat-6, EM02106, EM02201, EM02101, EM07225, EM07212, EM07212-1, EM07215
id | Σ | 0..1 | id | Logical id of this artifact
meta | Σ | 0..1 | Meta | Metadata about the resource
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements
Slices for contained |  | 0..* | Resource | Contained, inline Resources Slice: Unordered, Closed by type:$this
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:ethnicity |  | 1..6 | (Complex) | NZ Ethnicity URL: http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Hip_ethnicity_lvl_4 (2.0) (required)
extension:nzCitizen |  | 1..1 | (Complex) | NZ Citizenship URL: http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:status |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "status"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship status (preferred)
extension:source |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship"
extension:birthPlace |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/birth-place
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:country |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "country"
value[x] |  | 0..1 | CodeableConcept | Value of extension Binding: ISO 3166-1:2013 (2-alpha country code) (required)
extension:place-of-birth |  | 0..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "place-of-birth"
value[x] |  | 0..1 | string | Value of extension
extension:source |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
value[x] |  | 1..1 | CodeableConcept | Value of extension Binding: Country of Birth Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/birth-place"
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
Slices for identifier | Σ | 0..* | Identifier | An identifier for this patient Slice: Unordered, Closed by value:system
name | Σ C | 1..1 | HumanName | A name associated with the patient Constraints: EM07225
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Name Information Source (required)
extension:preferred |  | 1..1 | boolean | Preferred URL: http://hl7.org/fhir/StructureDefinition/iso21090-preferred
extension:nhi-name-use-extra |  | 0..1 | CodeableConcept | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/name-use-extra Binding: NHI Name Use Extra (required)
use | ?!Σ | 0..1 | code | temp | nickname | maiden Binding: NameUse (required): The use of a human name.
family | Σ | 0..1 | string | Family name (often called 'Surname')
given | Σ | 0..2 | string | Given name and other given name(s) This repeating element order: Given Names appear in the correct order for presenting the name
prefix | Σ | 0..1 | string | Parts that come before the name Binding: Name Prefix Codes (required) This repeating element order: Prefixes appear in the correct order for presenting the name
gender | Σ | 1..1 | code | male | female | other | unknown Binding: AdministrativeGender (required): The gender of a person used for administrative purposes.
id |  | 0..1 | string | xml:id (or equivalent in JSON)
Slices for extension |  | 0..* | Extension | Extension Slice: Unordered, Open by value:url
extension:originalText |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/gender-original-text
value |  | 0..1 | string | Primitive value for code
birthDate | Σ | 1..1 | date | The date of birth for the individual
id |  | 0..1 | string | xml:id (or equivalent in JSON)
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Birth Information Source (required)
value |  | 0..1 | date | Primitive value for date
deceased[x] | ?!Σ | 0..1 | dateTime | Indicates if the individual is deceased or not
id |  | 0..1 | string | xml:id (or equivalent in JSON)
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Death Information Source (required)
value |  | 0..1 | dateTime | Primitive value for dateTime
address |  | 1..1 | NhiAddress | An address expressed using postal conventions (as opposed to GPS or other location definition formats)
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
extension:nz-geocode |  | 0..1 | (Complex) | A geocode using the NZ specific datum (reference point) URL: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
extension:suburb |  | 0..1 | string | The suburb part of the address URL: http://hl7.org.nz/fhir/StructureDefinition/suburb
extension:building-name |  | 0..1 | string | The name of the building URL: http://hl7.org.nz/fhir/StructureDefinition/building-name
extension:domicile-code |  | 0..1 | CodeableConcept | The domicile code associated with this address URL: http://hl7.org.nz/fhir/StructureDefinition/domicile-code Binding: Domicile Code (preferred)
extension:notValidatedAddressReason |  | 0..1 | CodeableConcept | The reason an address was not validated URL: http://hl7.org.nz/fhir/StructureDefinition/not-validated-address-reason Binding: Address Not Validated Reason (preferred)
extension:nz-address-id |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nz-address-id
extension:nz-address-derived |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nhi-address-derived
use | ?!Σ | 1..1 | code | home | work | temp | old | billing - purpose of this address Binding: NHI Address Use Codes (required) Example General: home
type | Σ | 1..1 | code | postal | physical Binding: NHI Address Type Codes (required) Example General: both
text | Σ | 0..1 | string | Text representation of the address Example General: 137 Nowhere Street, Erewhon 9132
line | Σ | 1..2 | string | Street name, number, direction & P.O. Box etc. This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street
city | Σ | 0..1 | string | Name of city, town etc. Example General: Erewhon
postalCode | Σ | 0..1 | string | Postal code for area Example General: 9132
country | Σ | 0..1 | string | Country (e.g. can be ISO 3166 2 or 3 letter code) Binding: ISO 3166-1:2013 (2-alpha country code) (required)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Patient.extension:ethnicity.​value[x]:valueCodeableConcept | Base | required | HPI 4 digit ethnicity codes | 📍2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:nzCitizen.​extension:status.value[x]:valueCodeableConcept | Base | preferred | NZ Citizenship status | 📦1.1.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.extension:nzCitizen.​extension:source.value[x]:valueCodeableConcept | Base | required | NZ Citizenship Information Source | 📦1.1 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:birthPlace.​extension:country.value[x] | Base | required | ISO 3166-1:2013 (2-alpha country code) | 📦2013 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:birthPlace.​extension:source.value[x] | Base | required | Country of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.identifier:NHI.​use | Base | required | Valid use values for NHI | 📦2.0.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.name.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Name Information Source | 📦1.3 | HIP FHIR Common Terminology Guide v1.9
Patient.name.use | Base | required | NameUse | 📍4.0.1 | FHIR Std.
Patient.name.prefix | Base | required | Name Prefix Codes | 📦2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.telecom.system | Base | required | NHI ContactPoint System Codes | 📦1.6.5 | This IG
Patient.telecom.use | Base | required | NHI ContactPoint Use Codes | 📦1.6.5 | This IG
Patient.gender | Base | required | AdministrativeGender | 📍4.0.1 | FHIR Std.
Patient.birthDate.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.deceased[x].​extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Death Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.address.use | Base | required | NHI Address Use Codes | 📦1.0.0 | HIP FHIR Common Terminology Guide v1.9
Patient.address.type | Base | required | NHI Address Type Codes | 📦1.0 | HIP FHIR Common Terminology Guide v1.9
Patient.address.country | Base | required | ISO 3166-1:2013 (2-alpha country code) | 📦2013 | HIP FHIR Common Terminology Guide v1.9
Patient.contact.relationship | Base | extensible | Patient Contact Relationship | 📦4.0.1 | FHIR Std.
Patient.contact.gender | Base | required | AdministrativeGender | 📍4.0.1 | FHIR Std.
Patient.communication.​language | Base | preferred | Common Languages | 📦4.0.1 | FHIR Std.
Patient.link.type | Base | required | LinkType | 📍4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
EM02101 | error | Patient | A Patient name must contain either a given or family name | `Patient.name.all(given.exists() and family.exists())`
EM02106 | error | Patient | A Patient must have an active Preferred Name | `Patient.name.extension.where((url = 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred') and (valueBoolean=true)).count()=1`
EM02201 | error | Patient | A Patient must have a primary residential address | `Patient.address.where( (use = 'home') and (type = 'physical')).count()=1`
EM07212 | error | Patient | birthdate must be after 1 January 1900, and not a future date | `(birthDate > @1900-01-01) and (birthDate < now())`
EM07212-1 | error | Patient | Date of Death cannot be a future date | `deceasedDateTime < now()`
EM07215 | error | Patient | Date of Death must be greater than, or equal to Date of Birth | `deceasedDateTime >= birthDate`
EM07225 | error | Patient, Patient.name | If name-use-extra is supplied name-use must be temp, and source NPRF | `name.where(use='temp').exists() implies (extension.where((url='http://hl7.org.nz/fhir/StructureDefinition/information-source') and (valueCodeableConcept.coding.code ='NPRF')).exists())`
dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Patient | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
nhi-nz-pat-1 | error | Patient | only allows certain name name use values | `Patient.name.where( (use.empty()) or (use='nickname') or (use = 'maiden') or (use = 'temp') )`
nhi-nz-pat-2 | error | Patient | home phone 0..1 | `Patient.telecom.where(use='home' and system = 'phone').count() < 2`
nhi-nz-pat-3 | error | Patient | mobile phone 0..1 | `Patient.telecom.where(use='mobile' and system = 'phone').count() < 2`
nhi-nz-pat-4 | error | Patient | email 0..1 | `Patient.telecom.where(system = 'email').count() < 2`
nhi-nz-pat-5 | error | Patient | character restrictions for contact context | `Patient.telecom.extension[context].valueString.all(matches('^[-a-zA-Z0-9@:%._~#=?&\/]*$'))`
nhi-nz-pat-6 | error | Patient | Contact context must be less than 256 characters | `Patient.telecom.extension[context].256.all(length()<256)`
nz-pat-1 | error | Patient | only a single official NHI | `Patient.identifier.where(system='https://standards.digital.health.nz/ns/nhi-id' and use='official').count() < 2`

This structure is derived from NhiPatient

Summary

Mandatory: 20 elements(7 nested mandatory elements)
Prohibited: 7 elements

Key Elements View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Patient | C | 0..* | NhiPatient | Information about an individual or animal receiving health care services Constraints: nz-pat-1, nhi-nz-pat-1, nhi-nz-pat-2, nhi-nz-pat-3, nhi-nz-pat-4, nhi-nz-pat-5, nhi-nz-pat-6, EM02106, EM02201, EM02101, EM07225, EM07212, EM07212-1, EM07215
Slices for contained |  | 0..* | Resource | Contained, inline Resources Slice: Unordered, Closed by type:$this
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:ethnicity |  | 1..6 | (Complex) | NZ Ethnicity URL: http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Hip_ethnicity_lvl_4 (2.0) (required)
extension:nzCitizen |  | 1..1 | (Complex) | NZ Citizenship URL: http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:status |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "status"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship status (preferred)
extension:source |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship"
extension:birthPlace |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/birth-place
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:country |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "country"
extension:place-of-birth |  | 0..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "place-of-birth"
extension:source |  | 1..1 | Extension | Extension
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
value[x] |  | 1..1 | CodeableConcept | Value of extension Binding: Country of Birth Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/birth-place"
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
Slices for identifier | Σ | 0..* | Identifier | An identifier for this patient Slice: Unordered, Closed by value:system
name | Σ C | 1..1 | HumanName | A name associated with the patient Constraints: EM07225
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Name Information Source (required)
extension:preferred |  | 1..1 | boolean | Preferred URL: http://hl7.org/fhir/StructureDefinition/iso21090-preferred
extension:nhi-name-use-extra |  | 0..1 | CodeableConcept | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/name-use-extra Binding: NHI Name Use Extra (required)
use | ?!Σ | 0..1 | code | temp | nickname | maiden Binding: NameUse (required): The use of a human name.
given | Σ | 0..2 | string | Given name and other given name(s) This repeating element order: Given Names appear in the correct order for presenting the name
prefix | Σ | 0..1 | string | Parts that come before the name Binding: Name Prefix Codes (required) This repeating element order: Prefixes appear in the correct order for presenting the name
gender | Σ | 1..1 | code | male | female | other | unknown Binding: AdministrativeGender (required): The gender of a person used for administrative purposes.
Slices for extension |  |  |  | Content/Rules for all slices
extension:originalText |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/gender-original-text
birthDate | Σ | 1..1 | date | The date of birth for the individual
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Birth Information Source (required)
deceased[x] | ?!Σ | 0..1 | dateTime | Indicates if the individual is deceased or not
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Death Information Source (required)
address |  | 1..1 | NhiAddress | An address expressed using postal conventions (as opposed to GPS or other location definition formats)
Slices for extension |  |  |  | Content/Rules for all slices
extension:nz-geocode |  | 0..1 | (Complex) | A geocode using the NZ specific datum (reference point) URL: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
extension:suburb |  | 0..1 | string | The suburb part of the address URL: http://hl7.org.nz/fhir/StructureDefinition/suburb
extension:building-name |  | 0..1 | string | The name of the building URL: http://hl7.org.nz/fhir/StructureDefinition/building-name
extension:domicile-code |  | 0..1 | CodeableConcept | The domicile code associated with this address URL: http://hl7.org.nz/fhir/StructureDefinition/domicile-code Binding: Domicile Code (preferred)
extension:notValidatedAddressReason |  | 0..1 | CodeableConcept | The reason an address was not validated URL: http://hl7.org.nz/fhir/StructureDefinition/not-validated-address-reason Binding: Address Not Validated Reason (preferred)
extension:nz-address-id |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nz-address-id
extension:nz-address-derived |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nhi-address-derived
use | ?!Σ | 1..1 | code | home | work | temp | old | billing - purpose of this address Binding: NHI Address Use Codes (required) Example General: home
type | Σ | 1..1 | code | postal | physical Binding: NHI Address Type Codes (required) Example General: both
line | Σ | 1..2 | string | Street name, number, direction & P.O. Box etc. This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Patient.extension:ethnicity.​value[x]:valueCodeableConcept | Base | required | HPI 4 digit ethnicity codes | 📍2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:nzCitizen.​extension:status.value[x]:valueCodeableConcept | Base | preferred | NZ Citizenship status | 📦1.1.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.extension:nzCitizen.​extension:source.value[x]:valueCodeableConcept | Base | required | NZ Citizenship Information Source | 📦1.1 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:birthPlace.​extension:source.value[x] | Base | required | Country of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.identifier:NHI.​use | Base | required | Valid use values for NHI | 📦2.0.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.name.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Name Information Source | 📦1.3 | HIP FHIR Common Terminology Guide v1.9
Patient.name.use | Base | required | NameUse | 📍4.0.1 | FHIR Std.
Patient.name.prefix | Base | required | Name Prefix Codes | 📦2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.telecom.use | Base | required | NHI ContactPoint Use Codes | 📦1.6.5 | This IG
Patient.gender | Base | required | AdministrativeGender | 📍4.0.1 | FHIR Std.
Patient.birthDate.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.deceased[x].​extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Death Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.address.use | Base | required | NHI Address Use Codes | 📦1.0.0 | HIP FHIR Common Terminology Guide v1.9
Patient.address.type | Base | required | NHI Address Type Codes | 📦1.0 | HIP FHIR Common Terminology Guide v1.9
Patient.communication.​language | Base | preferred | Common Languages | 📦4.0.1 | FHIR Std.
Patient.link.type | Base | required | LinkType | 📍4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
EM02101 | error | Patient | A Patient name must contain either a given or family name | `Patient.name.all(given.exists() and family.exists())`
EM02106 | error | Patient | A Patient must have an active Preferred Name | `Patient.name.extension.where((url = 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred') and (valueBoolean=true)).count()=1`
EM02201 | error | Patient | A Patient must have a primary residential address | `Patient.address.where( (use = 'home') and (type = 'physical')).count()=1`
EM07212 | error | Patient | birthdate must be after 1 January 1900, and not a future date | `(birthDate > @1900-01-01) and (birthDate < now())`
EM07212-1 | error | Patient | Date of Death cannot be a future date | `deceasedDateTime < now()`
EM07215 | error | Patient | Date of Death must be greater than, or equal to Date of Birth | `deceasedDateTime >= birthDate`
EM07225 | error | Patient, Patient.name | If name-use-extra is supplied name-use must be temp, and source NPRF | `name.where(use='temp').exists() implies (extension.where((url='http://hl7.org.nz/fhir/StructureDefinition/information-source') and (valueCodeableConcept.coding.code ='NPRF')).exists())`
dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Patient | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
nhi-nz-pat-1 | error | Patient | only allows certain name name use values | `Patient.name.where( (use.empty()) or (use='nickname') or (use = 'maiden') or (use = 'temp') )`
nhi-nz-pat-2 | error | Patient | home phone 0..1 | `Patient.telecom.where(use='home' and system = 'phone').count() < 2`
nhi-nz-pat-3 | error | Patient | mobile phone 0..1 | `Patient.telecom.where(use='mobile' and system = 'phone').count() < 2`
nhi-nz-pat-4 | error | Patient | email 0..1 | `Patient.telecom.where(system = 'email').count() < 2`
nhi-nz-pat-5 | error | Patient | character restrictions for contact context | `Patient.telecom.extension[context].valueString.all(matches('^[-a-zA-Z0-9@:%._~#=?&\/]*$'))`
nhi-nz-pat-6 | error | Patient | Contact context must be less than 256 characters | `Patient.telecom.extension[context].256.all(length()<256)`
nz-pat-1 | error | Patient | only a single official NHI | `Patient.identifier.where(system='https://standards.digital.health.nz/ns/nhi-id' and use='official').count() < 2`

Differential View

This structure is derived from NhiPatient

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Patient | C | 0..* | NhiPatient | Information about an individual or animal receiving health care services Constraints: EM02106, EM02201, EM02101, EM07225, EM07212, EM07212-1, EM07215
implicitRules |  | 0..0 |  | A set of rules under which this content was created
language |  | 0..0 |  | Language of the resource content
Slices for contained |  |  |  | Content/Rules for all slices
contained:GP |  | 0..0 |  | Contained resource for the Patient's enrolled general Practitioner
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:ethnicity |  | 1..6 | Nz_ethnicity | NZ Ethnicity
extension:nzCitizen |  | 1..1 | Nz_citizenship | NZ Citizenship
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:status |  | 1..1 | Extension | Extension
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
extension:source |  | 1..1 | Extension | Extension
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
extension:dhb |  | 0..0 |  | District Health Board linked to a NZ Healthcare Service, Location or Patient
extension:birthPlace |  | 0..1 | BirthPlace | Extension
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:country |  | 1..1 | Extension | Extension
extension:source |  | 1..1 | Extension | Extension
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for identifier |  |  |  | Content/Rules for all slices
identifier:NHI |  | 0..0 |  | An identifier for this patient
name | C | 1..1 | HumanName | A name associated with the patient Constraints: EM07225
extension |  | 2..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:information-source |  | 1..1 | Information_source | Information Source
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
prefix |  | 0..1 | string | Parts that come before the name
telecom |  | 0..0 |  | The Paient's contact details
gender |  | 1..1 | code | male | female | other | unknown
birthDate |  | 1..1 | date | The date of birth for the individual
extension |  | 1..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:information-source |  | 1..1 | Information_source | Information Source
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
deceased[x] |  |  |  |
extension |  | 1..* | Extension | Extension
Slices for extension |  |  |  | Content/Rules for all slices
extension:information-source |  | 1..1 | Information_source | Information Source
value[x] |  | 1..1 | CodeableConcept | Value of extension
Slices for value[x] |  |  |  | Content/Rules for all slices
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension
address |  | 1..1 | NhiAddress | An address expressed using postal conventions (as opposed to GPS or other location definition formats)
use |  | 1..1 | code | home | work | temp | old | billing - purpose of this address
line |  | 1..2 | string | Street name, number, direction & P.O. Box etc.
generalPractitioner |  | 0..0 |  | Reference for the Patient's enrolled general Practitioner
Documentation for this format

#### Constraints

Id | Grade | Path(s) | Description | Expression
EM02101 | error | Patient | A Patient name must contain either a given or family name | `Patient.name.all(given.exists() and family.exists())`
EM02106 | error | Patient | A Patient must have an active Preferred Name | `Patient.name.extension.where((url = 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred') and (valueBoolean=true)).count()=1`
EM02201 | error | Patient | A Patient must have a primary residential address | `Patient.address.where( (use = 'home') and (type = 'physical')).count()=1`
EM07212 | error | Patient | birthdate must be after 1 January 1900, and not a future date | `(birthDate > @1900-01-01) and (birthDate < now())`
EM07212-1 | error | Patient | Date of Death cannot be a future date | `deceasedDateTime < now()`
EM07215 | error | Patient | Date of Death must be greater than, or equal to Date of Birth | `deceasedDateTime >= birthDate`
EM07225 | error | Patient, Patient.name | If name-use-extra is supplied name-use must be temp, and source NPRF | `name.where(use='temp').exists() implies (extension.where((url='http://hl7.org.nz/fhir/StructureDefinition/information-source') and (valueCodeableConcept.coding.code ='NPRF')).exists())`

Snapshot View

Name | Flags | Card. | Type | Description & Constraints Filter: Bindings Constraints Obligations
--- | --- | --- | --- | ---
Patient | C | 0..* | NhiPatient | Information about an individual or animal receiving health care services Constraints: nz-pat-1, nhi-nz-pat-1, nhi-nz-pat-2, nhi-nz-pat-3, nhi-nz-pat-4, nhi-nz-pat-5, nhi-nz-pat-6, EM02106, EM02201, EM02101, EM07225, EM07212, EM07212-1, EM07215
id | Σ | 0..1 | id | Logical id of this artifact
meta | Σ | 0..1 | Meta | Metadata about the resource
text |  | 0..1 | Narrative | Text summary of the resource, for human interpretation This profile does not constrain the narrative in regard to content, language, or traceability to data elements
Slices for contained |  | 0..* | Resource | Contained, inline Resources Slice: Unordered, Closed by type:$this
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:ethnicity |  | 1..6 | (Complex) | NZ Ethnicity URL: http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Hip_ethnicity_lvl_4 (2.0) (required)
extension:nzCitizen |  | 1..1 | (Complex) | NZ Citizenship URL: http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:status |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "status"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship status (preferred)
extension:source |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: NZ Citizenship Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship"
extension:birthPlace |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/birth-place
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:country |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "country"
value[x] |  | 0..1 | CodeableConcept | Value of extension Binding: ISO 3166-1:2013 (2-alpha country code) (required)
extension:place-of-birth |  | 0..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "place-of-birth"
value[x] |  | 0..1 | string | Value of extension
extension:source |  | 1..1 | Extension | Extension
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "source"
value[x] |  | 1..1 | CodeableConcept | Value of extension Binding: Country of Birth Information Source (required)
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/birth-place"
modifierExtension | ?! | 0..* | Extension | Extensions that cannot be ignored
Slices for identifier | Σ | 0..* | Identifier | An identifier for this patient Slice: Unordered, Closed by value:system
name | Σ C | 1..1 | HumanName | A name associated with the patient Constraints: EM07225
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 2..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Name Information Source (required)
extension:preferred |  | 1..1 | boolean | Preferred URL: http://hl7.org/fhir/StructureDefinition/iso21090-preferred
extension:nhi-name-use-extra |  | 0..1 | CodeableConcept | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/name-use-extra Binding: NHI Name Use Extra (required)
use | ?!Σ | 0..1 | code | temp | nickname | maiden Binding: NameUse (required): The use of a human name.
family | Σ | 0..1 | string | Family name (often called 'Surname')
given | Σ | 0..2 | string | Given name and other given name(s) This repeating element order: Given Names appear in the correct order for presenting the name
prefix | Σ | 0..1 | string | Parts that come before the name Binding: Name Prefix Codes (required) This repeating element order: Prefixes appear in the correct order for presenting the name
gender | Σ | 1..1 | code | male | female | other | unknown Binding: AdministrativeGender (required): The gender of a person used for administrative purposes.
id |  | 0..1 | string | xml:id (or equivalent in JSON)
Slices for extension |  | 0..* | Extension | Extension Slice: Unordered, Open by value:url
extension:originalText |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/gender-original-text
value |  | 0..1 | string | Primitive value for code
birthDate | Σ | 1..1 | date | The date of birth for the individual
id |  | 0..1 | string | xml:id (or equivalent in JSON)
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Birth Information Source (required)
value |  | 0..1 | date | Primitive value for date
deceased[x] | ?!Σ | 0..1 | dateTime | Indicates if the individual is deceased or not
id |  | 0..1 | string | xml:id (or equivalent in JSON)
Slices for extension |  | 1..* | Extension | Extension Slice: Unordered, Open by value:url
extension:information-source |  | 1..1 | (Complex) | Information Source URL: http://hl7.org.nz/fhir/StructureDefinition/information-source
id |  | 0..1 | string | Unique id for inter-element referencing
extension |  | 0..0 |  | Extension Slice: Unordered, Open by value:url
url |  | 1..1 | uri | "http://hl7.org.nz/fhir/StructureDefinition/information-source"
Slices for value[x] |  | 1..1 | CodeableConcept | Value of extension Slice: Unordered, Closed by type:$this
value[x]:valueCodeableConcept |  | 1..1 | CodeableConcept | Value of extension Binding: Date of Death Information Source (required)
value |  | 0..1 | dateTime | Primitive value for dateTime
address |  | 1..1 | NhiAddress | An address expressed using postal conventions (as opposed to GPS or other location definition formats)
id |  | 0..1 | string | Unique id for inter-element referencing
Slices for extension |  | 0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url
extension:nz-geocode |  | 0..1 | (Complex) | A geocode using the NZ specific datum (reference point) URL: http://hl7.org.nz/fhir/StructureDefinition/nz-geocode
extension:suburb |  | 0..1 | string | The suburb part of the address URL: http://hl7.org.nz/fhir/StructureDefinition/suburb
extension:building-name |  | 0..1 | string | The name of the building URL: http://hl7.org.nz/fhir/StructureDefinition/building-name
extension:domicile-code |  | 0..1 | CodeableConcept | The domicile code associated with this address URL: http://hl7.org.nz/fhir/StructureDefinition/domicile-code Binding: Domicile Code (preferred)
extension:notValidatedAddressReason |  | 0..1 | CodeableConcept | The reason an address was not validated URL: http://hl7.org.nz/fhir/StructureDefinition/not-validated-address-reason Binding: Address Not Validated Reason (preferred)
extension:nz-address-id |  | 0..1 | string | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nz-address-id
extension:nz-address-derived |  | 0..1 | (Complex) | Extension URL: http://hl7.org.nz/fhir/StructureDefinition/nhi-address-derived
use | ?!Σ | 1..1 | code | home | work | temp | old | billing - purpose of this address Binding: NHI Address Use Codes (required) Example General: home
type | Σ | 1..1 | code | postal | physical Binding: NHI Address Type Codes (required) Example General: both
text | Σ | 0..1 | string | Text representation of the address Example General: 137 Nowhere Street, Erewhon 9132
line | Σ | 1..2 | string | Street name, number, direction & P.O. Box etc. This repeating element order: The order in which lines should appear in an address label Example General: 137 Nowhere Street
city | Σ | 0..1 | string | Name of city, town etc. Example General: Erewhon
postalCode | Σ | 0..1 | string | Postal code for area Example General: 9132
country | Σ | 0..1 | string | Country (e.g. can be ISO 3166 2 or 3 letter code) Binding: ISO 3166-1:2013 (2-alpha country code) (required)
Documentation for this format

#### Terminology Bindings

Path | Status | Usage | ValueSet | Version | Source
Patient.extension:ethnicity.​value[x]:valueCodeableConcept | Base | required | HPI 4 digit ethnicity codes | 📍2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:nzCitizen.​extension:status.value[x]:valueCodeableConcept | Base | preferred | NZ Citizenship status | 📦1.1.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.extension:nzCitizen.​extension:source.value[x]:valueCodeableConcept | Base | required | NZ Citizenship Information Source | 📦1.1 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:birthPlace.​extension:country.value[x] | Base | required | ISO 3166-1:2013 (2-alpha country code) | 📦2013 | HIP FHIR Common Terminology Guide v1.9
Patient.extension:birthPlace.​extension:source.value[x] | Base | required | Country of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.identifier:NHI.​use | Base | required | Valid use values for NHI | 📦2.0.0 | HL7® FHIR® New Zealand Base Implementation Guide v2.0
Patient.name.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Name Information Source | 📦1.3 | HIP FHIR Common Terminology Guide v1.9
Patient.name.use | Base | required | NameUse | 📍4.0.1 | FHIR Std.
Patient.name.prefix | Base | required | Name Prefix Codes | 📦2.0 | HIP FHIR Common Terminology Guide v1.9
Patient.telecom.system | Base | required | NHI ContactPoint System Codes | 📦1.6.5 | This IG
Patient.telecom.use | Base | required | NHI ContactPoint Use Codes | 📦1.6.5 | This IG
Patient.gender | Base | required | AdministrativeGender | 📍4.0.1 | FHIR Std.
Patient.birthDate.extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Birth Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.deceased[x].​extension:information-source.​value[x]:valueCodeableConcept | Base | required | Date of Death Information Source | 📦1.2 | HIP FHIR Common Terminology Guide v1.9
Patient.address.use | Base | required | NHI Address Use Codes | 📦1.0.0 | HIP FHIR Common Terminology Guide v1.9
Patient.address.type | Base | required | NHI Address Type Codes | 📦1.0 | HIP FHIR Common Terminology Guide v1.9
Patient.address.country | Base | required | ISO 3166-1:2013 (2-alpha country code) | 📦2013 | HIP FHIR Common Terminology Guide v1.9
Patient.contact.relationship | Base | extensible | Patient Contact Relationship | 📦4.0.1 | FHIR Std.
Patient.contact.gender | Base | required | AdministrativeGender | 📍4.0.1 | FHIR Std.
Patient.communication.​language | Base | preferred | Common Languages | 📦4.0.1 | FHIR Std.
Patient.link.type | Base | required | LinkType | 📍4.0.1 | FHIR Std.

#### Constraints

Id | Grade | Path(s) | Description | Expression
EM02101 | error | Patient | A Patient name must contain either a given or family name | `Patient.name.all(given.exists() and family.exists())`
EM02106 | error | Patient | A Patient must have an active Preferred Name | `Patient.name.extension.where((url = 'http://hl7.org/fhir/StructureDefinition/iso21090-preferred') and (valueBoolean=true)).count()=1`
EM02201 | error | Patient | A Patient must have a primary residential address | `Patient.address.where( (use = 'home') and (type = 'physical')).count()=1`
EM07212 | error | Patient | birthdate must be after 1 January 1900, and not a future date | `(birthDate > @1900-01-01) and (birthDate < now())`
EM07212-1 | error | Patient | Date of Death cannot be a future date | `deceasedDateTime < now()`
EM07215 | error | Patient | Date of Death must be greater than, or equal to Date of Birth | `deceasedDateTime >= birthDate`
EM07225 | error | Patient, Patient.name | If name-use-extra is supplied name-use must be temp, and source NPRF | `name.where(use='temp').exists() implies (extension.where((url='http://hl7.org.nz/fhir/StructureDefinition/information-source') and (valueCodeableConcept.coding.code ='NPRF')).exists())`
dom-2 | error | Patient | If the resource is contained in another resource, it SHALL NOT contain nested Resources | `contained.contained.empty()`
dom-3 | error | Patient | If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource | `contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()`
dom-4 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated | `contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()`
dom-5 | error | Patient | If a resource is contained in another resource, it SHALL NOT have a security label | `contained.meta.security.empty()`
dom-6 | best practice | Patient | A resource should have narrative for robust management | `text.`div`.exists()`
ele-1 | error | **ALL** elements | All FHIR elements must have a @value or children | `hasValue() or (children().count() > id.count())`
ext-1 | error | **ALL** extensions | Must have either extensions or value[x], not both | `extension.exists() != value.exists()`
nhi-nz-pat-1 | error | Patient | only allows certain name name use values | `Patient.name.where( (use.empty()) or (use='nickname') or (use = 'maiden') or (use = 'temp') )`
nhi-nz-pat-2 | error | Patient | home phone 0..1 | `Patient.telecom.where(use='home' and system = 'phone').count() < 2`
nhi-nz-pat-3 | error | Patient | mobile phone 0..1 | `Patient.telecom.where(use='mobile' and system = 'phone').count() < 2`
nhi-nz-pat-4 | error | Patient | email 0..1 | `Patient.telecom.where(system = 'email').count() < 2`
nhi-nz-pat-5 | error | Patient | character restrictions for contact context | `Patient.telecom.extension[context].valueString.all(matches('^[-a-zA-Z0-9@:%._~#=?&\/]*$'))`
nhi-nz-pat-6 | error | Patient | Contact context must be less than 256 characters | `Patient.telecom.extension[context].256.all(length()<256)`
nz-pat-1 | error | Patient | only a single official NHI | `Patient.identifier.where(system='https://standards.digital.health.nz/ns/nhi-id' and use='official').count() < 2`

This structure is derived from NhiPatient

Summary

Mandatory: 20 elements(7 nested mandatory elements)
Prohibited: 7 elements

Other representations of profile: CSV, Excel, Schematron