Profiles & Operations Index > Medication Administration Submit

Operation: MedicationAdministration Submit

The Submit MedicationAdministration operation is used to transfer medication records to the DHDR. This encompasses both Create and Update.

Scope

This transaction involves a request by a Point of Service system to transfer a Medication Administration with contained resources, to the DHDR Solution. The request is received by the DHDR which stores the received record and returns an HTTP response code and an OperationOutcome resource if applicable.

For example, a user at a HIC site records a medication administration in a Point of Care System. The Point of Care System will extract and assemble the medication administration record as per the Ontario Digital Health Drug Repository HL7 FHIR Implementation Guide specification and submit it to the DHDR, where it is available for viewing by other DHDR Consumers.

Interaction Diagram

Actor: Client Application

Role: Requests a specific MedicationAdministration record based on a known resouce ID from the DHDR Solution.

Actor: DHDR Solution

Role: Returns a specific MedicationAdministration corresponding to the resource ID specified by the Client Application.

Specification

The FHIR DHDR specification is based on the HL7 FHIR R4 Search operation.

MedicationAdministration Create Request

The Create Request will create a new MedicationAdministration based upon information available from the MedicationAdministration source,if one does not already exist in the repository. If there is already an existing MedicationAdministration record, the newly submitted version will replace the existing version in the repository.

The MedicationAdministration Create Request creates a new resource in a server-assigned location. The create interaction is performed by an HTTP POST command as shown:

POST [base]/[type]{?_format=[mime-type]}

MedicationAdministration Create Response

  • OperationOutcome

MedicationAdministration Update Request

The Update Request will update an existing MedicationDispense record based upon information available from the MedicationAdministration record source.

PUT [base]/[type]/[id] {?_format=[mime-type]}

MedicationAdministration Updated Response

  • OperationOutcome

Note:

For new dispenses, MedicationAdministration.status should be set to completed.

For reversal of a dispense, MedicationAdministration.status should be set to entered-in-error.


Example Create Single Event Message

HTTP Method:

POST

Headers:

Content-Type: application/fhir+json

Address:

[base]/MedicationAdministration/

Message Body:


{
  "resourceType": "MedicationAdministration",
  "id": "94066C2D3E7D3025E05400144FF9F54ASB",
  "meta": {
    "lastUpdated": "2019-10-03T14:06:20.148-04:00",
    "source": "http://ehealthontario.ca/hns"
  },
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Narrative is not implemented in this release</div>"
  },
  "contained": [
    {
      "resourceType": "Medication",
      "id": "Medication94066C2D3E7D3025E05400144FF9F54A",
      "extension": [
        {
          "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-medication-strength",
          "valueString": "5mg"
        }
      ],
      "code": {
        "coding": [
          {
            "system": "https://fhir.infoway-inforoute.ca/CodeSystem/canadianclinicaldrugdataset",
            "code": "02267470",
            "display": "Novo-Bisoprolol"
          }
        ]
      },
...

Example Create Bundle Message

HTTP Method:

POST

Headers:

Content-Type: application/fhir+json

Address:

[base]/Bundle/

Message Body:

{
  "resourceType": "Bundle",
  "id": "3bbb062a-a103-4041-98b1-0f8f46a803sbn",
    "meta": {
    "lastUpdated": "2019-10-03T14:06:20.148-04:00",
    },
  "language": "en",
  "type": "batch",
  "timestamp": "2022-06-20T08:30:49.547-04:00",
  "entry": [
    {
      "fullUrl": "https://provider.pst.ehealthontario.ca/api2/fhir/MedicationDispense/93F05B0FF748525FE05400144FF9F54A",
      "resource": {
        "resourceType": "MedicationAdministration",
        "id": "93F05B0FF748525FE05400144FF9F54A",
        "meta": {
          "lastUpdated": "2019-10-02T11:45:17.000-04:00",
          "source": "http://ehealthontario.ca/hns"
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Narrative is not implemented in this release</div>"
        },
        "contained": [
          {
            "resourceType": "Medication",
            "id": "Medication93F05B0FF748525FE05400144FF9F54A",
      "extension": [
        {
          "url": "http://ehealthontario.ca/fhir/StructureDefinition/ca-on-medications-ext-medication-strength",
          "valueString": "5mg"
        }
      ], 
 ...

Medication Administration Profiles

Extensions


Expected Behaviour

See Response Handling page for a complete listig of response codes

Operation Validation HTTP Response Code OpOutcome Code OpOutcome Severity OperationOutcome.details.text&OperationOutcome.text
MedicationAdministration Create (POST) Missing security token 400 required error Missing required security token: PIN
MedicationAdministration Create (POST) Failed authentication 401 security error Authorization is required for the interaction that was attempted
MedicationAdministration Create (POST) Rate Limit 429 throttled error Too Many Requests
MedicationAdministration Create (POST) Unhandled Exception 500 exception fatal Internal Error
MedicationAdministration Create (POST) Accepted 202