Colorectal Cancer Screening and Management (CRCSM) Clinical Decision Support (CDS) Implementation Guide
0.1.0 - ci-build

Colorectal Cancer Screening and Management (CRCSM) Clinical Decision Support (CDS) Implementation Guide - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Library: IncreasedRiskExclusions

Official URL: http://cancerscreeningcds.github.io/crcsm-cds/Library/IncreasedRiskExclusions Version: 0.1.0
Draft as of 2025-02-28 Computable Name: IncreasedRiskExclusions
Id: IncreasedRiskExclusions
Version: 0.1.0
Url: IncreasedRiskExclusions
Status: draft
Type:

system: http://terminology.hl7.org/CodeSystem/library-type

code: logic-library

Date: 2025-02-28 21:24:30+0000
Publisher: MITRE
Related Artifacts:

Dependencies

  • http://fhir.org/guides/cqf/common/Library/FHIR-ModelInfo|4.0.1
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/FHIRHelpers|4.0.1
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/IncreasedRiskExclusionsEvents|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/IncreasedRiskExclusionsActions|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/DataElements|1.0.0
Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
IncreasedRiskExclusionsRecommendationResource01Out
flow-IncreasedRiskExclusionsResource01Out
HereditarySyndromeResource01Out
IBDResource01Out
HxCRCResource01Out
FamilyHxResource01Out
HxPolypsResource01Out
ExistsHereditarySyndromeboolean01Out
HereditarySyndromeCodeCoding01Out
HereditarySyndromeReasonCoding01Out
ExistsIBDboolean01Out
IBDCodeCoding01Out
IBDReasonCoding01Out
ExistsHxCRCboolean01Out
HxCRCCodeCoding01Out
HxCRCReasonCoding01Out
ExistsFamilyHxboolean01Out
FamilyHxCodeCoding01Out
FamilyHxReasonCoding01Out
ExistsHxPolypsboolean01Out
HxPolypsCodeCoding01Out
HxPolypsReasonCoding01Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient
Content: text/cql
library IncreasedRiskExclusions version '1.0.0'

using FHIR version '4.0.1'
include FHIRHelpers  version '4.0.1' called FHIRHelpers

include IncreasedRiskExclusionsEvents version '1.0.0' called Events
include IncreasedRiskExclusionsActions version '1.0.0' called Actions
include DataElements version '1.0.0' called DataElements

context Patient

//------------------------------------------------------------------------------
// RECOMMENDATIONS
//------------------------------------------------------------------------------

define "flow-IncreasedRiskExclusions":
  IncreasedRiskExclusionsRecommendation

define IncreasedRiskExclusionsRecommendation:
  if Events."eve-HereditarySyndrome" is true
  then Actions."act-CRCHereditarySyndrome"
  else if Events."eve-IBD" is true
  then Actions."act-IBD"
  else if Events."eve-HxCRC" is true
  then Actions."act-HxCRC"
  else if Events."eve-FamilyHx" is true
  then Actions."act-FamilyHxCRC"
  else if Events."eve-HxPolyps" is true
  then Actions."act-HxPolyps"
  else null

define HereditarySyndrome:
  if Events."eve-HereditarySyndrome" is true
    then Actions."act-CRCHereditarySyndrome"
  else null

define IBD:
  if Events."eve-IBD" is true
    then Actions."act-IBD"
  else null

define HxCRC:
  if Events."eve-HxCRC" is true
    then Actions."act-HxCRC"
  else null

define FamilyHx:
  if Events."eve-FamilyHx" is true
    then Actions."act-FamilyHxCRC"
  else null

define HxPolyps:
  if Events."eve-HxPolyps" is true 
    then Actions."act-HxPolyps"
  else null

//------------------------------------------------------------------------------
// DYNAMIC VALUES
//------------------------------------------------------------------------------   

// HereditarySyndrome
define ExistsHereditarySyndrome:
  HereditarySyndrome is not null

define HereditarySyndromeCode:
  HereditarySyndrome.code

define HereditarySyndromeReason:
  HereditarySyndrome.reason


// IBD
define ExistsIBD:
  IBD is not null

define IBDCode:
  IBD.code

define IBDReason:
  IBD.reason


// HxCRC
define ExistsHxCRC:
  HxCRC is not null

define HxCRCCode:
  HxCRC.code

define HxCRCReason:
  HxCRC.reason


// FamilyHx
define ExistsFamilyHx:
  FamilyHx is not null

define FamilyHxCode:
  FamilyHx.code

define FamilyHxReason:
  FamilyHx.reason


// HxPolyps
define ExistsHxPolyps:
  HxPolyps is not null

define HxPolypsCode:
  HxPolyps.code

define HxPolypsReason:
  HxPolyps.reason
Content: application/elm+xml
Encoded data (48916 characters)
Content: application/elm+json
Encoded data (88316 characters)