@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org.nz/fhir/ig/nhi/Patient/create3-errors> a fhir:Patient ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "create3-errors"] ; # 
  fhir:meta [
     fhir:profile ( [
       fhir:v "http://hl7.org.nz/fhir/StructureDefinition/CreateNhiPatient"^^xsd:anyURI ;
       fhir:l <http://hl7.org.nz/fhir/StructureDefinition/CreateNhiPatient>
     ] )
  ] ; # 
  fhir:text [
     fhir:status [ fhir:v "extensions" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Patient create3-errors</b></p><a name=\"create3-errors\"> </a><a name=\"hccreate3-errors\"> </a><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\"/><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-CreateNhiPatient.html\">Create NHI Patient</a></p></div><p style=\"border: 1px #661aff solid; background-color: #e6e6ff; padding: 10px;\">(temp) Male, DoB: 1899-06-05</p><hr/><table class=\"grid\"><tr><td style=\"background-color: #f3f5da\" title=\"Known status of Patient\">Deceased:</td><td colspan=\"3\">1888-10-18</td></tr><tr><td style=\"background-color: #f3f5da\" title=\"Ways to contact the Patient\">Contact Detail</td><td colspan=\"3\">74 Chancellor Street Palmerston North 4412 NZ (home) (NZ Suburb: Awapuni)</td></tr><tr><td style=\"background-color: #f3f5da\" title=\"The country where the person was born\">null:</td><td colspan=\"3\"><ul><li>country: <span title=\"Codes:{urn:iso:std:iso:3166 NZ}\">New Zealand</span></li><li>source: <span title=\"Codes:{https://standards.digital.health.nz/ns/information-source-code BRCT}\">Birth Certificate</span></li></ul></td></tr><tr><td style=\"background-color: #f3f5da\" title=\"New Zealand citizenship\">NZ Citizenship:</td><td colspan=\"3\"><ul><li>status: <span title=\"Codes:{https://standards.digital.health.nz/ns/nz-citizenship-status-code yes}\">Yes</span></li><li>source: <span title=\"Codes:{https://standards.digital.health.nz/ns/information-source-code BRCT}\">Birth Certificate</span></li></ul></td></tr><tr><td style=\"background-color: #f3f5da\" title=\"The ethnic group or groups that a person identifies with or feels they belong to.  Ethnicity is a measure of cultural affiliation as opposed to race, ancestry, nationality or citizen.  Ethnicity is self-perceived and a person can belong to more than one group.#xA;#xA;The Stats New Zealand standard can be found [here](http://aria.stats.govt.nz/aria/#ClassificationView:uri=http://stats.govt.nz/cms/ClassificationVersion/YVqOcFHSlguKkT17).\"><a href=\"https://fhir.org.nz/ig/base/StructureDefinition-nz-ethnicity.html\">NZ Ethnicity</a></td><td colspan=\"3\"><span title=\"Codes:{https://standards.digital.health.nz/ns/ethnic-group-level-4-code 21111}\">Māori</span></td></tr></table></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:extension ( [
     fhir:url [
       fhir:v "http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity"^^xsd:anyURI ;
       fhir:l <http://hl7.org.nz/fhir/StructureDefinition/nz-ethnicity>
     ] ;
     fhir:value [
       a fhir:CodeableConcept ;
       fhir:coding ( [
         fhir:system [
           fhir:v "https://standards.digital.health.nz/ns/ethnic-group-level-4-code"^^xsd:anyURI ;
           fhir:l <https://standards.digital.health.nz/ns/ethnic-group-level-4-code>
         ] ;
         fhir:code [ fhir:v "21111" ] ;
         fhir:display [ fhir:v "Māori" ]
       ] )
     ]
  ] [
     fhir:extension ( [
       fhir:url [
         fhir:v "status"^^xsd:anyURI ;
         fhir:l fhir:status
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/nz-citizenship-status-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/nz-citizenship-status-code>
           ] ;
           fhir:code [ fhir:v "yes" ] ;
           fhir:display [ fhir:v "Yes" ]
         ] )
       ]
     ] [
       fhir:url [
         fhir:v "source"^^xsd:anyURI ;
         fhir:l fhir:source
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/information-source-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/information-source-code>
           ] ;
           fhir:code [ fhir:v "BRCT" ] ;
           fhir:display [ fhir:v "Birth Certificate" ]
         ] )
       ]
     ] ) ;
     fhir:url [
       fhir:v "http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship"^^xsd:anyURI ;
       fhir:l <http://hl7.org.nz/fhir/StructureDefinition/nz-citizenship>
     ]
  ] [
     fhir:extension ( [
       fhir:url [
         fhir:v "country"^^xsd:anyURI ;
         fhir:l fhir:country
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "urn:iso:std:iso:3166"^^xsd:anyURI ;
             fhir:l <urn:iso:std:iso:3166>
           ] ;
           fhir:code [ fhir:v "NZ" ] ;
           fhir:display [ fhir:v "New Zealand" ]
         ] )
       ]
     ] [
       fhir:url [
         fhir:v "source"^^xsd:anyURI ;
         fhir:l fhir:source
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/information-source-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/information-source-code>
           ] ;
           fhir:code [ fhir:v "BRCT" ] ;
           fhir:display [ fhir:v "Birth Certificate" ]
         ] )
       ]
     ] ) ;
     fhir:url [
       fhir:v "http://hl7.org.nz/fhir/StructureDefinition/birth-place"^^xsd:anyURI ;
       fhir:l <http://hl7.org.nz/fhir/StructureDefinition/birth-place>
     ]
  ] ) ; # 
  fhir:name ( [
     fhir:extension ( [
       fhir:url [
         fhir:v "http://hl7.org.nz/fhir/StructureDefinition/information-source"^^xsd:anyURI ;
         fhir:l <http://hl7.org.nz/fhir/StructureDefinition/information-source>
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/information-source-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/information-source-code>
           ] ;
           fhir:code [ fhir:v "GREG" ] ;
           fhir:display [ fhir:v "Proof not Sighted" ]
         ] )
       ]
     ] [
       fhir:url [
         fhir:v "http://hl7.org/fhir/StructureDefinition/iso21090-preferred"^^xsd:anyURI ;
         fhir:l <http://hl7.org/fhir/StructureDefinition/iso21090-preferred>
       ] ;
       fhir:value [
         a fhir:Boolean ;
         fhir:v true
       ]
     ] [
       fhir:url [
         fhir:v "http://hl7.org.nz/fhir/StructureDefinition/name-use-extra"^^xsd:anyURI ;
         fhir:l <http://hl7.org.nz/fhir/StructureDefinition/name-use-extra>
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/nhi-name-use-extra-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/nhi-name-use-extra-code>
           ] ;
           fhir:code [ fhir:v "BABYOF" ]
         ] )
       ]
     ] ) ;
     fhir:use [ fhir:v "temp" ]
  ] ) ; # 
  fhir:gender [ fhir:v "male"] ; # 
  fhir:birthDate [
     fhir:v "1899-06-05"^^xsd:date ;
     fhir:extension ( [
       fhir:url [
         fhir:v "http://hl7.org.nz/fhir/StructureDefinition/information-source"^^xsd:anyURI ;
         fhir:l <http://hl7.org.nz/fhir/StructureDefinition/information-source>
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/information-source-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/information-source-code>
           ] ;
           fhir:code [ fhir:v "HL7" ] ;
           fhir:display [ fhir:v "HL7 applied" ]
         ] )
       ]
     ] )
  ] ; # 
  fhir:deceased [
     a fhir:DateTime ;
     fhir:v "1888-10-18"^^xsd:date ;
     fhir:extension ( [
       fhir:url [
         fhir:v "http://hl7.org.nz/fhir/StructureDefinition/information-source"^^xsd:anyURI ;
         fhir:l <http://hl7.org.nz/fhir/StructureDefinition/information-source>
       ] ;
       fhir:value [
         a fhir:CodeableConcept ;
         fhir:coding ( [
           fhir:system [
             fhir:v "https://standards.digital.health.nz/ns/information-source-code"^^xsd:anyURI ;
             fhir:l <https://standards.digital.health.nz/ns/information-source-code>
           ] ;
           fhir:code [ fhir:v "DREG" ] ;
           fhir:display [ fhir:v "Death Register" ]
         ] )
       ]
     ] )
  ] ; # 
  fhir:address ( [
     fhir:id [ fhir:v "2" ] ;
     fhir:extension ( [
       fhir:url [
         fhir:v "http://hl7.org.nz/fhir/StructureDefinition/nz-address-id"^^xsd:anyURI ;
         fhir:l <http://hl7.org.nz/fhir/StructureDefinition/nz-address-id>
       ] ;
       fhir:value [
         a fhir:String ;
         fhir:v "12345"
       ]
     ] [
       fhir:url [
         fhir:v "http://hl7.org.nz/fhir/StructureDefinition/suburb"^^xsd:anyURI ;
         fhir:l <http://hl7.org.nz/fhir/StructureDefinition/suburb>
       ] ;
       fhir:value [
         a fhir:String ;
         fhir:v "Awapuni"
       ]
     ] ) ;
     fhir:use [ fhir:v "home" ] ;
     fhir:type [ fhir:v "postal" ] ;
     fhir:line ( [ fhir:v "74 Chancellor Street" ] ) ;
     fhir:city [ fhir:v "Palmerston North" ] ;
     fhir:postalCode [ fhir:v "4412" ] ;
     fhir:country [ fhir:v "NZ" ]
  ] ) . # 

# -------------------------------------------------------------------------------------

