Clinical Practice Guidelines, published by HL7 International / Clinical Decision Support. This guide is not an authorized publication; it is the continuous build for version 2.0.0-draft built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/cqf-recommendations/ and changes regularly. See the Directory of published versions
Official URL: http://hl7.org/fhir/uv/cpg/Library/stopmedication-library | Version: 2.0.0-draft | |||
Active as of 2024-10-18 | Computable Name: StopMedicationLibrary |
Logic for an example recommendation to stop a medication
Generated Narrative: Library stopmedication-library
text/cql
library StopMedication
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1'
codesystem "Activity Type": 'http://hl7.org/fhir/uv/cpg/CodeSystem/cpg-activity-type-cs'
code "Stop Activity": 'stop-activity' from "Activity Type"
context Patient
/* Recommendation to stop an existing order for a medication */
/*
Positive recommendation:
If an active order for the medication exists
Propose stopping the medication
Given a proposal, the user can:
Accept the proposal
Ignore the proposal
Reject the proposal without reason
Reject the proposal with reason
Scenario 1: Active medication order, no plan or proposal, decision support should propose
Scenario 2: Active medication order, incomplete proposal, decision support should not propose
Scenario 3: Active medication order, rejected proposal, decision support should not propose
Scenario 4: No active medication order, decision support should not propose
*/
define "Medication Proposal":
[MedicationRequest] M
where M.intent = 'order'
and M.status = 'active'
define "Inclusion Criteria":
Patient.active
and exists "Medication Proposal"
define "Stop Medication Proposal":
[Task] T
where R.code ~ "Stop Activity"
define "Is Recommendation Applicable":
"Inclusion Criteria"
and not exists "Stop Medication Proposal"
No Content
(application/elm+xml
)