Skip to main content

MedicationDispense

Overview

The MedicationDispense resource indicates that a medication product is to be or has been dispensed for a named person/patient. This resource is used to record the dispensing of medications from a pharmacy or other dispensing location.

Use Cases:

  • Track medication dispensing events
  • Record pharmacy fulfillment of prescriptions
  • Monitor medication adherence and compliance

Relationships:

  • References Patient (subject of the dispense)
  • May reference MedicationRequest (original prescription)
  • May include Provenance information

Resource Schema

Key fields in the MedicationDispense resource:

{
"resourceType": "MedicationDispense",
"id": "example-dispense",
"status": "completed",
"medicationCodeableConcept": {
"coding": [{
"system": "http://www.nlm.nih.gov/research/umls/rxnorm",
"code": "1049502",
"display": "Acetaminophen 325 MG Oral Tablet"
}]
},
"subject": {
"reference": "Patient/123"
},
"quantity": {
"value": 30,
"unit": "tablets"
},
"whenHandedOver": "2023-10-15T10:30:00Z"
}

Operations

The Certified API MedicationDispense resource supports the following standard operations. However, support varies by the targeted CareRecord or solution.

CareRecord / SolutionCreateReadUpdateSearch
GEHRIMED-Yes-Yes
myAvatar-Yes-Yes
myEvolv-Yes-Yes
myUnity-Yes-Yes
TheraOffice-Yes-Yes

Read

Retrieve a specific medication dispense by ID.

GET /MedicationDispense/{id}
Example Request
curl -X GET https://fhir.netsmartcloud.com/provider/system-access/v2/{tenant-id}/MedicationDispense/dispense-123 \
-H "Accept: application/fhir+json"
info

Not all Netsmart solutions support MedicationDispense search. See supported operations table above and consult your target solution's documentation for more information.

Search for medication dispenses using various criteria.

GET Method

Use GET for simple searches with parameters in the query string.

GET /MedicationDispense?parameter=value

POST Method

Use POST for complex searches with form-encoded parameters.

POST /MedicationDispense/_search

Search Parameters

Patient-based Search:

ParameterTypeRequiredDescriptionExample
patientreferenceYesThe identity of a patient to list dispenses forpatient=value
statustokenNoReturns dispenses with a specified dispense statusstatus=value
typetokenNoReturns dispenses of a specific typetype=value
_lastUpdateddateNoOnly return resources which were last updated as specified by the given range_lastUpdated=value
_revincludespecialNoInclude Provenance resource(s) that reference the matched search results. Allowed: "Provenance:target"_revinclude=value

ID-based Search:

ParameterTypeRequiredDescriptionExample
_idstringYesThe ID of the resource_id=value
statustokenNoReturns dispenses with a specified dispense statusstatus=value
typetokenNoReturns dispenses of a specific typetype=value
_lastUpdateddateNoOnly return resources which were last updated as specified by the given range_lastUpdated=value
_revincludespecialNoInclude Provenance resource(s) that reference the matched search results. Allowed: "Provenance:target"_revinclude=value

Common Search Patterns

Find dispenses for a patient:

GET /MedicationDispense?patient=Patient/123&_count=10

Search by status:

GET /MedicationDispense?patient=Patient/123&status=completed

Find recently updated records:

GET /MedicationDispense?patient=Patient/123&_lastUpdated=ge2023-10-01

Examples

Read Request

Read MedicationDispense
curl -X GET "https://fhir.netsmartcloud.com/provider/system-access/v2/{tenant-id}/MedicationDispense/example-dispense" \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"

Request Examples

Search by Patient
curl -X POST https://fhir.netsmartcloud.com/provider/system-access/v2/{tenant-id}/MedicationDispense/_search \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "patient=Patient/123&status=completed"
Search by status
curl -X GET "https://fhir.netsmartcloud.com/provider/system-access/v2/{tenant-id}/MedicationDispense?patient=Patient/123&status=completed" \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json"

Integration Patterns

Common Workflows

  1. Medication History Retrieval: Search for all dispenses for a patient to build medication history
  2. Adherence Monitoring: Track dispensing patterns to monitor patient compliance
  3. Pharmacy Integration: Record dispensing events from pharmacy systems
  • Patient: Subject of the medication dispense
  • MedicationRequest: Original prescription that led to the dispense
  • Medication: Details about the dispensed medication
  • Provenance: Audit trail information

Error Handling

For detailed error codes and handling, see the Error Handling documentation.

Supported Profiles

This API supports the following FHIR profiles: