QI-Core Implementation Guide
7.0.0-ballot - STU7 Ballot United States of America flag

This page is part of the Quality Improvement Core Framework (v7.0.0-ballot: STU7 (v7.0.0) Ballot 1) based on FHIR (HL7® FHIR® Standard) R4. The current version which supersedes this version is 6.0.0. For a full list of available versions, see the Directory of published versions

: MedicationDispense cumulative dose example - 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 MedicationDispense models QDM Medication, Dispensed. Cooking with CQL session 53 discusses how to calculate cumulative medication duration:
https://github.com/cqframework/CQL-Formatting-and-Usage-Wiki/blob/master/Source/Cooking%20With%20CQL/53/CumulativeMedicationDurationFHIR.cql

The cumulative medication duration in this example would be calculated as:
supply or (quantity / (dose * dosesPerDay))
30 or (450 / (5 * 3)) = 30 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:MedicationDispense ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "cmd-example"] ; # 
  fhir:meta [
    ( fhir:profile [
fhir:v "http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationdispense"^^xsd:anyURI ;
fhir:link <http://hl7.org/fhir/us/qicore/StructureDefinition/qicore-medicationdispense>     ] )
  ] ; # 
  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: MedicationDispense 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>: Completed</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 --&gt; (ongoing)))</a></p><h3>Performers</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Actor</b></td></tr><tr><td style=\"display: none\">*</td><td><a href=\"Practitioner-example.html\">Practitioner Adam Careful </a></td></tr></table><p><b>authorizingPrescription</b>: <a href=\"MedicationRequest-example.html\">MedicationRequest: status = active; intent = order; medication[x] = -&gt;Medication alemtuzumab 10 MG/ML [Lemtrada]; authoredOn = 2015-03-25 19:32:52-0500</a></p><p><b>quantity</b>: 450 ml<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  codeml = 'ml')</span></p><p><b>daysSupply</b>: 30 Day<span style=\"background: LightGoldenRodYellow\"> (Details: UCUM  coded = 'd')</span></p><p><b>whenPrepared</b>: 2012-05-30 16:20:00+0000</p><p><b>whenHandedOver</b>: 2012-05-31 10:20:00+0000</p><p><b>destination</b>: <a href=\"Location-example.html\">Location South Wing, second floor</a></p><p><b>receiver</b>: <a href=\"Patient-example.html\">Jim Chalmers  Male, DoB: 1974-12-25 ( Medical record number (use: usual, period: 2001-05-06 --&gt; (ongoing)))</a></p><blockquote><p><b>dosageInstruction</b></p></blockquote></div>"
  ] ; # 
  fhir:extension ( [
fhir:url [ fhir:v "http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationDispense.recorded"^^xsd:anyURI ] ;
fhir:value [ fhir:v "2017-01-17"^^xsd:date ]
  ] ) ; # 
  fhir:status [ fhir:v "completed"] ; # 
  fhir:medication [
a fhir:Reference ;
fhir:reference [ fhir:v "Medication/example" ]
  ] ; # 
  fhir:subject [
fhir:reference [ fhir:v "Patient/example" ]
  ] ; # 
  fhir:performer ( [
fhir:actor [
fhir:reference [ fhir:v "Practitioner/example" ]     ]
  ] ) ; # 
  fhir:authorizingPrescription ( [
fhir:reference [ fhir:v "MedicationRequest/example" ]
  ] ) ; # 
  fhir:quantity [
fhir:value [ fhir:v "450"^^xsd:decimal ] ;
fhir:unit [ fhir:v "ml" ] ;
fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
fhir:code [ fhir:v "ml" ]
  ] ; # 
  fhir:daysSupply [
fhir:value [ fhir:v "30"^^xsd:decimal ] ;
fhir:unit [ fhir:v "Day" ] ;
fhir:system [ fhir:v "http://unitsofmeasure.org"^^xsd:anyURI ] ;
fhir:code [ fhir:v "d" ]
  ] ; # 
  fhir:whenPrepared [ fhir:v "2012-05-30T16:20:00+00:00"^^xsd:dateTime] ; # 
  fhir:whenHandedOver [ fhir:v "2012-05-31T10:20:00+00:00"^^xsd:dateTime] ; # 
  fhir:destination [
fhir:reference [ fhir:v "Location/example" ]
  ] ; # 
  fhir:receiver ( [
fhir:reference [ fhir:v "Patient/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: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" ]       ]     ] )
  ] ) . #