| Id: |
DecisionToScreen |
| Version: |
0.1.0 |
| Url: |
DecisionToScreen |
| 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/DecisionToScreenEvents|1.0.0
http://cancerscreeningcds.github.io/crcsm-cds/Library/DecisionToScreenActions|1.0.0
http://cancerscreeningcds.github.io/crcsm-cds/Library/DataElements|1.0.0
http://cancerscreeningcds.github.io/crcsm-cds/Library/IncreasedRiskExclusions|1.0.0
http://cancerscreeningcds.github.io/crcsm-cds/Library/USPSTFAvgRisk|1.0.0
|
| Parameters: |
| Name | Type | Min | Max | In/Out |
| Patient | Patient | 0 | 1 | Out |
| StopScreeningAge | Resource | 0 | 1 | Out |
| SDMContinueScreeningAge | Resource | 0 | 1 | Out |
| SDMContinueScreeningLifeExp | Resource | 0 | 1 | Out |
| IncreasedRiskExclusionsRecommendations | Resource | 0 | 1 | Out |
| USPSTFAverageRiskRecommendations | Resource | 0 | 1 | Out |
| flow-DecisionToScreen | Resource | 0 | * | Out |
| ExistsSDMContinueScreeningAge | boolean | 0 | 1 | Out |
| SDMContinueScreeningAgeCode | Coding | 0 | 1 | Out |
| SDMContinueScreeningAgeReason | Coding | 0 | 1 | Out |
| ExistsSDMContinueScreeningLifeExp | boolean | 0 | 1 | Out |
| SDMContinueScreeningLifeExpCode | Coding | 0 | 1 | Out |
| SDMContinueScreeningLifeExpReason | Coding | 0 | 1 | Out |
| ExistsStopScreeningAge | boolean | 0 | 1 | Out |
| StopScreeningAgeCode | Coding | 0 | 1 | Out |
| StopScreeningAgeReason | Coding | 0 | 1 | Out |
| ExistsIncreasedRiskExclusionsRecommendations | boolean | 0 | 1 | Out |
| ExistsUSPSTFAverageRiskRecommendations | boolean | 0 | 1 | Out |
| ExistsHereditarySyndrome | boolean | 0 | 1 | Out |
| HereditarySyndromeCode | Coding | 0 | 1 | Out |
| HereditarySyndromeReason | Coding | 0 | 1 | Out |
| ExistsIBD | boolean | 0 | 1 | Out |
| IBDCode | Coding | 0 | 1 | Out |
| IBDReason | Coding | 0 | 1 | Out |
| ExistsHxCRC | boolean | 0 | 1 | Out |
| HxCRCCode | Coding | 0 | 1 | Out |
| HxCRCReason | Coding | 0 | 1 | Out |
| ExistsFamilyHx | boolean | 0 | 1 | Out |
| FamilyHxCode | Coding | 0 | 1 | Out |
| FamilyHxReason | Coding | 0 | 1 | Out |
| ExistsHxPolyps | boolean | 0 | 1 | Out |
| HxPolypsCode | Coding | 0 | 1 | Out |
| HxPolypsReason | Coding | 0 | 1 | Out |
| ExistsUSPSTFAvgRisk | boolean | 0 | 1 | Out |
| USPSTFAvgRiskCode | Coding | 0 | 1 | Out |
| USPSTFAvgRiskReason | Coding | 0 | 1 | Out |
| USPSTFAvgRiskTiming | Resource | 0 | 1 | Out |
| USPSTFAvgRiskTimingEvent | string | 0 | 1 | Out |
|
| Data Requirements: |
| Type | Profile | MS | Code Filter |
| Patient |
http://hl7.org/fhir/StructureDefinition/Patient |
|
|
|
| Content: text/cql |
library DecisionToScreen version '1.0.0'
using FHIR version '4.0.1'
include FHIRHelpers version '4.0.1' called FHIRHelpers
include DecisionToScreenEvents version '1.0.0' called Events
include DecisionToScreenActions version '1.0.0' called Actions
include DataElements version '1.0.0' called DataElements
include IncreasedRiskExclusions version '1.0.0' called IncreasedRiskExclusions
include USPSTFAvgRisk version '1.0.0' called USPSTFAvgRisk
context Patient
//------------------------------------------------------------------------------
// RECOMMENDATIONS
//------------------------------------------------------------------------------
define "flow-DecisionToScreen":
{
StopScreeningAge,
SDMContinueScreeningAge,
SDMContinueScreeningLifeExp,
IncreasedRiskExclusionsRecommendations,
USPSTFAverageRiskRecommendations
}
except { null, {} }
define SDMContinueScreeningAge:
if Events."eve-AgeOver76" is true
then Actions."act-SelectivelyOfferScreening"
else null
define SDMContinueScreeningLifeExp:
if Events."eve-LifeExp" is true
then Actions."act-sdmcontinuelifexp"
else null
define StopScreeningAge:
if Events."eve-Age86AndOlder" is true
then Actions."act-HarmsLikelyOutweighBenefits"
else null
define IncreasedRiskExclusionsRecommendations:
IncreasedRiskExclusions."flow-IncreasedRiskExclusions"
define USPSTFAverageRiskRecommendations:
if IncreasedRiskExclusionsRecommendations is null and StopScreeningAge is null
then USPSTFAvgRisk."flow-USPSTFAvgRisk"
else null
//------------------------------------------------------------------------------
// DYNAMIC VALUES
//------------------------------------------------------------------------------
define ExistsSDMContinueScreeningAge:
SDMContinueScreeningAge is not null
define SDMContinueScreeningAgeCode:
SDMContinueScreeningAge.code
define SDMContinueScreeningAgeReason:
SDMContinueScreeningAge.reason
define ExistsSDMContinueScreeningLifeExp:
SDMContinueScreeningLifeExp is not null
define SDMContinueScreeningLifeExpCode:
SDMContinueScreeningLifeExp.code
define SDMContinueScreeningLifeExpReason:
SDMContinueScreeningLifeExp.reason
define ExistsStopScreeningAge:
StopScreeningAge is not null
define StopScreeningAgeCode:
StopScreeningAge.code
define StopScreeningAgeReason:
StopScreeningAge.reason
define ExistsIncreasedRiskExclusionsRecommendations:
IncreasedRiskExclusionsRecommendations is not null
define ExistsUSPSTFAverageRiskRecommendations:
USPSTFAverageRiskRecommendations is not null
//------------------------------------------------------------------------------
// DYNAMIC VALUES INCREASED RISK SCREENING/SURVEILLANCE
//------------------------------------------------------------------------------
define ExistsHereditarySyndrome:
IncreasedRiskExclusions.ExistsHereditarySyndrome
define HereditarySyndromeCode:
IncreasedRiskExclusions.HereditarySyndromeCode
define HereditarySyndromeReason:
IncreasedRiskExclusions.HereditarySyndromeReason
define ExistsIBD:
IncreasedRiskExclusions.ExistsIBD
define IBDCode:
IncreasedRiskExclusions.IBDCode
define IBDReason:
IncreasedRiskExclusions.IBDReason
define ExistsHxCRC:
IncreasedRiskExclusions.ExistsHxCRC
define HxCRCCode:
IncreasedRiskExclusions.HxCRCCode
define HxCRCReason:
IncreasedRiskExclusions.HxCRCReason
define ExistsFamilyHx:
IncreasedRiskExclusions.ExistsFamilyHx
define FamilyHxCode:
IncreasedRiskExclusions.FamilyHxCode
define FamilyHxReason:
IncreasedRiskExclusions.FamilyHxReason
define ExistsHxPolyps:
IncreasedRiskExclusions.ExistsHxPolyps
define HxPolypsCode:
IncreasedRiskExclusions.HxPolypsCode
define HxPolypsReason:
IncreasedRiskExclusions.HxPolypsReason
//------------------------------------------------------------------------------
// DYNAMIC VALUES AVERAGE RISK
//------------------------------------------------------------------------------
define ExistsUSPSTFAvgRisk:
USPSTFAvgRisk.ExistsUSPSTFAvgRisk
define USPSTFAvgRiskCode:
USPSTFAvgRisk.USPSTFAvgRiskCode
define USPSTFAvgRiskReason:
USPSTFAvgRisk.USPSTFAvgRiskReason
define USPSTFAvgRiskTiming:
USPSTFAvgRisk.USPSTFAvgRiskTiming
define USPSTFAvgRiskTimingEvent:
USPSTFAvgRisk.USPSTFAvgRiskTimingEvent
|
|
| Content: application/elm+xml |
Encoded data (61204 characters)
|
|
| Content: application/elm+json |
Encoded data (106476 characters)
|
|