Profiles & Operations > Search AllergyIntolerance

Operation: Search AllergyIntolerance

Search AllergyIntolerance

The Search AllergyIntolerance operation issues a parameterized query that results in a searchset Bundle that contains all the allergies related to a patient. This operation requires a patient identifier and also supports optional input parameters:

Query Search Parameters Description Usage Note
patient.identifier (AllergyIntolerance.patient.identifier) This parameter specifies an identifier associated with the patient who is the subject of this allergy. This use of patient.identifier follows the FHIR Chaining Parameters search methodology. the identifier of patient, which can be Ontario HCN, MRN, or ECID (Enterprise Client ID)
patient.gender (AllergyIntolerance.patient.gender) This parameter specifies the gender of the patient associated to the allergy. Value may be "male", "female", "other", "unknown"
patient.birthDate (AllergyIntolerance.patient.birthDate) This parameter specifies the date of birth of the patient associated to the allergy.
category the type of allergy (i.e. food|medication|environment|biologic)
date Date of the first time the allergy was recorded
onset Datetime when the manifestation showed
severity the severity of the allergy (i.e. mild|moderate|severe)

Scope

This transaction involves a request by PoS system for a set of allergies matching the specified search criteria. The request is received by the acCDR FHIR server which returns a Bundle containing the matching allergies.

For example, a physician who has access to acCDR is seeing a new patient and wants to see a list of allergies for that patient. The physician uses the patient information held in the system to query acCDR FHIR server for AllergyIntolerance associated with that patient with supported search criteria. The server returns a Bundle of any matching AllergyIntolerances which is then displayed to the physician as a list. The PoS system is responsibile for listing the available AllergyIntolerances for the user to review;

Interaction Diagram

search-encounter-diagram (need update)

Actor: PoS System

Role: Requests a set of acCDR allergies from acCDR FHIR server based on specified search criteria.

Actor: acCDR FHIR server

Role: Returns a Bundle containing AllergyIntolerance instances that match the search criteria specified by the PoS system.

Specification

This operation is based on FHIR R4 search operation.

Search AllergyIntolerance Operation

Search AllergyIntolerance operation is based on RESTful HTTP search operation on the AllergyIntolerance endpoint. acCDR FHIR server supports both GET and POST. We prefer the use of POST to avoid putting PHI in request URLs.

GET [base]/AllergyIntolerance?[parameters]

POST [base]/AllergyIntolerance/_search

For POST request, request parameters SHALL be specified as a string in the HTTP body. The format is parameter1=value1&parameter2=value2

Query Response

If the query is valid and at least one AllergyIntolerance is found, acCDR FHIR server will return a searchset bundle containing a matching AllergyIntolerance resource. If no matching AllergyIntolerance exists, acCDR FHIR server will return a empty bundle. The allergies in the searchset bundle will conform to the AllergyIntolerance profile defined in this implementation guide.

AllergyIntolerance Profile

Examples

  1. Search AllergyIntolerance by patient identifier (HCN or MRN)

GET [base]/AllergyIntolerance?patient.identifier=[system]|1234567890

  1. Search allergies using the combination of patient, date and location TBD

Search AllergyIntolerance Response Example

Expected Behavior

See Response Handling page for additional response handling behaviour.

Legend
code = OperationOutcome.issue.code
severity = OperationOutcome.issue.severity
details.coding.code=OperationOutcome.issue.details.coding.code
details.coding.display=OperationOutcome.issue.details.coding.display
details.text = OperationOutcome.issue.details.coding.text
HTTP Status Scenario Description severity code details.coding.code details.coding.display details.text
200 OK At least one encounter matching the specified search criteria is found
200 OK At least one encounter matching the specified search criteria is found, but there is a consent block that prevents disclosure of patient data. Returns an OperationOutcome resource indicating that there is a consent block on the patient's record that prevents disclosure of patient data. warning suppressed
200 OK No encounters matching the specified search criteria are found. warning not-found
400 Bad Request Missing security token error required Missing required security token: PIN
400 Bad Request Request is malformed (e.g. incorrect header value, patient identifier is missing system or value, etc) error -- -- -- --
500 Internal Server Error API validates the request but cannot return a valid response due to internal issues. fatal exception Internal Error
503 Service Unavailable Indicates that the services has been temporarily taken down (on purpose)
504 Gateway Timeout Downstream system(s) did not return timely response error timeout