Potential Drug-Drug Interaction (PDDI) Clinical Decision Support, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 1.0.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/PDDI-CDS/ and changes regularly. See the Directory of published versions
| Page standards status: Informative |
<PlanDefinition xmlns="http://hl7.org/fhir">
<id value="digoxin-cyclosporine-cds-sign"/>
<language value="en"/>
<text>
<status value="extensions"/>
<div xmlns="http://www.w3.org/1999/xhtml">
<table class="narrative-table">
<tbody>
<tr>
<th colspan="2" scope="row" class="row-header">Metadata</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Digoxin Cyclosporine Order Sign Recommendation</td>
</tr>
<tr>
<th scope="row" class="row-header">Version</th>
<td class="content-container">1.0.0</td>
</tr>
<tr>
<th scope="row" class="row-header">Experimental</th>
<td class="content-container">true</td>
</tr>
<tr>
<th scope="row" class="row-header">Jurisdiction</th>
<td class="content-container">
001 from <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">http://unstats.un.org/unsd/methods/m49/m49.htm</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Topic</th>
<td class="content-container">Digoxin Cyclosporine Prescribing
</td>
</tr>
<tr>
<th scope="row" class="row-header">Steward (Publisher)</th>
<td class="content-container">HL7 International / Clinical Decision Support</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container"><div><p>Drug-drug interaction recommendation for use on order sign of a digoxin or cyclosporine</p>
</div></td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
ECA Rule
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Action</th>
</tr>
<tr>
<th scope="row" class="row-header">Trigger Type</th>
<td class="content-container">Named Event</td>
</tr>
<tr>
<th scope="row" class="row-header">Trigger Name</th>
<td class="content-container">order-sign</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-inclusion-criteria">Inclusion Criteria</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product)</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Increased risk of digoxin toxicity. Assess risk and take action if necessary.
Digoxin toxicity is potentially serious. The clinical consequences may include anorexia, nausea, vomiting, visual changes, and cardiac arrhythmias.
The mechanism of this interaction appears to be mediated through P-glycoprotein inhibition by cyclosporine. P-glycoprotein is a major transporter for digoxin efflux.
unknown.
unknown.</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: action.title
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-base-summary">Get Base Summary</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: action.description
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-base-detail">Get Base Detail</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: activity.extension
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-base-indicator">Get Base Indicator</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Consultation</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Request communication with digoxin prescriber</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-is-context-medication-digoxin">Is Context medication digoxin</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad201.html">ActivityDefinition AD201</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Consultation</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Request communication with cyclosporine prescriber</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-is-context-medication-cyclosporine">Is Context medication cyclosporine</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad202.html">ActivityDefinition AD202</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Cancel digoxin</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Discontinue digoxin order</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-is-context-medication-digoxin">Is Context medication digoxin</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
remove from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Cancel cyclosporine</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Discontinue cyclosporine order</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-is-context-medication-cyclosporine">Is Context medication cyclosporine</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
remove from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Digoxin Level</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Order digoxin trough within 24 hours from initiation</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-is-new-order-for-digoxin">Is new order for digoxin</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad203.html">ActivityDefinition AD203</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Patient does (not) have digoxin level within 30 days that is below 0.9 ng/mL (SI: 1.2 nmol/L)</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">(Digoxin: level and date).
For patients with a reliable plasma digoxin concentration in normal range, it is reasonable to anticipate an increase in plasma concentrations after the initiation of cyclosporine. Following initiation, close monitoring and adjusting the digoxin dose as needed is recommended. Initiating cyclosporine is expected to increase digoxin levels. For patients without a reliable plasma digoxin concentration in normal range, use only if benefits outweight risks. Extreme caution and close monitoring is necessary.</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-is-digoxin-in-prefetch">Is digoxin in prefetch</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: action.title
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-card-2-summary">Get Card 2 Summary</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: action.description
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-card-2-detail">Get Card 2 Detail</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: activity.extension
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-card-2-indicator">Get Card 2 Indicator</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Patient does (not) have digoxin level within 30 days that is below 0.9 ng/mL (SI: 1.2 nmol/L))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Digoxin Level</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Order digoxin trough within 24 hours from the initiation of cyclosporine</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad203.html">ActivityDefinition AD203</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Patient does (not) have digoxin level within 30 days that is below 0.9 ng/mL (SI: 1.2 nmol/L))</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">New Digoxin</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Preemptively reduce digoxin dose with new order</td>
</tr>
<tr>
<th scope="row" class="row-header">Condition</th>
<td class="content-container">
<em>Kind</em>: Applicability
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-need-to-reduce-digoxin-dose">Need to reduce Digoxin dose</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad204.html">ActivityDefinition AD204</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Within 100 days, the patient has had electrolyte and serum creatinine levels checked, and they are not on a potassium sparing or loop diuretic.</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">(Potassium: level and date)
(Magnesium: level and date)
(Calcium: level and date)
(Serum creatinine: level and date)
Hypokalemia, hypomagnesemia, and hypercalcemia may potentiate digoxin toxicity. 50-70% of digoxin is excreted unchanged in the urine. Changing renal function may increase serum concentrations and risk of toxicity.</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: action.title
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-card-3-summary">Get Card 3 Summary</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: action.description
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-card-3-detail">Get Card 3 Detail</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dynamic Value</th>
<td class="content-container">
<em>Path</em>: activity.extension
<br/>
<em>Logic Definition</em>: <a href="#digoxincyclosporinecdslogic-get-card-3-indicator">Get Card 3 Indicator</a>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Within 100 days, the patient has had electrolyte and serum creatinine levels checked, and they are not on a potassium sparing or loop diuretic.)</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Serum Creatinine</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Order for serum creatinine</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad205.html">ActivityDefinition AD205</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Sub-Action (Parent Action Title: Within 100 days, the patient has had electrolyte and serum creatinine levels checked, and they are not on a potassium sparing or loop diuretic.)</th>
</tr>
<tr>
<th scope="row" class="row-header">Title</th>
<td class="content-container">Electrolyte Panel</td>
</tr>
<tr>
<th scope="row" class="row-header">Description</th>
<td class="content-container">Order for electrolyte panel</td>
</tr>
<tr>
<th scope="row" class="row-header">Type</th>
<td class="content-container">
create from <a href="http://terminology.hl7.org/7.2.0/CodeSystem-action-type.html">http://terminology.hl7.org/CodeSystem/action-type</a>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Definition</th>
<td class="content-container"><a href="ActivityDefinition-ad206.html">ActivityDefinition AD206</a></td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">PlanDefinition Logic</th>
</tr>
<tr>
<th scope="row" class="row-header">Primary Library</th>
<td class="content-container"><a href="Library-DigoxinCyclosporineCDSLogic.html">Digoxin-cyclosporine CDS Logic</a></td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: FHIR model information
<br/>
<em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIR-ModelInfo.html">http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library FHIRHelpers
<br/>
<em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIRHelpers.html">http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library FHIRCommon
<br/>
<em>Resource</em>: <a href="http://hl7.org/fhir/uv/cql/STU2/Library-FHIRCommon.html">http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Library Common
<br/>
<em>Resource</em>: <a href="Library-PDDICDSCommon.html">Potential Drug-Durg Interaction (PDDI) Clinical Decision Support (CDS) Common Logic</a> version: 1.0.0
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/Library/PDDICDSCommon|1.0.0</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Digoxin
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-digoxin.html">Digoxin Medications Value Set</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Cyclosporine
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-cyclosporine.html">Cyclosporine Medications Value Set</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-cyclosporine</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Digoxin LOINC
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-digoxin-LOINC.html">LOINC Codes for Digoxin Concentration</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin-LOINC</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Aldosterone Antagonists
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-AAS.html">Aldosterone Antagonists Drug Value Set</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Loop Diuretics
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-LOOPDIURETIC.html">Loop Diuretic Drug Value Set</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-LOOPDIURETIC</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Potassium LOINC
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-potassium-LOINC.html">LOINC Codes for Serum Potassium</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-potassium-LOINC</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Magnesium LOINC
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-magnesium-LOINC.html">LOINC Codes for Serum Potassium</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-magnesium-LOINC</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Calcium LOINC
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-calcium-LOINC.html">LOINC Codes for Serum Calcium</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-calcium-LOINC</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Dependency</th>
<td class="content-container">
<em>Description</em>: Value set Renal LOINC
<br/>
<em>Resource</em>: <a href="ValueSet-valueset-renal-LOINC.html">LOINC Codes for Renal Function</a>
<br/>
<em>Canonical URL</em>: <tt>http://hl7.org/fhir/uv/pddi/ValueSet/valueset-renal-LOINC</tt>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Parameter</th>
<td class="content-container">
<table>
<thead>
<tr>
<td><em>Name</em></td>
<td><em>Use</em></td>
<td><em>Card.</em></td>
<td><em>Type</em></td>
<td><em>Documentation</em></td>
</tr>
</thead>
<tbody>
<tr>
<td>ContextPrescriptions</td>
<td>In</td>
<td>0..*</td>
<td>MedicationRequest</td>
<td/>
</tr>
<tr>
<td>Get Base Indicator</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Get Card 2 Summary</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Inclusion Criteria</td>
<td>Out</td>
<td>0..1</td>
<td>boolean</td>
<td/>
</tr>
<tr>
<td>Get Card 3 Summary</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Is Context medication cyclosporine</td>
<td>Out</td>
<td>0..1</td>
<td>boolean</td>
<td/>
</tr>
<tr>
<td>Get Card 2 Detail</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Is digoxin in prefetch</td>
<td>Out</td>
<td>0..1</td>
<td>boolean</td>
<td/>
</tr>
<tr>
<td>Is new order for digoxin</td>
<td>Out</td>
<td>0..1</td>
<td>boolean</td>
<td/>
</tr>
<tr>
<td>Get Card 3 Detail</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Get Card 3 Indicator</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Get Base Detail</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Need to reduce Digoxin dose</td>
<td>Out</td>
<td>0..1</td>
<td>boolean</td>
<td/>
</tr>
<tr>
<td>Is Context medication digoxin</td>
<td>Out</td>
<td>0..1</td>
<td>boolean</td>
<td/>
</tr>
<tr>
<td>Get Card 2 Indicator</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
<tr>
<td>Get Base Summary</td>
<td>Out</td>
<td>0..1</td>
<td>string</td>
<td/>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="section-header"><a name="effective-data-requirements"> </a>PlanDefinition Logic Data Requirements</th>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Patient
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/patient.html">Patient</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
<br/>
<em>Must Support Elements</em>: medication, authoredOn
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-digoxin.html">Digoxin Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
<br/>
<em>Must Support Elements</em>: medication, authoredOn
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-cyclosporine.html">Cyclosporine Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
<br/>
<em>Must Support Elements</em>: medication, authoredOn
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-AAS.html">Aldosterone Antagonists Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
<br/>
<em>Must Support Elements</em>: medication, authoredOn
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-LOOPDIURETIC.html">Loop Diuretic Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationRequest
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationrequest.html">MedicationRequest</a>
<br/>
<em>Must Support Elements</em>: medication.reference, medication, authoredOn
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Medication
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medication.html">Medication</a>
<br/>
<em>Must Support Elements</em>: id, code
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-digoxin.html">Digoxin Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-cyclosporine.html">Cyclosporine Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-AAS.html">Aldosterone Antagonists Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-LOOPDIURETIC.html">Loop Diuretic Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationAdministration
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationadministration.html">MedicationAdministration</a>
<br/>
<em>Must Support Elements</em>: medication.reference, effective, medication
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationDispense
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationdispense.html">MedicationDispense</a>
<br/>
<em>Must Support Elements</em>: medication, whenHandedOver
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-digoxin.html">Digoxin Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationDispense
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationdispense.html">MedicationDispense</a>
<br/>
<em>Must Support Elements</em>: medication, whenHandedOver
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-cyclosporine.html">Cyclosporine Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationDispense
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationdispense.html">MedicationDispense</a>
<br/>
<em>Must Support Elements</em>: medication, whenHandedOver
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-AAS.html">Aldosterone Antagonists Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationDispense
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationdispense.html">MedicationDispense</a>
<br/>
<em>Must Support Elements</em>: medication, whenHandedOver
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-LOOPDIURETIC.html">Loop Diuretic Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationDispense
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationdispense.html">MedicationDispense</a>
<br/>
<em>Must Support Elements</em>: medication.reference, whenHandedOver, medication
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationStatement
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationstatement.html">MedicationStatement</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-digoxin.html">Digoxin Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationStatement
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationstatement.html">MedicationStatement</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-cyclosporine.html">Cyclosporine Medications Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationStatement
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationstatement.html">MedicationStatement</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-AAS.html">Aldosterone Antagonists Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationStatement
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationstatement.html">MedicationStatement</a>
<br/>
<em>Must Support Elements</em>: medication, effective
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: medication</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-LOOPDIURETIC.html">Loop Diuretic Drug Value Set</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: MedicationStatement
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/medicationstatement.html">MedicationStatement</a>
<br/>
<em>Must Support Elements</em>: medication.reference, effective, medication
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Observation
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
<br/>
<em>Must Support Elements</em>: code, effective, value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-potassium-LOINC.html">LOINC Codes for Serum Potassium</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Observation
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
<br/>
<em>Must Support Elements</em>: code, effective, value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-magnesium-LOINC.html">LOINC Codes for Serum Potassium</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Observation
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
<br/>
<em>Must Support Elements</em>: code, effective, value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-calcium-LOINC.html">LOINC Codes for Serum Calcium</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Observation
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
<br/>
<em>Must Support Elements</em>: code, effective, value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-digoxin-LOINC.html">LOINC Codes for Digoxin Concentration</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" class="row-header">Data Requirement</th>
<td class="content-container">
<em>Type</em>: Observation
<br/>
<em>Profile(s)</em>:
<a href="http://hl7.org/fhir/R4/observation.html">Observation</a>
<br/>
<em>Must Support Elements</em>: code, effective, value
<br/>
<em>Code Filter(s)</em>:
<br/>
<span class="tab-one"><em>Path</em>: code</span>
<br/>
<span class="tab-one"><em>ValueSet</em>:</span> <a href="ValueSet-valueset-renal-LOINC.html">LOINC Codes for Renal Function</a>
<br/>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-digoxin-prescription"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Digoxin Prescription":
ContextPrescriptions P
where P.medication in "Digoxin"
return P.medication as CodeableConcept</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-context-medication-digoxin"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is Context medication digoxin":
exists ("Digoxin Prescription")</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-digoxin-rx"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Digoxin Rx":
(
[MedicationRequest: "Digoxin"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Digoxin"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Digoxin"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Digoxin"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-digoxin-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is digoxin in prefetch":
exists ("Digoxin Rx")</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-continuation-order-for-digoxin"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is continuation order for digoxin":
"Is Context medication digoxin"
and "Is digoxin in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-cyclosporine-prescription"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Cyclosporine Prescription":
ContextPrescriptions P
where P.medication in "Cyclosporine"
return P.medication as CodeableConcept</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-context-medication-cyclosporine"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is Context medication cyclosporine":
exists ("Cyclosporine Prescription")</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-cyclosporine-rx"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Cyclosporine Rx":
(
[MedicationRequest: "Cyclosporine"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Cyclosporine"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Cyclosporine"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Cyclosporine"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-cyclosporine-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is cyclosporine in prefetch":
exists ("Cyclosporine Rx")</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-continuation-order-for-cyclosporine"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is continuation order for cyclosporine":
"Is Context medication cyclosporine"
and "Is cyclosporine in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-normal-digoxin-observation"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Normal Digoxin Observation":
Last (
[Observation: "Digoxin LOINC"] O
where O.effective.toInterval() during Interval[Today() - 30 days, null]
and O.value < 0.9 'ng/mL'
sort by start of effective.toInterval()
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-there-a-normal-digoxin-level-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is there a normal digoxin level in prefetch":
"Normal Digoxin Observation" is not null</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-aldosterone-antagonists-rx"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Aldosterone Antagonists Rx":
(
[MedicationRequest: "Aldosterone Antagonists"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Aldosterone Antagonists"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Aldosterone Antagonists"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Aldosterone Antagonists"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-loop-diuretics-rx"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Loop Diuretics Rx":
(
[MedicationRequest: "Loop Diuretics"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Loop Diuretics"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Loop Diuretics"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Loop Diuretics"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-are-diuretics-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Are diuretics in prefetch":
exists ("Aldosterone Antagonists Rx")
or exists("Loop Diuretics Rx")</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-normal-potassium-observation"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Normal Potassium Observation":
Last (
[Observation: "Potassium LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 3.5 'meq/L'
and O.value < 5.0 'meq/L'
sort by start of effective.toInterval()
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-normal-magnesium-observation"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Normal Magnesium Observation":
Last (
[Observation: "Magnesium LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 0.7 'mmol/L'
and O.value < 1.1 'mmol/L'
sort by start of effective.toInterval()
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-normal-calcium-observation"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Normal Calcium Observation":
Last (
[Observation: "Calcium LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 8.5 'mg/dL'
and O.value < 10.2 'mg/dL'
sort by start of effective.toInterval()
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-there-a-normal-electrolyte-observation-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is there a normal electrolyte observation in prefetch":
"Normal Potassium Observation" is not null
and "Normal Magnesium Observation" is not null
and "Normal Calcium Observation" is not null</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-normal-renal-observation"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Normal Renal Observation":
Last (
[Observation: "Renal LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 0.6 'mg/dL'
and O.value < 1.2 'mg/dL'
sort by start of effective.toInterval()
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-there-a-normal-renal-observation-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is there a normal renal observation in prefetch":
"Normal Renal Observation" is not null</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-there-a-normal-electrolyte-and-renal-observation-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is there a normal electrolyte and renal observation in prefetch":
"Is there a normal electrolyte observation in prefetch"
and "Is there a normal renal observation in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-are-diuretics-or-abnormal-electrolyte-or-abnormal-renal-observations-in-prefetch"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Are diuretics or abnormal electrolyte or abnormal renal observations in prefetch":
"Are diuretics in prefetch"
or not "Is there a normal electrolyte and renal observation in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-base-indicator"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Base Indicator":
if "Is continuation order for digoxin"
or "Is continuation order for cyclosporine"
then if "Is there a normal digoxin level in prefetch"
then if "Are diuretics or abnormal electrolyte or abnormal renal observations in prefetch"
then 'warning'
else 'info'
else 'warning'
else 'warning'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-card-2-summary"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Card 2 Summary":
if "Is there a normal digoxin level in prefetch"
then 'Patient has digoxin level within 30 days that is below 0.9 ng/mL (SI: 1.2 nmol/L)'
else 'Patient does not have digoxin level on record within the last 30 days. '</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-inclusion-criteria"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
**
** Digoxin Cyclosporine CDS Recommendation
**
*/
define "Inclusion Criteria":
(
"Is Context medication cyclosporine"
and "Is digoxin in prefetch"
)
or (
"Is Context medication digoxin"
and "Is cyclosporine in prefetch"
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-card-3-summary"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Card 3 Summary":
if "Is there a normal electrolyte and renal observation in prefetch"
then 'Within 100 days, the patient has had electrolyte and serum creatinine levels checked, and they are not on a potassium sparing or loop diuretic.'
else 'Within 100 days, the patient has not had an electrolyte panel. The patient does have serum creatinine level and is not on a potassium sparing or loop diuretic.'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-card-2-detail"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Card 2 Detail":
if "Is there a normal digoxin level in prefetch"
then '(Digoxin: '
+ Common.GetLevelAndDate("Normal Digoxin Observation")
+ '). \nFor patients with a reliable plasma digoxin concentration in normal range, it is reasonable to anticipate an increase in plasma concentrations after the initiation of cyclosporine. Following initiation, close monitoring and adjusting the digoxin dose as needed is recommended'
else 'Initiating cyclosporine is expected to increase digoxin levels. For patients without a reliable plasma digoxin concentration in normal range, use only if benefits outweight risks. Extreme caution and close monitoring is necessary.'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-new-order-for-digoxin"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is new order for digoxin":
"Is Context medication digoxin"
and not "Is digoxin in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-card-3-detail"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Card 3 Detail":
if "Is there a normal electrolyte and renal observation in prefetch"
then '(Potassium: '
+ Common.GetLevelAndDate("Normal Potassium Observation")
+ ')\n (Magnesium: '
+ Common.GetLevelAndDate("Normal Magnesium Observation")
+ ')\n (Calcium: '
+ Common.GetLevelAndDate("Normal Calcium Observation")
+ ')\n'
else ''
+ '(Serum creatinine: '
+ Common.GetLevelAndDate("Normal Renal Observation")
+ ')\n Hypokalemia, hypomagnesemia, and hypercalcemia may potentiate digoxin toxicity. 50-70% of digoxin is excreted unchanged in the urine. Changing renal function may increase serum concentrations and risk of toxicity.'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-card-3-indicator"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Card 3
define "Get Card 3 Indicator":
if "Is there a normal electrolyte and renal observation in prefetch"
then 'info'
else 'warning'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-base-detail"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Get Base Detail":
'Increased risk of digoxin toxicity. Assess risk and take action if necessary. \nDigoxin toxicity is potentially serious. The clinical consequences may include anorexia, nausea, vomiting, visual changes, and cardiac arrhythmias. \nThe mechanism of this interaction appears to be mediated through P-glycoprotein inhibition by cyclosporine. P-glycoprotein is a major transporter for digoxin efflux. \nunknown. \nunknown.'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-need-to-reduce-digoxin-dose"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Need to reduce Digoxin dose":
"Is Context medication cyclosporine"
or not "Is there a normal digoxin level in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-is-new-order-for-cyclosporine"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define "Is new order for cyclosporine":
"Is Context medication cyclosporine"
and not "Is cyclosporine in prefetch"</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-card-2-indicator"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Card 2
define "Get Card 2 Indicator":
if "Is new order for cyclosporine"
then if "Is there a normal digoxin level in prefetch"
then 'warning'
else 'critical'
else if "Is there a normal digoxin level in prefetch"
then 'info'
else 'warning'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> DigoxinCyclosporineCDSLogic</td>
</tr>
<tr>
<td>
<a name="digoxincyclosporinecdslogic-get-base-summary"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">// Card 1: Base
define "Get Base Summary":
'Potential Drug-Drug Interaction between digoxin ('
+ (
if "Is Context medication digoxin"
then Common.GetDrugNames("Digoxin Prescription")
else Common.GetDrugNames("Digoxin Rx")
)
+ ') and cyclosporine ('
+ (
if "Is Context medication cyclosporine"
then Common.GetDrugNames("Cyclosporine Prescription")
else Common.GetDrugNames("Cyclosporine Rx")
)
+ ')'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRCommon</td>
</tr>
<tr>
<td>
<a name="fhircommon-tointerval"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.
The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.
NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
case
when choice is FHIR.dateTime then
Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
when choice is FHIR.Period then
FHIRHelpers.ToInterval(choice as FHIR.Period)
when choice is FHIR.instant then
Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
when choice is FHIR.Age then
Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
when choice is FHIR.Range then
Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
when choice is FHIR.Timing then
Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
when choice is FHIR.string then
Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
else
null as Interval<DateTime>
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-toconcept"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
if concept is null then
null
else
System.Concept {
codes: concept.coding C return ToCode(C),
display: concept.text.value
}</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-tocode"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
if coding is null then
null
else
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-tostring"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToString(value string): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-todatetime"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value dateTime): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-tointerval"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value, period."end".value]</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-todatetime"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDateTime(value instant): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-todate"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToDate(value date): value.value</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-toquantity"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity)
value to a CQL Quantity
@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
@seealso: ToCalendarUnit
*/
define function ToQuantity(quantity FHIR.Quantity):
case
when quantity is null then null
when quantity.value is null then null
when quantity.comparator is not null then
Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
else
Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> FHIRHelpers</td>
</tr>
<tr>
<td>
<a name="fhirhelpers-tocalendarunit"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">/*
@description: Converts a UCUM definite duration unit to a CQL calendar duration
unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities)
topic of the CQL specification.
@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
*/
define function ToCalendarUnit(unit System.String):
case unit
when 'ms' then 'millisecond'
when 's' then 'second'
when 'min' then 'minute'
when 'h' then 'hour'
when 'd' then 'day'
when 'wk' then 'week'
when 'mo' then 'month'
when 'a' then 'year'
else unit
end</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> PDDICDSCommon</td>
</tr>
<tr>
<td>
<a name="pddicdscommon-getlevelanddate"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function GetLevelAndDate(observation Observation):
if observation is not null
then ToString(ToQuantity(observation.value as Quantity))
+ ' and '
+ ToString(observation.effective.value)
else 'NA'</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> PDDICDSCommon</td>
</tr>
<tr>
<td>
<a name="pddicdscommon-toquantity"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToQuantity(quantity FHIR.Quantity):
System.Quantity { value: quantity.value.value, unit: quantity.unit.value }</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> PDDICDSCommon</td>
</tr>
<tr>
<td>
<a name="pddicdscommon-getdrugnames"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function GetDrugNames(codes List<FHIR.CodeableConcept>):
Combine(
flatten(
codes C
return C.coding coding
return ToCode(coding).display
)
,', '
)</code></pre>
</td>
</tr>
<tr>
<th scope="row" rowspan="2" class="row-header">
Logic Definition
</th>
<td class="content-container"><em>Library Name:</em> PDDICDSCommon</td>
</tr>
<tr>
<td>
<a name="pddicdscommon-tocode"> </a>
<pre style="border: none;" class="content-container highlight language-cql"><code class="language-cql">define function ToCode(coding FHIR.Coding):
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}</code></pre>
</td>
</tr>
<tr>
<th colspan="2" scope="row" class="row-header">Generated using version 0.5.6-cibuild of the sample-content-ig Liquid templates</th>
</tr>
</tbody>
</table>
</div>
</text>
<contained>
<Library>
<id value="effective-data-requirements"/>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Digoxin Prescription"/>
</extension>
<extension url="statement">
<valueString
value="define "Digoxin Prescription":
ContextPrescriptions P
where P.medication in "Digoxin"
return P.medication as CodeableConcept"/>
</extension>
<extension url="displaySequence">
<valueInteger value="0"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is Context medication digoxin"/>
</extension>
<extension url="statement">
<valueString
value="define "Is Context medication digoxin":
exists ("Digoxin Prescription")"/>
</extension>
<extension url="displaySequence">
<valueInteger value="1"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Digoxin Rx"/>
</extension>
<extension url="statement">
<valueString
value="define "Digoxin Rx":
(
[MedicationRequest: "Digoxin"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Digoxin"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Digoxin"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Digoxin"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="2"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is digoxin in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Is digoxin in prefetch":
exists ("Digoxin Rx")"/>
</extension>
<extension url="displaySequence">
<valueInteger value="3"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is continuation order for digoxin"/>
</extension>
<extension url="statement">
<valueString
value="define "Is continuation order for digoxin":
"Is Context medication digoxin"
and "Is digoxin in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="4"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Cyclosporine Prescription"/>
</extension>
<extension url="statement">
<valueString
value="define "Cyclosporine Prescription":
ContextPrescriptions P
where P.medication in "Cyclosporine"
return P.medication as CodeableConcept"/>
</extension>
<extension url="displaySequence">
<valueInteger value="5"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is Context medication cyclosporine"/>
</extension>
<extension url="statement">
<valueString
value="define "Is Context medication cyclosporine":
exists ("Cyclosporine Prescription")"/>
</extension>
<extension url="displaySequence">
<valueInteger value="6"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Cyclosporine Rx"/>
</extension>
<extension url="statement">
<valueString
value="define "Cyclosporine Rx":
(
[MedicationRequest: "Cyclosporine"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Cyclosporine"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Cyclosporine"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Cyclosporine"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="7"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is cyclosporine in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Is cyclosporine in prefetch":
exists ("Cyclosporine Rx")"/>
</extension>
<extension url="displaySequence">
<valueInteger value="8"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is continuation order for cyclosporine"/>
</extension>
<extension url="statement">
<valueString
value="define "Is continuation order for cyclosporine":
"Is Context medication cyclosporine"
and "Is cyclosporine in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="9"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Normal Digoxin Observation"/>
</extension>
<extension url="statement">
<valueString
value="define "Normal Digoxin Observation":
Last (
[Observation: "Digoxin LOINC"] O
where O.effective.toInterval() during Interval[Today() - 30 days, null]
and O.value < 0.9 'ng/mL'
sort by start of effective.toInterval()
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="10"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is there a normal digoxin level in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Is there a normal digoxin level in prefetch":
"Normal Digoxin Observation" is not null"/>
</extension>
<extension url="displaySequence">
<valueInteger value="11"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Aldosterone Antagonists Rx"/>
</extension>
<extension url="statement">
<valueString
value="define "Aldosterone Antagonists Rx":
(
[MedicationRequest: "Aldosterone Antagonists"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Aldosterone Antagonists"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Aldosterone Antagonists"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Aldosterone Antagonists"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="12"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Loop Diuretics Rx"/>
</extension>
<extension url="statement">
<valueString
value="define "Loop Diuretics Rx":
(
[MedicationRequest: "Loop Diuretics"] MR
where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null]
return MR.medication as CodeableConcept
)
union (
[MedicationAdministration: "Loop Diuretics"] MA
where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MA.medication as CodeableConcept
)
union (
[MedicationDispense: "Loop Diuretics"] MD
where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null]
return MD.medication as CodeableConcept
)
union (
[MedicationStatement: "Loop Diuretics"] MS
where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null]
return MS.medication as CodeableConcept
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="13"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Are diuretics in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Are diuretics in prefetch":
exists ("Aldosterone Antagonists Rx")
or exists("Loop Diuretics Rx")"/>
</extension>
<extension url="displaySequence">
<valueInteger value="14"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Normal Potassium Observation"/>
</extension>
<extension url="statement">
<valueString
value="define "Normal Potassium Observation":
Last (
[Observation: "Potassium LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 3.5 'meq/L'
and O.value < 5.0 'meq/L'
sort by start of effective.toInterval()
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="15"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Normal Magnesium Observation"/>
</extension>
<extension url="statement">
<valueString
value="define "Normal Magnesium Observation":
Last (
[Observation: "Magnesium LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 0.7 'mmol/L'
and O.value < 1.1 'mmol/L'
sort by start of effective.toInterval()
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="16"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Normal Calcium Observation"/>
</extension>
<extension url="statement">
<valueString
value="define "Normal Calcium Observation":
Last (
[Observation: "Calcium LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 8.5 'mg/dL'
and O.value < 10.2 'mg/dL'
sort by start of effective.toInterval()
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="17"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString
value="Is there a normal electrolyte observation in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Is there a normal electrolyte observation in prefetch":
"Normal Potassium Observation" is not null
and "Normal Magnesium Observation" is not null
and "Normal Calcium Observation" is not null"/>
</extension>
<extension url="displaySequence">
<valueInteger value="18"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Normal Renal Observation"/>
</extension>
<extension url="statement">
<valueString
value="define "Normal Renal Observation":
Last (
[Observation: "Renal LOINC"] O
where O.effective.toInterval() during Interval[Today() - 365 days, null]
and O.value > 0.6 'mg/dL'
and O.value < 1.2 'mg/dL'
sort by start of effective.toInterval()
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="19"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString
value="Is there a normal renal observation in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Is there a normal renal observation in prefetch":
"Normal Renal Observation" is not null"/>
</extension>
<extension url="displaySequence">
<valueInteger value="20"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString
value="Is there a normal electrolyte and renal observation in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Is there a normal electrolyte and renal observation in prefetch":
"Is there a normal electrolyte observation in prefetch"
and "Is there a normal renal observation in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="21"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString
value="Are diuretics or abnormal electrolyte or abnormal renal observations in prefetch"/>
</extension>
<extension url="statement">
<valueString
value="define "Are diuretics or abnormal electrolyte or abnormal renal observations in prefetch":
"Are diuretics in prefetch"
or not "Is there a normal electrolyte and renal observation in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="22"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Base Indicator"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Base Indicator":
if "Is continuation order for digoxin"
or "Is continuation order for cyclosporine"
then if "Is there a normal digoxin level in prefetch"
then if "Are diuretics or abnormal electrolyte or abnormal renal observations in prefetch"
then 'warning'
else 'info'
else 'warning'
else 'warning'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="23"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Card 2 Summary"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Card 2 Summary":
if "Is there a normal digoxin level in prefetch"
then 'Patient has digoxin level within 30 days that is below 0.9 ng/mL (SI: 1.2 nmol/L)'
else 'Patient does not have digoxin level on record within the last 30 days. '"/>
</extension>
<extension url="displaySequence">
<valueInteger value="24"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Inclusion Criteria"/>
</extension>
<extension url="statement">
<valueString
value="/*
**
** Digoxin Cyclosporine CDS Recommendation
**
*/
define "Inclusion Criteria":
(
"Is Context medication cyclosporine"
and "Is digoxin in prefetch"
)
or (
"Is Context medication digoxin"
and "Is cyclosporine in prefetch"
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="25"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Card 3 Summary"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Card 3 Summary":
if "Is there a normal electrolyte and renal observation in prefetch"
then 'Within 100 days, the patient has had electrolyte and serum creatinine levels checked, and they are not on a potassium sparing or loop diuretic.'
else 'Within 100 days, the patient has not had an electrolyte panel. The patient does have serum creatinine level and is not on a potassium sparing or loop diuretic.'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="26"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Card 2 Detail"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Card 2 Detail":
if "Is there a normal digoxin level in prefetch"
then '(Digoxin: '
+ Common.GetLevelAndDate("Normal Digoxin Observation")
+ '). \nFor patients with a reliable plasma digoxin concentration in normal range, it is reasonable to anticipate an increase in plasma concentrations after the initiation of cyclosporine. Following initiation, close monitoring and adjusting the digoxin dose as needed is recommended'
else 'Initiating cyclosporine is expected to increase digoxin levels. For patients without a reliable plasma digoxin concentration in normal range, use only if benefits outweight risks. Extreme caution and close monitoring is necessary.'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="27"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is new order for digoxin"/>
</extension>
<extension url="statement">
<valueString
value="define "Is new order for digoxin":
"Is Context medication digoxin"
and not "Is digoxin in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="28"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Card 3 Detail"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Card 3 Detail":
if "Is there a normal electrolyte and renal observation in prefetch"
then '(Potassium: '
+ Common.GetLevelAndDate("Normal Potassium Observation")
+ ')\n (Magnesium: '
+ Common.GetLevelAndDate("Normal Magnesium Observation")
+ ')\n (Calcium: '
+ Common.GetLevelAndDate("Normal Calcium Observation")
+ ')\n'
else ''
+ '(Serum creatinine: '
+ Common.GetLevelAndDate("Normal Renal Observation")
+ ')\n Hypokalemia, hypomagnesemia, and hypercalcemia may potentiate digoxin toxicity. 50-70% of digoxin is excreted unchanged in the urine. Changing renal function may increase serum concentrations and risk of toxicity.'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="29"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Card 3 Indicator"/>
</extension>
<extension url="statement">
<valueString
value="// Card 3
define "Get Card 3 Indicator":
if "Is there a normal electrolyte and renal observation in prefetch"
then 'info'
else 'warning'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="30"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Base Detail"/>
</extension>
<extension url="statement">
<valueString
value="define "Get Base Detail":
'Increased risk of digoxin toxicity. Assess risk and take action if necessary. \nDigoxin toxicity is potentially serious. The clinical consequences may include anorexia, nausea, vomiting, visual changes, and cardiac arrhythmias. \nThe mechanism of this interaction appears to be mediated through P-glycoprotein inhibition by cyclosporine. P-glycoprotein is a major transporter for digoxin efflux. \nunknown. \nunknown.'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="31"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Need to reduce Digoxin dose"/>
</extension>
<extension url="statement">
<valueString
value="define "Need to reduce Digoxin dose":
"Is Context medication cyclosporine"
or not "Is there a normal digoxin level in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="32"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Is new order for cyclosporine"/>
</extension>
<extension url="statement">
<valueString
value="define "Is new order for cyclosporine":
"Is Context medication cyclosporine"
and not "Is cyclosporine in prefetch""/>
</extension>
<extension url="displaySequence">
<valueInteger value="33"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Card 2 Indicator"/>
</extension>
<extension url="statement">
<valueString
value="// Card 2
define "Get Card 2 Indicator":
if "Is new order for cyclosporine"
then if "Is there a normal digoxin level in prefetch"
then 'warning'
else 'critical'
else if "Is there a normal digoxin level in prefetch"
then 'info'
else 'warning'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="34"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="DigoxinCyclosporineCDSLogic"/>
</extension>
<extension url="name">
<valueString value="Get Base Summary"/>
</extension>
<extension url="statement">
<valueString
value="// Card 1: Base
define "Get Base Summary":
'Potential Drug-Drug Interaction between digoxin ('
+ (
if "Is Context medication digoxin"
then Common.GetDrugNames("Digoxin Prescription")
else Common.GetDrugNames("Digoxin Rx")
)
+ ') and cyclosporine ('
+ (
if "Is Context medication cyclosporine"
then Common.GetDrugNames("Cyclosporine Prescription")
else Common.GetDrugNames("Cyclosporine Rx")
)
+ ')'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="35"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToConcept"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts the given FHIR [CodeableConcept](https://hl7.org/fhir/datatypes.html#CodeableConcept) value to a CQL Concept.
*/
define function ToConcept(concept FHIR.CodeableConcept):
if concept is null then
null
else
System.Concept {
codes: concept.coding C return ToCode(C),
display: concept.text.value
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="36"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToCode"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts the given FHIR [Coding](https://hl7.org/fhir/datatypes.html#Coding) value to a CQL Code.
*/
define function ToCode(coding FHIR.Coding):
if coding is null then
null
else
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="37"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToString"/>
</extension>
<extension url="statement">
<valueString
value="define function ToString(value string): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="38"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRCommon"/>
</extension>
<extension url="name">
<valueString value="toInterval"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Normalizes a value that is a choice of timing-valued types to an equivalent interval
@comment: Normalizes a choice type of FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instance, FHIR.string, FHIR.Age, or FHIR.Range types
to an equivalent interval. This selection of choice types is a superset of the majority of choice types that are used as possible
representations for timing-valued elements in FHIR, allowing this function to be used across any resource.
The input can be provided as a dateTime, Period, Timing, instant, string, Age, or Range.
The intent of this function is to provide a clear and concise mechanism to treat single
elements that have multiple possible representations as intervals so that logic doesn't have to account
for the variability. More complex calculations (such as medication request period or dispense period
calculation) need specific guidance and consideration. That guidance may make use of this function, but
the focus of this function is on single element calculations where the semantics are unambiguous.
If the input is a dateTime, the result a DateTime Interval beginning and ending on that dateTime.
If the input is a Period, the result is a DateTime Interval.
If the input is a Timing, an error is raised indicating a single interval cannot be computed from a Timing.
If the input is an instant, the result is a DateTime Interval beginning and ending on that instant.
If the input is a string, an error is raised indicating a single interval cannot be computed from a string.
If the input is an Age, the result is a DateTime Interval beginning when the patient was the given Age,
and ending immediately prior to when the patient was the given Age plus one year.
If the input is a Range, the result is a DateTime Interval beginning when the patient was the Age given
by the low end of the Range, and ending immediately prior to when the patient was the Age given by the
high end of the Range plus one year.
NOTE: Due to the
complexity of determining a single interval from a Timing or String type, this function will throw a run-time exception if it is used
with a Timing or String.
*/
define fluent function toInterval(choice Choice<FHIR.dateTime, FHIR.Period, FHIR.Timing, FHIR.instant, FHIR.string, FHIR.Age, FHIR.Range>):
case
when choice is FHIR.dateTime then
Interval[FHIRHelpers.ToDateTime(choice as FHIR.dateTime), FHIRHelpers.ToDateTime(choice as FHIR.dateTime)]
when choice is FHIR.Period then
FHIRHelpers.ToInterval(choice as FHIR.Period)
when choice is FHIR.instant then
Interval[FHIRHelpers.ToDateTime(choice as FHIR.instant), FHIRHelpers.ToDateTime(choice as FHIR.instant)]
when choice is FHIR.Age then
Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age),
FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity(choice as FHIR.Age) + 1 year)
when choice is FHIR.Range then
Interval[FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).low),
FHIRHelpers.ToDate(Patient.birthDate) + FHIRHelpers.ToQuantity((choice as FHIR.Range).high) + 1 year)
when choice is FHIR.Timing then
Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a Timing value is not supported')
when choice is FHIR.string then
Message(null as Interval<DateTime>, true, 'NOT_IMPLEMENTED', 'Error', 'Calculation of an interval from a String value is not supported')
else
null as Interval<DateTime>
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="39"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToDateTime"/>
</extension>
<extension url="statement">
<valueString
value="define function ToDateTime(value dateTime): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="40"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToInterval"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts the given [Period](https://hl7.org/fhir/datatypes.html#Period)
value to a CQL DateTime Interval
@comment: If the start value of the given period is unspecified, the starting
boundary of the resulting interval will be open (meaning the start of the interval
is unknown, as opposed to interpreted as the beginning of time).
*/
define function ToInterval(period FHIR.Period):
if period is null then
null
else
if period."start" is null then
Interval(period."start".value, period."end".value]
else
Interval[period."start".value, period."end".value]"/>
</extension>
<extension url="displaySequence">
<valueInteger value="41"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToDateTime"/>
</extension>
<extension url="statement">
<valueString
value="define function ToDateTime(value instant): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="42"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToDate"/>
</extension>
<extension url="statement">
<valueString
value="define function ToDate(value date): value.value"/>
</extension>
<extension url="displaySequence">
<valueInteger value="43"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToQuantity"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts the given FHIR [Quantity](https://hl7.org/fhir/datatypes.html#Quantity)
value to a CQL Quantity
@comment: If the given quantity has a comparator specified, a runtime error is raised. If the given quantity
has a system other than UCUM (i.e. `http://unitsofmeasure.org`) or CQL calendar units (i.e. `http://hl7.org/fhirpath/CodeSystem/calendar-units`)
an error is raised. For UCUM to calendar units, the `ToCalendarUnit` function is used.
@seealso: ToCalendarUnit
*/
define function ToQuantity(quantity FHIR.Quantity):
case
when quantity is null then null
when quantity.value is null then null
when quantity.comparator is not null then
Message(null, true, 'FHIRHelpers.ToQuantity.ComparatorQuantityNotSupported', 'Error', 'FHIR Quantity value has a comparator and cannot be converted to a System.Quantity value.')
when quantity.system is null or quantity.system.value = 'http://unitsofmeasure.org'
or quantity.system.value = 'http://hl7.org/fhirpath/CodeSystem/calendar-units' then
System.Quantity { value: quantity.value.value, unit: ToCalendarUnit(Coalesce(quantity.code.value, quantity.unit.value, '1')) }
else
Message(null, true, 'FHIRHelpers.ToQuantity.InvalidFHIRQuantity', 'Error', 'Invalid FHIR Quantity code: ' & quantity.unit.value & ' (' & quantity.system.value & '|' & quantity.code.value & ')')
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="44"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="FHIRHelpers"/>
</extension>
<extension url="name">
<valueString value="ToCalendarUnit"/>
</extension>
<extension url="statement">
<valueString
value="/*
@description: Converts a UCUM definite duration unit to a CQL calendar duration
unit using conversions specified in the [quantities](https://cql.hl7.org/02-authorsguide.html#quantities)
topic of the CQL specification.
@comment: Note that for durations above days (or weeks), the conversion is understood to be approximate
*/
define function ToCalendarUnit(unit System.String):
case unit
when 'ms' then 'millisecond'
when 's' then 'second'
when 'min' then 'minute'
when 'h' then 'hour'
when 'd' then 'day'
when 'wk' then 'week'
when 'mo' then 'month'
when 'a' then 'year'
else unit
end"/>
</extension>
<extension url="displaySequence">
<valueInteger value="45"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="PDDICDSCommon"/>
</extension>
<extension url="name">
<valueString value="GetLevelAndDate"/>
</extension>
<extension url="statement">
<valueString
value="define function GetLevelAndDate(observation Observation):
if observation is not null
then ToString(ToQuantity(observation.value as Quantity))
+ ' and '
+ ToString(observation.effective.value)
else 'NA'"/>
</extension>
<extension url="displaySequence">
<valueInteger value="46"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="PDDICDSCommon"/>
</extension>
<extension url="name">
<valueString value="ToQuantity"/>
</extension>
<extension url="statement">
<valueString
value="define function ToQuantity(quantity FHIR.Quantity):
System.Quantity { value: quantity.value.value, unit: quantity.unit.value }"/>
</extension>
<extension url="displaySequence">
<valueInteger value="47"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="PDDICDSCommon"/>
</extension>
<extension url="name">
<valueString value="GetDrugNames"/>
</extension>
<extension url="statement">
<valueString
value="define function GetDrugNames(codes List<FHIR.CodeableConcept>):
Combine(
flatten(
codes C
return C.coding coding
return ToCode(coding).display
)
,', '
)"/>
</extension>
<extension url="displaySequence">
<valueInteger value="48"/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition">
<extension url="libraryName">
<valueString value="PDDICDSCommon"/>
</extension>
<extension url="name">
<valueString value="ToCode"/>
</extension>
<extension url="statement">
<valueString
value="define function ToCode(coding FHIR.Coding):
System.Code {
code: coding.code.value,
system: coding.system.value,
version: coding.version.value,
display: coding.display.value
}"/>
</extension>
<extension url="displaySequence">
<valueInteger value="49"/>
</extension>
</extension>
<name value="EffectiveDataRequirements"/>
<status value="active"/>
<type>
<coding>
<system value="http://terminology.hl7.org/CodeSystem/library-type"/>
<code value="module-definition"/>
</coding>
</type>
<relatedArtifact>
<type value="depends-on"/>
<display value="FHIR model information"/>
<resource
value="http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FHIRHelpers"/>
<resource
value="http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library FHIRCommon"/>
<resource
value="http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Library Common"/>
<resource
value="http://hl7.org/fhir/uv/pddi/Library/PDDICDSCommon|1.0.0"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Digoxin"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Cyclosporine"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-cyclosporine"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Digoxin LOINC"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin-LOINC"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Aldosterone Antagonists"/>
<resource value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Loop Diuretics"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-LOOPDIURETIC"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Potassium LOINC"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-potassium-LOINC"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Magnesium LOINC"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-magnesium-LOINC"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Calcium LOINC"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-calcium-LOINC"/>
</relatedArtifact>
<relatedArtifact>
<type value="depends-on"/>
<display value="Value set Renal LOINC"/>
<resource
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-renal-LOINC"/>
</relatedArtifact>
<parameter>
<name value="ContextPrescriptions"/>
<use value="in"/>
<min value="0"/>
<max value="*"/>
<type value="MedicationRequest"/>
</parameter>
<parameter>
<name value="Get Base Indicator"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Get Card 2 Summary"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Inclusion Criteria"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Get Card 3 Summary"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Is Context medication cyclosporine"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Get Card 2 Detail"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Is digoxin in prefetch"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Is new order for digoxin"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Get Card 3 Detail"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Get Card 3 Indicator"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Get Base Detail"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Need to reduce Digoxin dose"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Is Context medication digoxin"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="boolean"/>
</parameter>
<parameter>
<name value="Get Card 2 Indicator"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<parameter>
<name value="Get Base Summary"/>
<use value="out"/>
<min value="0"/>
<max value="1"/>
<type value="string"/>
</parameter>
<dataRequirement>
<type value="Patient"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Patient"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<mustSupport value="medication"/>
<mustSupport value="authoredOn"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<mustSupport value="medication"/>
<mustSupport value="authoredOn"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-cyclosporine"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<mustSupport value="medication"/>
<mustSupport value="authoredOn"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<mustSupport value="medication"/>
<mustSupport value="authoredOn"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-LOOPDIURETIC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationRequest"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationRequest"/>
<mustSupport value="medication.reference"/>
<mustSupport value="medication"/>
<mustSupport value="authoredOn"/>
</dataRequirement>
<dataRequirement>
<type value="Medication"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
<mustSupport value="id"/>
<mustSupport value="code"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-cyclosporine"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-LOOPDIURETIC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationAdministration"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationAdministration"/>
<mustSupport value="medication.reference"/>
<mustSupport value="effective"/>
<mustSupport value="medication"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationDispense"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
<mustSupport value="medication"/>
<mustSupport value="whenHandedOver"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationDispense"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
<mustSupport value="medication"/>
<mustSupport value="whenHandedOver"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-cyclosporine"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationDispense"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
<mustSupport value="medication"/>
<mustSupport value="whenHandedOver"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationDispense"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
<mustSupport value="medication"/>
<mustSupport value="whenHandedOver"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-LOOPDIURETIC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationDispense"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
<mustSupport value="medication.reference"/>
<mustSupport value="whenHandedOver"/>
<mustSupport value="medication"/>
</dataRequirement>
<dataRequirement>
<type value="MedicationStatement"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationStatement"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-cyclosporine"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationStatement"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationStatement"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
<mustSupport value="medication"/>
<mustSupport value="effective"/>
<codeFilter>
<path value="medication"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-LOOPDIURETIC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="MedicationStatement"/>
<profile
value="http://hl7.org/fhir/StructureDefinition/MedicationStatement"/>
<mustSupport value="medication.reference"/>
<mustSupport value="effective"/>
<mustSupport value="medication"/>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-potassium-LOINC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-magnesium-LOINC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-calcium-LOINC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-digoxin-LOINC"/>
</codeFilter>
</dataRequirement>
<dataRequirement>
<type value="Observation"/>
<profile value="http://hl7.org/fhir/StructureDefinition/Observation"/>
<mustSupport value="code"/>
<mustSupport value="effective"/>
<mustSupport value="value"/>
<codeFilter>
<path value="code"/>
<valueSet
value="http://hl7.org/fhir/uv/pddi/ValueSet/valueset-renal-LOINC"/>
</codeFilter>
</dataRequirement>
</Library>
</contained>
<extension
url="http://hl7.org/fhir/uv/pddi/StructureDefinition/pddi-cds-configuration-options">
<extension url="code">
<valueString value="filter-out-repeated-alerts"/>
</extension>
<extension url="type">
<valueString value="boolean"/>
</extension>
<extension url="name">
<valueString value="Filter out repeated alerts"/>
</extension>
<extension url="description">
<valueString
value="Only works if both this configuration option is set to 'true' and cache-for-order-sign-filtering was set to 'true' in an order-select request. Uses information about this CDS call to filter aparently repititious card. Currently, this only supports filtering out cards that were triggered by the same knowledge artifact when the physician reference display, encounter id, and patient id match between the order-select and order-sign requests."/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/uv/pddi/StructureDefinition/pddi-cds-configuration-options">
<extension url="code">
<valueString value="alert-non-serious"/>
</extension>
<extension url="type">
<valueString value="boolean"/>
</extension>
<extension url="name">
<valueString
value="Alert for non-serious potential drug-drug interactions"/>
</extension>
<extension url="description">
<valueString
value="Serious potential drug-drug interactions could result in death; requires hospitalization or extension of hospital stay; results in persistent or significant disability or incapacity; is life-threatening (see https://www.w3.org/2019/05/pddi/index.html). If set to True, this configuration option tells the CDS service to alerts for potential drug-drug interactions that do not meet this criterion."/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/uv/pddi/StructureDefinition/pddi-cds-configuration-options">
<extension url="code">
<valueString value="show-evidence-support"/>
</extension>
<extension url="type">
<valueString value="boolean"/>
</extension>
<extension url="name">
<valueString value="Show evidence support"/>
</extension>
<extension url="description">
<valueString
value="If this options is set to True, CDS response cards will provide more complete information about the evidence that supports the potential drug-drug interaction alert."/>
</extension>
</extension>
<extension
url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
<valueCode value="cds"/>
</extension>
<extension
url="http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements">
<valueCanonical value="#effective-data-requirements"/>
</extension>
<url
value="http://hl7.org/fhir/uv/pddi/PlanDefinition/digoxin-cyclosporine-cds-sign"/>
<version value="1.0.0"/>
<name value="DigoxinCyclosporineOrderSignRecommendation"/>
<title value="Digoxin Cyclosporine Order Sign Recommendation"/>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/plan-definition-type"/>
<code value="eca-rule"/>
<display value="ECA Rule"/>
</coding>
</type>
<status value="active"/>
<experimental value="true"/>
<date value="2026-06-17T14:03:14+00:00"/>
<publisher value="HL7 International / Clinical Decision Support"/>
<contact>
<telecom>
<system value="url"/>
<value value="http://www.hl7.org/Special/committees/dss"/>
</telecom>
</contact>
<description
value="Drug-drug interaction recommendation for use on order sign of a digoxin or cyclosporine"/>
<jurisdiction>
<coding>
<system value="http://unstats.un.org/unsd/methods/m49/m49.htm"/>
<code value="001"/>
</coding>
</jurisdiction>
<topic>
<text value="Digoxin Cyclosporine Prescribing"/>
</topic>
<relatedArtifact>
<type value="documentation"/>
<display
value="Potential Drug-Drug Interaction Clinical Decision Support"/>
<url value="http://hl7.org/fhir/uv/pddi/STU1/"/>
<document>
<url value="http://hl7.org/fhir/uv/pddi/STU1/"/>
</document>
</relatedArtifact>
<library
value="http://hl7.org/fhir/uv/pddi/Library/DigoxinCyclosporineCDSLogic"/>
<action>
<trigger>
<type value="named-event"/>
<name value="order-sign"/>
</trigger>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Inclusion Criteria"/>
</expression>
</condition>
<action>
<title
value="Potential Drug-Drug Interaction between digoxin (product) and cyclosporine (product)"/>
<description
value="Increased risk of digoxin toxicity. Assess risk and take action if necessary.
Digoxin toxicity is potentially serious. The clinical consequences may include anorexia, nausea, vomiting, visual changes, and cardiac arrhythmias.
The mechanism of this interaction appears to be mediated through P-glycoprotein inhibition by cyclosporine. P-glycoprotein is a major transporter for digoxin efflux.
unknown.
unknown."/>
<dynamicValue>
<path value="action.title"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Base Summary"/>
</expression>
</dynamicValue>
<dynamicValue>
<path value="action.description"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Base Detail"/>
</expression>
</dynamicValue>
<dynamicValue>
<path value="activity.extension"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Base Indicator"/>
</expression>
</dynamicValue>
<action>
<title value="Consultation"/>
<description value="Request communication with digoxin prescriber"/>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Is Context medication digoxin"/>
</expression>
</condition>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad201"/>
</action>
<action>
<title value="Consultation"/>
<description
value="Request communication with cyclosporine prescriber"/>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Is Context medication cyclosporine"/>
</expression>
</condition>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad202"/>
</action>
<action>
<title value="Cancel digoxin"/>
<description value="Discontinue digoxin order"/>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Is Context medication digoxin"/>
</expression>
</condition>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="remove"/>
</coding>
</type>
</action>
<action>
<title value="Cancel cyclosporine"/>
<description value="Discontinue cyclosporine order"/>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Is Context medication cyclosporine"/>
</expression>
</condition>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="remove"/>
</coding>
</type>
</action>
<action>
<title value="Digoxin Level"/>
<description
value="Order digoxin trough within 24 hours from initiation"/>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Is new order for digoxin"/>
</expression>
</condition>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad203"/>
</action>
</action>
<action>
<title
value="Patient does (not) have digoxin level within 30 days that is below 0.9 ng/mL (SI: 1.2 nmol/L)"/>
<description
value="(Digoxin: level and date).
For patients with a reliable plasma digoxin concentration in normal range, it is reasonable to anticipate an increase in plasma concentrations after the initiation of cyclosporine. Following initiation, close monitoring and adjusting the digoxin dose as needed is recommended. Initiating cyclosporine is expected to increase digoxin levels. For patients without a reliable plasma digoxin concentration in normal range, use only if benefits outweight risks. Extreme caution and close monitoring is necessary."/>
<documentation>
<type value="citation"/>
<display value="Dorian et al. Clin Invest Med 1988; 11(2):108-112"/>
</documentation>
<documentation>
<type value="citation"/>
<display
value="Dorian et al. Transplant Proc. 1987; 19(1):1825-1827"/>
</documentation>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Is digoxin in prefetch"/>
</expression>
</condition>
<dynamicValue>
<path value="action.title"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Card 2 Summary"/>
</expression>
</dynamicValue>
<dynamicValue>
<path value="action.description"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Card 2 Detail"/>
</expression>
</dynamicValue>
<dynamicValue>
<path value="activity.extension"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Card 2 Indicator"/>
</expression>
</dynamicValue>
<action>
<title value="Digoxin Level"/>
<description
value="Order digoxin trough within 24 hours from the initiation of cyclosporine"/>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad203"/>
</action>
<action>
<title value="New Digoxin"/>
<description value="Preemptively reduce digoxin dose with new order"/>
<condition>
<kind value="applicability"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Need to reduce Digoxin dose"/>
</expression>
</condition>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad204"/>
</action>
</action>
<action>
<title
value="Within 100 days, the patient has had electrolyte and serum creatinine levels checked, and they are not on a potassium sparing or loop diuretic."/>
<description
value="(Potassium: level and date)
(Magnesium: level and date)
(Calcium: level and date)
(Serum creatinine: level and date)
Hypokalemia, hypomagnesemia, and hypercalcemia may potentiate digoxin toxicity. 50-70% of digoxin is excreted unchanged in the urine. Changing renal function may increase serum concentrations and risk of toxicity."/>
<documentation>
<type value="citation"/>
<display value="Lip et al. Postgrad Med J. 1993; 69(811):337"/>
</documentation>
<documentation>
<type value="citation"/>
<display
value="Digoxin-FDA [prescribing information] NDA 20405/S-004"/>
</documentation>
<dynamicValue>
<path value="action.title"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Card 3 Summary"/>
</expression>
</dynamicValue>
<dynamicValue>
<path value="action.description"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Card 3 Detail"/>
</expression>
</dynamicValue>
<dynamicValue>
<path value="activity.extension"/>
<expression>
<language value="text/cql-identifier"/>
<expression value="Get Card 3 Indicator"/>
</expression>
</dynamicValue>
<action>
<title value="Serum Creatinine"/>
<description value="Order for serum creatinine"/>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad205"/>
</action>
<action>
<title value="Electrolyte Panel"/>
<description value="Order for electrolyte panel"/>
<type>
<coding>
<system
value="http://terminology.hl7.org/CodeSystem/action-type"/>
<code value="create"/>
</coding>
</type>
<definitionCanonical
value="http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad206"/>
</action>
</action>
</action>
</PlanDefinition>