Quality Measure Implementation Guide (STU3 Ballot)
2.1.0 - ballot

This page is part of the Quality Measure STU2 for FHIR R4 Implementation Guide (v2.1.0: STU3 Ballot 1) based on FHIR R4. The current version which supercedes this version is 3.0.0. For a full list of available versions, see the Directory of published versions

: RiskAdjustment_FHIR2 - 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 xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

 a fhir:Library;
  fhir:nodeRole fhir:treeRoot;
  fhir:Resource.id [ fhir:value "risk-adjustment-FHIR2"];
  fhir:DomainResource.text [
     fhir:Narrative.status [ fhir:value "generated" ];
     fhir:Narrative.div "<div xmlns=\"http://www.w3.org/1999/xhtml\">\r\n   <table class=\"grid dict\">\r\n      <tr>\r\n         <th scope=\"row\"><b>Id: </b></th>\r\n         <td style=\"padding-left: 25px; padding-right: 25px;\">riskadjustment-fhir2</td>\r\n      </tr>\r\n      <tr>\r\n         <th scope=\"row\"><b>Type: </b></th>\r\n         <td style=\"padding-right: 25px;\"><span><br/><span><span style=\"padding-left: 25px;\"><b>system: </b><span>http://terminology.hl7.org/CodeSystem/library-type</span><br/></span><span style=\"padding-left: 25px;\"><b>code: </b><span>logic-library</span></span></span></span></td>\r\n      </tr>\r\n      <tr>\r\n         <th scope=\"row\"><b>Version: </b></th>\r\n         <td style=\"padding-left: 25px; padding-right: 25px;\">0.0.001</td>\r\n      </tr>\r\n      <tr>\r\n         <th scope=\"row\"><b>Status: </b></th>\r\n         <td style=\"padding-left: 25px; padding-right: 25px;\">active</td>\r\n      </tr>\r\n      <tr style=\"vertical-align: top;\">\r\n         <th scope=\"row\"><a id=\"cql-content\"><b>Content: </b></a></th>\r\n         <td style=\"padding-left: 25px; padding-right: 25px;\"><b>type: </b><span>text/cql</span></td>\r\n      </tr>\r\n      <tr>\r\n         <td colspan=\"2\" style=\"padding-left: 25px; padding-right: 25px;\">\r\n            <pre><code class=\"language-cql\">library RiskAdjustment_FHIR2 version '0.0.001'\r\n\r\nusing FHIR version '1.0.2'\r\n\r\ninclude FHIRHelpers version '1.0.2' called FHIRHelpers\r\ninclude SupplementalDataElements_FHIR2 version '1.0.0' called SDE\r\n\r\nvalueset &quot;Serum Albumin&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1029.60'\r\nvalueset &quot;Cirrhosis or other liver disease&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1029.63'\r\nvalueset &quot;Encounter Inpatient&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.307'\r\nvalueset &quot;CABG_Open and Endoscopic&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1029.39'\r\nvalueset &quot;Bilirubin&quot;: 'http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.666.5.2400'\r\n\r\nparameter &quot;Measurement Period&quot; Interval&lt;DateTime&gt;\r\n\r\ncontext Patient\r\n\r\ndefine &quot;SDE Ethnicity&quot;:\r\n  SDE.&quot;SDE Ethnicity&quot;\r\n\r\ndefine &quot;SDE Payer&quot;:\r\n  SDE.&quot;SDE Payer&quot;\r\n\r\ndefine &quot;SDE Race&quot;:\r\n  SDE.&quot;SDE Race&quot;\r\n\r\ndefine &quot;SDE Sex&quot;:\r\n  SDE.&quot;SDE Sex&quot;\r\n\r\ndefine &quot;Encounter Inpatient 365&quot;: [&quot;Encounter&quot;: &quot;Encounter Inpatient&quot;] E\r\n    where FHIRHelpers.ToQuantity(E.length) &lt;= 365 days // Shouldn't need the ToQuantity, need a FHIR.Duration conversion\r\n      and E.period ends during &quot;Measurement Period&quot;\r\n	and E.status.value in {'finished'}\r\n\r\ndefine &quot;CABG_Open and Endoscopic During Encounter&quot;: [&quot;Procedure&quot;: &quot;CABG_Open and Endoscopic&quot;] P\r\n    with &quot;Encounter Inpatient 365&quot; E\r\n      such that P.performedPeriod starts during E.period\r\n	and P.status.value in {'completed'}\r\n\r\ndefine &quot;Hepatic Failure&quot;:\r\n    exists (&quot;Cirrhosis Dx&quot;)\r\n    and exists (&quot;Bilirubin Test&quot;)\r\n    and exists (&quot;Serum Albumin Test&quot;)\r\n\r\ndefine &quot;Cirrhosis Dx&quot;: [&quot;Condition&quot;: &quot;Cirrhosis or other liver disease&quot;] D\r\n    with &quot;CABG_Open and Endoscopic During Encounter&quot; C\r\n	such that D.onsetDateTime.value before start of C.performedPeriod\r\n	such that Coalesce (D.onsetDateTime.value, start of ToInterval(D.onsetPeriod)) before start of ToInterval(C.performedPeriod)\r\n\r\ndefine &quot;Bilirubin Test&quot;:\r\n[&quot;Observation&quot;: &quot;Bilirubin&quot;] L\r\n    with &quot;CABG_Open and Endoscopic During Encounter&quot; C\r\n      such that L.effectiveDateTime.value before start of C.performedPeriod\r\nsuch that Coalesce (L.effectiveDateTime.value, start of ToInterval(L.effectivePeriod)) starts before start of ToInterval(C.performedPeriod)\r\n    with &quot;Encounter Inpatient 365&quot; E\r\n      such that L.effectiveDateTime.value during E.period\r\n    where L.valueQuantity &gt; 2 'mg/dL'\r\n      and L.status.value in {'final', 'amended', 'corrected', 'appended'}\r\n\r\ndefine &quot;Serum Albumin Test&quot;:\r\n[&quot;Observation&quot;: &quot;Serum Albumin&quot;] L\r\n    with &quot;CABG_Open and Endoscopic During Encounter&quot; C\r\n      such that L.effectiveDateTime.value before start of C.performedPeriod\r\n    with &quot;Encounter Inpatient 365&quot; E\r\n      such that L.effectiveDateTime.value during E.period\r\n    where L.valueQuantity &lt; 3.5 'g/dL'\r\n      and L.status.value in {'final', 'amended', 'corrected', 'appended'}\r\n\r\ndefine &quot;Initial Population&quot;: &quot;Encounter Inpatient 365&quot;\r\n\r\ndefine &quot;Denominator&quot;: &quot;Initial Population&quot;\r\n\r\ndefine &quot;Numerator&quot;: &quot;CABG_Open and Endoscopic During Encounter&quot;\r\n</code></pre>\r\n         </td>\r\n      </tr>\r\n   </table>\r\n</div>"
  ];
  fhir:Library.url [ fhir:value "http://hl7.org/fhir/us/cqfmeasures/Library/risk-adjustment-FHIR2"];
  fhir:Library.version [ fhir:value "0.0.001"];
  fhir:Library.name [ fhir:value "RiskAdjustment_FHIR2"];
  fhir:Library.title [ fhir:value "RiskAdjustment_FHIR2"];
  fhir:Library.status [ fhir:value "active"];
  fhir:Library.experimental [ fhir:value "true"^^xsd:boolean];
  fhir:Library.type [
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "http://terminology.hl7.org/CodeSystem/library-type" ];
       fhir:Coding.code [ fhir:value "logic-library" ]     ]
  ];
  fhir:Library.date [ fhir:value "2021-04-13T15:56:57+00:00"^^xsd:dateTime];
  fhir:Library.publisher [ fhir:value "Clinical Quality Information WG"];
  fhir:Library.contact [
     fhir:index 0;
     fhir:ContactDetail.telecom [
       fhir:index 0;
       fhir:ContactPoint.system [ fhir:value "url" ];
       fhir:ContactPoint.value [ fhir:value "http://www.hl7.org/Special/committees/cqi/index.cfm" ]     ]
  ];
  fhir:Library.description [ fhir:value "Example library illustrating risk adjustment with FHIR DSTU2"];
  fhir:Library.jurisdiction [
     fhir:index 0;
     fhir:CodeableConcept.coding [
       fhir:index 0;
       fhir:Coding.system [ fhir:value "urn:iso:std:iso:3166" ];
       fhir:Coding.code [ fhir:value "US" ]     ]
  ];
  fhir:Library.content [
     fhir:index 0;
     fhir:Attachment.contentType [ fhir:value "application/elm+xml" ];
     fhir:Attachment.data [ fhir:value "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGxpYnJhcnkgeG1sbnM9InVybjpobDctb3JnOmVsbTpyMSIgeG1sbnM6dD0idXJuOmhsNy1vcmc6ZWxtLXR5cGVzOnIxIiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIiB4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxuczpmaGlyPSJodHRwOi8vaGw3Lm9yZy9maGlyIiB4bWxuczpxZG00Mz0idXJuOmhlYWx0aGl0LWdvdjpxZG06djRfMyIgeG1sbnM6cWRtNTM9InVybjpoZWFsdGhpdC1nb3Y6cWRtOnY1XzMiIHhtbG5zOmE9InVybjpobDctb3JnOmNxbC1hbm5vdGF0aW9uczpyMSI+CiAgIDxpZGVudGlmaWVyIGlkPSJSaXNrQWRqdXN0bWVudF9GSElSMiIgdmVyc2lvbj0iMC4wLjAwMSIvPgogICA8c2NoZW1hSWRlbnRpZmllciBpZD0idXJuOmhsNy1vcmc6ZWxtIiB2ZXJzaW9uPSJyMSIvPgogICA8dXNpbmdzPgogICAgICA8ZGVmIGxvY2FsSWRlbnRpZmllcj0iU3lzdGVtIiB1cmk9InVybjpobDctb3JnOmVsbS10eXBlczpyMSIvPgogICA8L3VzaW5ncz4KPC9saWJyYXJ5Pgo="^^xsd:base64Binary ]
  ], [
     fhir:index 1;
     fhir:Attachment.contentType [ fhir:value "text/cql" ];
     fhir:Attachment.data [ fhir:value "bGlicmFyeSBSaXNrQWRqdXN0bWVudF9GSElSMiB2ZXJzaW9uICcwLjAuMDAxJwovKiAKdXNpbmcgRkhJUiB2ZXJzaW9uICcxLjAuMicKCmluY2x1ZGUgRkhJUkhlbHBlcnMgdmVyc2lvbiAnMS4wLjInIGNhbGxlZCBGSElSSGVscGVycwppbmNsdWRlIFN1cHBsZW1lbnRhbERhdGFFbGVtZW50c19GSElSMiB2ZXJzaW9uICcxLjAuMCcgY2FsbGVkIFNERQoKdmFsdWVzZXQgIlNlcnVtIEFsYnVtaW4iOiAnaHR0cDovL2N0cy5ubG0ubmloLmdvdi9maGlyL1ZhbHVlU2V0LzIuMTYuODQwLjEuMTEzNzYyLjEuNC4xMDI5LjYwJwp2YWx1ZXNldCAiQ2lycmhvc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5nIEUucGVyaW9kCiAgICB3aGVyZSBMLnZhbHVlUXVhbnRpdHkgPCAzLjUgJ2cvZEwnCiAgICAgIGFuZCBMLnN0YXR1cy52YWx1ZSBpbiB7J2ZpbmFsJywgJ2FtZW5kZWQnLCAnY29ycmVjdGVkJywgJ2FwcGVuZGVkJ30KCmRlZmluZSAiSW5pdGlhbCBQb3B1bGF0aW9uIjogIkVuY291bnRlciBJbnBhdGllbnQgMzY1IgoKZGVmaW5lICJEZW5vbWluYXRvciI6ICJJbml0aWFsIFBvcHVsYXRpb24iCgpkZWZpbmUgIk51bWVyYXRvciI6ICJDQUJHX09wZW4gYW5kIEVuZG9zY29waWMgRHVyaW5nIEVuY291bnRlciIgKi8K"^^xsd:base64Binary ]
  ].

# - ontology header ------------------------------------------------------------

 a owl:Ontology;
  owl:imports fhir:fhir.ttl.