# Rejection Rules - Aotearoa Immunisation Register (AIR) FHIR Implementation Guide v2.1.0

* [**Table of Contents**](toc.md)
* **Rejection Rules**

## Rejection Rules

# Immunisation Event Rejection Rules

The following rejection rules must be passed before an immunisation event can be created or updated within ImmSOT.

| | | | |
| :--- | :--- | :--- | :--- |
| rejection_facility | An immunisation event is rejected when |  |  |
|  |  |  |  |
|  | 1. The event has a non HPI-F system | 1. 422 | 1. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics": "A   Facility ID is required."        }    ]} |
|  | 2. The event facility value is empty. | 2. 400 | 2. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics":  "HAPI-0450: Failed to parse request   body as JSON resource. Error was: HAPI-1821: [element=\"value\"]   Invalid attribute value \"\": Attribute value must not be empty   (\"\")" }    ]} |
|  | 3. The event facility system is empty. | 3. 400 | 3. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics":  "HAPI-0450: Failed to parse request   body as JSON resource. Error was: HAPI-1821: [element=\"value\"]   Invalid attribute value \"\": Attribute value must not be empty   (\"\")" }    ]} |
|  | 4. The facility system exceeds 100 chars | 4. 422 | 4. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics":   "Location system cannot be greater than 100 characters"        }      ]} |
|  | 5. The facility value exceeds 8 characters | 5. 422 | 5. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics":   "Location value cannot be greater than 8 characters"        }      ]} |
|  | 6. The event does not have: | 6. 422 | 6. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics": "A   location is required."        }    ]} |
|  |     1. both facility system and   value |  |  |
|  |     2. location identifier |  |  |
|  |     3. location |  |  |
|  | 7. The event does not have a facility system | 7. 422 | 7. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics":   "Location has identification number but no identification system is   specified"       }    ]} |
|  | 8. The event does not have a facility value |  | 8. {      "resourceType": "OperationOutcome",    "issue": [{            "severity":   "error",              "code": "invariant",            "diagnostics": "A   Facility ID is required."        }    ]} |
|  |  |  |  |
| rejection_dose_number | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one dose number. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Immunization.protocolApplied:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization","Line   1, Col 1003"]}]} |
|  | 2. There’s a dose number and it exceeds 2 digits. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Dose   number cannot exceed 2 digits"}]} |
|  | 3. The dose supplied is blank or   zero. | 3. 422 | 3. "Value supplied is less than permitted   value of 1" |
|  |  |  |  |
| rejection_immunisation_event_date | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one immunisation event date | 1. 400 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"HAPI-0450:   Failed to parse request body as JSON resource. Error was: HAPI-1823: Multiple   repetitions of non-repeatable element 'occurrenceDateTime' found during   parse"}]} |
|  | 2. The event has an immunisation event date and it’s not in date OR   datetime format. | 2. 400 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"HAPI-0450:   Failed to parse request body as JSON resource. Error was: HAPI-1821:   [element=\"occurrenceDateTime\"] Invalid attribute value \"not   a date\": Invalid date/time format: \"not a date\""}]} |
|  | 3. It does not contain an immunisation event date. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Minimum"}]},"diagnostics":"Immunization.occurrence[x]:   minimum required = 1, but only found 0 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization","Line   1, Col 878"]}]} |
|  |  |  |  |
| rejection_vaccine_batch_expiry_date | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one vaccine batch expiry date | 1. 400 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"HAPI-0450:   Failed to parse request body as JSON resource. Error was: HAPI-1823: Multiple   repetitions of non-repeatable element 'expirationDate' found during   parse"}]} |
|  | 2. The event has a vaccine batch expiry date and it’s not in date format. | 2. 400 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"HAPI-0450:   Failed to parse request body as JSON resource. Error was: HAPI-1821:   [element=\"expirationDate\"] Invalid attribute value \"not a   date\": Invalid date/time format: \"not a date\""}]} |
|  |  |  |  |
| rejection_diluent_expiry_date | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one diluent expiry date | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Extension.extension:diluentExpiryDate:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-diluent|0.3.0)","location":["Immunization.extension[1]","Line   1, Col 828"]}]} |
|  | 2. The event has a diluent expiry date and it’s not in date format. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"warning","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Type_Specific_Checks_DT_DateTime_Reasonable"}]},"diagnostics":"The   value '111111' is outside the range of reasonable years - check for data   entry error","location":["Immunization.extension[0].extension[1].value.ofType(string)","Line   1, Col 684"]}]} |
|  |  |  |  |
| rejection_vaccine_batch_number | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one vaccine batch number | 1. 400 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"HAPI-0450:   Failed to parse request body as JSON resource. Error was: HAPI-1823: Multiple   repetitions of non-repeatable element 'lotNumber' found during parse"}]} |
|  | 2. The event has a vaccine batch number and it’s more than 50 characters. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Vaccine   lot number cannot be greater than 50 characters"}]} |
|  |  |  |  |
| rejection_diluent_batch_number | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one diluent batch number | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Immunization.extension:Diluent:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization","Line   1, Col   1122"]},{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Extension.extension:diluentLotNumber:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-diluent|0.3.0)","location":["Immunization.extension[1]","Line   1, Col 816"]}]} |
|  | 2. The event has a diluent batch number and it’s more than 50 characters. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Diluent   lot number cannot be greater than 50 characters"}]} |
|  |  |  |  |
| rejection_modified_by | An immunisation event is rejected when |  |  |
|  | 1. The event does not have ‘modified by’. | 1. 400 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"unknown","diagnostics":"User   ID header must be set."}]} |
|  | 2. There’s more than one ‘modified by’ | 2. n/a | 2. last one considered |
|  | 3. The event has ‘modified by’ and it exceeds 255 characters. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Modified   by cannot be greater than 255 characters"}]} |
|  |  |  |  |
| rejection_vaccine | An immunisation event is rejected when |  |  |
|  | 1. There’s more than one vaccine code | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Immunization.vaccineCode.coding:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization.vaccineCode","Line   1, Col 766"]}]} |
|  | 2. The event does not have a vaccine code (Note - this is irrespective of   whether vaccine system is present or not) | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Minimum"}]},"diagnostics":"Immunization.vaccineCode.coding.code:   minimum required = 1, but only found 0 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization.vaccineCode.coding[0]","Line   1, Col 701"]}]} |
|  | 3. The event does not have a vaccine system (Note - this is irrespective   of whether vaccine code is present or not) | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"warning","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"TERMINOLOGY_TX_SYSTEM_NO_CODE"}]},"diagnostics":"A   code with no system has no defined meaning. A system should be   provided","location":["Immunization.vaccineCode.coding[0]","Line   1, Col   684"]},{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Minimum"}]},"diagnostics":"Immunization.vaccineCode.coding.system:   minimum required = 1, but only found 0 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization.vaccineCode.coding[0]","Line   1, Col 684"]}]} |
|  | 4. The vaccine code exceeds 25 characters | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Vaccine   code cannot be greater than 25 characters"}]} |
|  | 5. The event has a code system version and it exceeds 25 characters | 5. 422 | 5.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Vaccine   code system version cannot be greater than 25 characters"}]} |
|  | 6. The event has vaccine source text and it exceeds 255 characters | 6. 422 | 6.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Vaccine   code text cannot be greater than 255 characters"}]} |
|  |  |  |  |
| rejection_status_reason | An immunisation event is rejected when |  |  |
|  | 1. The event has more than one status_reason_code. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Immunization.statusReason.coding:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization.statusReason","Line   1, Col 781"]}]} |
|  | 2. The event has a status_reason_code and it exceeds 18 characters. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Status   reason code cannot be greater than 18 characters"}]} |
|  | 3. The event has a   status_reason_code but does not have a status_reason_code_system (or   vice-versa). | | |
|  |  | 3a. 422 | 3a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Status   reason has a code but no code system is specified"}]} |
|  |  | 3b. 422 | 3b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Status   reason has a code system but no code is specified"}]} |
|  | 4. The event has a status_reason_code_system and it exceeds 100   characters. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Status   reason code system cannot be greater than 100 characters"}]} |
|  | 5. The event has a status_reason_code_system_version and it exceeds 25   characters. | 5. 422 | 5.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Status   reason code system version cannot be greater than 25 characters"}]} |
|  |  |  |  |
| rejection_route | An immunisation event is rejected when |  |  |
|  | 1. The event has more than one route_code. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Immunization.route.coding:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization.route","Line   1, Col 1001"]}]} |
|  | 2. The event has a route_code and it exceeds 18 characters. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Route   code cannot be greater than 18 characters"}]} |
|  | 3. The event has a route_code but   does not have a route_code_system (or vice-versa). | | |
|  |  | 3a. 422 | 3a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Route   has a code but no code system is specified"}]} |
|  |  | 3b. 422 | 3b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Route   has a code system but no code is specified"}]} |
|  | 4. The event has a route_code_system and it exceeds 100 characters. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Route   code system cannot be greater than 100 characters"}]} |
|  | 5. The event has a route_code_system_version and it exceeds 25   characters. | 5. 422 | 5.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Route   code system version cannot be greater than 25 characters"}]} |
|  |  |  |  |
| rejection_body_site | An immunisation event is rejected when |  |  |
|  |  |  |  |
|  | 1. The event has more than one body_site_code | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Validation_VAL_Profile_Maximum"}]},"diagnostics":"Immunization.site.coding:   max allowed = 1, but found 2 (from   https://standards.digital.health.nz/fhir/air/StructureDefinition/air-immunization|0.3.0)","location":["Immunization.site","Line   1, Col 1034"]}]} |
|  | 2. The event has a body_site_code and it exceeds 18 characters. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Body   site code cannot be greater than 18 characters"}]} |
|  | 3. The event has a body_site_code   but does not have a body_site_code_system (or vice-versa). | | |
|  |  | 3a. 422 | 3a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Body   site has a code but no code system is specified"}]} |
|  |  | 3b. 422 | 3b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Body   site has a code system but no code is specified"}]} |
|  | 4. The event has a body_site_code_system and it exceeds 100 characters. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Body   site code system cannot be greater than 100 characters"}]} |
|  | 5. The event has a body_site_code_system_version and it exceeds 25   characters. | 5. 422 | 5.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Body   site code system version cannot be greater than 25 characters"}]} |
|  |  |  |  |
| rejection_indication | An immunisation event is rejected when |  |  |
|  | 1. The event has an indication code and it exceeds 18 characters. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Indication   (reasonCode) code cannot be greater than 18 characters"}]} |
|  | 2. The event has an indication code   but does not have a system (or vice-versa). | | |
|  |  | 2a. 422 | 2a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Indication   (reasonCode) has a code but no code system is specified"}]} |
|  |  | 2b. 422 | 2b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Indication   (reasonCode) has a code system but no code is specified"}]} |
|  | 3. The event has an indication system and it exceeds 100 characters. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Indication   (reasonCode) code system cannot be greater than 100 characters"}]} |
|  | 4. The event has a system_version and it exceeds 25 characters. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Indication   (reasonCode) code system version cannot be greater than 25   characters"}]} |
|  |  |  |  |
| rejection_health_worker | An immunisation event is rejected when |  |  |
|  | 1. The event has a health_worker_identification_number and it exceeds 255   characters. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker identification number cannot be greater than 255 characters"}]} |
|  | 2. The event has a   health_worker_identification_number but does not have a   health_worker_identification_system (or vice-versa). | | |
|  |  | 2a. 422 | 2a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker has identification number but no identification system is   specified"}]} |
|  |  | 2b. 422 | 2b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker has identification system but no identification number is   specified"}]} |
|  | 3. The event has a health_worker_identification_system and it exceeds 100   characters. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker identification system cannot be greater than 100 characters"}]} |
|  |  |  |  |
| rejection_health_worker_function | An immunisation event is rejected when |  |  |
|  | 1. The event has a health_worker_function_code and it exceeds 4   characters. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker function code cannot be greater than 4 characters"}]} |
|  | 2. The event has a   health_worker_function_code, but not a health_worker_function_system (or   vice-versa). | | |
|  |  | 2a. 422 | 2a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker function has a code but no code system is specified"}]} |
|  |  | 2b. 422 | 2b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker function has a code system but no code is specified"}]} |
|  | 3. The event has a health_worker_function_system and it exceeds 100   characters. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker function system cannot be greater than 100 characters"}]} |
|  | 4. The event has a health_worker_function_system_version and it exceeds   25 characters. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Health   worker function code system version cannot be greater than 25   characters"}]} |
|  |  |  |  |
| rejection_nhi | An immunisation event is rejected when |  |  |
|  | 1. the NHI number does not pass checksum. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"NHI   did not pass checksum"}]} |
|  | 2. the request does not include an NHI code. | 2. 422 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Rule   nz-pat-2: 'if the patient identifier has a system, then it must have a   value.' Failed"}]},"diagnostics":"Rule nz-pat-2: 'if the   patient identifier has a system, then it must have a value.' Failed","location":["Immunization","Line   1, Col 909"]}]} |
|  | 3. the request does not include an NHI system. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Rule   nz-pat-3: 'if the patient identifier has a value, then it must have a   system.' Failed"}]},"diagnostics":"Rule nz-pat-3: 'if the   patient identifier has a value, then it must have a system.' Failed","location":["Immunization","Line   1, Col 870"]}]} |
|  | 4. the request has more than one NHI code. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Rule   nz-pat-1-1: 'There must be exactly one patient identifier.'   Failed"}]},"diagnostics":"Rule nz-pat-1-1: 'There must be   exactly one patient identifier.' Failed","location":["Immunization","Line   1, Col 825"]}]} |
|  |  |  |  |
| rejection_fhir_profile | An immunisation event is rejected when the request   violates the AIR FHIR immunisation profile. | 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","details":{"coding":[{"system":"http://hl7.org/fhir/java-core-messageId","code":"Rule   nz-pat-1-1: 'There must be exactly one patient identifier.'   Failed"}]},"diagnostics":"Rule nz-pat-1-1: 'There must be   exactly one patient identifier.' Failed","location":["Immunization","Line   1, Col 825"]}]} |
|  |  |  |  |
| rejection_status | An immunisation event is rejected when it does not have   a valid status (i.e. something other than completed, not done, or entered in   error). | 400 | {"resourceType":   "OperationOutcome","issue": [{"severity":   "error","code":   "processing","diagnostics": "HAPI-0450: Failed to   parse request body as JSON resource. Error was: HAPI-1821:   [element=\"status\"] Invalid attribute value \"?\":   Unknown ImmunizationStatus code '?'"}]} |
|  |  |  |  |
| Version_number | 1. An update immunisation event request is rejected   when the version of the existing event in the request payload does not match   the version of the event being updated. | 412 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"conflict","diagnostics":"Resource   version is outdated"}]} |
|  | 2. If-Match header, must be an integer | 400 | 2.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"processing","diagnostics":"Version   must be an integer"}]} |
|  |  |  |  |
| rejection_mobile_site | An immunisation event is rejected when the mobile site   is provided in must not be longer than 36 characters. | 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Mobile   Site ID cannot be greater than 36 characters"}]} |
|  |  |  |  |
| rejection_dq_ignore | An immunisation   event is rejected when the optional header dqIgnore is provided then it must   be a boolean value | | |
|  |  |  |  |
| rejection_serology | An immunisation   event is rejected when a serology report is provided: | | |
|  | 1. The event has a serology_result_system and it exceeds 100 characters. | 1. 422 | 1.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Serology   result value system cannot be greater than 100 characters"}]} |
|  | 2. The event has a serology_result_code, but not a serology_result_system   (or vice-versa). | 2. 422 | 2a.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Serology   result value has a code but no code system is specified"}]} |
|  |  |  | 2b.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Serology   result value has a code system but no code is specified"}]} |
|  | 3. The event has a serology_result_code and it exceeds 18 characters. | 3. 422 | 3.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Serology   result value code cannot be greater than 18 characters"}]} |
|  | 4. The event has a serology_result_system_version and it exceeds 25   characters. | 4. 422 | 4.   {"resourceType":"OperationOutcome","issue":[{"severity":"error","code":"invariant","diagnostics":"Serology   result value code system version cannot be greater than 25 characters"}]} |

