@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 -------------------------------------------------------------------

<https://standards.digital.health.nz/fhir/air/OperationDefinition/Reassign-patient-schedules> a fhir:OperationDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:Resource.id [ fhir:value "Reassign-patient-schedules"] ;
  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 Reassign-patient-schedules</b></p><a name=\"Reassign-patient-schedules\"> </a><a name=\"hcReassign-patient-schedules\"> </a><p>URL: [base]/Patient/$reassign-schedules</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>NHI</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a></td><td/><td><div><p>The logical id to identify patient/consumer.</p>\n</div></td></tr><tr><td>IN</td><td>reassignDate</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a></td><td/><td><div><p>The new onboarding date for the consumer</p>\n</div></td></tr><tr><td>OUT</td><td>version</td><td/><td>1..1</td><td><a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a></td><td/><td><div><p>The consumer version following the update.</p>\n</div></td></tr><tr><td>OUT</td><td>state</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a></td><td/><td><div><p>The consumer state.</p>\n</div></td></tr><tr><td>OUT</td><td>subStatus</td><td/><td>0..1</td><td><a href=\"http://hl7.org/fhir/R4/patient.html\">Patient</a></td><td/><td><div><p>The consumer subStatus.</p>\n</div></td></tr></table></div>"
  ] ;
  fhir:OperationDefinition.url [ fhir:value "https://standards.digital.health.nz/fhir/air/OperationDefinition/reassign-patient-schedules"] ;
  fhir:OperationDefinition.version [ fhir:value "1.28.0-SNAPSHOT"] ;
  fhir:OperationDefinition.name [ fhir:value "reassign-patient-schedules"] ;
  fhir:OperationDefinition.title [ fhir:value "Reassign Patient Schedules"] ;
  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-04T03:40:16+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 "Reassign immunisation schedules for a patient.\n\n        Cancels the existing schedules and then creates a new set of schedules based on the new onboarding date. Input is the new onboarding date."] ;
  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 "false"^^xsd:boolean] ;
  fhir:OperationDefinition.code [ fhir:value "reassign-schedules"] ;
  fhir:OperationDefinition.resource [
     fhir:value "Patient" ;
     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 "NHI" ] ;
     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 logical id to identify patient/consumer." ] ;
     fhir:OperationDefinition.parameter.type [ fhir:value "Patient" ]
  ], [
     fhir:index 1 ;
     fhir:OperationDefinition.parameter.name [ fhir:value "reassignDate" ] ;
     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 new onboarding date for the consumer" ] ;
     fhir:OperationDefinition.parameter.type [ fhir:value "Patient" ]
  ], [
     fhir:index 2 ;
     fhir:OperationDefinition.parameter.name [ fhir:value "version" ] ;
     fhir:OperationDefinition.parameter.use [ fhir:value "out" ] ;
     fhir:OperationDefinition.parameter.min [ fhir:value "1"^^xsd:integer ] ;
     fhir:OperationDefinition.parameter.max [ fhir:value "1" ] ;
     fhir:OperationDefinition.parameter.documentation [ fhir:value "The consumer version following the update." ] ;
     fhir:OperationDefinition.parameter.type [ fhir:value "Patient" ]
  ], [
     fhir:index 3 ;
     fhir:OperationDefinition.parameter.name [ fhir:value "state" ] ;
     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 consumer state." ] ;
     fhir:OperationDefinition.parameter.type [ fhir:value "Patient" ]
  ], [
     fhir:index 4 ;
     fhir:OperationDefinition.parameter.name [ fhir:value "subStatus" ] ;
     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 consumer subStatus." ] ;
     fhir:OperationDefinition.parameter.type [ fhir:value "Patient" ]
  ] .

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

<https://standards.digital.health.nz/fhir/air/OperationDefinition/Reassign-patient-schedules.ttl> a owl:Ontology ;
  owl:imports fhir:fhir.ttl .

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

