MediRecords FHIR Implementation Guide
20221128 - ci-build


DocumentReference

The MediRecords FHIR API supports the following DocumentReference profiles:

MRDocumentReferenceIn Correspondence - In
MRDocumentReferenceOut Correspondence - Out
MRDocumentReferencePrescription Medications - Prescription

The MediRecords FHIR API supports the following DocumentReference operations.

Read

GET {API_URL}/v1/DocumentReference/{id}

This API interface enables the client to read a DocumentReference resource from MediRecords repository which is compliant with the supported MediRecords DocumentReference profiles.

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

Webhook

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

Hub Event Application Trigger Event
document-in-reference.created Occurs whenever a new correspondence in record is created
document-out-reference.created Occurs whenever a new correspondence out record is created
document-in-reference.updated Occurs whenever a correspondence in record is updated
document-out-reference.updated Occurs whenever a correspondence out record is updated
Bundle<br>
  DocumentReference (1)
  Encounter (0..1)
  Patient (1)
  PractitionerRole (0..2)
  Practitioner (0..3)
  Organization (0..3)
   
document-in-reference.deleted Occurs whenever a correspondence in record is deleted
document-out-reference.deleted Occurs whenever a correspondence out record is deleted
Bundle<br>
  request (1)
    url: DELETE DocumentReference/{id}

Webhook Prescription

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

Hub Event Application Trigger Event  
document-reference.created Occurs whenever an documentreference prescription record is created  
Bundle
  DocumentReference (1)
  Practitioner (0..*)
  Organization (0..*)
  Patient (1) 
  Encounter (0..*)
  MedicationRequest (0..*)