Aotearoa Immunisation Register (AIR) FHIR Implementation Guide (API-V1)
1.27.0 - release New Zealand

Aotearoa Immunisation Register (AIR) FHIR Implementation Guide (API-V1) - Local Development build (v1.27.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

## : Upsert Immunisation Event - TTL Representation

Active as of 2026-08-05

Raw ttl | Download

    @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 xsd: <http://www.w3.org/2001/XMLSchema#> .

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

    <http://hl7.org/fhir/OperationDefinition/Immunization-upsert> a fhir:OperationDefinition ;
      fhir:nodeRole fhir:treeRoot ;
      fhir:Resource.id [ fhir:value "Immunization-upsert"] ;
      fhir:DomainResource.text [
         fhir:Narrative.status [ fhir:value "generated" ] ;
         fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition Immunization-upsert</b></p><a name=\"Immunization-upsert\"> </a><a name=\"hcImmunization-upsert\"> </a><p>URL: [base]/Immunization/$upsert</p><h3>Parameters</h3><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>immunization</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/immunization.html\">Immunization</a></td><td/><td><div><p>The Immunization resource to be either updated (if an algorithmic match is found) or inserted (if no match is found) into ImmSOT.</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/immunization.html\">Immunization</a></td><td/><td><div><p>The updated or created immunisation event (as an Immunization resource).</p>\n</div></td></tr><tr><td>OUT</td><td>failure</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/operationoutcome.html\">OperationOutcome</a></td><td/><td><div><p>Error response</p>\n</div></td></tr></table></div>"
      ] ;
      fhir:OperationDefinition.url [ fhir:value "https://standards.digital.health.nz/fhir/air/OperationDefinition/immunization-upsert"] ;
      fhir:OperationDefinition.version [ fhir:value "1.27.0"] ;
      fhir:OperationDefinition.name [ fhir:value "UpsertImmunisationEvent"] ;
      fhir:OperationDefinition.title [ fhir:value "Upsert Immunisation Event"] ;
      fhir:OperationDefinition.status [ fhir:value "active"] ;
      fhir:OperationDefinition.kind [ fhir:value "operation"] ;
      fhir:OperationDefinition.experimental [ fhir:value "false"^^xsd:boolean] ;
      fhir:OperationDefinition.date [ fhir:value "2026-08-05T01:54:22+00:00"^^xsd:dateTime] ;
      fhir:OperationDefinition.publisher [ fhir:value "Te Whatu Ora"] ;
      fhir:OperationDefinition.contact [
         fhir:index 0 ;
         fhir:ContactDetail.name [ fhir:value "Te Whatu Ora" ] ;
         fhir:ContactDetail.telecom [
           fhir:index 0 ;
           fhir:ContactPoint.system [ fhir:value "url" ] ;
           fhir:ContactPoint.value [ fhir:value "https://tewhatuora.govt.nz" ]
         ]
      ] ;
      fhir:OperationDefinition.description [ fhir:value "Upsert an immunisation event based on a matching algorithm."] ;
      fhir:OperationDefinition.jurisdiction [
         fhir:index 0 ;
         fhir:CodeableConcept.coding [
           fhir:index 0 ;
           fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ] ;
           fhir:Coding.code [ fhir:value "US" ] ;
           fhir:Coding.display [ fhir:value "New Zealand" ]
         ]
      ] ;
      fhir:OperationDefinition.affectsState [ fhir:value "true"^^xsd:boolean] ;
      fhir:OperationDefinition.code [ fhir:value "upsert"] ;
      fhir:OperationDefinition.resource [
         fhir:value "Immunization" ;
         fhir:index 0
      ] ;
      fhir:OperationDefinition.system [ fhir:value "false"^^xsd:boolean] ;
      fhir:OperationDefinition.type [ fhir:value "true"^^xsd:boolean] ;
      fhir:OperationDefinition.instance [ fhir:value "false"^^xsd:boolean] ;
      fhir:OperationDefinition.parameter [
         fhir:index 0 ;
         fhir:OperationDefinition.parameter.name [ fhir:value "immunization" ] ;
         fhir:OperationDefinition.parameter.use [ fhir:value "in" ] ;
         fhir:OperationDefinition.parameter.min [ fhir:value "1"^^xsd:integer ] ;
         fhir:OperationDefinition.parameter.max [ fhir:value "1" ] ;
         fhir:OperationDefinition.parameter.documentation [ fhir:value "The Immunization resource to be either updated (if an algorithmic match is found) or inserted (if no match is found) into ImmSOT." ] ;
         fhir:OperationDefinition.parameter.type [ fhir:value "Immunization" ]
      ], [
         fhir:index 1 ;
         fhir:OperationDefinition.parameter.name [ fhir:value "return" ] ;
         fhir:OperationDefinition.parameter.use [ fhir:value "out" ] ;
         fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:OperationDefinition.parameter.max [ fhir:value "1" ] ;
         fhir:OperationDefinition.parameter.documentation [ fhir:value "The updated or created immunisation event (as an Immunization resource)." ] ;
         fhir:OperationDefinition.parameter.type [ fhir:value "Immunization" ]
      ], [
         fhir:index 2 ;
         fhir:OperationDefinition.parameter.name [ fhir:value "failure" ] ;
         fhir:OperationDefinition.parameter.use [ fhir:value "out" ] ;
         fhir:OperationDefinition.parameter.min [ fhir:value "0"^^xsd:integer ] ;
         fhir:OperationDefinition.parameter.max [ fhir:value "1" ] ;
         fhir:OperationDefinition.parameter.documentation [ fhir:value "Error response" ] ;
         fhir:OperationDefinition.parameter.type [ fhir:value "OperationOutcome" ]
      ] .

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

    <http://hl7.org/fhir/OperationDefinition/Immunization-upsert.ttl> a owl:Ontology ;
      owl:imports fhir:fhir.ttl ;
      owl:versionIRI <http://build.fhir.org/OperationDefinition/Immunization-upsert.ttl> .