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: USPSTFAvgRiskActions

Official URL: http://cancerscreeningcds.github.io/crcsm-cds/Library/USPSTFAvgRiskActions Version: 0.1.0
Draft as of 2025-02-28 Computable Name: USPSTFAvgRiskActions
Id: USPSTFAvgRiskActions
Version: 0.1.0
Url: USPSTFAvgRiskActions
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/DataElements|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/CRCSMCommonFunctions|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/DetermineNextDueDate|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/DetermineNextDueDateEvents|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/CSMCommonFunctions|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/CDSConnectCommonsforFHIRv401|1.0.0
  • http://cancerscreeningcds.github.io/crcsm-cds/Library/DetermineNextDueDateActions|1.0.0
  • SNOMED CT (all versions)
  • Plan Definition Action Code System
  • Plan Definition Action Reason Code System
  • Logical Observation Identifiers, Names and Codes (LOINC)
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.198.11.1020
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.108.11.1145
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1032.356
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113762.1.4.1032.359
  • http://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.113883.3.464.1003.118.11.1097
Parameters:
NameTypeMinMaxIn/Out
ScreeningHistoryLookbackQuantity01In
PatientPatient01Out
DueDateWhenPatientIs45date01Out
NextDueDatedateTime01Out
act-RecommendStartScreeningAt45Resource01Out
act-updateDueDateNowResource01Out
act-determineDueDateResource01Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient
DiagnosticReport http://hl7.org/fhir/StructureDefinition/DiagnosticReport ;;;;;; code filter:
path: code
Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;;;;;;;; code filter:
path: code
Observation http://hl7.org/fhir/StructureDefinition/Observation ;;;;;;;;;;
Content: text/cql
library USPSTFAvgRiskActions version '1.0.0'

using FHIR version '4.0.1'
include FHIRHelpers  version '4.0.1' called FHIRHelpers
include DataElements version '1.0.0' called DataElements
include CRCSMCommonFunctions version '1.0.0' called CRCSMCommonFunctions
include DetermineNextDueDate version '1.0.0' called DetermineNextDueDate

codesystem "SNOMED-CT": 'http://snomed.info/sct'
codesystem "ActCode": 'http://cancerscreeningcds.github.io/crcsm-cds/CodeSystem/plan-definition-action-code-system'
codesystem "ReasonCode": 'http://cancerscreeningcds.github.io/crcsm-cds/CodeSystem/plan-definition-action-reason-code-system'

// Act Codes
code "Colorectal Cancer Screening": '268548003' from "SNOMED-CT" display 'Screening for malignant neoplasm of large intestine (procedure)'

// TODO: Consider attributing a reason code to each action
// Reason Codes
code "USPSTF average risk": 'USPSTFaveragerisk' from "ReasonCode" display 'USPSTF average risk'

context Patient

// CALCULATE DUE DATES

define DueDateWhenPatientIs45:
  Patient.birthDate + 45 years


define NextDueDate:
  DetermineNextDueDate."flow-DetermineNextDueDate"
  
// ACTIONS

// TODO: Use only timingTiming within Actions, since only one action.timing[x] element is allowed in a Request Group.
// We should consider removing timingAge.

define "act-RecommendStartScreeningAt45":
  CRCSMCommonFunctions.SetRecommendation("Colorectal Cancer Screening", "USPSTF average risk", CRCSMCommonFunctions.SourceDocumentationUSPSTF, {value: 45.0, code: 'a'}, DueDateWhenPatientIs45, null)

// TODO: update L2 to use date patient turns 45 as due date. When a patient has not had any screening in the past, and they're over the start screening age, their due date is _still_ the same. If we set the due date to Now(), they will appear as due instead of overdue.
define "act-updateDueDateNow":
  CRCSMCommonFunctions.SetRecommendation("Colorectal Cancer Screening", "USPSTF average risk", CRCSMCommonFunctions.SourceDocumentationUSPSTF, {value: 45.0, code: 'a'}, DueDateWhenPatientIs45, null)

define "act-determineDueDate":
  CRCSMCommonFunctions.SetRecommendation("Colorectal Cancer Screening", "USPSTF average risk", CRCSMCommonFunctions.SourceDocumentationUSPSTF, {value: 45.0, code: 'a'}, NextDueDate, null)


Content: application/elm+xml
Encoded data (28780 characters)
Content: application/elm+json
Encoded data (49248 characters)