Clinical Practice Guidelines
2.0.0-draft - draft International flag

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

Library: Hold Medication Library (Experimental)

Official URL: http://hl7.org/fhir/uv/cpg/Library/holdmedication-library Version: 2.0.0-draft
Active as of 2024-10-18 Computable Name: HoldMedicationLibrary

Logic for an example recommendation to hold a medication

Generated Narrative: Library holdmedication-library

Contents

text/cql

library HoldMedication

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 "Hold Activity": 'hold-activity' from "Activity Type"

context Patient

/* Recommendation to hold an existing order for a medication */

/*
Positive recommendation:

If an active order for the medication exists
  Propose holding 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 "Hold Medication Proposal":
  [Task] T
    where R.code ~ "Hold Activity"

define "Is Recommendation Applicable":
  "Inclusion Criteria"
    and not exists "Hold Medication Proposal"

No Content (application/elm+xml)