MediRecords FHIR Implementation Guide
1.3.0 - release


AllergyIntolerance

The MediRecords FHIR API supports the following AllergyIntolerance operations.

GET {API_URL}/v1/AllergyIntolerance

This API interface enables the client to search AllergyIntolerance instances from MediRecords repository. This is in compliance with this MediRecords AllergyIntolerance profile.

Query Parameters    
_count number Instruct the server regarding how many resources should be returned in a single page
asserter reference Practitioner(reference) or Patient(reference) who has recorded the allergy.
code token The text value in the code details of the allergy record. Supported only using :text modifier.
manifestation token It is the clinical symptoms/signs associated with the allergy. It is text value in the reaction manifestation details of the allergy record. Supported only using :text modifier.
patient
(mandatory)
reference Patient(reference) for whom the allergy record is created
severity token It denotes the reaction severity. The acceptable values are Mild, Moderate, Severe and Not Specified
Request Headers  
X-Request-Id A unique id to for the request/response assigned by either client or server. The expected format is UUID. If the client doesn’t supply this id, it is expected that server SHALL assign one.

Response

The server returns matching AllergyIntolerance instances in a Bundle that the logged-in user has access to. If no search criteria is provided, then all AllergyIntolerance instances that the logged-in user has access to will be returned.

By default, only active Allergy records will be provided in the search result.

In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.

Status Text
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Read

GET {API_URL}/v1/AllergyIntolerance/{id}

This API interface enables the client to read an AllergyIntolerance resource from MediRecords repository which is compliant with this MediRecords AllergyIntolerance profile.

Request Parameters  
id The logical id of the AllergyIntolerance resource

Response

In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.

Status Text
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Create

POST {API_URL}/v1/AllergyIntolerance

This API interface enables the client to create a AllergyIntolerance resource in MediRecords repository which is compliant with this MediRecords AllergyIntolerance profile.

Request Parameters  
_format This parameter allows a client to override the accept header value when it is unable to set it correctly due to internal limitations (e.g. XSLT usage). the values xml, text/xml, application/xml, and application/fhir+xml SHALL be interpreted to mean the XML format, the codes json, application/json and application/fhir+json SHALL be interpreted to mean the JSON format. The _format parameter does not override the Content-Type header for the type of the body of a POST request
Request Headers  
Prefer The client can indicate how the response can be returned. return=minimal indicates that the client asks to return no body. return=representation indicates that the client asks to return the full resource. return=OperationOutcome indicates that the client asks server to return an OperationOutcome resource containing hints and warnings about the operation rather than the full resource
X-Request-Id A unique id to for the request/response assigned by either client or server. The expected format is UUID. If the client doesn’t supply this id, it is expected that server SHALL assign one.

Request Body

Request body that creates a new AllergyIntolerance resource

Response

In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.

Status Text  
201 Created The response to this depends on what is specified in “Prefer” header or what is server’s default behaviour. By default this returns the requested AllergyIntolerance instance with the logical id populated in it.
400 Bad Request Resource could not be parsed or failed basic FHIR validation rules
401 Unauthorized  
403 Forbidden  
404 Not Found Resource type not supported, or not a FHIR end-point
409 Conflict  
422 Unprocessable Entity The proposed resource violated applicable FHIR profiles or server business rules.
500 Internal Server Error  

Update

PUT {API_URL}/v1/AllergyIntolerance/{id}

This API interface enables the client to update a specific AllergyIntolerance resource instance existed in MediRecords repository which is compliant with this MediRecords AllergyIntolerance profile.

Request Parameters  
id The logical id of the AllergyIntolerance resource
Request Headers  
X-Request-Id A unique id to for the request/response assigned by either client or server. The expected format is UUID. If the client doesn’t supply this id, it is expected that server SHALL assign one.

Request Body

Request body that updates an existing AllergyIntolerance record details

Response

In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.

Status Text
200 OK
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
422 Unprocessable Entity
500 Internal Server Error

Delete

DELETE {API_URL}/v1/AllergyIntolerance/{id}

This API interface enables the client to delete a specific AllergyIntolerance resource instance from MediRecords repository.

Request Parameters  
id The logical id of the AllergyIntolerance resource
Request Headers  
X-Request-Id A unique id to for the request/response assigned by either client or server. The expected format is UUID. If the client doesn’t supply this id, it is expected that server SHALL assign one.

Response

In an error situation, server SHALL return OperationOutcome detailing the error with the appropriate HTTP Error code as follows.

Status Text
204 No Content
400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
500 Internal Server Error

Webhook

The following table provides the FHIR Webhook event types generated for the AllergyIntolerance resource.

Hub Event Application Trigger Event  
allergy-intolerance.created Occurs whenever a new allergy record is created Example
allergy-intolerance.updated Occurs whenever a allergy record is updated  
Bundle 
  AllergyIntolerance(1)
  Patient (1)
  PractitionerRole (0..1)
  Practitioner (0..2)
  Organization (0..1)
   
allergy-intolerance.deleted Occurs whenever a allergy record is deleted
Bundle
  request (1) 
    url: DELETE AllergyIntolerance/{id}