MedicationStatement Profile

This MedicationStatement profile is part of the set of resource profiles supported by the API Server used with the athenaPractice 12.3 and athenaFlow 9.12 products. It further describes read, search, create and update capabilities of these products.

Overview

This resource contains a record of a medication associated with a patient. This may be a medication that was once consumed, is currently consumed, or will be consumed in future. The source of this information can be a patient, a significant other, a clinician. Prior medications are often recorded during an encounter when the patient’s medical history is taken. Because this information relies on patient memory or the clinical data available for a patient, it is less precise than medication administration recordings (see MedicationAdministration).

Scope and Usage

This profile is used to define the content that will be returned by the API Server in response to requests to access MedicationStatement resources. All elements listed in the differential profile view are Supported, which means that the API Server is capable of supplying these fields from the product database when they have been populated via the product or its APIs.

The profile also defines the content that must be supplied to the API Server in response to requests to populate MedicationStatement resources. Fields which are marked as Mandatory in this profile are those that must be supplied to the API Server in content used to populate a resource.

Source

The MedicationStatement resource is derived from the MEDICATE tables in athenaPractice and athenaFlow. Specific detail can be found in the Mappings section below.

Supported Operations

The operations supported by this resource are listed below.

Read Operation

Read operations are executed as specified in the HL7 FHIR RESTful API implementation definition. To read a MedicationStatement, an application shall perform an HTTP GET, specifying the identifier of the resources being retrieved.

GET [base]/fhir/MedicationStatement/[id]{?_format=[json|xml]&_summary=[true|data]}

Read Operation Parameters

ParameterDescription
[base]Specifies the base URL of the FHIR Server, e.g., https://cpsapisandbox.virenceaz.com:9443/demoAPIServer
[id]Specifies the identifier of the MedicationStatement resource to retrieve
[_format]Specifies the format of the output and may be xml or json. When present, the _format value overrides the value of the Accept header in the request.
[_summary]Filters the output to include only summary elements (_summary=true) or to omit the generated narrative (_summary=data). Note: If the generated html narrative for the resource is not going to be used by the call, using _summary=data provides slightly improved API response times.

Read Operation HTTP Response Codes

Response CodeDescription
200 OKThe requested resource was found and is contained within the body of the HTTP response.
401 UnauthorizedAuthorization is required for this request, and either the Authorization header is missing or the supplied user credentials in the Authorization header are not valid or have expired. The body of the HTTP response will contain an OperationOutcome resource that indicates that Authorization is required.
404 Not FoundThe requested resource does not exist. The body of the HTTP response will contain an OperationOutcome resource that indicates that the resource could not be found.
500 Server ErrorThe server may return other error codes to indicate other error conditions. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.

Search Operation

Search operations are executed as specified in the HL7 FHIR RESTful API implementation definition. To search for MedicationStatement resources, an application shall perform an HTTP GET, specifying the query parameters associated with the resource.

GET [base]/fhir/MedicationStatement?{search-parameters}{&_count=[max-results]&_format=[json|xml]&_summary=[true|text|data]}

Search Operation Parameters

ParameterDescription
[base]Specifies the base URL of the FHIR Server, e.g., https://cpsapisandbox.virenceaz.com:9443/demoAPIServer
[_count]Specifies the maximum number of search results to return in a single query. Note: The count of results does not limit the number of additional resources returned via the _include parameter. No more than max-results MedicationStatement resources which match the search criteria will be returned. The API Server has default and maximum limits for the value that can be specified for this parameter. These limits may vary depending upon the client application vendors participation level in the AthenaHealth Partner program. Note: The API Server support the HL7 FHIR Paging capability.
[_format]Specifies the format of the output and may be xml or json. When present, the _format value overrides the value of the Accept header in the request.
[_summary]Filters the output to include only narrative elements (_summary=text), summary elements (_summary=true) or to omit the generated narrative (_summary=data). Note: If the generated html narrative for the resource is not going to be used by the call, using _summary=data provides improved API response times, especially when returning larger result sets.
_id (token )The ID of the resource
_lastUpdated (date )
_lastUpdated-fromnow (quantity )Like _lastUpdated except expressed as a positive or negative offset from the current time in units of time , e.g. _lastUpdated-fromnow=ge7||d for more than seven days in the future or =le-2||mo for less than two months in the past. The unit must be specified.
_security (token )
_tag (token )
ddid (token )
effectivedate (date )Date when patient was taking (or not taking) the medication
effectivedate-fromnow (quantity )Like effectivedate except expressed as a positive or negative offset from the current time in units of time , e.g. effectivedate-fromnow=ge7||d for more than seven days in the future or =le-2||mo for less than two months in the past. The unit must be specified.
encounter (reference )
encounter-or-historical (reference )
identifier (token )Return statements with this external identifier
medication (reference )Return administrations of this medication reference
ndc (token )
patient (reference )The identity of a patient to list statements for
rxnorm (token )
source (reference )Who the information in the statement came from
status (token )Return statements that match the given status

Search Operation HTTP Response Codes

Response CodeDescription
200 OKThe query was performed and any results found are contained within the body of the HTTP response. Note: The search API will return 200 OK when the query itself is successful, regardless of whether or not any matching results were found.
401 UnauthorizedAuthorization is required for this request, and either the Authorization header is missing or the supplied user credentials in the Authorization header are not valid or have expired. The body of the HTTP response will contain an OperationOutcome resource that indicates that Authorization is required.
500 Server ErrorThe server may return other error codes to indicate other error conditions. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.

Create Operation

Create operations are executed as specified in the HL7 FHIR RESTful API implementation definition. To create a new MedicationStatement resource, an application must perform an HTTP POST, specifying the content of the resource in the body of the request.

POST [base]/fhir/MedicationStatement?{_format=[json|xml]}

Create Operation Parameters

ParameterDescription
[_format]Specifies the format of the output and may be xml or json. When present, the _format value overrides the value of the Accept header in the request.

Create Operation HTTP Response Codes

Response CodeDescription
201 CreatedThe resource was created at the location specified in the HTTP Location header. Note: Unsupported fields will be accepted in a request but will not be persisted to the database. Some fields may be mapped to database specific codes which closely but not perfectly match the input. See the HL7 FHIR specification for more detail on server permitted changes.
400 Bad RequestThe resource could not be parsed, or failed basic validation rules. The body of the HTTP response will contain an OperationOutcome resource that provide more detail about the reason for the failure.
401 UnauthorizedAuthorization is required for this request, and either the Authorization header is missing or the supplied user credentials in the Authorization header are not valid or have expired. The body of the HTTP response will contain an OperationOutcome resource that indicates that Authorization is required.
422 Unprocessable EntityThe proposed resource violated server business rules. For example, a required field may be missing or a field may contain a value that is not supported by the API Server. The body of the HTTP response will contain an OperationOutcome resource that provide more detail about the reason for the failure.
500 Server ErrorThe server may return other error codes to indicate other error conditions. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.

Update Operation

Update operations are executed as specified in the HL7 FHIR RESTful API implementation definition. To create a new MedicationStatement resource, an application must perform an HTTP PUT, specifying the content of the resource in the body of the request.

PUT [base]/fhir/MedicationStatement/[id]?{_format=[json|xml]}

Update Operation Parameters

ParameterDescription
[_format]Specifies the format of the output and may be xml or json. When present, the _format value overrides the value of the Accept header in the request.

Update Operation HTTP Response Codes

Response CodeDescription
200 OKThe resource was updated at the location specified in the HTTP Location header. Note: Unsupported fields will be accepted in a request but will not be persisted to the database. Some fields may be mapped to database specific codes which closely but not perfectly match the input. See the HL7 FHIR specification for more detail on server permitted changes.
400 Bad RequestThe resource could not be parsed, or failed basic validation rules. The body of the HTTP response will contain an OperationOutcome resource that provide more detail about the reason for the failure.
401 UnauthorizedAuthorization is required for this request, and either the Authorization header is missing or the supplied user credentials in the Authorization header are not valid or have expired. The body of the HTTP response will contain an OperationOutcome resource that indicates that Authorization is required.
422 Unprocessable EntityThe proposed resource violated server business rules. For example, a required field may be missing or a field may contain a value that is not supported by the API Server. The body of the HTTP response will contain an OperationOutcome resource that provide more detail about the reason for the failure.
500 Server ErrorThe server may return other error codes to indicate other error conditions. The body of the HTTP response will contain an OperationOutcome resource that indicates the nature of the error.

Profile Content

The official URL for this profile is:

http://hl7.org/fhir/StructureDefinition/medicationstatement-profile

Record of medication being taken by a patient

Name Flags Card. Type Description & Constraints
.. MedicationStatementI0..*MedicationStatement Record of medication being taken by a patient

mst-1: Reason not taken is only permitted if wasNotTaken is true

mst-2: Reason for use is only permitted if wasNotTaken is false
... meta0..1Meta Metadata about the resource
... implicitRules?! 0..1uri A set of rules under which this content was created
... language0..1code Language of the resource content

Binding: IETF BCP-47 (required )
... textI0..1Narrative Text summary of the resource, for human interpretation
... contained0..*Resource Contained, inline Resources
...medicationstatement-ndc0..1CodeableConcept Extension
.... url1..1uri "http://hl7.org/fhir/StructureDefinition/medicationstatement-ndc"
.... valueCodeableConcept1..1CodeableConcept Value of extension
...medicationstatement-ddid0..1CodeableConcept Extension
.... url1..1uri "http://hl7.org/fhir/StructureDefinition/medicationstatement-ddid"
.... valueCodeableConcept1..1CodeableConcept Value of extension
...medicationstatement-rxnorm0..1CodeableConcept Extension
...medicationstatement-encounter0..1Reference (Reference)Extension
.... url1..1uri "http://hl7.org/fhir/StructureDefinition/medicationstatement-encounter"
.... valueReference1..1Reference (Reference)Value of extension
...medicationstatement-medcategory0..1string Extension
.... url1..1uri "http://hl7.org/fhir/StructureDefinition/medicationstatement-medcategory"
.... valueString1..1string Value of extension
... modifierExtension?!0..*Extension Extensions that cannot be ignored
... identifier0..*Identifier External identifier
... patient1..1Reference (Patient )Who is/was taking the medication
... informationSource1..1Reference (Practitioner )
... dateAsserted0..1dateTime When the statement was asserted?
... status?! 1..1code active | completed | entered-in-error | intended

Binding: MedicationStatementStatus (required )
... wasNotTaken?! 0..1boolean True if medication is/was not being taken
... reasonNotTakenI0..*CodeableConcept True if asserting medication was not given

Binding: Reason Medication Not Given Codes (example )
... reasonForUseReference0..1Reference (Condition )Binding: Condition/Problem/Diagnosis Codes (example )
... effectivePeriod1..1Period Over what period was medication consumed?
... note0..1string Further information about the statement
... supportingInformation0..*Reference (Resource )Additional supporting information
... medicationReference1..1Reference (Medication )What medication was taken
... dosage0..*BackboneElement Details of how medication was taken
.... extension0..*Extension Additional Content defined by implementations
.... modifierExtension?!0..*Extension Extensions that cannot be ignored
.... text0..1string Reported dosage information
.... timing0..1Timing When/how often was medication taken
.... asNeeded[x]0..1boolean , CodeableConcept Take "as needed" (for x)

Binding: (unbound) (example )
.... site[x]0..1CodeableConcept , Reference (BodySite )Where (on body) medication is/was administered

Binding: SNOMED CT Anatomical Structure for Administration Site Codes (example )
.... route0..1CodeableConcept How the medication entered the body

Binding: SNOMED CT Route Codes (example )
.... method0..1CodeableConcept Technique used to administer medication

Binding: (unbound) (example )
.... quantityQuantityI0..1SimpleQuantity Amount administered in one dose

qty-3: If a code for the unit is present, the system SHALL also be present

sqty-1: The comparator is not used on a SimpleQuantity
.... rate[x]0..1Ratio , Range Dose quantity per unit of time
.... maxDosePerPeriod0..1Ratio Maximum dose that was consumed per unit of time


 

athenaPractice Mapping

The mappings in this section represent the how data stored within athenaPractice is served through the product's APIs. athenaPractice and athenaFlow share a common schema for patient clinical data and only one is shown when these are the same. Use of this information is subject to the API Server Terms and Conditions .

MedicationStatement Profile
MedicationStatementMedicationStatement-ProfileFHIR_MEDICATEVIEW
 ├ id%MEDICATEGROUPID%
 ├ extensionndc
 ├ extensionddid
 ├ extensionrxnormMakeRxnormExtensionList(%RXNORM%,"http://www.nlm.nih.gov/research/umls/rxnorm",null)
 ├ extensionencounter
 ├ extensionmedcategory
 ├ identifierEXTMEDICATEIDMakeIdentifier("U",getSiteIdSystem("ExtMedication"),%EXTMEDICATEID%)
 ├ patientPIDMakeReference("PATIENT",%PID%,"Patient")
 ├ informationSourceUSRIDMakeReference("USR",%USRID%,"Practitioner")
 ├ dateAssertedDB_CREATE_DATE%DB_CREATE_DATE%
 ├ statusSTOPREASONIsActiveOrMapCode(%STOPDATE%,"active",%STOPREASON%,"MEDSTOPREASON")
 ├ wasNotTakenANNOTATE%STOPREASON%
 ├ reasonNotTakenMakeTextConcept(%ANNOTATE%)
 ├ reasonForUseReferencePROBIDMakeReference("PRESCRIB",%PROBID%,"Condition")
 ├ effectivePeriodSTARTDATE and STOPDATEMakePeriod(%STARTDATE%,%STOPDATE%)
 ├ noteCOMMENTS%COMMENTS%
 ├ supportingInformationPTIDMakeReferenceList("PRESCRIB",%PTID%,"MedicationOrder")
 └ medicationReferenceDDIDMakeReference("MEDINFO",%DDID%,"Medication",%DESCRIPTION%)
   ├ textINSTRUCTIONS%INSTRUCTIONS%
   ├ timingTIMINGMakeTiming(%PERIOD%,%PERIOD_UNIT%)
   ├ routeROUTEMapConcept(%ROUTE%,"MEDICATIONROUTE")
   └ quantityQuantityDOSE and DOSE_UNITMakeNonZeroQuantity(%DOSE%,%DOSE_UNIT%)

athenaFlow Mapping

The mappings in this section represent the how data stored within athenaFlow is served through the product's APIs. Use of this information is subject to the API Server Terms and Conditions .

MedicationStatement Profile
MedicationStatementMedicationStatement-ProfileFHIR_MEDICATEVIEW
 ├ id%MEDICATEGROUPID%
 ├ extensionndc
 ├ extensionddid
 ├ extensionrxnormMakeRxnormExtensionList(%RXNORM%,"http://www.nlm.nih.gov/research/umls/rxnorm",null)
 ├ extensionencounter
 ├ extensionmedcategory
 ├ identifierEXTMEDICATEIDMakeIdentifier("U",getSiteIdSystem("ExtMedication"),%EXTMEDICATEID%)
 ├ patientPIDMakeReference("PATIENT",%PID%,"Patient")
 ├ informationSourceUSRIDMakeReference("USR",%USRID%,"Practitioner")
 ├ dateAssertedDB_CREATE_DATE%DB_CREATE_DATE%
 ├ statusSTOPREASONIsActiveOrMapCode(%STOPDATE%,"active",%STOPREASON%,"MEDSTOPREASON")
 ├ wasNotTakenANNOTATE%STOPREASON%
 ├ reasonNotTakenMakeTextConcept(%ANNOTATE%)
 ├ reasonForUseReferencePROBIDMakeReference("PRESCRIB",%PROBID%,"Condition")
 ├ effectivePeriodSTARTDATE and STOPDATEMakePeriod(%STARTDATE%,%STOPDATE%)
 ├ noteCOMMENTS%COMMENTS%
 ├ supportingInformationPTIDMakeReferenceList("PRESCRIB",%PTID%,"MedicationOrder")
 └ medicationReferenceDDIDMakeReference("MEDINFO",%DDID%,"Medication",%DESCRIPTION%)
   ├ textINSTRUCTIONS%INSTRUCTIONS%
   ├ timingTIMINGMakeTiming(%PERIOD%,%PERIOD_UNIT%)
   ├ routeROUTEMapConcept(%ROUTE%,"MEDICATIONROUTE")
   └ quantityQuantityDOSE and DOSE_UNITMakeNonZeroQuantity(%DOSE%,%DOSE_UNIT%)