QI-Core Implementation Guide, published by HL7 International / Clinical Quality Information. This guide is not an authorized publication; it is the continuous build for version 7.0.0-ballot built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/fhir-qi-core/ and changes regularly. See the Directory of published versions
: MedicationRequest Cumulative Duration - TTL Representation
Raw ttl | Download
@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sct: <http://snomed.info/id/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
# - resource -------------------------------------------------------------------
#
This example MedicationRequest models QDM Medication, Order. Cooking with CQL session 49 discusses how to calculate cumulative medication duration:
https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/blob/master/Source/Cooking%20With%20CQL/49/36_CumulativeMedicationDuration.cql
The cumulative medication duration in this example would be calculated as:
(supply * (1 + refills )) / (dosage * frequency)
(100 * (1 + 2)) / (5 * 3) = 20 days
See the QDM to QI-Core mapping for details regarding QDM data attribute representation in FHIR.
http://hl7.org/fhir/us/qicore/qdm-to-qicore.html
a fhir:MedicationRequest ;
fhir:nodeRole fhir:treeRoot ;
fhir:id [ fhir:v "cmd-example"] ; #
fhir:meta [
( fhir:profile [
fhir:v "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationrequest> ] )
] ; #
fhir:text [
fhir:status [ fhir:v "generated" ] ;
fhir:div "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: MedicationRequest cmd-example</b></p><a name=\"cmd-example\"> </a><a name=\"hccmd-example\"> </a><a name=\"cmd-example-en-US\"> </a><p><b>status</b>: Active</p><p><b>intent</b>: Order</p><p><b>medication</b>: <a href=\"Medication-example.html\">Medication alemtuzumab 10 MG/ML [Lemtrada]</a></p><p><b>subject</b>: <a href=\"Patient-example.html\">Jim Chalmers Male, DoB: 1974-12-25 ( Medical record number (use: usual, period: 2001-05-06 --> (ongoing)))</a></p><p><b>authoredOn</b>: 2015-03-25 19:32:52-0500</p><p><b>requester</b>: <a href=\"Practitioner-example.html\">Practitioner Adam Careful </a></p><blockquote><p><b>dosageInstruction</b></p></blockquote><h3>DispenseRequests</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>NumberOfRepeatsAllowed</b></td><td><b>Quantity</b></td></tr><tr><td style=\"display: none\">*</td><td>2</td><td>100 ml<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM codeml = 'ml')</span></td></tr></table></div>"
] ; #
fhir:status [ fhir:v "active"] ; #
fhir:intent [ fhir:v "order"] ; #
fhir:medication [
a fhir:Reference ;
fhir:reference [ fhir:v "Medication/example" ]
] ; #
fhir:subject [
fhir:reference [ fhir:v "Patient/example" ]
] ; #
fhir:authoredOn [ fhir:v "2015-03-25T19:32:52-05:00"^^xsd:dateTime] ; #
fhir:requester [
fhir:reference [ fhir:v "Practitioner/example" ]
] ; #
fhir:dosageInstruction ( [
fhir:timing [
fhir:repeat [
fhir:frequency [ fhir:v "3"^^xsd:positiveInteger ] ;
fhir:period [ fhir:v "1"^^xsd:decimal ] ;
fhir:periodUnit [ fhir:v "d" ] ] ] ;
fhir:site [
( fhir:coding [
a sct:447964005 ;
fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
fhir:code [ fhir:v "447964005" ] ] ) ] ;
fhir:route [
( fhir:coding [
a sct:394899003 ;
fhir:system [ fhir:v "http://snomed.info/sct"^^xsd:anyURI ] ;
fhir:code [ fhir:v "394899003" ] ;
fhir:display [ fhir:v "oral administration of treatment" ] ] ) ] ;
( fhir:doseAndRate [
fhir:type [
( fhir:coding [
fhir:system [ fhir:v "http://terminology.hl7.org/CodeSystem/dose-rate-type"^^xsd:anyURI ] ;
fhir:code [ fhir:v "ordered" ] ;
fhir:display [ fhir:v "Ordered" ] ] ) ] ;
fhir:dose [
a fhir:Quantity ;
fhir:value [ fhir:v "5"^^xsd:decimal ] ;
fhir:unit [ fhir:v "ml" ] ;
fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
fhir:code [ fhir:v "ml" ] ] ] )
] ) ; #
fhir:dispenseRequest [
fhir:numberOfRepeatsAllowed [ fhir:v "2"^^xsd:nonNegativeInteger ] ;
fhir:quantity [
fhir:value [ fhir:v "100"^^xsd:decimal ] ;
fhir:unit [ fhir:v "ml" ] ;
fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
fhir:code [ fhir:v "ml" ] ]
] . #