New Zealand MWS IG
1.1.5 - Release

New Zealand MWS IG - Local Development build (v1.1.5) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

## Search Allergy Intolerance

### Get AllergyIntolerance for Patient

This is typically used to get all AllergyIntolerances for a patient.

#### Get AllergyIntolerance for Patient processing steps:

1. A FHIR Client sends a GET request to the MWS AllergyIntolerance endpoint with the 'patient' query parameter specifying the patient's NHI number
2. The request is validated - ALT: Validation failure. Operation Outcome resource returned
3. AllergyIntolerances for this NHI are retrieved from the MWS database
4. A bundle of MwsAllergyIntolerance resources is returned to the client

#### Search AllergyIntolerance Response Example

get-enrolment-response-message-1

### Search AllergyIntolerance for Patient

This is used to find all AllergyIntolerances for a patient filtered by category.

### Get and Search AllergyIntolerance for Patient Business Rules and Errors

Business Rule | HTTP error | EM error | Codesystem displayname | Additional description
--- | --- | --- | --- | ---
NHI number is a required search parameter | 400 Bad request |  |  | Not supported. The FHIR endpoint on this server does not know how to handle GET operation with parameters [category]
the NHI number parameter must exist in NHI | 404 Not found | EM02002 | Cannot be found | The MWS id cannot be found in MWS
Category parameter must contain a valid category code | 400 Bad request | EM07217 | Category contains invalid text | Category must contain a valid category