| 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: |
| Name | Type | Min | Max | In/Out |
| Patient | Patient | 0 | 1 | Out |
| eve-fhxgeneinherited | boolean | 0 | 1 | Out |
| eve-knownvariantstatus | boolean | 0 | 1 | Out |
| eve-fhxbrcaovcatubalperit | boolean | 0 | 1 | Out |
| eve-brcageneancestry | boolean | 0 | 1 | Out |
| eve-fhxriskresult | boolean | 0 | 1 | Out |
| LastFhxBreastOvarianTubalPeritonealCancerObservationResult | Resource | 0 | 1 | Out |
| RiskFactorModifiedAfterRiskAssessment | boolean | 0 | 1 | Out |
| ValidMostRecentFamilialRiskAssessment | boolean | 0 | 1 | Out |
|
| Data Requirements: |
|
| 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)
|
|