Breast Cancer Screening and Management (BCSM) Clinical Decision Support (CDS) Implementation Guide
1.0.0 - ci-build

Breast Cancer Screening and Management (BCSM) Clinical Decision Support (CDS) Implementation Guide - Local Development build (v1.0.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Library: Genetic Risk Referral Events

Official URL: http://cancerscreeningcds.github.io/bcsm-cds/Library/GeneticRiskReferralEvents Version: 1.0.0
Draft as of 2025-02-28 Computable Name: GeneticRiskReferralEvents
Title: Genetic Risk Referral Events
Id: GeneticRiskReferralEvents
Version: 1.0.0
Url: Genetic Risk Referral Events
Status: draft
Type:

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

code: logic-library

Date: 2025-02-28 23:16:14+0000
Publisher: MITRE
Related Artifacts:

Dependencies

Parameters:
NameTypeMinMaxIn/Out
PatientPatient01Out
eve-fhxgeneinheritedboolean01Out
eve-knownvariantstatusboolean01Out
eve-fhxbrcaovcatubalperitboolean01Out
eve-brcageneancestryboolean01Out
eve-fhxriskresultboolean01Out
LastFhxBreastOvarianTubalPeritonealCancerObservationResultResource01Out
RiskFactorModifiedAfterRiskAssessmentboolean01Out
ValidMostRecentFamilialRiskAssessmentboolean01Out
Data Requirements:
TypeProfileMSCode Filter
Patient http://hl7.org/fhir/StructureDefinition/Patient
Observation http://hl7.org/fhir/StructureDefinition/Observation ; code filter:
path: code

system: http://cancerscreeningcds.github.io/bcsm-cds/CodeSystem/screening-observation-code-system

code: fhxbrcaovcatubalperit

display: Family history of breast, ovarian, tubal, or peritoneal cancer

Observation http://hl7.org/fhir/StructureDefinition/Observation ; code filter:
path: code

system: http://cancerscreeningcds.github.io/bcsm-cds/CodeSystem/plan-definition-action-code-system

code: familialriskassessment

display: Familial risk assessment

Observation http://hl7.org/fhir/StructureDefinition/Observation ; code filter:
path: code

system: http://cancerscreeningcds.github.io/bcsm-cds/CodeSystem/plan-definition-action-code-system

code: fhxrisktool

display: Brief familial risk assessment tool

Content: text/cql
/*  
  Author: CMS Alliance to Modernize Healthcare, operated by THE MITRE Corporation.

  (C) 2024 The MITRE Corporation. All Rights Reserved. 
  Approved for Public Release: 24-2711. 
  Distribution Unlimited.

  Unless otherwise noted, this work is available under an Apache 2.0 license. 
  It was produced by the MITRE Corporation for the Division of Cancer Prevention 
  and Control, Centers for Disease Control and Prevention in accordance with the 
  Statement of Work, contract number 75FCMC18D0047, task order number 75D30123F17931.
*/

library GeneticRiskReferralEvents 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 BCSMCommonFunctions version '1.0.0' called BCSMCommon
include CSMCommonFunctions version '1.0.0' called Common

codesystem "LOCAL": 'http://cancerscreeningcds.github.io/bcsm-cds/CodeSystem/screening-observation-code-system'
codesystem "ActCode": 'http://cancerscreeningcds.github.io/bcsm-cds/CodeSystem/plan-definition-action-code-system'

code "Family history of inherited cancer susceptibility": 'fhxgenetic' from "LOCAL" display 'Family history of inherited cancer susceptibility'
code "Ancestry associated with BRCA1/2 gene mutations": 'brcageneancestry' from "LOCAL" display 'Ancestry associated with BRCA1/2 gene mutations'
code "Familial risk assessment": 'familialriskassessment' from "ActCode" display 'Familial risk assessment'
code "High genetic risk": 'highgeneticrisk' from "LOCAL" display 'High genetic risk'

context Patient

define "eve-fhxgeneinherited":
  DataElements."de-fhxgeneinherited"

define "eve-knownvariantstatus":
  DataElements."de-knownvariantstatus"

define "eve-fhxbrcaovcatubalperit":
  if DataElements.FamilyHistoryBreastOvarianTubalPeritonealCancerObservation is not null
    then FHIRHelpers.ToBoolean(DataElements.FamilyHistoryBreastOvarianTubalPeritonealCancerObservation.value as boolean) 
  else exists DataElements.FamilyMemberBreastOvarianTubalPeritonealCancer

define "eve-brcageneancestry":
  if DataElements.MostRecentBRCAGeneAncestryObservation is not null
    then FHIRHelpers.ToBoolean(DataElements.MostRecentBRCAGeneAncestryObservation.value as boolean) 
  else false

define "eve-fhxriskresult":
  DataElements."de-fhxbreastcarisk"

// Familial risk assessment is valid if exists
// and risk factor observation not changed from false to true  after risk assessment
define ValidMostRecentFamilialRiskAssessment:
  DataElements.FamilialRiskAssessmentExists
    and RiskFactorModifiedAfterRiskAssessment is false

define RiskFactorModifiedAfterRiskAssessment:
  if "eve-fhxbrcaovcatubalperit" and LastFhxBreastOvarianTubalPeritonealCancerObservationResult is false
    and Common.ObservationDate(DataElements.FamilyHistoryBreastOvarianTubalPeritonealCancerObservation) is not null
    and Common.ObservationDate(DataElements.FamilyHistoryBreastOvarianTubalPeritonealCancerObservation) 
      > Common.ObservationDate(DataElements."MostRecentFamilialRiskAssessmentObservation")
    then true
  else false  

define LastFhxBreastOvarianTubalPeritonealCancerObservationResult:
  BCSMCommon.SortedObservations(
    DataElements.FamilyHistoryBreastOvarianTubalPeritonealCancerObservations
  )[1].value 



Content: application/elm+xml
Encoded data (38508 characters)
Content: application/elm+json
Encoded data (66876 characters)