From 1c552ea9ae73b64d5263952670829ab9fab56693 Mon Sep 17 00:00:00 2001 From: Joseph Kotanchik Date: Thu, 9 Nov 2023 16:32:52 -0500 Subject: [PATCH 1/8] feat(MAT-6075): Display Definition Callstack in Population Tabs --- .husky/pre-commit | 2 +- .../groupCoverage/QiCoreGroupCoverage.tsx | 95 ++- .../editTestCase/qiCore/EditTestCase.test.tsx | 1 + .../editTestCase/qiCore/EditTestCase.tsx | 735 ++++++++++++++++++ .../calculationResults/CalculationResults.tsx | 7 +- 5 files changed, 832 insertions(+), 8 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index e260cff8a..1bc5c8426 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ /bin/sh . "$(dirname "$0")/_/husky.sh" -npm exec pretty-quick --staged && npm exec concurrently npm:test npm:lint +npm exec pretty-quick --staged && npm exec concurrently npm:test-silent npm:lint diff --git a/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx b/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx index 4000ccc73..ddd59567a 100644 --- a/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx +++ b/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx @@ -19,9 +19,30 @@ import { } from "../../../util/GroupCoverageHelpers"; import "./QiCoreGroupCoverage.scss"; +export interface CqlDefinitionExpression { + id?: string; + definitionName: string; + definitionLogic: string; + context: string; + supplDataElement: boolean; + popDefinition: boolean; + commentString: string; + returnType: string | null; + parentLibrary: string | null; + libraryDisplayName: string | null; + libraryVersion: string | null; + name: string; + logic: string; +} + +export interface CqlDefinitionCallstack { + [key: string]: Array; +} + interface Props { groupPopulations: GroupPopulation[]; mappedCalculationResults: MappedCalculationResults; + cqlDefinitionCallstack?: CqlDefinitionCallstack; } interface Statement { @@ -29,6 +50,7 @@ interface Statement { relevance: Relevance; statementLevelHTML?: string | undefined; pretty?: string; + name?: string; } interface PopulationStatement extends Statement { @@ -50,6 +72,7 @@ const allDefinitions = [ const QiCoreGroupCoverage = ({ groupPopulations, mappedCalculationResults, + cqlDefinitionCallstack, }: Props) => { // selected group/criteria const [selectedCriteria, setSelectedCriteria] = useState(""); @@ -115,6 +138,7 @@ const QiCoreGroupCoverage = ({ populationName: FHIR_POPULATION_CODES[relevantPopulations[key].populationType], id: relevantPopulations[key].populationId, + name: key, }; return output; }, {}); @@ -224,6 +248,39 @@ const QiCoreGroupCoverage = ({ } }; + const generateCallstackText = (selectedDefinition: Statement): string => { + let text = ""; + cqlDefinitionCallstack[selectedDefinition.name]?.forEach( + (calledDefinition) => { + // Get Highlighted HTML from execution results + text += + mappedCalculationResults[selectedCriteria]["statementResults"][ + calledDefinition.name + ].statementLevelHTML; + // Get the callstack for each definition called by the parent statement + getCallstack(calledDefinition.id).forEach((name) => { + text += + mappedCalculationResults[selectedCriteria]["statementResults"][name] + .statementLevelHTML; + }); + } + ); + return text; + }; + + const getCallstack = (defId: string): string[] => { + let calledDefinitions: string[] = []; + cqlDefinitionCallstack[defId]?.forEach((calledDefinition) => { + calledDefinitions.push(calledDefinition.name); + if (cqlDefinitionCallstack[calledDefinition.id]) { + calledDefinitions = calledDefinitions.concat( + getCallstack(calledDefinition.id) + ); + } + }); + return calledDefinitions; + }; + return ( <>
@@ -300,12 +357,38 @@ const QiCoreGroupCoverage = ({ data-testid={`${selectedHighlightingTab.abbreviation}-highlighting`} > {selectedPopulationDefinitionResults ? ( -
- {parse(selectedPopulationDefinitionResults?.statementLevelHTML)} - -
+ <> +
+ {parse( + selectedPopulationDefinitionResults?.statementLevelHTML + )} + +
+
+ Definition Used +
+
+ {parse( + generateCallstackText(selectedPopulationDefinitionResults) + )} +
+ ) : ( "No results available" )} diff --git a/src/components/editTestCase/qiCore/EditTestCase.test.tsx b/src/components/editTestCase/qiCore/EditTestCase.test.tsx index 1d85c4c4b..23b0512ba 100644 --- a/src/components/editTestCase/qiCore/EditTestCase.test.tsx +++ b/src/components/editTestCase/qiCore/EditTestCase.test.tsx @@ -41,6 +41,7 @@ import { TestCaseValidator } from "../../../validators/TestCaseValidator"; import { checkUserCanEdit } from "@madie/madie-util"; import { PopulationType as FqmPopulationType } from "fqm-execution/build/types/Enums"; import { addValues } from "../../../util/DefaultValueProcessor"; +import { defineElm } from "../../../__mocks__/define-elm-fixture"; //temporary solution (after jest updated to version 27) for error: thrown: "Exceeded timeout of 5000 ms for a test. jest.setTimeout(60000); diff --git a/src/components/editTestCase/qiCore/EditTestCase.tsx b/src/components/editTestCase/qiCore/EditTestCase.tsx index 64dd1d017..38e69d2ce 100644 --- a/src/components/editTestCase/qiCore/EditTestCase.tsx +++ b/src/components/editTestCase/qiCore/EditTestCase.tsx @@ -75,6 +75,726 @@ import { Bundle } from "fhir/r4"; import { Allotment } from "allotment"; import ElementsTab from "./LeftPanel/ElementsTab/ElementsTab"; import { QiCoreResourceProvider } from "../../../util/QiCorePatientProvider"; +import { CqlDefinitionCallstack } from "../groupCoverage/GroupCoverage"; + +const callstackMap: CqlDefinitionCallstack = { + "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period": + [ + { + id: "AHAOverall-2.5.000|AHA|Qualifying Outpatient Encounter During Measurement Period", + definitionName: + "Qualifying Outpatient Encounter During Measurement Period", + definitionLogic: + 'define "Qualifying Outpatient Encounter During Measurement Period":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n union [Encounter: "Patient Provider Interaction"]\n ) ValidEncounter\n where ValidEncounter.period during "Measurement Period"\n and ValidEncounter.isFinished()', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Qualifying Outpatient Encounter During Measurement Period", + logic: + 'define "Qualifying Outpatient Encounter During Measurement Period":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n union [Encounter: "Patient Provider Interaction"]\n ) ValidEncounter\n where ValidEncounter.period during "Measurement Period"\n and ValidEncounter.isFinished()', + }, + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", + definitionName: "Heart Failure Outpatient Encounter", + definitionLogic: + 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter", + logic: + 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', + }, + ], + "FHIRHelpers-4.3.000|FHIRHelpers|ToValue": [ + { + id: "FHIRHelpers-4.3.000|FHIRHelpers|ToInterval", + definitionName: "ToInterval", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "FHIRHelpers", + libraryDisplayName: "FHIRHelpers", + libraryVersion: "4.3.000", + name: "ToInterval", + logic: null, + }, + { + id: "FHIRHelpers-4.3.000|FHIRHelpers|ToQuantity", + definitionName: "ToQuantity", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "FHIRHelpers", + libraryDisplayName: "FHIRHelpers", + libraryVersion: "4.3.000", + name: "ToQuantity", + logic: null, + }, + { + id: "FHIRHelpers-4.3.000|FHIRHelpers|ToRatio", + definitionName: "ToRatio", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "FHIRHelpers", + libraryDisplayName: "FHIRHelpers", + libraryVersion: "4.3.000", + name: "ToRatio", + logic: null, + }, + { + id: "FHIRHelpers-4.3.000|FHIRHelpers|ToConcept", + definitionName: "ToConcept", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "FHIRHelpers", + libraryDisplayName: "FHIRHelpers", + libraryVersion: "4.3.000", + name: "ToConcept", + logic: null, + }, + ], + "FHIRHelpers-4.3.000|FHIRHelpers|ToRatio": [ + { + id: "FHIRHelpers-4.3.000|FHIRHelpers|ToQuantity", + definitionName: "ToQuantity", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "FHIRHelpers", + libraryDisplayName: "FHIRHelpers", + libraryVersion: "4.3.000", + name: "ToQuantity", + logic: null, + }, + ], + "AHAOverall-2.5.000|AHA|Moderate or Severe LVSD Dates": [ + { + id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", + definitionName: "isConfirmedActiveDiagnosis", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "isConfirmedActiveDiagnosis", + logic: null, + }, + ], + "AHAOverall-2.5.000|AHA|overlapsAfterHeartFailureOutpatientEncounter": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + { + id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", + definitionName: "isConfirmedActiveDiagnosis", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "isConfirmedActiveDiagnosis", + logic: null, + }, + ], + Numerator: [ + { + id: "Is Currently Taking ACEI or ARB or ARNI", + definitionName: "Is Currently Taking ACEI or ARB or ARNI", + definitionLogic: + 'define "Is Currently Taking ACEI or ARB or ARNI":\n exists (\n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Is Currently Taking ACEI or ARB or ARNI", + logic: + 'define "Is Currently Taking ACEI or ARB or ARNI":\n exists (\n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )', + }, + { + id: "Has ACEI or ARB or ARNI Ordered", + definitionName: "Has ACEI or ARB or ARNI Ordered", + definitionLogic: + 'define "Has ACEI or ARB or ARNI Ordered":\n exists ( \n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Has ACEI or ARB or ARNI Ordered", + logic: + 'define "Has ACEI or ARB or ARNI Ordered":\n exists ( \n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )', + }, + ], + "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + ], + "AHAOverall-2.5.000|AHA|Has Heart Transplant": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + ], + Denominator: [ + { + id: "Initial Population", + definitionName: "Initial Population", + definitionLogic: + 'define "Initial Population":\n AHA."Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period"', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Initial Population", + logic: + 'define "Initial Population":\n AHA."Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period"', + }, + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + ], + "AHAOverall-2.5.000|AHA|isOrderedDuringHeartFailureOutpatientEncounter": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + ], + "SDE Payer": [ + { + id: "SupplementalDataElements-3.4.000|SDE|SDE Payer", + definitionName: "SDE Payer", + definitionLogic: + 'define "SDE Payer":\r\n [Coverage: type in "Payer Type"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "SupplementalDataElements", + libraryDisplayName: "SDE", + libraryVersion: "3.4.000", + name: "SDE Payer", + logic: + 'define "SDE Payer":\r\n [Coverage: type in "Payer Type"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }', + }, + ], + "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + { + id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", + definitionName: "isConfirmedActiveDiagnosis", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "isConfirmedActiveDiagnosis", + logic: null, + }, + ], + "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter": [ + { + id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", + definitionName: "isConfirmedActiveDiagnosis", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "isConfirmedActiveDiagnosis", + logic: null, + }, + ], + "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD": + [ + { + id: "AHAOverall-2.5.000|AHA|Moderate or Severe LVSD Dates", + definitionName: "Moderate or Severe LVSD Dates", + definitionLogic: + 'define "Moderate or Severe LVSD Dates":\n ( [Observation: "Ejection Fraction"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 \'%\'\n and Fraction.status in {\'final\', \'amended\', \'corrected\'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: "Moderate or Severe LVSD"]\n union ( [Condition: "Left ventricular systolic dysfunction (disorder)"] LVSDDiagnosis\n where LVSDDiagnosis.severity in "Moderate or Severe"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Moderate or Severe LVSD Dates", + logic: + 'define "Moderate or Severe LVSD Dates":\n ( [Observation: "Ejection Fraction"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 \'%\'\n and Fraction.status in {\'final\', \'amended\', \'corrected\'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: "Moderate or Severe LVSD"]\n union ( [Condition: "Left ventricular systolic dysfunction (disorder)"] LVSDDiagnosis\n where LVSDDiagnosis.severity in "Moderate or Severe"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )', + }, + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", + definitionName: "Heart Failure Outpatient Encounter", + definitionLogic: + 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter", + logic: + 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', + }, + ], + "Initial Population": [ + { + id: "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", + definitionName: + "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", + definitionLogic: + 'define "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period":\n AgeInYearsAt(date from start of "Measurement Period") >= 18\n and exists ( "Qualifying Outpatient Encounter During Measurement Period" Encounter1\n with "Qualifying Outpatient Encounter During Measurement Period" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists "Heart Failure Outpatient Encounter"', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", + logic: + 'define "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period":\n AgeInYearsAt(date from start of "Measurement Period") >= 18\n and exists ( "Qualifying Outpatient Encounter During Measurement Period" Encounter1\n with "Qualifying Outpatient Encounter During Measurement Period" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists "Heart Failure Outpatient Encounter"', + }, + ], + "AHAOverall-2.5.000|AHA|overlapsHeartFailureOutpatientEncounter": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + { + id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", + definitionName: "isConfirmedActiveDiagnosis", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "isConfirmedActiveDiagnosis", + logic: null, + }, + ], + "Has Diagnosis of Pregnancy": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + ], + "Denominator Exclusions": [ + { + id: "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications", + definitionName: "Has Left Ventricular Assist Device Complications", + definitionLogic: + 'define "Has Left Ventricular Assist Device Complications":\n exists (\n [Condition: "Left Ventricular Assist Device Complications"] LVADComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Has Left Ventricular Assist Device Complications", + logic: + 'define "Has Left Ventricular Assist Device Complications":\n exists (\n [Condition: "Left Ventricular Assist Device Complications"] LVADComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )', + }, + { + id: "AHAOverall-2.5.000|AHA|Has Heart Transplant", + definitionName: "Has Heart Transplant", + definitionLogic: + 'define "Has Heart Transplant":\n exists (\n [Procedure: "Heart Transplant"] HeartTransplant\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = \'completed\'\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Has Heart Transplant", + logic: + 'define "Has Heart Transplant":\n exists (\n [Procedure: "Heart Transplant"] HeartTransplant\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = \'completed\'\n )', + }, + { + id: "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications", + definitionName: "Has Heart Transplant Complications", + definitionLogic: + 'define "Has Heart Transplant Complications":\n exists ( \n [Condition: "Heart Transplant Complications"] HeartTransplantComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Has Heart Transplant Complications", + logic: + 'define "Has Heart Transplant Complications":\n exists ( \n [Condition: "Heart Transplant Complications"] HeartTransplantComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )', + }, + { + id: "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device", + definitionName: "Has Left Ventricular Assist Device", + definitionLogic: + 'define "Has Left Ventricular Assist Device":\n exists (\n [Procedure: "Left Ventricular Assist Device Placement"] LVADOutpatient\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = \'completed\'\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Has Left Ventricular Assist Device", + logic: + 'define "Has Left Ventricular Assist Device":\n exists (\n [Procedure: "Left Ventricular Assist Device Placement"] LVADOutpatient\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = \'completed\'\n )', + }, + ], + "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + ], + "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications": [ + { + id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionName: + "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + definitionLogic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", + logic: + 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', + }, + { + id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", + definitionName: "isConfirmedActiveDiagnosis", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "AHAOverall", + libraryDisplayName: "AHA", + libraryVersion: "2.5.000", + name: "isConfirmedActiveDiagnosis", + logic: null, + }, + ], + "Denominator Exceptions": [ + { + id: "Has Diagnosis of Pregnancy", + definitionName: "Has Diagnosis of Pregnancy", + definitionLogic: + 'define "Has Diagnosis of Pregnancy":\n exists (\n [Condition: "Pregnancy"] PregnancyDiagnosis\n with AHA."Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Has Diagnosis of Pregnancy", + logic: + 'define "Has Diagnosis of Pregnancy":\n exists (\n [Condition: "Pregnancy"] PregnancyDiagnosis\n with AHA."Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )', + }, + { + id: "Has Diagnosis of Renal Failure Due to ACEI", + definitionName: "Has Diagnosis of Renal Failure Due to ACEI", + definitionLogic: + 'define "Has Diagnosis of Renal Failure Due to ACEI":\n exists (\n [Condition: "Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Has Diagnosis of Renal Failure Due to ACEI", + logic: + 'define "Has Diagnosis of Renal Failure Due to ACEI":\n exists (\n [Condition: "Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )', + }, + { + id: "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", + definitionName: "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", + definitionLogic: + 'define "Has Diagnosis of Allergy or Intolerance to ACEI or ARB":\n exists (\n ( ["Condition": "Allergy to ACE Inhibitor or ARB"]\n union ["Condition": "Intolerance to ACE Inhibitor or ARB"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", + logic: + 'define "Has Diagnosis of Allergy or Intolerance to ACEI or ARB":\n exists (\n ( ["Condition": "Allergy to ACE Inhibitor or ARB"]\n union ["Condition": "Intolerance to ACE Inhibitor or ARB"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )', + }, + { + id: "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", + definitionName: + "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", + definitionLogic: + 'define "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient":\n exists (\n ( [AllergyIntolerance: "ACE Inhibitor or ARB or ARNI Ingredient"]\n union [AllergyIntolerance: "Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with angiotensin II receptor antagonist mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with neprilysin inhibitor mechanism of action (substance)"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )', + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", + logic: + 'define "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient":\n exists (\n ( [AllergyIntolerance: "ACE Inhibitor or ARB or ARNI Ingredient"]\n union [AllergyIntolerance: "Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with angiotensin II receptor antagonist mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with neprilysin inhibitor mechanism of action (substance)"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )', + }, + { + id: "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", + definitionName: + "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", + definitionLogic: + "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )", + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: null, + libraryDisplayName: null, + libraryVersion: null, + name: "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", + logic: + "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )", + }, + ], + "FHIRHelpers-4.3.000|FHIRHelpers|ToInterval": [ + { + id: "FHIRHelpers-4.3.000|FHIRHelpers|ToQuantity", + definitionName: "ToQuantity", + definitionLogic: null, + context: "Patient", + supplDataElement: false, + popDefinition: false, + commentString: "", + returnType: null, + parentLibrary: "FHIRHelpers", + libraryDisplayName: "FHIRHelpers", + libraryVersion: "4.3.000", + name: "ToQuantity", + logic: null, + }, + ], +}; const TestCaseForm = tw.form`m-3`; const ValidationErrorsButton = tw.button` @@ -237,6 +957,7 @@ const EditTestCase = (props: EditTestCaseProps) => { loaded: false, series: [], }); + // const [expressionDefinitions, setExpressionDefinitions] = useState>([]); const [editor, setEditor] = useState(null); function resizeEditor() { // hack to force Ace to resize as it doesn't seem to be responsive @@ -557,6 +1278,19 @@ const EditTestCase = (props: EditTestCaseProps) => { setPopulationGroupResults( executionResults[0].detailedResults as DetailedPopulationGroupResult[] ); + // if (measure?.cql) { + // const definitions = new Array(); + // const expressions = new CqlAntlr(measure.cql).parse() + // .expressionDefinitions; + // expressions.forEach(expression => { + // const defName = expression.name.slice(1, -1); + // definitions.push( + // {...expression, + // callstack: callstackMap[defName] + // }); + // }); + // setExpressionDefinitions(definitions); + // } } catch (error) { setCalculationErrors({ status: "error", @@ -886,6 +1620,7 @@ const EditTestCase = (props: EditTestCaseProps) => { calculationResults={populationGroupResults} calculationErrors={calculationErrors} groupPopulations={groupPopulations} + cqlDefinitionCallstack={callstackMap} /> )}
diff --git a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx index 5a2013a21..6e8b293b6 100644 --- a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx +++ b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx @@ -7,7 +7,9 @@ import { DetailedPopulationGroupResult } from "fqm-execution/build/types/Calcula import { MadieAlert } from "@madie/madie-design-system/dist/react"; import { GroupPopulation, PopulationType } from "@madie/madie-models"; import { useFeatureFlags } from "@madie/madie-util"; -import QiCoreGroupCoverage from "../../groupCoverage/QiCoreGroupCoverage"; +import GroupCoverage, { + CqlDefinitionCallstack, +} from "../../groupCoverage/GroupCoverage"; import { Relevance } from "fqm-execution"; type ErrorProps = { @@ -19,6 +21,7 @@ type CalculationResultType = { calculationResults: DetailedPopulationGroupResult[]; calculationErrors: ErrorProps; groupPopulations: GroupPopulation[]; + cqlDefinitionCallstack?: CqlDefinitionCallstack; }; export interface MappedCalculationResults { @@ -45,6 +48,7 @@ const CalculationResults = ({ calculationResults, calculationErrors, groupPopulations, + cqlDefinitionCallstack = {}, }: CalculationResultType) => { // template for group name coming from execution engine const originalGroupName = (name) => { @@ -140,6 +144,7 @@ const CalculationResults = ({ )} {!featureFlags.highlightingTabs && coverageHtmls && ( From fb51946fe45e589084ede0bce7ea8e6b0484317b Mon Sep 17 00:00:00 2001 From: Joseph Kotanchik Date: Thu, 16 Nov 2023 10:54:13 -0500 Subject: [PATCH 2/8] fix up pre-commit hook --- .husky/pre-commit | 2 +- src/api/useCqlParsingService.ts | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 src/api/useCqlParsingService.ts diff --git a/.husky/pre-commit b/.husky/pre-commit index 1bc5c8426..f1d227f25 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,4 @@ /bin/sh . "$(dirname "$0")/_/husky.sh" -npm exec pretty-quick --staged && npm exec concurrently npm:test-silent npm:lint +npm exec pretty-quick --staged && npm exec concurrently "npm:lint" "npm:test -- --silent" diff --git a/src/api/useCqlParsingService.ts b/src/api/useCqlParsingService.ts new file mode 100644 index 000000000..3cf8dda74 --- /dev/null +++ b/src/api/useCqlParsingService.ts @@ -0,0 +1,41 @@ +import axios from "axios"; +import useServiceConfig from "./useServiceConfig"; +import { ServiceConfig } from "./ServiceContext"; +import { useOktaTokens } from "@madie/madie-util"; +import { CqlDefinitionCallstack } from "../components/editTestCase/groupCoverage/GroupCoverage"; + +export class CqlParsingService { + constructor(private baseUrl: string, private getAccessToken: () => string) {} + + async getDefinitionCallstacks(cql: string): Promise { + try { + const response = await axios.put( + `${this.baseUrl}/cql/callstacks`, + cql, + { + headers: { + Authorization: `Bearer ${this.getAccessToken()}`, + }, + } + ); + return response.data as unknown as CqlDefinitionCallstack; + } catch (err) { + // if (err?.response?.status === 400) { + // throw new Error(err.response.data.message); + // } + const message = `Unable to retrieve used definition references`; + throw new Error(message); + } + } +} + +const useCqlParsingService = (): CqlParsingService => { + const serviceConfig: ServiceConfig = useServiceConfig(); + const { getAccessToken } = useOktaTokens(); + return new CqlParsingService( + serviceConfig?.elmTranslationService.baseUrl, + getAccessToken + ); +}; + +export default useCqlParsingService; From 642d6ae536a79aab788cf6a524a58f371fa0d5b9 Mon Sep 17 00:00:00 2001 From: Joseph Kotanchik Date: Tue, 21 Nov 2023 16:17:05 -0500 Subject: [PATCH 3/8] removed hardcoded test data --- .../editTestCase/qiCore/EditTestCase.tsx | 1231 +++++++---------- 1 file changed, 499 insertions(+), 732 deletions(-) diff --git a/src/components/editTestCase/qiCore/EditTestCase.tsx b/src/components/editTestCase/qiCore/EditTestCase.tsx index 38e69d2ce..5775a8d03 100644 --- a/src/components/editTestCase/qiCore/EditTestCase.tsx +++ b/src/components/editTestCase/qiCore/EditTestCase.tsx @@ -76,725 +76,492 @@ import { Allotment } from "allotment"; import ElementsTab from "./LeftPanel/ElementsTab/ElementsTab"; import { QiCoreResourceProvider } from "../../../util/QiCorePatientProvider"; import { CqlDefinitionCallstack } from "../groupCoverage/GroupCoverage"; - -const callstackMap: CqlDefinitionCallstack = { - "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period": - [ - { - id: "AHAOverall-2.5.000|AHA|Qualifying Outpatient Encounter During Measurement Period", - definitionName: - "Qualifying Outpatient Encounter During Measurement Period", - definitionLogic: - 'define "Qualifying Outpatient Encounter During Measurement Period":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n union [Encounter: "Patient Provider Interaction"]\n ) ValidEncounter\n where ValidEncounter.period during "Measurement Period"\n and ValidEncounter.isFinished()', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Qualifying Outpatient Encounter During Measurement Period", - logic: - 'define "Qualifying Outpatient Encounter During Measurement Period":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n union [Encounter: "Patient Provider Interaction"]\n ) ValidEncounter\n where ValidEncounter.period during "Measurement Period"\n and ValidEncounter.isFinished()', - }, - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", - definitionName: "Heart Failure Outpatient Encounter", - definitionLogic: - 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter", - logic: - 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', - }, - ], - "FHIRHelpers-4.3.000|FHIRHelpers|ToValue": [ - { - id: "FHIRHelpers-4.3.000|FHIRHelpers|ToInterval", - definitionName: "ToInterval", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "FHIRHelpers", - libraryDisplayName: "FHIRHelpers", - libraryVersion: "4.3.000", - name: "ToInterval", - logic: null, - }, - { - id: "FHIRHelpers-4.3.000|FHIRHelpers|ToQuantity", - definitionName: "ToQuantity", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "FHIRHelpers", - libraryDisplayName: "FHIRHelpers", - libraryVersion: "4.3.000", - name: "ToQuantity", - logic: null, - }, - { - id: "FHIRHelpers-4.3.000|FHIRHelpers|ToRatio", - definitionName: "ToRatio", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "FHIRHelpers", - libraryDisplayName: "FHIRHelpers", - libraryVersion: "4.3.000", - name: "ToRatio", - logic: null, - }, - { - id: "FHIRHelpers-4.3.000|FHIRHelpers|ToConcept", - definitionName: "ToConcept", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "FHIRHelpers", - libraryDisplayName: "FHIRHelpers", - libraryVersion: "4.3.000", - name: "ToConcept", - logic: null, - }, - ], - "FHIRHelpers-4.3.000|FHIRHelpers|ToRatio": [ - { - id: "FHIRHelpers-4.3.000|FHIRHelpers|ToQuantity", - definitionName: "ToQuantity", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "FHIRHelpers", - libraryDisplayName: "FHIRHelpers", - libraryVersion: "4.3.000", - name: "ToQuantity", - logic: null, - }, - ], - "AHAOverall-2.5.000|AHA|Moderate or Severe LVSD Dates": [ - { - id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", - definitionName: "isConfirmedActiveDiagnosis", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "isConfirmedActiveDiagnosis", - logic: null, - }, - ], - "AHAOverall-2.5.000|AHA|overlapsAfterHeartFailureOutpatientEncounter": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - { - id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", - definitionName: "isConfirmedActiveDiagnosis", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "isConfirmedActiveDiagnosis", - logic: null, - }, - ], - Numerator: [ - { - id: "Is Currently Taking ACEI or ARB or ARNI", - definitionName: "Is Currently Taking ACEI or ARB or ARNI", - definitionLogic: - 'define "Is Currently Taking ACEI or ARB or ARNI":\n exists (\n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Is Currently Taking ACEI or ARB or ARNI", - logic: - 'define "Is Currently Taking ACEI or ARB or ARNI":\n exists (\n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )', - }, - { - id: "Has ACEI or ARB or ARNI Ordered", - definitionName: "Has ACEI or ARB or ARNI Ordered", - definitionLogic: - 'define "Has ACEI or ARB or ARNI Ordered":\n exists ( \n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Has ACEI or ARB or ARNI Ordered", - logic: - 'define "Has ACEI or ARB or ARNI Ordered":\n exists ( \n [MedicationRequest: medication in "ACE Inhibitor or ARB or ARNI"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )', - }, - ], - "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - ], - "AHAOverall-2.5.000|AHA|Has Heart Transplant": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - ], - Denominator: [ - { - id: "Initial Population", - definitionName: "Initial Population", - definitionLogic: - 'define "Initial Population":\n AHA."Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period"', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Initial Population", - logic: - 'define "Initial Population":\n AHA."Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period"', - }, - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - ], - "AHAOverall-2.5.000|AHA|isOrderedDuringHeartFailureOutpatientEncounter": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - ], - "SDE Payer": [ - { - id: "SupplementalDataElements-3.4.000|SDE|SDE Payer", - definitionName: "SDE Payer", - definitionLogic: - 'define "SDE Payer":\r\n [Coverage: type in "Payer Type"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "SupplementalDataElements", - libraryDisplayName: "SDE", - libraryVersion: "3.4.000", - name: "SDE Payer", - logic: - 'define "SDE Payer":\r\n [Coverage: type in "Payer Type"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }', - }, - ], - "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - { - id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", - definitionName: "isConfirmedActiveDiagnosis", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "isConfirmedActiveDiagnosis", - logic: null, - }, - ], - "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter": [ - { - id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", - definitionName: "isConfirmedActiveDiagnosis", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "isConfirmedActiveDiagnosis", - logic: null, - }, - ], - "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD": - [ - { - id: "AHAOverall-2.5.000|AHA|Moderate or Severe LVSD Dates", - definitionName: "Moderate or Severe LVSD Dates", - definitionLogic: - 'define "Moderate or Severe LVSD Dates":\n ( [Observation: "Ejection Fraction"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 \'%\'\n and Fraction.status in {\'final\', \'amended\', \'corrected\'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: "Moderate or Severe LVSD"]\n union ( [Condition: "Left ventricular systolic dysfunction (disorder)"] LVSDDiagnosis\n where LVSDDiagnosis.severity in "Moderate or Severe"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Moderate or Severe LVSD Dates", - logic: - 'define "Moderate or Severe LVSD Dates":\n ( [Observation: "Ejection Fraction"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 \'%\'\n and Fraction.status in {\'final\', \'amended\', \'corrected\'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: "Moderate or Severe LVSD"]\n union ( [Condition: "Left ventricular systolic dysfunction (disorder)"] LVSDDiagnosis\n where LVSDDiagnosis.severity in "Moderate or Severe"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )', - }, - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", - definitionName: "Heart Failure Outpatient Encounter", - definitionLogic: - 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter", - logic: - 'define "Heart Failure Outpatient Encounter":\n ( [Encounter: "Care Services in Long Term Residential Facility"]\n union [Encounter: "Home Healthcare Services"]\n union [Encounter: "Nursing Facility Visit"]\n union [Encounter: "Office Visit"]\n union [Encounter: "Outpatient Consultation"]\n ) QualifyingEncounter\n with [Condition: "Heart Failure"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during "Measurement Period"\n and QualifyingEncounter.isFinished()', - }, - ], - "Initial Population": [ - { - id: "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", - definitionName: - "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", - definitionLogic: - 'define "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period":\n AgeInYearsAt(date from start of "Measurement Period") >= 18\n and exists ( "Qualifying Outpatient Encounter During Measurement Period" Encounter1\n with "Qualifying Outpatient Encounter During Measurement Period" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists "Heart Failure Outpatient Encounter"', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", - logic: - 'define "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period":\n AgeInYearsAt(date from start of "Measurement Period") >= 18\n and exists ( "Qualifying Outpatient Encounter During Measurement Period" Encounter1\n with "Qualifying Outpatient Encounter During Measurement Period" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists "Heart Failure Outpatient Encounter"', - }, - ], - "AHAOverall-2.5.000|AHA|overlapsHeartFailureOutpatientEncounter": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - { - id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", - definitionName: "isConfirmedActiveDiagnosis", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "isConfirmedActiveDiagnosis", - logic: null, - }, - ], - "Has Diagnosis of Pregnancy": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - ], - "Denominator Exclusions": [ - { - id: "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications", - definitionName: "Has Left Ventricular Assist Device Complications", - definitionLogic: - 'define "Has Left Ventricular Assist Device Complications":\n exists (\n [Condition: "Left Ventricular Assist Device Complications"] LVADComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Has Left Ventricular Assist Device Complications", - logic: - 'define "Has Left Ventricular Assist Device Complications":\n exists (\n [Condition: "Left Ventricular Assist Device Complications"] LVADComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )', - }, - { - id: "AHAOverall-2.5.000|AHA|Has Heart Transplant", - definitionName: "Has Heart Transplant", - definitionLogic: - 'define "Has Heart Transplant":\n exists (\n [Procedure: "Heart Transplant"] HeartTransplant\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = \'completed\'\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Has Heart Transplant", - logic: - 'define "Has Heart Transplant":\n exists (\n [Procedure: "Heart Transplant"] HeartTransplant\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = \'completed\'\n )', - }, - { - id: "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications", - definitionName: "Has Heart Transplant Complications", - definitionLogic: - 'define "Has Heart Transplant Complications":\n exists ( \n [Condition: "Heart Transplant Complications"] HeartTransplantComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Has Heart Transplant Complications", - logic: - 'define "Has Heart Transplant Complications":\n exists ( \n [Condition: "Heart Transplant Complications"] HeartTransplantComplications\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )', - }, - { - id: "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device", - definitionName: "Has Left Ventricular Assist Device", - definitionLogic: - 'define "Has Left Ventricular Assist Device":\n exists (\n [Procedure: "Left Ventricular Assist Device Placement"] LVADOutpatient\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = \'completed\'\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Has Left Ventricular Assist Device", - logic: - 'define "Has Left Ventricular Assist Device":\n exists (\n [Procedure: "Left Ventricular Assist Device Placement"] LVADOutpatient\n with "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = \'completed\'\n )', - }, - ], - "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - ], - "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications": [ - { - id: "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionName: - "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - definitionLogic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", - logic: - 'define "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD":\n "Heart Failure Outpatient Encounter" HFOutpatientEncounter\n with "Moderate or Severe LVSD Dates" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period', - }, - { - id: "AHAOverall-2.5.000|AHA|isConfirmedActiveDiagnosis", - definitionName: "isConfirmedActiveDiagnosis", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "AHAOverall", - libraryDisplayName: "AHA", - libraryVersion: "2.5.000", - name: "isConfirmedActiveDiagnosis", - logic: null, - }, - ], - "Denominator Exceptions": [ - { - id: "Has Diagnosis of Pregnancy", - definitionName: "Has Diagnosis of Pregnancy", - definitionLogic: - 'define "Has Diagnosis of Pregnancy":\n exists (\n [Condition: "Pregnancy"] PregnancyDiagnosis\n with AHA."Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Has Diagnosis of Pregnancy", - logic: - 'define "Has Diagnosis of Pregnancy":\n exists (\n [Condition: "Pregnancy"] PregnancyDiagnosis\n with AHA."Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )', - }, - { - id: "Has Diagnosis of Renal Failure Due to ACEI", - definitionName: "Has Diagnosis of Renal Failure Due to ACEI", - definitionLogic: - 'define "Has Diagnosis of Renal Failure Due to ACEI":\n exists (\n [Condition: "Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Has Diagnosis of Renal Failure Due to ACEI", - logic: - 'define "Has Diagnosis of Renal Failure Due to ACEI":\n exists (\n [Condition: "Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )', - }, - { - id: "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", - definitionName: "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", - definitionLogic: - 'define "Has Diagnosis of Allergy or Intolerance to ACEI or ARB":\n exists (\n ( ["Condition": "Allergy to ACE Inhibitor or ARB"]\n union ["Condition": "Intolerance to ACE Inhibitor or ARB"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", - logic: - 'define "Has Diagnosis of Allergy or Intolerance to ACEI or ARB":\n exists (\n ( ["Condition": "Allergy to ACE Inhibitor or ARB"]\n union ["Condition": "Intolerance to ACE Inhibitor or ARB"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )', - }, - { - id: "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", - definitionName: - "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", - definitionLogic: - 'define "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient":\n exists (\n ( [AllergyIntolerance: "ACE Inhibitor or ARB or ARNI Ingredient"]\n union [AllergyIntolerance: "Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with angiotensin II receptor antagonist mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with neprilysin inhibitor mechanism of action (substance)"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )', - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", - logic: - 'define "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient":\n exists (\n ( [AllergyIntolerance: "ACE Inhibitor or ARB or ARNI Ingredient"]\n union [AllergyIntolerance: "Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with angiotensin II receptor antagonist mechanism of action (substance)"]\n union [AllergyIntolerance: "Substance with neprilysin inhibitor mechanism of action (substance)"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )', - }, - { - id: "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", - definitionName: - "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", - definitionLogic: - "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )", - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: null, - libraryDisplayName: null, - libraryVersion: null, - name: "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", - logic: - "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )", - }, - ], - "FHIRHelpers-4.3.000|FHIRHelpers|ToInterval": [ - { - id: "FHIRHelpers-4.3.000|FHIRHelpers|ToQuantity", - definitionName: "ToQuantity", - definitionLogic: null, - context: "Patient", - supplDataElement: false, - popDefinition: false, - commentString: "", - returnType: null, - parentLibrary: "FHIRHelpers", - libraryDisplayName: "FHIRHelpers", - libraryVersion: "4.3.000", - name: "ToQuantity", - logic: null, - }, - ], -}; +import useCqlParsingService from "../../../api/useCqlParsingService"; + +// const callstackMap: CqlDefinitionCallstack = { +// "AHAOverall-2.5.000|AHA|overlapsAfterHeartFailureOutpatientEncounter|function": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", +// "definitionName": "Heart Failure Outpatient Encounter", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()" +// }, +// { +// "id": "AHAOverall-2.5.000|AHA|Qualifying Outpatient Encounter During Measurement Period", +// "definitionName": "Qualifying Outpatient Encounter During Measurement Period", +// "definitionLogic": "define \"Qualifying Outpatient Encounter During Measurement Period\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n union [Encounter: \"Patient Provider Interaction\"]\n ) ValidEncounter\n where ValidEncounter.period during \"Measurement Period\"\n and ValidEncounter.isFinished()", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Qualifying Outpatient Encounter During Measurement Period", +// "function": false, +// "logic": "define \"Qualifying Outpatient Encounter During Measurement Period\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n union [Encounter: \"Patient Provider Interaction\"]\n ) ValidEncounter\n where ValidEncounter.period during \"Measurement Period\"\n and ValidEncounter.isFinished()" +// } +// ], +// "AHAOverall-2.5.000|AHA|overlapsHeartFailureOutpatientEncounter|function": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "Numerator": [ +// { +// "id": "Is Currently Taking ACEI or ARB or ARNI", +// "definitionName": "Is Currently Taking ACEI or ARB or ARNI", +// "definitionLogic": "define \"Is Currently Taking ACEI or ARB or ARNI\":\n exists (\n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Is Currently Taking ACEI or ARB or ARNI", +// "function": false, +// "logic": "define \"Is Currently Taking ACEI or ARB or ARNI\":\n exists (\n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )" +// }, +// { +// "id": "Has ACEI or ARB or ARNI Ordered", +// "definitionName": "Has ACEI or ARB or ARNI Ordered", +// "definitionLogic": "define \"Has ACEI or ARB or ARNI Ordered\":\n exists ( \n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Has ACEI or ARB or ARNI Ordered", +// "function": false, +// "logic": "define \"Has ACEI or ARB or ARNI Ordered\":\n exists ( \n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )" +// } +// ], +// "AHAOverall-2.5.000|AHA|isOrderedDuringHeartFailureOutpatientEncounter|function": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "AHAOverall-2.5.000|AHA|Has Heart Transplant": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "Denominator": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// }, +// { +// "id": "Initial Population", +// "definitionName": "Initial Population", +// "definitionLogic": "define \"Initial Population\":\n AHA.\"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\"", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Initial Population", +// "function": false, +// "logic": "define \"Initial Population\":\n AHA.\"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\"" +// } +// ], +// "SDE Payer": [ +// { +// "id": "SupplementalDataElements-3.4.000|SDE|SDE Payer", +// "definitionName": "SDE Payer", +// "definitionLogic": "define \"SDE Payer\":\r\n [Coverage: type in \"Payer Type\"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "SupplementalDataElements", +// "libraryDisplayName": "SDE", +// "libraryVersion": "3.4.000", +// "name": "SDE Payer", +// "function": false, +// "logic": "define \"SDE Payer\":\r\n [Coverage: type in \"Payer Type\"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }" +// } +// ], +// "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", +// "definitionName": "Heart Failure Outpatient Encounter", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()" +// }, +// { +// "id": "AHAOverall-2.5.000|AHA|Moderate or Severe LVSD Dates", +// "definitionName": "Moderate or Severe LVSD Dates", +// "definitionLogic": "define \"Moderate or Severe LVSD Dates\":\n ( [Observation: \"Ejection Fraction\"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 '%'\n and Fraction.status in {'final', 'amended', 'corrected'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: \"Moderate or Severe LVSD\"]\n union ( [Condition: \"Left ventricular systolic dysfunction (disorder)\"] LVSDDiagnosis\n where LVSDDiagnosis.severity in \"Moderate or Severe\"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Moderate or Severe LVSD Dates", +// "function": false, +// "logic": "define \"Moderate or Severe LVSD Dates\":\n ( [Observation: \"Ejection Fraction\"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 '%'\n and Fraction.status in {'final', 'amended', 'corrected'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: \"Moderate or Severe LVSD\"]\n union ( [Condition: \"Left ventricular systolic dysfunction (disorder)\"] LVSDDiagnosis\n where LVSDDiagnosis.severity in \"Moderate or Severe\"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )" +// } +// ], +// "Initial Population": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", +// "definitionName": "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", +// "definitionLogic": "define \"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\":\n AgeInYearsAt(date from start of \"Measurement Period\") >= 18\n and exists ( \"Qualifying Outpatient Encounter During Measurement Period\" Encounter1\n with \"Qualifying Outpatient Encounter During Measurement Period\" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists \"Heart Failure Outpatient Encounter\"", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", +// "function": false, +// "logic": "define \"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\":\n AgeInYearsAt(date from start of \"Measurement Period\") >= 18\n and exists ( \"Qualifying Outpatient Encounter During Measurement Period\" Encounter1\n with \"Qualifying Outpatient Encounter During Measurement Period\" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists \"Heart Failure Outpatient Encounter\"" +// } +// ], +// "Has Diagnosis of Pregnancy": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "Denominator Exclusions": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device", +// "definitionName": "Has Left Ventricular Assist Device", +// "definitionLogic": "define \"Has Left Ventricular Assist Device\":\n exists (\n [Procedure: \"Left Ventricular Assist Device Placement\"] LVADOutpatient\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = 'completed'\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Has Left Ventricular Assist Device", +// "function": false, +// "logic": "define \"Has Left Ventricular Assist Device\":\n exists (\n [Procedure: \"Left Ventricular Assist Device Placement\"] LVADOutpatient\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = 'completed'\n )" +// }, +// { +// "id": "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications", +// "definitionName": "Has Left Ventricular Assist Device Complications", +// "definitionLogic": "define \"Has Left Ventricular Assist Device Complications\":\n exists (\n [Condition: \"Left Ventricular Assist Device Complications\"] LVADComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Has Left Ventricular Assist Device Complications", +// "function": false, +// "logic": "define \"Has Left Ventricular Assist Device Complications\":\n exists (\n [Condition: \"Left Ventricular Assist Device Complications\"] LVADComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )" +// }, +// { +// "id": "AHAOverall-2.5.000|AHA|Has Heart Transplant", +// "definitionName": "Has Heart Transplant", +// "definitionLogic": "define \"Has Heart Transplant\":\n exists (\n [Procedure: \"Heart Transplant\"] HeartTransplant\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = 'completed'\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Has Heart Transplant", +// "function": false, +// "logic": "define \"Has Heart Transplant\":\n exists (\n [Procedure: \"Heart Transplant\"] HeartTransplant\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = 'completed'\n )" +// }, +// { +// "id": "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications", +// "definitionName": "Has Heart Transplant Complications", +// "definitionLogic": "define \"Has Heart Transplant Complications\":\n exists ( \n [Condition: \"Heart Transplant Complications\"] HeartTransplantComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Has Heart Transplant Complications", +// "function": false, +// "logic": "define \"Has Heart Transplant Complications\":\n exists ( \n [Condition: \"Heart Transplant Complications\"] HeartTransplantComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )" +// } +// ], +// "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications": [ +// { +// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": "AHAOverall", +// "libraryDisplayName": "AHA", +// "libraryVersion": "2.5.000", +// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", +// "function": false, +// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" +// } +// ], +// "Denominator Exceptions": [ +// { +// "id": "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", +// "definitionName": "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", +// "definitionLogic": "define \"Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient\":\n exists (\n ( [AllergyIntolerance: \"ACE Inhibitor or ARB or ARNI Ingredient\"]\n union [AllergyIntolerance: \"Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with angiotensin II receptor antagonist mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with neprilysin inhibitor mechanism of action (substance)\"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", +// "function": false, +// "logic": "define \"Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient\":\n exists (\n ( [AllergyIntolerance: \"ACE Inhibitor or ARB or ARNI Ingredient\"]\n union [AllergyIntolerance: \"Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with angiotensin II receptor antagonist mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with neprilysin inhibitor mechanism of action (substance)\"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )" +// }, +// { +// "id": "Has Diagnosis of Renal Failure Due to ACEI", +// "definitionName": "Has Diagnosis of Renal Failure Due to ACEI", +// "definitionLogic": "define \"Has Diagnosis of Renal Failure Due to ACEI\":\n exists (\n [Condition: \"Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)\"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Has Diagnosis of Renal Failure Due to ACEI", +// "function": false, +// "logic": "define \"Has Diagnosis of Renal Failure Due to ACEI\":\n exists (\n [Condition: \"Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)\"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )" +// }, +// { +// "id": "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", +// "definitionName": "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", +// "definitionLogic": "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", +// "function": false, +// "logic": "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )" +// }, +// { +// "id": "Has Diagnosis of Pregnancy", +// "definitionName": "Has Diagnosis of Pregnancy", +// "definitionLogic": "define \"Has Diagnosis of Pregnancy\":\n exists (\n [Condition: \"Pregnancy\"] PregnancyDiagnosis\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Has Diagnosis of Pregnancy", +// "function": false, +// "logic": "define \"Has Diagnosis of Pregnancy\":\n exists (\n [Condition: \"Pregnancy\"] PregnancyDiagnosis\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )" +// }, +// { +// "id": "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", +// "definitionName": "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", +// "definitionLogic": "define \"Has Diagnosis of Allergy or Intolerance to ACEI or ARB\":\n exists (\n ( [\"Condition\": \"Allergy to ACE Inhibitor or ARB\"]\n union [\"Condition\": \"Intolerance to ACE Inhibitor or ARB\"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )", +// "context": "Patient", +// "supplDataElement": false, +// "popDefinition": false, +// "commentString": "", +// "returnType": null, +// "parentLibrary": null, +// "libraryDisplayName": null, +// "libraryVersion": null, +// "name": "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", +// "function": false, +// "logic": "define \"Has Diagnosis of Allergy or Intolerance to ACEI or ARB\":\n exists (\n ( [\"Condition\": \"Allergy to ACE Inhibitor or ARB\"]\n union [\"Condition\": \"Intolerance to ACE Inhibitor or ARB\"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )" +// } +// ] +// }; const TestCaseForm = tw.form`m-3`; const ValidationErrorsButton = tw.button` @@ -925,6 +692,7 @@ const EditTestCase = (props: EditTestCaseProps) => { // Avoid infinite dependency render. May require additional error handling for timeouts. const testCaseService = useRef(useTestCaseServiceApi()); const calculation = useRef(calculationService()); + const cqlParsingService = useRef(useCqlParsingService()); const [alert, setAlert] = useState(null); const { errors, setErrors } = props; if (!errors) { @@ -982,6 +750,7 @@ const EditTestCase = (props: EditTestCaseProps) => { const [groupPopulations, setGroupPopulations] = useState( [] ); + const [callstackMap, setCallstackMap] = useState(); const { measureState, @@ -1136,6 +905,17 @@ const EditTestCase = (props: EditTestCaseProps) => { load.current = +1; loadTestCase(); } + + if (_.isNil(callstackMap) && measure?.cql) { + cqlParsingService.current + .getDefinitionCallstacks(measure.cql) + .then((callstack: CqlDefinitionCallstack) => { + setCallstackMap(callstack); + }) + .catch((error) => { + console.error(error); + }); + } }, [ id, measureId, @@ -1278,19 +1058,6 @@ const EditTestCase = (props: EditTestCaseProps) => { setPopulationGroupResults( executionResults[0].detailedResults as DetailedPopulationGroupResult[] ); - // if (measure?.cql) { - // const definitions = new Array(); - // const expressions = new CqlAntlr(measure.cql).parse() - // .expressionDefinitions; - // expressions.forEach(expression => { - // const defName = expression.name.slice(1, -1); - // definitions.push( - // {...expression, - // callstack: callstackMap[defName] - // }); - // }); - // setExpressionDefinitions(definitions); - // } } catch (error) { setCalculationErrors({ status: "error", From 7fbc2a7befdab3a5d6dafacba9ba011fdc13a47a Mon Sep 17 00:00:00 2001 From: Joseph Kotanchik Date: Tue, 21 Nov 2023 16:20:10 -0500 Subject: [PATCH 4/8] correct incoming data model. add request type to api call. --- src/api/useCqlParsingService.ts | 1 + .../editTestCase/groupCoverage/QiCoreGroupCoverage.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/api/useCqlParsingService.ts b/src/api/useCqlParsingService.ts index 3cf8dda74..5547c130d 100644 --- a/src/api/useCqlParsingService.ts +++ b/src/api/useCqlParsingService.ts @@ -15,6 +15,7 @@ export class CqlParsingService { { headers: { Authorization: `Bearer ${this.getAccessToken()}`, + "Content-Type": "text/plain", }, } ); diff --git a/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx b/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx index ddd59567a..ddb0cb972 100644 --- a/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx +++ b/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx @@ -31,6 +31,7 @@ export interface CqlDefinitionExpression { parentLibrary: string | null; libraryDisplayName: string | null; libraryVersion: string | null; + function: boolean; name: string; logic: string; } From e8b08be07c4e312ded2044c7ece0058ee94afc76 Mon Sep 17 00:00:00 2001 From: Prateek Keerthi Date: Wed, 29 Nov 2023 10:15:50 -0500 Subject: [PATCH 5/8] merged develop --- src/api/useCqlParsingService.ts | 2 +- src/components/editTestCase/qiCore/EditTestCase.tsx | 2 +- .../qiCore/calculationResults/CalculationResults.tsx | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/api/useCqlParsingService.ts b/src/api/useCqlParsingService.ts index 5547c130d..c9cf741dd 100644 --- a/src/api/useCqlParsingService.ts +++ b/src/api/useCqlParsingService.ts @@ -2,7 +2,7 @@ import axios from "axios"; import useServiceConfig from "./useServiceConfig"; import { ServiceConfig } from "./ServiceContext"; import { useOktaTokens } from "@madie/madie-util"; -import { CqlDefinitionCallstack } from "../components/editTestCase/groupCoverage/GroupCoverage"; +import { CqlDefinitionCallstack } from "../components/editTestCase/groupCoverage/QiCoreGroupCoverage"; export class CqlParsingService { constructor(private baseUrl: string, private getAccessToken: () => string) {} diff --git a/src/components/editTestCase/qiCore/EditTestCase.tsx b/src/components/editTestCase/qiCore/EditTestCase.tsx index 5775a8d03..6fa936315 100644 --- a/src/components/editTestCase/qiCore/EditTestCase.tsx +++ b/src/components/editTestCase/qiCore/EditTestCase.tsx @@ -75,8 +75,8 @@ import { Bundle } from "fhir/r4"; import { Allotment } from "allotment"; import ElementsTab from "./LeftPanel/ElementsTab/ElementsTab"; import { QiCoreResourceProvider } from "../../../util/QiCorePatientProvider"; -import { CqlDefinitionCallstack } from "../groupCoverage/GroupCoverage"; import useCqlParsingService from "../../../api/useCqlParsingService"; +import { CqlDefinitionCallstack } from "../groupCoverage/QiCoreGroupCoverage"; // const callstackMap: CqlDefinitionCallstack = { // "AHAOverall-2.5.000|AHA|overlapsAfterHeartFailureOutpatientEncounter|function": [ diff --git a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx index 6e8b293b6..c5ab36282 100644 --- a/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx +++ b/src/components/editTestCase/qiCore/calculationResults/CalculationResults.tsx @@ -7,10 +7,10 @@ import { DetailedPopulationGroupResult } from "fqm-execution/build/types/Calcula import { MadieAlert } from "@madie/madie-design-system/dist/react"; import { GroupPopulation, PopulationType } from "@madie/madie-models"; import { useFeatureFlags } from "@madie/madie-util"; -import GroupCoverage, { - CqlDefinitionCallstack, -} from "../../groupCoverage/GroupCoverage"; import { Relevance } from "fqm-execution"; +import QiCoreGroupCoverage, { + CqlDefinitionCallstack, +} from "../../groupCoverage/QiCoreGroupCoverage"; type ErrorProps = { status?: "success" | "warning" | "error" | "info" | "meta"; From 920170f2f8fca7bf2b02261a5f516fceee1c1b74 Mon Sep 17 00:00:00 2001 From: Prateek Keerthi Date: Wed, 29 Nov 2023 10:23:55 -0500 Subject: [PATCH 6/8] MAT 6075 remove commented code --- .../editTestCase/qiCore/EditTestCase.tsx | 485 ------------------ 1 file changed, 485 deletions(-) diff --git a/src/components/editTestCase/qiCore/EditTestCase.tsx b/src/components/editTestCase/qiCore/EditTestCase.tsx index 6fa936315..2a955bc2c 100644 --- a/src/components/editTestCase/qiCore/EditTestCase.tsx +++ b/src/components/editTestCase/qiCore/EditTestCase.tsx @@ -78,491 +78,6 @@ import { QiCoreResourceProvider } from "../../../util/QiCorePatientProvider"; import useCqlParsingService from "../../../api/useCqlParsingService"; import { CqlDefinitionCallstack } from "../groupCoverage/QiCoreGroupCoverage"; -// const callstackMap: CqlDefinitionCallstack = { -// "AHAOverall-2.5.000|AHA|overlapsAfterHeartFailureOutpatientEncounter|function": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", -// "definitionName": "Heart Failure Outpatient Encounter", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()" -// }, -// { -// "id": "AHAOverall-2.5.000|AHA|Qualifying Outpatient Encounter During Measurement Period", -// "definitionName": "Qualifying Outpatient Encounter During Measurement Period", -// "definitionLogic": "define \"Qualifying Outpatient Encounter During Measurement Period\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n union [Encounter: \"Patient Provider Interaction\"]\n ) ValidEncounter\n where ValidEncounter.period during \"Measurement Period\"\n and ValidEncounter.isFinished()", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Qualifying Outpatient Encounter During Measurement Period", -// "function": false, -// "logic": "define \"Qualifying Outpatient Encounter During Measurement Period\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n union [Encounter: \"Patient Provider Interaction\"]\n ) ValidEncounter\n where ValidEncounter.period during \"Measurement Period\"\n and ValidEncounter.isFinished()" -// } -// ], -// "AHAOverall-2.5.000|AHA|overlapsHeartFailureOutpatientEncounter|function": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "Numerator": [ -// { -// "id": "Is Currently Taking ACEI or ARB or ARNI", -// "definitionName": "Is Currently Taking ACEI or ARB or ARNI", -// "definitionLogic": "define \"Is Currently Taking ACEI or ARB or ARNI\":\n exists (\n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Is Currently Taking ACEI or ARB or ARNI", -// "function": false, -// "logic": "define \"Is Currently Taking ACEI or ARB or ARNI\":\n exists (\n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ActiveACEIOrARBOrARNI\n where ActiveACEIOrARBOrARNI.overlapsAfterHeartFailureOutpatientEncounter()\n )" -// }, -// { -// "id": "Has ACEI or ARB or ARNI Ordered", -// "definitionName": "Has ACEI or ARB or ARNI Ordered", -// "definitionLogic": "define \"Has ACEI or ARB or ARNI Ordered\":\n exists ( \n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Has ACEI or ARB or ARNI Ordered", -// "function": false, -// "logic": "define \"Has ACEI or ARB or ARNI Ordered\":\n exists ( \n [MedicationRequest: medication in \"ACE Inhibitor or ARB or ARNI\"] ACEIOrARBOrARNIOrdered\n where ACEIOrARBOrARNIOrdered.isOrderedDuringHeartFailureOutpatientEncounter()\n )" -// } -// ], -// "AHAOverall-2.5.000|AHA|isOrderedDuringHeartFailureOutpatientEncounter|function": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "AHAOverall-2.5.000|AHA|Has Heart Transplant": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "Denominator": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// }, -// { -// "id": "Initial Population", -// "definitionName": "Initial Population", -// "definitionLogic": "define \"Initial Population\":\n AHA.\"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\"", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Initial Population", -// "function": false, -// "logic": "define \"Initial Population\":\n AHA.\"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\"" -// } -// ], -// "SDE Payer": [ -// { -// "id": "SupplementalDataElements-3.4.000|SDE|SDE Payer", -// "definitionName": "SDE Payer", -// "definitionLogic": "define \"SDE Payer\":\r\n [Coverage: type in \"Payer Type\"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "SupplementalDataElements", -// "libraryDisplayName": "SDE", -// "libraryVersion": "3.4.000", -// "name": "SDE Payer", -// "function": false, -// "logic": "define \"SDE Payer\":\r\n [Coverage: type in \"Payer Type\"] Payer\r\n return {\r\n code: Payer.type,\r\n period: Payer.period\r\n }" -// } -// ], -// "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter", -// "definitionName": "Heart Failure Outpatient Encounter", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter\":\n ( [Encounter: \"Care Services in Long Term Residential Facility\"]\n union [Encounter: \"Home Healthcare Services\"]\n union [Encounter: \"Nursing Facility Visit\"]\n union [Encounter: \"Office Visit\"]\n union [Encounter: \"Outpatient Consultation\"]\n ) QualifyingEncounter\n with [Condition: \"Heart Failure\"] HeartFailure\n such that HeartFailure.prevalenceInterval() overlaps QualifyingEncounter.period \n and HeartFailure.isConfirmedActiveDiagnosis()\n where QualifyingEncounter.period during \"Measurement Period\"\n and QualifyingEncounter.isFinished()" -// }, -// { -// "id": "AHAOverall-2.5.000|AHA|Moderate or Severe LVSD Dates", -// "definitionName": "Moderate or Severe LVSD Dates", -// "definitionLogic": "define \"Moderate or Severe LVSD Dates\":\n ( [Observation: \"Ejection Fraction\"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 '%'\n and Fraction.status in {'final', 'amended', 'corrected'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: \"Moderate or Severe LVSD\"]\n union ( [Condition: \"Left ventricular systolic dysfunction (disorder)\"] LVSDDiagnosis\n where LVSDDiagnosis.severity in \"Moderate or Severe\"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Moderate or Severe LVSD Dates", -// "function": false, -// "logic": "define \"Moderate or Severe LVSD Dates\":\n ( [Observation: \"Ejection Fraction\"] EjectionFraction\n let dateOfFinding: start of ( EjectionFraction Fraction\n where Fraction.value as Quantity <= 40 '%'\n and Fraction.status in {'final', 'amended', 'corrected'} \n return Fraction.effective.toInterval()\n )\n return dateOfFinding \n )\n union\n ( \n ( [Condition: \"Moderate or Severe LVSD\"]\n union ( [Condition: \"Left ventricular systolic dysfunction (disorder)\"] LVSDDiagnosis\n where LVSDDiagnosis.severity in \"Moderate or Severe\"\n ) \n ) ModerateOrSevereLVSD\n let dateOfFinding: start of ( ModerateOrSevereLVSD LVSD\n where LVSD.isConfirmedActiveDiagnosis()\n return LVSD.prevalenceInterval()\n )\n return dateOfFinding \n )" -// } -// ], -// "Initial Population": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", -// "definitionName": "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", -// "definitionLogic": "define \"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\":\n AgeInYearsAt(date from start of \"Measurement Period\") >= 18\n and exists ( \"Qualifying Outpatient Encounter During Measurement Period\" Encounter1\n with \"Qualifying Outpatient Encounter During Measurement Period\" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists \"Heart Failure Outpatient Encounter\"", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period", -// "function": false, -// "logic": "define \"Has Two Qualifying Outpatient Encounters and Heart Failure Outpatient Encounter During the Measurement Period\":\n AgeInYearsAt(date from start of \"Measurement Period\") >= 18\n and exists ( \"Qualifying Outpatient Encounter During Measurement Period\" Encounter1\n with \"Qualifying Outpatient Encounter During Measurement Period\" Encounter2\n such that Encounter2.id !~ Encounter1.id\n )\n and exists \"Heart Failure Outpatient Encounter\"" -// } -// ], -// "Has Diagnosis of Pregnancy": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "Denominator Exclusions": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device", -// "definitionName": "Has Left Ventricular Assist Device", -// "definitionLogic": "define \"Has Left Ventricular Assist Device\":\n exists (\n [Procedure: \"Left Ventricular Assist Device Placement\"] LVADOutpatient\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = 'completed'\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Has Left Ventricular Assist Device", -// "function": false, -// "logic": "define \"Has Left Ventricular Assist Device\":\n exists (\n [Procedure: \"Left Ventricular Assist Device Placement\"] LVADOutpatient\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that LVADOutpatient.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where LVADOutpatient.status = 'completed'\n )" -// }, -// { -// "id": "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications", -// "definitionName": "Has Left Ventricular Assist Device Complications", -// "definitionLogic": "define \"Has Left Ventricular Assist Device Complications\":\n exists (\n [Condition: \"Left Ventricular Assist Device Complications\"] LVADComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Has Left Ventricular Assist Device Complications", -// "function": false, -// "logic": "define \"Has Left Ventricular Assist Device Complications\":\n exists (\n [Condition: \"Left Ventricular Assist Device Complications\"] LVADComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( LVADComplications.recordedDate.toInterval(), LVADComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period \n where LVADComplications.isConfirmedActiveDiagnosis()\n )" -// }, -// { -// "id": "AHAOverall-2.5.000|AHA|Has Heart Transplant", -// "definitionName": "Has Heart Transplant", -// "definitionLogic": "define \"Has Heart Transplant\":\n exists (\n [Procedure: \"Heart Transplant\"] HeartTransplant\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = 'completed'\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Has Heart Transplant", -// "function": false, -// "logic": "define \"Has Heart Transplant\":\n exists (\n [Procedure: \"Heart Transplant\"] HeartTransplant\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that HeartTransplant.performed.toInterval() starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplant.status = 'completed'\n )" -// }, -// { -// "id": "AHAOverall-2.5.000|AHA|Has Heart Transplant Complications", -// "definitionName": "Has Heart Transplant Complications", -// "definitionLogic": "define \"Has Heart Transplant Complications\":\n exists ( \n [Condition: \"Heart Transplant Complications\"] HeartTransplantComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Has Heart Transplant Complications", -// "function": false, -// "logic": "define \"Has Heart Transplant Complications\":\n exists ( \n [Condition: \"Heart Transplant Complications\"] HeartTransplantComplications\n with \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that ( Coalesce( HeartTransplantComplications.recordedDate.toInterval(), HeartTransplantComplications.prevalenceInterval() ) ) starts before end of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where HeartTransplantComplications.isConfirmedActiveDiagnosis()\n )" -// } -// ], -// "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "AHAOverall-2.5.000|AHA|Has Left Ventricular Assist Device Complications": [ -// { -// "id": "AHAOverall-2.5.000|AHA|Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionName": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "definitionLogic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": "AHAOverall", -// "libraryDisplayName": "AHA", -// "libraryVersion": "2.5.000", -// "name": "Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD", -// "function": false, -// "logic": "define \"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\":\n \"Heart Failure Outpatient Encounter\" HFOutpatientEncounter\n with \"Moderate or Severe LVSD Dates\" ModerateSevereLVSDDate\n such that ModerateSevereLVSDDate before end of HFOutpatientEncounter.period" -// } -// ], -// "Denominator Exceptions": [ -// { -// "id": "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", -// "definitionName": "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", -// "definitionLogic": "define \"Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient\":\n exists (\n ( [AllergyIntolerance: \"ACE Inhibitor or ARB or ARNI Ingredient\"]\n union [AllergyIntolerance: \"Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with angiotensin II receptor antagonist mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with neprilysin inhibitor mechanism of action (substance)\"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient", -// "function": false, -// "logic": "define \"Has Allergy or Intolerance to ACEI or ARB or ARNI Ingredient\":\n exists (\n ( [AllergyIntolerance: \"ACE Inhibitor or ARB or ARNI Ingredient\"]\n union [AllergyIntolerance: \"Substance with angiotensin-converting enzyme inhibitor mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with angiotensin II receptor antagonist mechanism of action (substance)\"]\n union [AllergyIntolerance: \"Substance with neprilysin inhibitor mechanism of action (substance)\"] ) ACEIOrARBOrARNIAllergyIntolerance\n where ACEIOrARBOrARNIAllergyIntolerance.overlapsAfterHeartFailureOutpatientEncounter()\n )" -// }, -// { -// "id": "Has Diagnosis of Renal Failure Due to ACEI", -// "definitionName": "Has Diagnosis of Renal Failure Due to ACEI", -// "definitionLogic": "define \"Has Diagnosis of Renal Failure Due to ACEI\":\n exists (\n [Condition: \"Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)\"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Has Diagnosis of Renal Failure Due to ACEI", -// "function": false, -// "logic": "define \"Has Diagnosis of Renal Failure Due to ACEI\":\n exists (\n [Condition: \"Acute renal failure caused by angiotensin-converting-enzyme inhibitor (disorder)\"] RenalFailureDueToACEI\n where RenalFailureDueToACEI.overlapsAfterHeartFailureOutpatientEncounter()\n )" -// }, -// { -// "id": "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", -// "definitionName": "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", -// "definitionLogic": "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI", -// "function": false, -// "logic": "define \"Has Medical or Patient Reason for Not Ordering ACEI or ARB or ARNI\":\n exists (\n [MedicationNotRequested: medication in \"ACE Inhibitor or ARB or ARNI\"] NoACEIOrARBOrARNIOrdered\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that NoACEIOrARBOrARNIOrdered.authoredOn during day of ModerateOrSevereLVSDHFOutpatientEncounter.period\n where NoACEIOrARBOrARNIOrdered.status = 'completed'\n and NoACEIOrARBOrARNIOrdered.intent in { 'order', 'original-order', 'reflex-order', 'filler-order', 'instance-order' } \n and ( NoACEIOrARBOrARNIOrdered.reasonCode in \"Medical Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason\"\n or NoACEIOrARBOrARNIOrdered.reasonCode in \"Patient Reason for ACE Inhibitor or ARB Decline\"\n )\n )" -// }, -// { -// "id": "Has Diagnosis of Pregnancy", -// "definitionName": "Has Diagnosis of Pregnancy", -// "definitionLogic": "define \"Has Diagnosis of Pregnancy\":\n exists (\n [Condition: \"Pregnancy\"] PregnancyDiagnosis\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Has Diagnosis of Pregnancy", -// "function": false, -// "logic": "define \"Has Diagnosis of Pregnancy\":\n exists (\n [Condition: \"Pregnancy\"] PregnancyDiagnosis\n with AHA.\"Heart Failure Outpatient Encounter with History of Moderate or Severe LVSD\" ModerateOrSevereLVSDHFOutpatientEncounter\n such that PregnancyDiagnosis.prevalenceInterval() starts 9 months or less before or on start of ModerateOrSevereLVSDHFOutpatientEncounter.period\n )" -// }, -// { -// "id": "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", -// "definitionName": "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", -// "definitionLogic": "define \"Has Diagnosis of Allergy or Intolerance to ACEI or ARB\":\n exists (\n ( [\"Condition\": \"Allergy to ACE Inhibitor or ARB\"]\n union [\"Condition\": \"Intolerance to ACE Inhibitor or ARB\"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )", -// "context": "Patient", -// "supplDataElement": false, -// "popDefinition": false, -// "commentString": "", -// "returnType": null, -// "parentLibrary": null, -// "libraryDisplayName": null, -// "libraryVersion": null, -// "name": "Has Diagnosis of Allergy or Intolerance to ACEI or ARB", -// "function": false, -// "logic": "define \"Has Diagnosis of Allergy or Intolerance to ACEI or ARB\":\n exists (\n ( [\"Condition\": \"Allergy to ACE Inhibitor or ARB\"]\n union [\"Condition\": \"Intolerance to ACE Inhibitor or ARB\"] ) ACEIOrARBAllergyOrIntoleranceDiagnosis\n where ACEIOrARBAllergyOrIntoleranceDiagnosis.overlapsAfterHeartFailureOutpatientEncounter()\n )" -// } -// ] -// }; - const TestCaseForm = tw.form`m-3`; const ValidationErrorsButton = tw.button` text-lg From d92a7a970e7b32067cf5b3f5470f95ce286d1777 Mon Sep 17 00:00:00 2001 From: Joseph Kotanchik Date: Fri, 1 Dec 2023 13:00:23 -0500 Subject: [PATCH 7/8] MAT-6075: Update header text --- .../editTestCase/groupCoverage/QiCoreGroupCoverage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx b/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx index ddb0cb972..d1a5bdd24 100644 --- a/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx +++ b/src/components/editTestCase/groupCoverage/QiCoreGroupCoverage.tsx @@ -375,7 +375,7 @@ const QiCoreGroupCoverage = ({ color: "#0073C8", }} > - Definition Used + Definition(s) Used
Date: Thu, 7 Dec 2023 10:19:46 -0500 Subject: [PATCH 8/8] Remove dead code --- src/api/useCqlParsingService.ts | 3 --- src/components/editTestCase/qiCore/EditTestCase.tsx | 1 - 2 files changed, 4 deletions(-) diff --git a/src/api/useCqlParsingService.ts b/src/api/useCqlParsingService.ts index c9cf741dd..dd6ebadd4 100644 --- a/src/api/useCqlParsingService.ts +++ b/src/api/useCqlParsingService.ts @@ -21,9 +21,6 @@ export class CqlParsingService { ); return response.data as unknown as CqlDefinitionCallstack; } catch (err) { - // if (err?.response?.status === 400) { - // throw new Error(err.response.data.message); - // } const message = `Unable to retrieve used definition references`; throw new Error(message); } diff --git a/src/components/editTestCase/qiCore/EditTestCase.tsx b/src/components/editTestCase/qiCore/EditTestCase.tsx index 2a955bc2c..1ead83bc1 100644 --- a/src/components/editTestCase/qiCore/EditTestCase.tsx +++ b/src/components/editTestCase/qiCore/EditTestCase.tsx @@ -240,7 +240,6 @@ const EditTestCase = (props: EditTestCaseProps) => { loaded: false, series: [], }); - // const [expressionDefinitions, setExpressionDefinitions] = useState>([]); const [editor, setEditor] = useState(null); function resizeEditor() { // hack to force Ace to resize as it doesn't seem to be responsive