@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<https://standards.digital.health.nz/fhir/air/Immunization/imm-example-2> a fhir:Immunization ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "imm-example-2"] ;
  fhir:Resource.meta [
     fhir:Element.extension [
       fhir:index 0 ;
       fhir:Extension.url [ fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-modified-source-system" ] ;
       fhir:Extension.valueString [ fhir:value "SS345" ]
     ], [
       fhir:index 1 ;
       fhir:Extension.url [ fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-modified-by" ] ;
       fhir:Extension.valueString [ fhir:value "222" ]
     ], [
       fhir:index 2 ;
       fhir:Extension.url [ fhir:value "http://hl7.org/fhir/StructureDefinition/firstCreated" ] ;
       fhir:Extension.valueDateTime [ fhir:value "2023-08-21T02:18:30.303+00:00"^^xsd:dateTime ]
     ] ;
     fhir:Meta.versionId [ fhir:value "2" ] ;
     fhir:Meta.lastUpdated [ fhir:value "2023-08-31T02:18:32.217+00:00"^^xsd:dateTime ] ;
     fhir:Meta.profile [
       fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization" ;
       fhir:index 0 ;
       fhir:link <https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization>
     ]
  ] ;
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "extensions" ] ;
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: Immunization imm-example-2</b></p><a name=\"imm-example-2\"> </a><a name=\"hcimm-example-2\"> </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\">version: 2; Last updated: 2023-08-31 02:18:32+0000</p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-air-immunization.html\">AIR Immunization</a></p></div><blockquote><p><b>Immunization Diluent</b></p><ul><li>diluentLotNumber: 33332222</li><li>diluentExpiryDate: 2026-01-01</li></ul></blockquote><p><b>AIR Administered Product Extension</b>: <span title=\"Codes:{http://nzmt.org.nz 44016911000116108}\">M-M-R-II</span></p><p><b>mobileSiteId</b>: FZZ958-K_MOB0001</p><blockquote><p><b>AIR Age Given Extension</b></p><ul><li>years: 1</li><li>months: 2</li><li>days: 22</li><li>daysSinceBirth: 445</li><li>precision: Day</li></ul></blockquote><p><b>status</b>: Completed</p><p><b>statusReason</b>: <span title=\"Codes:{http://snomed.info/sct 127785005}\">Active or passive immunization</span></p><p><b>vaccineCode</b>: <span title=\"Codes:{http://hl7.org/fhir/sid/cvx 03}\">MMR</span></p><p><b>patient</b>: Identifier: NHI/ZAA0792</p><p><b>occurrence</b>: 2023-03-01 16:45:46+1300</p><p><b>location</b>: <a href=\"https://simplifier.net/resolve?scope=fhir.org.nz.ig.base@2.0.0&amp;canonical=https://api.hip.digital.health.nz/fhir/hpi/v1/Location/FZZ835-E\">https://api.hip.digital.health.nz/fhir/hpi/v1/Location/FZZ835-E</a></p><p><b>lotNumber</b>: 1234567890</p><p><b>expirationDate</b>: 2024-08-31</p><p><b>site</b>: <span title=\"Codes:{http://snomed.info/sct 368209003}\">Right upper arm</span></p><p><b>route</b>: <span title=\"Codes:{http://snomed.info/sct 54471007}\">Buccal route</span></p><h3>Performers</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Function</b></td><td><b>Actor</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{https://standards.digital.health.nz/ns/air-terms-code VC}\">Vaccinator</span></td><td>Identifier: HPIProvider/90ZZLP</td></tr></table><p><b>reasonCode</b>: <span title=\"Codes:{http://snomed.info/sct 161651000210107}\">Publicly funded vaccination given for 65 years of age or older</span></p><h3>ProtocolApplieds</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>TargetDisease</b></td><td><b>DoseNumber[x]</b></td></tr><tr><td style=\"display: none\">*</td><td><span title=\"Codes:{http://snomed.info/sct 14189004}\">Measles</span></td><td>1</td></tr></table><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: RelatedPerson #imm-related-person-1</b></p><a name=\"imm-example-2/imm-related-person-1\"> </a><a name=\"hcimm-example-2/imm-related-person-1\"> </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-air-related-person-prf.html\">AIR Related Person Profile</a></p></div><p><b>patient</b>: <a href=\"https://simplifier.net/resolve?scope=fhir.org.nz.ig.base@2.0.0&amp;canonical=https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZZZ9994\">https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZZZ9994</a></p><p><b>relationship</b>: <span title=\"Codes:{http://terminology.hl7.org/CodeSystem/v3-RoleCode MTH}\">mother</span></p><p><b>name</b>: Jane Jess Test-Dill </p><p><b>telecom</b>: ph: 041111111(Home), ph: 091111111(Work), <a href=\"mailto:jadill@test.mail\">jadill@test.mail</a></p><p><b>address</b>: 456 Main St Suite 256 Hamilton 1111 (home) (NZ Suburb: ccc)</p></blockquote><hr/><blockquote><p class=\"res-header-id\"><b>Generated Narrative: Observation #imm-serology-report-1</b></p><a name=\"imm-example-2/imm-serology-report-1\"> </a><a name=\"hcimm-example-2/imm-serology-report-1\"> </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-air-serology-report-profile.html\">AIR Serology Report Profile</a></p></div><p><b>status</b>: Final</p><p><b>code</b>: <span title=\"Codes:{http://snomed.info/sct 278969009}\">Hepatitis B status</span></p><p><b>interpretation</b>: <span title=\"Codes:{https://standards.digital.health.nz/ns/air-serology-protection-terms IND}\">Indeterminate</span></p></blockquote></div>"
  ] ;
  fhir:DomainResource.contained [
     a fhir:RelatedPerson ;
     fhir:index 0 ;
     fhir:Resource.id [ fhir:value "imm-related-person-1" ] ;
     fhir:Resource.meta [
       fhir:Meta.profile [
         fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-related-person-prf" ;
         fhir:index 0 ;
         fhir:link <https://standards.digital.health.nz/fhir/air/StructureDefinition/air-related-person-prf>
       ]
     ] ;
     fhir:RelatedPerson.patient [
       fhir:link <https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZZZ9994> ;
       fhir:Reference.reference [ fhir:value "https://api.hip.digital.health.nz/fhir/nhi/v1/Patient/ZZZ9994" ] ;
       fhir:Reference.identifier [
         fhir:Identifier.system [ fhir:value "https://standards.digital.health.nz/ns/nhi-id" ] ;
         fhir:Identifier.value [ fhir:value "ZZZ9994" ]
       ]
     ] ;
     fhir:RelatedPerson.relationship [
       fhir:index 0 ;
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/v3-RoleCode" ] ;
         fhir:Coding.code [ fhir:value "MTH" ]
       ]
     ] ;
     fhir:RelatedPerson.name [
       fhir:index 0 ;
       fhir:HumanName.family [ fhir:value "Test-Dill" ] ;
       fhir:HumanName.given [
         fhir:value "Jane Jess" ;
         fhir:index 0
       ]
     ] ;
     fhir:RelatedPerson.telecom [
       fhir:index 0 ;
       fhir:ContactPoint.system [ fhir:value "phone" ] ;
       fhir:ContactPoint.value [ fhir:value "041111111" ] ;
       fhir:ContactPoint.use [ fhir:value "home" ]
     ], [
       fhir:index 1 ;
       fhir:ContactPoint.system [ fhir:value "phone" ] ;
       fhir:ContactPoint.value [ fhir:value "091111111" ] ;
       fhir:ContactPoint.use [ fhir:value "work" ]
     ], [
       fhir:index 2 ;
       fhir:ContactPoint.system [ fhir:value "email" ] ;
       fhir:ContactPoint.value [ fhir:value "jadill@test.mail" ] ;
       fhir:ContactPoint.use [ fhir:value "home" ]
     ] ;
     fhir:RelatedPerson.address [
       fhir:index 0 ;
       fhir:Element.extension [
         fhir:index 0 ;
         fhir:Extension.url [ fhir:value "http://hl7.org.nz/fhir/StructureDefinition/suburb" ] ;
         fhir:Extension.valueString [ fhir:value "ccc" ]
       ] ;
       fhir:Address.use [ fhir:value "home" ] ;
       fhir:Address.type [ fhir:value "physical" ] ;
       fhir:Address.line [
         fhir:value "456 Main St" ;
         fhir:index 0
       ], [
         fhir:value "Suite 256" ;
         fhir:index 1
       ] ;
       fhir:Address.city [ fhir:value "Hamilton" ] ;
       fhir:Address.postalCode [ fhir:value "1111" ]
     ]
  ], [
     a fhir:Observation ;
     fhir:index 1 ;
     fhir:Resource.id [ fhir:value "imm-serology-report-1" ] ;
     fhir:Resource.meta [
       fhir:Meta.profile [
         fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-serology-report-profile" ;
         fhir:index 0 ;
         fhir:link <https://standards.digital.health.nz/fhir/air/StructureDefinition/air-serology-report-profile>
       ]
     ] ;
     fhir:Observation.status [ fhir:value "final" ] ;
     fhir:Observation.code [
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         a sct:278969009 ;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
         fhir:Coding.code [ fhir:value "278969009" ]
       ]
     ] ;
     fhir:Observation.interpretation [
       fhir:index 0 ;
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "https://standards.digital.health.nz/ns/air-serology-protection-terms" ] ;
         fhir:Coding.code [ fhir:value "IND" ]
       ]
     ]
  ] ;
  fhir:DomainResource.extension [
     fhir:index 0 ;
     fhir:Element.extension [
       fhir:index 0 ;
       fhir:Extension.url [ fhir:value "diluentLotNumber" ] ;
       fhir:Extension.valueString [ fhir:value "33332222" ]
     ], [
       fhir:index 1 ;
       fhir:Extension.url [ fhir:value "diluentExpiryDate" ] ;
       fhir:Extension.valueDate [ fhir:value "2026-01-01"^^xsd:date ]
     ] ;
     fhir:Extension.url [ fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-diluent" ]
  ], [
     fhir:index 1 ;
     fhir:Extension.url [ fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-administered-product" ] ;
     fhir:Extension.valueCodeableConcept [
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "http://nzmt.org.nz" ] ;
         fhir:Coding.code [ fhir:value "44016911000116108" ] ;
         fhir:Coding.display [ fhir:value "M-M-R-II" ]
       ]
     ]
  ], [
     fhir:index 2 ;
     fhir:Extension.url [ fhir:value "mobileSiteId" ] ;
     fhir:Extension.valueString [ fhir:value "FZZ958-K_MOB0001" ]
  ], [
     fhir:index 3 ;
     fhir:Element.extension [
       fhir:index 0 ;
       fhir:Extension.url [ fhir:value "years" ] ;
       fhir:Extension.valueInteger [ fhir:value "1"^^xsd:integer ]
     ], [
       fhir:index 1 ;
       fhir:Extension.url [ fhir:value "months" ] ;
       fhir:Extension.valueInteger [ fhir:value "2"^^xsd:integer ]
     ], [
       fhir:index 2 ;
       fhir:Extension.url [ fhir:value "days" ] ;
       fhir:Extension.valueInteger [ fhir:value "22"^^xsd:integer ]
     ], [
       fhir:index 3 ;
       fhir:Extension.url [ fhir:value "daysSinceBirth" ] ;
       fhir:Extension.valueInteger [ fhir:value "445"^^xsd:integer ]
     ], [
       fhir:index 4 ;
       fhir:Extension.url [ fhir:value "precision" ] ;
       fhir:Extension.valueString [ fhir:value "Day" ]
     ] ;
     fhir:Extension.url [ fhir:value "https://standards.digital.health.nz/fhir/air/StructureDefinition/air-age-given" ]
  ] ;
  fhir:Immunization.status [ fhir:value "completed"] ;
  fhir:Immunization.statusReason [
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       a sct:127785005 ;
       fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
       fhir:Coding.code [ fhir:value "127785005" ]
     ]
  ] ;
  fhir:Immunization.vaccineCode [
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       fhir:Coding.system [ fhir:value "http://hl7.org/fhir/sid/cvx" ] ;
       fhir:Coding.code [ fhir:value "03" ] ;
       fhir:Coding.display [ fhir:value "MMR" ]
     ]
  ] ;
  fhir:Immunization.patient [
     fhir:Reference.identifier [
       fhir:Identifier.system [ fhir:value "https://standards.digital.health.nz/ns/nhi-id" ] ;
       fhir:Identifier.value [ fhir:value "ZAA0792" ]
     ]
  ] ;
  fhir:Immunization.occurrenceDateTime [ fhir:value "2023-03-01T16:45:46+13:00"^^xsd:dateTime] ;
  fhir:Immunization.location [
     fhir:link <https://api.hip.digital.health.nz/fhir/hpi/v1/Location/FZZ835-E> ;
     fhir:Reference.reference [ fhir:value "https://api.hip.digital.health.nz/fhir/hpi/v1/Location/FZZ835-E" ] ;
     fhir:Reference.identifier [
       fhir:Identifier.system [ fhir:value "https://standards.digital.health.nz/ns/hpi-facility-id" ] ;
       fhir:Identifier.value [ fhir:value "FZZ835-E" ]
     ]
  ] ;
  fhir:Immunization.lotNumber [ fhir:value "1234567890"] ;
  fhir:Immunization.expirationDate [ fhir:value "2024-08-31"^^xsd:date] ;
  fhir:Immunization.site [
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       a sct:368209003 ;
       fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
       fhir:Coding.version [ fhir:value "1.0.0" ] ;
       fhir:Coding.code [ fhir:value "368209003" ] ;
       fhir:Coding.display [ fhir:value "Right upper arm" ]
     ]
  ] ;
  fhir:Immunization.route [
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       a sct:54471007 ;
       fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
       fhir:Coding.version [ fhir:value "1.0.0" ] ;
       fhir:Coding.code [ fhir:value "54471007" ] ;
       fhir:Coding.display [ fhir:value "Buccal route" ]
     ]
  ] ;
  fhir:Immunization.performer [
     fhir:index 0 ;
     fhir:Immunization.performer.function [
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         fhir:Coding.system [ fhir:value "https://standards.digital.health.nz/ns/air-terms-code" ] ;
         fhir:Coding.code [ fhir:value "VC" ] ;
         fhir:Coding.display [ fhir:value "Vaccinator" ]
       ]
     ] ;
     fhir:Immunization.performer.actor [
       fhir:Reference.identifier [
         fhir:Identifier.system [ fhir:value "https://standards.digital.health.nz/ns/hpi-person-id" ] ;
         fhir:Identifier.value [ fhir:value "90ZZLP" ]
       ]
     ]
  ] ;
  fhir:Immunization.reasonCode [
     fhir:index 0 ;
     fhir:CodeableConcept.coding [
       fhir:index 0 ;
       a sct:161651000210107 ;
       fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
       fhir:Coding.version [ fhir:value "1.0.0" ] ;
       fhir:Coding.code [ fhir:value "161651000210107" ] ;
       fhir:Coding.display [ fhir:value "Publicly funded vaccination given for 65 years of age or older" ]
     ]
  ] ;
  fhir:Immunization.protocolApplied [
     fhir:index 0 ;
     fhir:Immunization.protocolApplied.targetDisease [
       fhir:index 0 ;
       fhir:CodeableConcept.coding [
         fhir:index 0 ;
         a sct:14189004 ;
         fhir:Coding.system [ fhir:value "http://snomed.info/sct" ] ;
         fhir:Coding.code [ fhir:value "14189004" ]
       ]
     ] ;
     fhir:Immunization.protocolApplied.doseNumberPositiveInt [ fhir:value "1"^^xsd:positiveInteger ]
  ] .

# - ontology header ------------------------------------------------------------

<https://standards.digital.health.nz/fhir/air/Immunization/imm-example-2.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

# -------------------------------------------------------------------------------------

