warfarin-nsaids-cds-sign
type: PlanDefinition
node role: treeRoot
id:
  v: warfarin-nsaids-cds-sign
language:
  v: en
text:
  status:
    v: extensions
  div:
    v: Metadata Title Warfarin NSAIDs Order Sign Recommendation Version 1.0.0 Experimental true Jurisdiction 001 from http://unstats.un.org/unsd/methods/m49/m49.htm Topic Warfarin NSAIDs Prescribing Steward (Publisher) HL7 International / Clinical Decision Support Description Drug-drug interaction recommendation for use on order select of a warfarin or NSAID Type ECA Rule PlanDefinition Action Trigger Type Named Event Trigger Name order-sign Condition Kind: Applicability Logic Definition: Inclusion Criteria PlanDefinition Sub-Action Title Potential Drug-Drug Interaction between warfarin (product) and NSAID (product) Description Topical diclofenac has relatively low systemic absorption; in one study a topical gel (16 g/day) produced about 6% of the absorption seen with systemic administration of 150 mg/day. A higher than recommended dose of topical gel (48 g/day) produced 20% of a systemic dose of diclofenac. Condition Kind: Applicability Logic Definition: Is context medication topical diclofenac Dynamic Value Path: action.title Logic Definition: Get Base Summary Dynamic Value Path: activity.extension Logic Definition: Get Base Indicator PlanDefinition Sub-Action (Parent Action Title: Potential Drug-Drug Interaction between warfarin (product) and NSAID (product)) Title No special precautions PlanDefinition Sub-Action Title Potential Drug-Drug Interaction between warfarin (product) and NSAID (product) Description Increased risk of bleeding. Bleeding is a serious potential clinical consequence because it can result in death, life-threatening hospitalization, and disability. Non-steroidal anti-inflammatory drugs (NSAIDs) have antiplatelet effects which increase the bleeding risk when combined with oral anticoagulants such as warfarin. The antiplatelet effect of NSAIDs lasts only as long as the NSAID is present in the circulation, unlike aspirin’s antiplatelet effect, which lasts for up to 2 weeks after aspirin is discontinued. NSAIDs also can cause peptic ulcers and most of th…
contained: Library
  id:
    v: effective-data-requirements
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: Topical Diclofenac Prescription
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Topical Diclofenac Prescription": ContextPrescriptions P where P.medication in "Topical Diclofenac" return P.medication as CodeableConcept
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 0
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: Is context medication topical diclofenac
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Is context medication topical diclofenac": exists ("Topical Diclofenac Prescription")
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 1
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: Get Base Indicator
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Get Base Indicator": if "Is context medication topical diclofenac" then 'info' else 'warning'
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 2
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: PPIs and Misoprostols Rx
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "PPIs and Misoprostols Rx": ( [MedicationRequest: "PPIs and Misoprostols"] MR where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null] return MR.medication as CodeableConcept ) union ( [MedicationAdministration: "PPIs and Misoprostols"] MA where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MA.medication as CodeableConcept ) union ( [MedicationDispense: "PPIs and Misoprostols"] MD where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null] return MD.medication as CodeableConcept ) union ( [MedicationStatement: "PPIs and Misoprostols"] MS where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MS.medication as CodeableConcept )
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 3
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: Taking PPI or misoprostol
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Taking PPI or misoprostol": exists ("PPIs and Misoprostols Rx")
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 4
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: Get Card 2 Summary
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Get Card 2 Summary": if "Taking PPI or misoprostol" then 'Patient is taking a proton pump inhibitor (' + Common.GetDrugNames("PPIs and Misoprostols Rx") + ').' else 'Patient is not taking a proton pump inhibitor or misoprostol.'
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer
        v: 5
    url:
      v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
      l: cqf-logicDefinition
  extension:
    extension:
      url:
        v: libraryName
        l: libraryName
      value: String
        v: WarfarinNSAIDsCDSLogic
    extension:
      url:
        v: name
        l: name
      value: String
        v: Warfarin Rx
    extension:
      url:
        v: statement
        l: statement
      value: String
        v: define "Warfarin Rx": ( [MedicationRequest: "Warfarins"] MR where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null] return MR.medication as CodeableConcept ) union ( [MedicationAdministration: "Warfarins"] MA where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MA.medication as CodeableConcept ) union ( [MedicationDispense: "Warfarins"] MD where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null] return MD.medication as CodeableConcept ) union ( [MedicationStatement: "Warfarins"] MS where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MS.medication as CodeableConcept )
    extension:
      url:
        v: displaySequence
        l: displaySequence
      value: Integer

Integer
v: 6

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Is warfarin in prefetch
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Is warfarin in prefetch": exists ("Warfarin Rx")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 7
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: NSAID Prescription
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "NSAID Prescription": ContextPrescriptions P where P.medication in "NSAIDs" return P.medication as CodeableConcept
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 8
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Is context medication systemic NSAID
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Is context medication systemic NSAID": exists ("NSAID Prescription")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 9
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Inclusion Criteria
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* ** ** Warfarin NSAID CDS Recommendation ** */ define "Inclusion Criteria": if "Is context medication topical diclofenac" then "Is warfarin in prefetch" else ( "Is context medication systemic NSAID" and "Is warfarin in prefetch" )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 10
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: GI Bleeds Condition
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "GI Bleeds Condition": Last( [Condition: "History of GI Bleeds"] C sort by assertedDate().value )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 11
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Age > 65 years or Hx UGIB
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Age > 65 years or Hx UGIB": "GI Bleeds Condition" is not null or AgeInYears() > 65
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 12
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 3 Summary
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 3 Summary": if "Age > 65 years or Hx UGIB" then 'Patient is 65 y/o or does have a history of upper gastrointestinal bleed ("' + Common.GetConditionName("GI Bleeds Condition") + '" and ' + Common.GetAssertedDate("GI Bleeds Condition") + ').' else 'Patient is not 65 y/o and does not have a history of upper gastrointestinal bleed.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 13
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Systemic Corticosteroids Rx
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Systemic Corticosteroids Rx": ( [MedicationRequest: "Systemic Corticosteroids"] MR where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null] return MR.medication as CodeableConcept ) union ( [MedicationAdministration: "Systemic Corticosteroids"] MA where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MA.medication as CodeableConcept ) union ( [MedicationDispense: "Systemic Corticosteroids"] MD where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null] return MD.medication as CodeableConcept ) union ( [MedicationStatement: "Systemic Corticosteroids"] MS where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MS.medication as CodeableConcept )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 14
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Has Systemic Corticosteroids
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Has Systemic Corticosteroids": exists ("Systemic Corticosteroids Rx")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 15
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Aldosterone Antagonists Rx
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 16
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Has Aldosterone Antagonists
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Has Aldosterone Antagonists": exists ("Aldosterone Antagonists Rx")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 17
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: NSAID Rx
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "NSAID Rx": ( [MedicationRequest: "NSAIDs"] MR where MR.authoredOn.toInterval() during Interval[Today() - 100 days, null] return MR.medication as CodeableConcept ) union ( [MedicationAdministration: "NSAIDs"] MA where MA.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MA.medication as CodeableConcept ) union ( [MedicationDispense: "NSAIDs"] MD where MD.whenHandedOver.toInterval() during Interval[Today() - 100 days, null] return MD.medication as CodeableConcept ) union ( [MedicationStatement: "NSAIDs"] MS where MS.effective.toInterval() overlaps Interval[Today() - 100 days, null] return MS.medication as CodeableConcept )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 18
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Has NSAID
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Has NSAID": exists ("NSAID Rx")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 19
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Taking CS, MCRA, or NSAID
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Taking CS, MCRA, or NSAID": "Has Systemic Corticosteroids" or "Has Aldosterone Antagonists" or "Has NSAID"
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 20
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 4 Summary
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 4 Summary": if "Taking CS, MCRA, or NSAID" then 'Patient is concomitantly taking systemic corticosteroids (' + Common.GetDrugNames("Systemic Corticosteroids Rx") + '), aldosterone antagonist (' + Common.GetDrugNames("Aldosterone Antagonists Rx") + '), or high dose or multiple NSAIDs (' + Common.GetDrugNames("NSAID Rx") + ').' else 'Patient is not concomitantly taking systemic corticosteroids, aldosterone antagonist, or high dose or multiple NSAIDs.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 21
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 2 Detail
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 2 Detail": 'Proton pump inhibitors and misoprostol may reduce the risk of UGIB in patients receiving NSAIDs and warfarin.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 22
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Acetaminophen 500 MG
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Acetaminophen 500 MG": Code '198440' from "RXNORM" display 'Acetaminophen 500 MG Oral Tablet'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 23
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Base Label 2
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Base Label 2": 'Substitute NSAID (' + Common.GetDrugNames("NSAID Prescription") + ') with APAP (' + Common.ToString("Acetaminophen 500 MG") + ').'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 24
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 2 Label
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 2 Label": if "Taking PPI or misoprostol" then 'Assess risk and take action if necessary.' else 'Use only if benefit outweighs risk.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 25
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Acetaminophen 325 MG
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Acetaminophen 325 MG": Code '313782' from "RXNORM" display 'Acetaminophen 325 MG Oral Tablet'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 26
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Base Label 1
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Base Label 1": 'Substitute NSAID (' + Common.GetDrugNames("NSAID Prescription") + ') with APAP (' + Common.ToString("Acetaminophen 325 MG") + ').'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 27
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 4 Detail
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 4 Detail": 'Both corticosteroids and aldosterone antagonists have been shown to subsetantially increase the risk of UGIB in patients on NSAIDs, with relative risks of 12.8 and 11 respectively compared to a risk of 4.3 with NSAIDs alone (Masclee et al. Gastroenterology 2014; 147:784-92.)'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 28
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 4 Indicator
extension:
  url:
    v: statement
    l: statement
  value: String
    v: // Card 4: Systemic Corticosteroids or Aldosterone Antagonist define "Get Card 4 Indicator": if "Taking CS, MCRA, or NSAID" then 'warning' else 'info'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 29
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 3 Detail
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 3 Detail": 'Patients with a history of UGIB or peptic ulcer may have an increased risk of UGIB from this interaction. The extent to which older age is an independent risk factor for UGIB due to these interactions is not firmly established, but UGIB in general is known to increase with age.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 30
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 3 Indicator
extension:
  url:
    v: statement
    l: statement
  value: String
    v: // Card 3: History of UGIB/peptic ulcer or > 65 years old define "Get Card 3 Indicator": if "Age > 65 years or Hx UGIB" then 'warning' else 'info'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 31
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Is not context medication topical diclofenac
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Is not context medication topical diclofenac": not exists ("Topical Diclofenac Prescription")
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 32
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 3 Label
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 3 Label": if "Taking PPI or misoprostol" then 'Assess risk and take action if necessary.' else if "Age > 65 years or Hx UGIB" then 'Use only if benefit outweighs risk.' else 'Assess risk and take action if necessary.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 33
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 2 Indicator
extension:
  url:
    v: statement
    l: statement
  value: String
    v: // Card 2: PPI or misoprostol define "Get Card 2 Indicator": if "Taking PPI or misoprostol" then 'info' else 'critical'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 34
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Base Summary
extension:
  url:
    v: statement
    l: statement
  value: String
    v: // Card 1: Base define "Get Base Summary": 'Potential Drug-Drug Interaction between warfarin (' + Common.GetDrugNames("Warfarin Rx") + ') and NSAID (' + Common.GetDrugNames("NSAID Prescription") + ').'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 35
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: WarfarinNSAIDsCDSLogic
extension:
  url:
    v: name
    l: name
  value: String
    v: Get Card 4 Label
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define "Get Card 4 Label": if "Taking PPI or misoprostol" then 'Assess risk and take action if necessary.' else if "Taking CS, MCRA, or NSAID" then 'Use only if benefit outweighs risk.' else 'Assess risk and take action if necessary.'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 36
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToConcept
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 37
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToCode
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 38
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value string): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 39
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: toInterval
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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 dete…
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 40
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToDateTime
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToDateTime(value dateTime): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 41
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToInterval
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 42
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToDateTime
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToDateTime(value instant): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 43
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToDate
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToDate(value date): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 44
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToQuantity
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 45
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToCalendarUnit
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 46
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: PDDICDSCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: GetDrugNames
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function GetDrugNames(codes List<FHIR.CodeableConcept>): Combine( flatten( codes C return C.coding coding return ToCode(coding).display ) ,', ' )
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 47
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: PDDICDSCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ToCode
extension:
  url:
    v: statement
    l: statement
  value: String
    v: 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:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 48
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: PDDICDSCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: assertedDate
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define fluent function assertedDate(condition Condition): condition.ext('http://hl7.org/fhir/StructureDefinition/condition-assertedDate').value as dateTime
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 49
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ext
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @description: Returns the single extension (if present) on the given resource with the specified url. @comment: This function uses singleton from to ensure that a run-time exception is thrown if there is more than one extension on the given resource with the specified url. */ define fluent function ext(domainResource DomainResource, url String): singleton from domainResource.exts(url)
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 50
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: exts
extension:
  url:
    v: statement
    l: statement
  value: String
    v: /* @description: Returns any extensions defined on the given resource with the specified url */ define fluent function exts(domainResource DomainResource, url String): domainResource.extension E where E.url = url return E
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 51
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: FHIRHelpers
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value uri): value.value
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 52
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: PDDICDSCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: GetConditionName
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function GetConditionName(condition Condition): if condition is not null then condition.code.coding[0].display.value else 'NA'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 53
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: PDDICDSCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: GetAssertedDate
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function GetAssertedDate(condition Condition): if condition is not null then ToString(condition.assertedDate().value) else 'NA'
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 54
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

extension:
  url:
    v: libraryName
    l: libraryName
  value: String
    v: PDDICDSCommon
extension:
  url:
    v: name
    l: name
  value: String
    v: ToString
extension:
  url:
    v: statement
    l: statement
  value: String
    v: define function ToString(value Code): value.display
extension:
  url:
    v: displaySequence
    l: displaySequence
  value: Integer
    v: 55
url:
  v: http://hl7.org/fhir/StructureDefinition/cqf-logicDefinition
  l: cqf-logicDefinition

v: EffectiveDataRequirements

v: active

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/library-type
    l: library-type
  code:
    v: module-definition

type:
  v: depends-on
display:
  v: FHIR model information
resource:
  v: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo|4.0.1
  l: http://hl7.org/fhir/uv/cql/Library/FHIR-ModelInfo

type:
  v: depends-on
display:
  v: Library FHIRHelpers
resource:
  v: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers|4.0.1
  l: http://hl7.org/fhir/uv/cql/Library/FHIRHelpers

type:
  v: depends-on
display:
  v: Library FHIRCommon
resource:
  v: http://hl7.org/fhir/uv/cql/Library/FHIRCommon|2.0.0
  l: http://hl7.org/fhir/uv/cql/Library/FHIRCommon

type:
  v: depends-on
display:
  v: Library Common
resource:
  v: http://hl7.org/fhir/uv/pddi/Library/PDDICDSCommon|1.0.0
  l: http://hl7.org/fhir/uv/pddi/Library/PDDICDSCommon

type:
  v: depends-on
display:
  v: Code system RXNORM
resource:
  v: http://www.nlm.nih.gov/research/umls/rxnorm
  l: rxnorm

type:
  v: depends-on
display:
  v: Value set Topical Diclofenac
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-topicaldiclofenac
  l: valueset-topicaldiclofenac

type:
  v: depends-on
display:
  v: Value set PPIs and Misoprostols
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-PPIS
  l: valueset-PPIS

type:
  v: depends-on
display:
  v: Value set Warfarins
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-warfarin
  l: valueset-warfarin

type:
  v: depends-on
display:
  v: Value set NSAIDs
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-NSAIDS
  l: valueset-NSAIDS

type:
  v: depends-on
display:
  v: Value set History of GI Bleeds
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-Hx-UGIB-snomed
  l: valueset-Hx-UGIB-snomed

type:
  v: depends-on
display:
  v: Value set Systemic Corticosteroids
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-SCS
  l: valueset-SCS

type:
  v: depends-on
display:
  v: Value set Aldosterone Antagonists
resource:
  v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS
  l: valueset-AAS

name:
  v: ContextPrescriptions
use:
  v: in
min:
  v: 0
max:
  v: *
type:
  v: MedicationRequest

name:
  v: Get Base Indicator
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 2 Summary
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Inclusion Criteria
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Get Card 3 Summary
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 4 Summary
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 2 Detail
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Is context medication topical diclofenac
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Get Base Label 2
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 2 Label
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Base Label 1
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 4 Detail
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 4 Indicator
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 3 Detail
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 3 Indicator
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Is not context medication topical diclofenac
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: boolean

name:
  v: Get Card 3 Label
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 2 Indicator
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Base Summary
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

name:
  v: Get Card 4 Label
use:
  v: out
min:
  v: 0
max:
  v: 1
type:
  v: string

type:
  v: Patient
profile:
  v: http://hl7.org/fhir/StructureDefinition/Patient
  l: Patient

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: authoredOn
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-PPIS
    l: valueset-PPIS

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: authoredOn
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-warfarin
    l: valueset-warfarin

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: authoredOn
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-SCS
    l: valueset-SCS

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: authoredOn
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS
    l: valueset-AAS

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication
must support:
  v: authoredOn
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-NSAIDS
    l: valueset-NSAIDS

type:
  v: MedicationRequest
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationRequest
  l: MedicationRequest
must support:
  v: medication.reference
must support:
  v: medication
must support:
  v: authoredOn

type:
  v: Medication
profile:
  v: http://hl7.org/fhir/StructureDefinition/Medication
  l: Medication
must support:
  v: id
must support:
  v: code

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-PPIS
    l: valueset-PPIS

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-warfarin
    l: valueset-warfarin

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-SCS
    l: valueset-SCS

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS
    l: valueset-AAS

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-NSAIDS
    l: valueset-NSAIDS

type:
  v: MedicationAdministration
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationAdministration
  l: MedicationAdministration
must support:
  v: medication.reference
must support:
  v: effective
must support:
  v: medication

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense
must support:
  v: medication
must support:
  v: whenHandedOver
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-PPIS
    l: valueset-PPIS

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense
must support:
  v: medication
must support:
  v: whenHandedOver
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-warfarin
    l: valueset-warfarin

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense
must support:
  v: medication
must support:
  v: whenHandedOver
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-SCS
    l: valueset-SCS

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense
must support:
  v: medication
must support:
  v: whenHandedOver
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS
    l: valueset-AAS

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense
must support:
  v: medication
must support:
  v: whenHandedOver
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-NSAIDS
    l: valueset-NSAIDS

type:
  v: MedicationDispense
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationDispense
  l: MedicationDispense
must support:
  v: medication.reference
must support:
  v: whenHandedOver
must support:
  v: medication

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-PPIS
    l: valueset-PPIS

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-warfarin
    l: valueset-warfarin

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-SCS
    l: valueset-SCS

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-AAS
    l: valueset-AAS

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement
must support:
  v: medication
must support:
  v: effective
code filter:
  path:
    v: medication
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-NSAIDS
    l: valueset-NSAIDS

type:
  v: MedicationStatement
profile:
  v: http://hl7.org/fhir/StructureDefinition/MedicationStatement
  l: MedicationStatement
must support:
  v: medication.reference
must support:
  v: effective
must support:
  v: medication

type:
  v: Condition
profile:
  v: http://hl7.org/fhir/StructureDefinition/Condition
  l: Condition
must support:
  v: code
code filter:
  path:
    v: code
  value set:
    v: http://hl7.org/fhir/uv/pddi/ValueSet/valueset-Hx-UGIB-snomed
    l: valueset-Hx-UGIB-snomed

extension:
  url:
    v: code
    l: code
  value: String
    v: filter-out-repeated-alerts
extension:
  url:
    v: type
    l: type
  value: String
    v: boolean
extension:
  url:
    v: name
    l: name
  value: String
    v: Filter out repeated alerts
extension:
  url:
    v: description
    l: description
  value: String
    v: 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.
url:
  v: http://hl7.org/fhir/uv/pddi/StructureDefinition/pddi-cds-configuration-options
  l: pddi-cds-configuration-options

extension:
  url:
    v: code
    l: code
  value: String
    v: alert-non-serious
extension:
  url:
    v: type
    l: type
  value: String
    v: boolean
extension:
  url:
    v: name
    l: name
  value: String
    v: Alert for non-serious potential drug-drug interactions
extension:
  url:
    v: description
    l: description
  value: String
    v: 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.
url:
  v: http://hl7.org/fhir/uv/pddi/StructureDefinition/pddi-cds-configuration-options
  l: pddi-cds-configuration-options

extension:
  url:
    v: code
    l: code
  value: String
    v: show-evidence-support
extension:
  url:
    v: type
    l: type
  value: String
    v: boolean
extension:
  url:
    v: name
    l: name
  value: String
    v: Show evidence support
extension:
  url:
    v: description
    l: description
  value: String
    v: 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.
url:
  v: http://hl7.org/fhir/uv/pddi/StructureDefinition/pddi-cds-configuration-options
  l: pddi-cds-configuration-options

url:
  v: http://hl7.org/fhir/StructureDefinition/structuredefinition-wg
  l: structuredefinition-wg
value: Code
  v: cds

url:
  v: http://hl7.org/fhir/uv/crmi/StructureDefinition/crmi-effectiveDataRequirements
  l: crmi-effectiveDataRequirements
value: Canonical
  v: #effective-data-requirements
  l: effective-data-requirements

v: 1.0.0

v: WarfarinNSAIDsOrderSignRecommendation

v: Warfarin NSAIDs Order Sign Recommendation

coding:
  system:
    v: http://terminology.hl7.org/CodeSystem/plan-definition-type
    l: plan-definition-type
  code:
    v: eca-rule
  display:
    v: ECA Rule

v: active

v: true

v: 2026-06-11T13:43:59+00:00

v: HL7 International / Clinical Decision Support

telecom:
  system:
    v: url
  value:
    v: http://www.hl7.org/Special/committees/dss

v: Drug-drug interaction recommendation for use on order select of a warfarin or NSAID

coding:
  system:
    v: http://unstats.un.org/unsd/methods/m49/m49.htm
    l: m49.htm
  code:
    v: 001

text:
  v: Warfarin NSAIDs Prescribing

type:
  v: documentation
display:
  v: Warfarin-NSAIDs clinical decision support algorithm
url:
  v: https://ddi-cds.org/warfarin-nsaids/
  l: warfarin-nsaids
document:
  url:
    v: https://ddi-cds.org/warfarin-nsaids/
    l: warfarin-nsaids

trigger:
  type:
    v: named-event
  name:
    v: order-sign
condition:
  kind:
    v: applicability
  expression:
    language:
      v: text/cql-identifier
    expression:
      v: Inclusion Criteria
action:
  title:
    v: Potential Drug-Drug Interaction between warfarin (product) and NSAID (product)
  description:
    v: Topical diclofenac has relatively low systemic absorption; in one study a topical gel (16 g/day) produced about 6% of the absorption seen with systemic administration of 150 mg/day. A higher than recommended dose of topical gel (48 g/day) produced 20% of a systemic dose of diclofenac.
  condition:
    kind:
      v: applicability
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Is context medication topical diclofenac
  dynamic value:
    path:
      v: action.title
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Base Summary
  dynamic value:
    path:
      v: activity.extension
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Base Indicator
  action:
    title:
      v: No special precautions
action:
  title:
    v: Potential Drug-Drug Interaction between warfarin (product) and NSAID (product)
  description:
    v: Increased risk of bleeding. Bleeding is a serious potential clinical consequence because it can result in death, life-threatening hospitalization, and disability. Non-steroidal anti-inflammatory drugs (NSAIDs) have antiplatelet effects which increase the bleeding risk when combined with oral anticoagulants such as warfarin. The antiplatelet effect of NSAIDs lasts only as long as the NSAID is present in the circulation, unlike aspirin’s antiplatelet effect, which lasts for up to 2 weeks after aspirin is discontinued. NSAIDs also can cause peptic ulcers and most of the evidence for increased bleeding risk with NSAIDs plus warfarin is due to upper gastrointestinal bleeding (UGIB). unknown. unknown.
  condition:
    kind:
      v: applicability
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Is not context medication topical diclofenac
  dynamic value:
    path:
      v: action.title
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Base Summary
  dynamic value:
    path:
      v: activity.extension
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Base Indicator
  action:
    title:
      v: Assess risk and take action if necessary.
    description:
      v: If the NSAID is being used as an analgesic or antipyretic, it would be prudent to use an alternative such as acetaminophen. In some people, acetaminophen can increase the anticoagulant effect of warfarin, so monitor the INR if acetaminophen is used in doses over 2 g/day for a few days. For more severe pain consider short-term opioids in place of the NSAID.
  action:
    title:
      v: Substitute NSAID (product) with APAP (product).
    description:
      v: Order for APAP <2g per day (APAP 500 mg every 4-6 hours prn).
    definition: Canonical
      v: http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad101
      l: ad101
    dynamic value:
      path:
        v: action.title
  action:
    title:
      v: Substitute NSAID (product) with APAP (product).
    description:
      v: Order for APAP <2g per day (APAP 500 mg every 4-6 hours prn).
    definition: Canonical
      v: http://hl7.org/fhir/uv/pddi/ActivityDefinition/ad102
      l: ad102
    dynamic value:
      path:
        v: action.title
action:
  title:
    v: Patient is (not) taking a proton pump inhibitor (product) or misoprostol (product).
  description:
    v: Proton pump inhibitors and misoprostol may reduce the risk of UGIB in patients receiving NSAIDs and warfarin.
  condition:
    kind:
      v: applicability
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Is not context medication topical diclofenac
  dynamic value:
    path:
      v: action.title
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Card 2 Summary
  dynamic value:
    path:
      v: action.description
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Card 2 Detail
  dynamic value:
    path:
      v: activity.extension
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Card 2 Indicator
  action:
    title:
      v: Assess risk and take action if necessary.
    dynamic value:
      path:
        v: action.title
action:
  title:
    v: Patient is (not) 65 y/o and/or does (not) have a history of upper gastrointestinal bleed
  description:
    v: Patients with a history of UGIB or peptic ulcer may have an increased risk of UGIB from this interaction. The extent to which older age is an independent risk factor for UGIB due to these interactions is not firmly established, but UGIB in general is known to increase with age
  condition:
    kind:
      v: applicability
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Is not context medication topical diclofenac
  dynamic value:
    path:
      v: action.title
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Card 3 Summary
  dynamic value:
    path:
      v: action.description
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Card 3 Detail
  dynamic value:
    path:
      v: activity.extension
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Get Card 3 Indicator
  action:
    title:
      v: Assess risk and take action if necessary.
    dynamic value:
      path:
        v: action.title
action:
  title:
    v: Patient is (not) concomitantly taking systemic corticosteroids, aldosterone antagonist, or high dose or multiple NSAIDs
  description:
    v: Both corticosteroids and aldosterone antagonists have been shown to subsetantially increase the risk of UGIB in patients on NSAIDs, with relative risks of 12.8 and 11 respectively compared to a risk of 4.3 with NSAIDs alone (Masclee et al. Gastroenterology 2014; 147:784-92.)
  condition:
    kind:
      v: applicability
    expression:
      language:
        v: text/cql-identifier
      expression:
        v: Is not context medication topical diclofenac
  dynamic value:
    path:
      v: action.title

v: remove

v: create

v: text/cql-identifier

v: Get Base Label 1

v: create

v: text/cql-identifier

v: Get Base Label 2

v: text/cql-identifier

v: Get Card 2 Label

v: text/cql-identifier

v: Get Card 3 Label

language:
  v: text/cql-identifier
expression:
  v: Get Card 4 Summary

path:
  v: action.description
expression:
  language:
    v: text/cql-identifier
  expression:
    v: Get Card 4 Detail

path:
  v: activity.extension
expression:
  language:
    v: text/cql-identifier
  expression:
    v: Get Card 4 Indicator

title:
  v: Assess risk and take action if necessary.
dynamic value:
  path:
    v: action.title
  expression:
    language:
      v: text/cql-identifier
    expression:
      v: Get Card 4 Label