diff --git a/dist/browser.js b/dist/browser.js index 85d2506..b03432c 100644 --- a/dist/browser.js +++ b/dist/browser.js @@ -747,7 +747,15 @@ module.exports = class MeasureHelpers { // the sourceLocalId is the FunctionRef itself to match how library statement references work. localIds[libraryClauseLocalId] = { localId: libraryClauseLocalId, sourceLocalId: statement.localId }; } - // else if they key is localId push the value + // handle the `when` pieces of Case expression aka CaseItems. + // They have a `when` key that should be mapped to get a result from the expression that defines them + } else if (k === 'type' && v === 'Null' && statement.localId) { + // If this is a "Null" expression, mark that it `isFalsyLiteral` so we can interpret final results differently. + localIds[statement.localId] = { localId: statement.localId, isFalsyLiteral: true }; + } else if (k === 'type' && v === 'Literal' && statement.localId && statement.value === 'false') { + // If this is a "Literal" expression whose value is false, mark that it `isFalsyLiteral` so we can interpret final results differently + localIds[statement.localId] = { localId: statement.localId, isFalsyLiteral: true }; + // else if the key is localId, push the value } else if (k === 'localId') { localIds[v] = { localId: v }; // if the value is an array or object, recurse @@ -1423,8 +1431,12 @@ module.exports = class ResultsHelpers { finalResult = 'UNHIT'; } else if ( params.clause.isFalsyLiteral - && Object.prototype.hasOwnProperty.call(params.rawClauseResults[params.libraryName], params.clause.localId) + && Object.prototype.hasOwnProperty.call(params.rawClauseResults[params.library_name], params.clause.localId) ) { + // If this clause is a Null or Literal False we need to look for the existence of a result for the localId in the + // rawClauseResults instead. If the key for the localId exists then it was executed, and we will want to treat the + // `final` result as `TRUE` instead of `FALSE`. If the key is totally absent then it was not executed therefore + // `final` result should stay `FALSE`. finalResult = 'TRUE'; } else if (this.doesResultPass(params.rawResult)) { finalResult = 'TRUE'; diff --git a/lib/helpers/measure_helpers.js b/lib/helpers/measure_helpers.js index 3e3c47f..25e0536 100644 --- a/lib/helpers/measure_helpers.js +++ b/lib/helpers/measure_helpers.js @@ -201,7 +201,15 @@ module.exports = class MeasureHelpers { // the sourceLocalId is the FunctionRef itself to match how library statement references work. localIds[libraryClauseLocalId] = { localId: libraryClauseLocalId, sourceLocalId: statement.localId }; } - // else if they key is localId push the value + // handle the `when` pieces of Case expression aka CaseItems. + // They have a `when` key that should be mapped to get a result from the expression that defines them + } else if (k === 'type' && v === 'Null' && statement.localId) { + // If this is a "Null" expression, mark that it `isFalsyLiteral` so we can interpret final results differently. + localIds[statement.localId] = { localId: statement.localId, isFalsyLiteral: true }; + } else if (k === 'type' && v === 'Literal' && statement.localId && statement.value === 'false') { + // If this is a "Literal" expression whose value is false, mark that it `isFalsyLiteral` so we can interpret final results differently + localIds[statement.localId] = { localId: statement.localId, isFalsyLiteral: true }; + // else if the key is localId, push the value } else if (k === 'localId') { localIds[v] = { localId: v }; // if the value is an array or object, recurse diff --git a/lib/helpers/results_helpers.js b/lib/helpers/results_helpers.js index 1add375..9a64bd7 100644 --- a/lib/helpers/results_helpers.js +++ b/lib/helpers/results_helpers.js @@ -496,8 +496,12 @@ module.exports = class ResultsHelpers { finalResult = 'UNHIT'; } else if ( params.clause.isFalsyLiteral - && Object.prototype.hasOwnProperty.call(params.rawClauseResults[params.libraryName], params.clause.localId) + && Object.prototype.hasOwnProperty.call(params.rawClauseResults[params.library_name], params.clause.localId) ) { + // If this clause is a Null or Literal False we need to look for the existence of a result for the localId in the + // rawClauseResults instead. If the key for the localId exists then it was executed, and we will want to treat the + // `final` result as `TRUE` instead of `FALSE`. If the key is totally absent then it was not executed therefore + // `final` result should stay `FALSE`. finalResult = 'TRUE'; } else if (this.doesResultPass(params.rawResult)) { finalResult = 'TRUE'; diff --git a/spec/fixtures/json/elm/example.json b/spec/fixtures/json/cqm_measures/Case_When_Test/library_elm.json similarity index 100% rename from spec/fixtures/json/elm/example.json rename to spec/fixtures/json/cqm_measures/Case_When_Test/library_elm.json diff --git a/spec/fixtures/json/cqm_measures/Case_When_Test/Measure.json b/spec/fixtures/json/cqm_measures/Case_When_Test/measure.json similarity index 52% rename from spec/fixtures/json/cqm_measures/Case_When_Test/Measure.json rename to spec/fixtures/json/cqm_measures/Case_When_Test/measure.json index 867b9b3..1d4304d 100644 --- a/spec/fixtures/json/cqm_measures/Case_When_Test/Measure.json +++ b/spec/fixtures/json/cqm_measures/Case_When_Test/measure.json @@ -7,72 +7,32 @@ "source_data_criteria": [ { "dataElementCodes": [], - "_id": "65ba97456068b16c755ed930", - "participant": [], + "_id": "65c4ea736068b11663b74824", + "prescriber": [], "relatedTo": [], - "qdmTitle": "Encounter, Performed", - "hqmfOid": "2.16.840.1.113883.10.20.28.4.5", - "qdmCategory": "encounter", - "qdmStatus": "performed", + "qdmTitle": "Medication, Order", + "hqmfOid": "2.16.840.1.113883.10.20.28.4.51", + "qdmCategory": "medication", + "qdmStatus": "order", "qdmVersion": "5.6", - "_type": "QDM::EncounterPerformed", - "facilityLocations": [], - "description": "Encounter, Performed: EncounterInpatient", - "codeListId": "2.16.840.1.113883.3.666.5.307", - "id": "65ba97456068b16c755ed930", - "diagnoses": [] - }, - { - "dataElementCodes": [], - "_id": "65ba97456068b16c755ed931", - "performer": [], - "relatedTo": [], - "qdmTitle": "Procedure, Performed", - "hqmfOid": "2.16.840.1.113883.10.20.28.4.67", - "qdmCategory": "procedure", - "qdmStatus": "performed", - "qdmVersion": "5.6", - "_type": "QDM::ProcedurePerformed", - "description": "Procedure, Performed: SevereMaternalMorbidityProcedures", - "codeListId": "2.16.840.1.113762.1.4.1029.256", - "id": "65ba97456068b16c755ed931", - "components": [] - }, - { - "dataElementCodes": [], - "_id": "65ba97456068b16c755ed932", - "performer": [], - "relatedTo": [], - "qdmTitle": "Procedure, Performed", - "hqmfOid": "2.16.840.1.113883.10.20.28.4.67", - "qdmCategory": "procedure", - "qdmStatus": "performed", - "qdmVersion": "5.6", - "_type": "QDM::ProcedurePerformed", - "description": "Procedure, Performed: BloodTransfusion", - "codeListId": "2.16.840.1.113762.1.4.1029.213", - "id": "65ba97456068b16c755ed932", - "components": [] + "_type": "QDM::MedicationOrder", + "description": "Medication, Order: DigoxinMedications", + "codeListId": "2.16.840.1.113883.3.464.1003.1065", + "id": "65c4ea736068b11663b74824" } ], "measure_attributes": [], - "patients": ["65ba97abf3f95300004b62d4"], + "patients": [], "value_sets": [ - "65ba97456068b16c755ed920", - "65ba97456068b16c755ed921", - "65ba97456068b16c755ed922", - "65ba97456068b16c755ed923", - "65ba97456068b16c755ed924", - "65ba97456068b16c755ed925", - "65ba97456068b16c755ed926" + "65c4ea736068b11663b7481a" ], - "_id": "65ba97456068b16c755ed928", + "_id": "65c4ea736068b11663b7481c", "title": "TestWhenCase", "description": "", "hqmf_id": "8A6D0413-8D31-A32C-018D-60D0A6600AD3", "hqmf_set_id": "25B51662-1A12-411E-AC9D-22657E11EED8", "main_cql_library": "TestWhenCase", - "hqmf_version_number": "0.0.001", + "hqmf_version_number": "0.0.008", "cms_id": "CMSv0", "calculate_sdes": null, "measure_period": { @@ -101,14 +61,14 @@ "IPP": { "conjunction?": true, "type": "IPP", - "hqmf_id": "9C288484-8902-4099-9751-EB420FE57F23", + "hqmf_id": "8507F30A-36AB-4B77-9C71-EB6BF7ECCD30", "preconditions": [ { "id": 2, "preconditions": [ { "id": 1, - "reference": "TestWhenCase__SDE_SOC_Procedure_Detail__1407163A_24C5_4C70_971E_F0E43AA1DFD5" + "reference": "TestWhenCase__Initial_Population__1665C489_6C17_4F50_9F37_C23DBB7E5434" } ], "conjunction_code": "allTrue" @@ -116,15 +76,15 @@ ] } }, - "updated_at": 1706727237745, - "created_at": 1706727237745, + "updated_at": 1707403891552, + "created_at": 1707403891552, "cql_libraries": [ { "is_main_library": true, "is_top_level": true, - "_id": "65ba97456068b16c755ed929", + "_id": "65c4ea736068b11663b7481d", "library_name": "TestWhenCase", - "library_version": "0.0.001", + "library_version": "0.0.008", "elm": { "library": { "annotation": [ @@ -135,10 +95,13 @@ { "type": "Annotation", "s": { - "r": "79", + "r": "112", "s": [ { - "value": ["", "library TestWhenCase version '0.0.001'"] + "value": [ + "", + "library TestWhenCase version '0.0.008'" + ] } ] } @@ -146,7 +109,7 @@ ], "identifier": { "id": "TestWhenCase", - "version": "0.0.001" + "version": "0.0.008" }, "schemaIdentifier": { "id": "urn:hl7-org:elm", @@ -171,17 +134,25 @@ "r": "1", "s": [ { - "value": ["", "using "] + "value": [ + "", + "using " + ] }, { "s": [ { - "value": ["QDM"] + "value": [ + "QDM" + ] } ] }, { - "value": [" version ", "'5.6'"] + "value": [ + " version ", + "'5.6'" + ] } ] } @@ -193,15 +164,15 @@ "parameters": { "def": [ { - "localId": "11", - "locator": "13:1-13:49", + "localId": "5", + "locator": "7:1-7:49", "name": "Measurement Period", "accessLevel": "Public", "annotation": [ { "type": "Annotation", "s": { - "r": "11", + "r": "5", "s": [ { "value": [ @@ -212,21 +183,27 @@ ] }, { - "r": "10", + "r": "4", "s": [ { - "value": ["Interval<"] + "value": [ + "Interval<" + ] }, { - "r": "9", + "r": "3", "s": [ { - "value": ["DateTime"] + "value": [ + "DateTime" + ] } ] }, { - "value": [">"] + "value": [ + ">" + ] } ] } @@ -235,12 +212,12 @@ } ], "parameterTypeSpecifier": { - "localId": "10", - "locator": "13:32-13:49", + "localId": "4", + "locator": "7:32-7:49", "type": "IntervalTypeSpecifier", "pointType": { - "localId": "9", - "locator": "13:41-13:48", + "localId": "3", + "locator": "7:41-7:48", "name": "{urn:hl7-org:elm-types:r1}DateTime", "type": "NamedTypeSpecifier" } @@ -252,9 +229,9 @@ "def": [ { "localId": "2", - "locator": "5:1-5:70", - "name": "Blood Transfusion", - "id": "2.16.840.1.113762.1.4.1029.213", + "locator": "5:1-5:75", + "name": "Digoxin Medications", + "id": "2.16.840.1.113883.3.464.1003.1065", "accessLevel": "Public", "annotation": [ { @@ -266,165 +243,9 @@ "value": [ "", "valueset ", - "\"Blood Transfusion\"", - ": ", - "'urn:oid:2.16.840.1.113762.1.4.1029.213'" - ] - } - ] - } - } - ] - }, - { - "localId": "3", - "locator": "6:1-6:81", - "name": "Conversion of Cardiac Rhythm", - "id": "2.16.840.1.113762.1.4.1029.357", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "3", - "s": [ - { - "value": [ - "", - "valueset ", - "\"Conversion of Cardiac Rhythm\"", - ": ", - "'urn:oid:2.16.840.1.113762.1.4.1029.357'" - ] - } - ] - } - } - ] - }, - { - "localId": "4", - "locator": "7:1-7:71", - "name": "Encounter Inpatient", - "id": "2.16.840.1.113883.3.666.5.307", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "4", - "s": [ - { - "value": [ - "", - "valueset ", - "\"Encounter Inpatient\"", - ": ", - "'urn:oid:2.16.840.1.113883.3.666.5.307'" - ] - } - ] - } - } - ] - }, - { - "localId": "5", - "locator": "8:1-8:65", - "name": "Hysterectomy", - "id": "2.16.840.1.113762.1.4.1029.358", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "5", - "s": [ - { - "value": [ - "", - "valueset ", - "\"Hysterectomy\"", - ": ", - "'urn:oid:2.16.840.1.113762.1.4.1029.358'" - ] - } - ] - } - } - ] - }, - { - "localId": "6", - "locator": "9:1-9:89", - "name": "Severe Maternal Morbidity Procedures", - "id": "2.16.840.1.113762.1.4.1029.256", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "6", - "s": [ - { - "value": [ - "", - "valueset ", - "\"Severe Maternal Morbidity Procedures\"", - ": ", - "'urn:oid:2.16.840.1.113762.1.4.1029.256'" - ] - } - ] - } - } - ] - }, - { - "localId": "7", - "locator": "10:1-10:65", - "name": "Tracheostomy", - "id": "2.16.840.1.113762.1.4.1029.359", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "7", - "s": [ - { - "value": [ - "", - "valueset ", - "\"Tracheostomy\"", - ": ", - "'urn:oid:2.16.840.1.113762.1.4.1029.359'" - ] - } - ] - } - } - ] - }, - { - "localId": "8", - "locator": "11:1-11:64", - "name": "Ventilation", - "id": "2.16.840.1.113762.1.4.1029.360", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "8", - "s": [ - { - "value": [ - "", - "valueset ", - "\"Ventilation\"", + "\"Digoxin Medications\"", ": ", - "'urn:oid:2.16.840.1.113762.1.4.1029.360'" + "'urn:oid:2.16.840.1.113883.3.464.1003.1065'" ] } ] @@ -437,7 +258,7 @@ "contexts": { "def": [ { - "locator": "15:1-15:15", + "locator": "9:1-9:15", "name": "Patient" } ] @@ -445,13 +266,13 @@ "statements": { "def": [ { - "locator": "15:1-15:15", + "locator": "9:1-9:15", "name": "Patient", "context": "Patient", "expression": { "type": "SingletonFrom", "operand": { - "locator": "15:1-15:15", + "locator": "9:1-9:15", "dataType": "{urn:healthit-gov:qdm:v5_6}Patient", "templateId": "Patient", "type": "Retrieve" @@ -459,773 +280,407 @@ } }, { - "localId": "19", - "locator": "17:1-19:67", - "name": "Qualifying Encounters", + "localId": "81", + "locator": "25:1-41:27", + "name": "More Than One Order", "context": "Patient", "accessLevel": "Public", + "type": "FunctionDef", "annotation": [ { "type": "Annotation", "s": { - "r": "19", + "r": "81", "s": [ { "value": [ "", - "define ", - "\"Qualifying Encounters\"", - ":\n " + "define function ", + "\"More Than One Order\"", + "(", + "Medication", + " " + ] + }, + { + "r": "8", + "s": [ + { + "value": [ + "List<" + ] + }, + { + "r": "7", + "s": [ + { + "value": [ + "\"Medication, Order\"" + ] + } + ] + }, + { + "value": [ + ">" + ] + } + ] + }, + { + "value": [ + " ):\n " ] }, { - "r": "18", + "r": "80", "s": [ { + "r": "80", "s": [ { - "r": "13", "s": [ { - "r": "12", + "r": "10", "s": [ { - "r": "12", + "r": "9", "s": [ - { - "value": [ - "[", - "\"Encounter, Performed\"", - ": " - ] - }, { "s": [ { "value": [ - "\"Encounter Inpatient\"" + "\"Medication\"" ] } ] - }, - { - "value": ["]"] } ] + }, + { + "value": [ + " ", + "OrderMedication1" + ] } ] - }, - { - "value": [" ", "Encounter"] } ] - } - ] - }, - { - "value": ["\n "] - }, - { - "r": "17", - "s": [ + }, { - "value": ["where "] + "value": [ + "\n " + ] }, { - "r": "17", + "r": "77", "s": [ { - "r": "15", + "value": [ + "with " + ] + }, + { + "r": "12", "s": [ { - "r": "14", + "r": "11", "s": [ { - "value": ["Encounter"] + "s": [ + { + "value": [ + "\"Medication\"" + ] + } + ] } ] }, { - "value": ["."] - }, - { - "r": "15", - "s": [ - { - "value": ["relevantPeriod"] - } + "value": [ + " ", + "OrderMedication2" ] } ] }, { - "r": "17", - "value": [" ", "ends during", " "] + "value": [ + "\n such that " + ] }, { - "r": "16", + "r": "76", "s": [ { - "value": ["\"Measurement Period\""] - } - ] - } - ] - } - ] - } - ] - } - ] - } - } - ], - "expression": { - "localId": "18", - "locator": "18:3-19:67", - "type": "Query", - "source": [ - { - "localId": "13", - "locator": "18:3-18:59", - "alias": "Encounter", - "expression": { - "localId": "12", - "locator": "18:3-18:49", - "dataType": "{urn:healthit-gov:qdm:v5_6}PositiveEncounterPerformed", - "templateId": "PositiveEncounterPerformed", - "codeProperty": "code", - "codeComparator": "in", - "type": "Retrieve", - "codes": { - "locator": "18:28-18:48", - "name": "Encounter Inpatient", - "preserve": true, - "type": "ValueSetRef" - } - } - } - ], - "relationship": [], - "where": { - "localId": "17", - "locator": "19:5-19:67", - "type": "In", - "operand": [ - { - "locator": "19:36-19:39", - "type": "End", - "operand": { - "localId": "15", - "locator": "19:11-19:34", - "path": "relevantPeriod", - "scope": "Encounter", - "type": "Property" - } - }, - { - "localId": "16", - "locator": "19:48-19:67", - "name": "Measurement Period", - "type": "ParameterRef" - } - ] - } - } - }, - { - "localId": "29", - "locator": "40:1-42:71", - "name": "SOCProcedures", - "context": "Patient", - "accessLevel": "Public", - "type": "FunctionDef", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "29", - "s": [ - { - "value": [ - "", - "define function ", - "\"SOCProcedures\"", - "(", - "Encounter", - " " - ] - }, - { - "r": "23", - "s": [ - { - "value": ["\"Encounter, Performed\""] - } - ] - }, - { - "value": [" ):\n "] - }, - { - "r": "28", - "s": [ - { - "r": "28", - "s": [ - { - "s": [ - { - "r": "27", - "s": [ - { - "r": "26", + "r": "40", "s": [ { - "value": ["( "] - }, - { - "r": "26", + "r": "21", "s": [ { - "r": "24", + "value": [ + "( " + ] + }, + { + "r": "21", "s": [ { - "value": [ - "[", - "\"Procedure, Performed\"", - ": " - ] - }, - { + "r": "16", "s": [ { + "r": "14", + "s": [ + { + "r": "13", + "s": [ + { + "value": [ + "OrderMedication1" + ] + } + ] + }, + { + "value": [ + "." + ] + }, + { + "r": "14", + "s": [ + { + "value": [ + "authorDatetime" + ] + } + ] + } + ] + }, + { + "r": "16", "value": [ - "\"Severe Maternal Morbidity Procedures\"" + " ", + "during", + " " + ] + }, + { + "r": "15", + "s": [ + { + "value": [ + "\"Measurement Period\"" + ] + } ] } ] }, - { - "value": ["]"] - } - ] - }, - { - "value": ["\n union "] - }, - { - "r": "25", - "s": [ { "value": [ - "[", - "\"Procedure, Performed\"", - ": " + "\n and " ] }, { + "r": "20", "s": [ { + "r": "18", + "s": [ + { + "r": "17", + "s": [ + { + "value": [ + "OrderMedication1" + ] + } + ] + }, + { + "value": [ + "." + ] + }, + { + "r": "18", + "s": [ + { + "value": [ + "refills" + ] + } + ] + } + ] + }, + { + "r": "19", "value": [ - "\"Blood Transfusion\"" + " ", + ">=", + " ", + "1" ] } ] - }, - { - "value": ["]"] } ] + }, + { + "value": [ + "\n )" + ] } ] }, - { - "value": [" )"] - } - ] - }, - { - "value": [" ", "SMMProcedures"] - } - ] - } - ] - } - ] - } - ] - } - ] - } - } - ], - "expression": { - "localId": "28", - "locator": "41:3-42:71", - "type": "Query", - "source": [ - { - "localId": "27", - "locator": "41:3-42:71", - "alias": "SMMProcedures", - "expression": { - "localId": "26", - "locator": "41:3-42:57", - "type": "Union", - "operand": [ - { - "localId": "24", - "locator": "41:5-41:68", - "dataType": "{urn:healthit-gov:qdm:v5_6}PositiveProcedurePerformed", - "templateId": "PositiveProcedurePerformed", - "codeProperty": "code", - "codeComparator": "in", - "type": "Retrieve", - "codes": { - "locator": "41:30-41:67", - "name": "Severe Maternal Morbidity Procedures", - "preserve": true, - "type": "ValueSetRef" - } - }, - { - "localId": "25", - "locator": "42:11-42:55", - "dataType": "{urn:healthit-gov:qdm:v5_6}PositiveProcedurePerformed", - "templateId": "PositiveProcedurePerformed", - "codeProperty": "code", - "codeComparator": "in", - "type": "Retrieve", - "codes": { - "locator": "42:36-42:54", - "name": "Blood Transfusion", - "preserve": true, - "type": "ValueSetRef" - } - } - ] - } - } - ], - "relationship": [] - }, - "operand": [ - { - "name": "Encounter", - "operandTypeSpecifier": { - "localId": "23", - "locator": "40:43-40:64", - "name": "{urn:healthit-gov:qdm:v5_6}PositiveEncounterPerformed", - "type": "NamedTypeSpecifier" - } - } - ] - }, - { - "localId": "77", - "locator": "21:1-38:5", - "name": "SDE SOC Procedure Detail", - "context": "Patient", - "accessLevel": "Public", - "annotation": [ - { - "type": "Annotation", - "s": { - "r": "77", - "s": [ - { - "value": [ - "", - "define ", - "\"SDE SOC Procedure Detail\"", - ":\n " - ] - }, - { - "r": "76", - "s": [ - { - "s": [ - { - "r": "21", - "s": [ - { - "r": "20", - "s": [ - { - "s": [ { "value": [ - "\"Qualifying Encounters\"" - ] - } - ] - } - ] - }, - { - "value": [" ", "Encounter"] - } - ] - } - ] - }, - { - "value": ["\n "] - }, - { - "s": [ - { - "value": ["let "] - }, - { - "r": "31", - "s": [ - { - "value": ["procedure", ": "] - }, - { - "r": "30", - "s": [ - { - "value": ["\"SOCProcedures\"", "("] - }, - { - "r": "22", - "s": [ - { - "value": ["Encounter"] - } - ] - }, - { - "value": [")"] - } - ] - } - ] - } - ] - }, - { - "value": ["\n "] - }, - { - "r": "75", - "s": [ - { - "value": ["return "] - }, - { - "r": "74", - "s": [ - { - "value": ["{\n "] - }, - { - "s": [ - { - "value": ["id", ": "] - }, - { - "r": "33", - "s": [ - { - "r": "32", - "s": [ - { - "value": ["Encounter"] - } + "\n or " ] }, { - "value": ["."] - }, - { - "r": "33", + "r": "39", "s": [ { - "value": ["id"] - } - ] - } - ] - } - ] - }, - { - "value": [",\n "] - }, - { - "s": [ - { - "value": ["code", ": "] - }, - { - "r": "35", - "s": [ - { - "r": "34", - "s": [ + "value": [ + "( " + ] + }, { - "value": ["Encounter"] - } - ] - }, - { - "value": ["."] - }, - { - "r": "35", - "s": [ - { - "value": ["code"] - } - ] - } - ] - } - ] - }, - { - "value": [",\n "] - }, - { - "s": [ - { - "value": ["procedures", ": "] - }, - { - "r": "73", - "s": [ - { - "s": [ - { - "r": "37", - "s": [ - { - "r": "36", - "s": [ - { - "s": [ - { - "value": [ - "procedure" - ] - } - ] - } - ] - }, - { - "value": [" ", "P"] - } - ] - } - ] - }, - { - "value": ["\n "] - }, - { - "r": "72", - "s": [ - { - "value": ["return "] - }, - { - "r": "71", + "r": "39", "s": [ { - "value": ["{\n "] - }, - { - "s": [ - { - "value": [ - "code", - ": " - ] - }, - { - "r": "38", - "s": [ - { - "value": ["P"] - } - ] - } - ] - }, - { - "value": [",\n "] - }, - { + "r": "34", "s": [ { - "value": [ - "SOCCategory", - ": " - ] - }, - { - "r": "70", + "r": "29", "s": [ { - "value": [ - "case\n " - ] - }, - { - "r": "44", + "r": "24", "s": [ { "value": [ - "when " + "date from " ] }, { - "r": "42", + "r": "23", "s": [ { - "r": "40", + "r": "22", "s": [ - { - "r": "39", - "s": [ - { - "value": [ - "P" - ] - } - ] - }, { "value": [ - "." - ] - }, - { - "r": "40", - "s": [ - { - "value": [ - "code" - ] - } + "OrderMedication1" ] } ] }, { "value": [ - " in " + "." ] }, { - "r": "41", + "r": "23", "s": [ { "value": [ - "\"Blood Transfusion\"" + "authorDatetime" ] } ] } ] - }, - { - "value": [ - " then " - ] - }, - { - "r": "43", - "s": [ - { - "value": [ - "'Blood Transfusion'" - ] - } - ] } ] }, { "value": [ - "\n " + " ", + "!~", + " " ] }, { - "r": "50", + "r": "27", "s": [ { "value": [ - "when " + "date from " ] }, { - "r": "48", + "r": "26", "s": [ { - "r": "46", + "r": "25", "s": [ - { - "r": "45", - "s": [ - { - "value": [ - "P" - ] - } - ] - }, { "value": [ - "." - ] - }, - { - "r": "46", - "s": [ - { - "value": [ - "code" - ] - } + "OrderMedication2" ] } ] }, { "value": [ - " in " + "." ] }, { - "r": "47", + "r": "26", "s": [ { "value": [ - "\"Conversion of Cardiac Rhythm\"" + "authorDatetime" ] } ] } ] + } + ] + } + ] + }, + { + "value": [ + "\n and " + ] + }, + { + "r": "33", + "s": [ + { + "r": "31", + "s": [ + { + "r": "30", + "s": [ + { + "value": [ + "OrderMedication1" + ] + } + ] }, { "value": [ - " then " + "." ] }, { - "r": "49", + "r": "31", "s": [ { "value": [ - "'Conversion of cardiac rhythm'" + "authorDatetime" ] } ] @@ -1233,30 +688,141 @@ ] }, { + "r": "33", "value": [ - "\n " + " ", + "during", + " " ] }, { - "r": "56", + "r": "32", "s": [ { "value": [ - "when " + "\"Measurement Period\"" ] - }, + } + ] + } + ] + } + ] + }, + { + "value": [ + "\n and " + ] + }, + { + "r": "38", + "s": [ + { + "r": "36", + "s": [ + { + "r": "35", + "s": [ + { + "value": [ + "OrderMedication2" + ] + } + ] + }, + { + "value": [ + "." + ] + }, + { + "r": "36", + "s": [ + { + "value": [ + "authorDatetime" + ] + } + ] + } + ] + }, + { + "r": "38", + "value": [ + " ", + "during", + " " + ] + }, + { + "r": "37", + "s": [ + { + "value": [ + "\"Measurement Period\"" + ] + } + ] + } + ] + } + ] + }, + { + "value": [ + "\n )" + ] + } + ] + } + ] + }, + { + "value": [ + "\n or " + ] + }, + { + "r": "75", + "s": [ + { + "value": [ + "( " + ] + }, + { + "r": "75", + "s": [ + { + "r": "69", + "s": [ + { + "r": "63", + "s": [ + { + "r": "52", + "s": [ + { + "r": "47", + "s": [ { - "r": "54", + "r": "43", "s": [ { - "r": "52", + "value": [ + "date from " + ] + }, + { + "r": "42", "s": [ { - "r": "51", + "r": "41", "s": [ { "value": [ - "P" + "OrderMedication1" ] } ] @@ -1267,76 +833,43 @@ ] }, { - "r": "52", + "r": "42", "s": [ { "value": [ - "code" + "authorDatetime" ] } ] } ] - }, - { - "value": [ - " in " - ] - }, - { - "r": "53", - "s": [ - { - "value": [ - "\"Hysterectomy\"" - ] - } - ] } ] }, { "value": [ - " then " + " ", + "~", + " " ] }, { - "r": "55", + "r": "46", "s": [ { "value": [ - "'Hysterectomy'" + "date from " ] - } - ] - } - ] - }, - { - "value": [ - "\n " - ] - }, - { - "r": "62", - "s": [ - { - "value": [ - "when " - ] - }, - { - "r": "60", - "s": [ + }, { - "r": "58", + "r": "45", "s": [ { - "r": "57", + "r": "44", "s": [ { "value": [ - "P" + "OrderMedication2" ] } ] @@ -1347,28 +880,53 @@ ] }, { - "r": "58", + "r": "45", "s": [ { "value": [ - "code" + "authorDatetime" ] } ] } ] + } + ] + } + ] + }, + { + "value": [ + "\n and " + ] + }, + { + "r": "51", + "s": [ + { + "r": "49", + "s": [ + { + "r": "48", + "s": [ + { + "value": [ + "OrderMedication1" + ] + } + ] }, { "value": [ - " in " + "." ] }, { - "r": "59", + "r": "49", "s": [ { "value": [ - "\"Tracheostomy\"" + "authorDatetime" ] } ] @@ -1376,47 +934,60 @@ ] }, { + "r": "51", "value": [ - " then " + " ", + "during", + " " ] }, { - "r": "61", + "r": "50", "s": [ { "value": [ - "'Tracheostomy'" + "\"Measurement Period\"" ] } ] } ] - }, - { - "value": [ - "\n " - ] - }, + } + ] + }, + { + "value": [ + "\n and " + ] + }, + { + "r": "62", + "s": [ { - "r": "68", + "r": "56", "s": [ { "value": [ - "when " + "date from " ] }, { - "r": "66", + "r": "55", "s": [ { - "r": "64", + "value": [ + "start of " + ] + }, + { + "r": "54", "s": [ { - "r": "63", + "r": "53", "s": [ { "value": [ - "P" + "OrderMedication1" ] } ] @@ -1427,57 +998,194 @@ ] }, { - "r": "64", + "r": "54", "s": [ { "value": [ - "code" + "relevantPeriod" ] } ] } ] - }, + } + ] + } + ] + }, + { + "value": [ + " ", + "!~", + " " + ] + }, + { + "r": "60", + "s": [ + { + "value": [ + "date from " + ] + }, + { + "r": "59", + "s": [ { "value": [ - " in " + "start of " ] }, { - "r": "65", + "r": "58", "s": [ + { + "r": "57", + "s": [ + { + "value": [ + "OrderMedication2" + ] + } + ] + }, { "value": [ - "\"Ventilation\"" + "." + ] + }, + { + "r": "58", + "s": [ + { + "value": [ + "relevantPeriod" + ] + } ] } ] } ] + } + ] + } + ] + } + ] + }, + { + "value": [ + "\n and " + ] + }, + { + "r": "68", + "s": [ + { + "r": "66", + "s": [ + { + "value": [ + "start of " + ] + }, + { + "r": "65", + "s": [ + { + "r": "64", + "s": [ + { + "value": [ + "OrderMedication1" + ] + } + ] }, { "value": [ - " then " + "." ] }, { - "r": "67", + "r": "65", "s": [ { "value": [ - "'Ventilation'" + "relevantPeriod" ] } ] } ] + } + ] + }, + { + "r": "68", + "value": [ + " ", + "during", + " " + ] + }, + { + "r": "67", + "s": [ + { + "value": [ + "\"Measurement Period\"" + ] + } + ] + } + ] + } + ] + }, + { + "value": [ + "\n and " + ] + }, + { + "r": "74", + "s": [ + { + "r": "72", + "s": [ + { + "value": [ + "start of " + ] + }, + { + "r": "71", + "s": [ + { + "r": "70", + "s": [ + { + "value": [ + "OrderMedication2" + ] + } + ] }, { - "r": "69", "value": [ - " \n else ", - "null", - " end" + "." + ] + }, + { + "r": "71", + "s": [ + { + "value": [ + "relevantPeriod" + ] + } ] } ] @@ -1485,18 +1193,60 @@ ] }, { - "value": ["\n }"] + "r": "74", + "value": [ + " ", + "during", + " " + ] + }, + { + "r": "73", + "s": [ + { + "value": [ + "\"Measurement Period\"" + ] + } + ] } ] } ] + }, + { + "value": [ + "\n )" + ] } ] } ] + } + ] + }, + { + "value": [ + "\n " + ] + }, + { + "r": "79", + "s": [ + { + "value": [ + "return " + ] }, { - "value": ["\n }"] + "r": "78", + "s": [ + { + "value": [ + "OrderMedication1" + ] + } + ] } ] } @@ -1509,608 +1259,971 @@ } ], "expression": { - "localId": "76", - "locator": "22:3-38:5", + "localId": "80", + "locator": "26:3-41:27", "type": "Query", "source": [ { - "localId": "21", - "locator": "22:3-22:35", - "alias": "Encounter", + "localId": "10", + "locator": "26:3-26:31", + "alias": "OrderMedication1", "expression": { - "localId": "20", - "locator": "22:3-22:25", - "name": "Qualifying Encounters", - "type": "ExpressionRef" + "localId": "9", + "locator": "26:3-26:14", + "name": "Medication", + "type": "OperandRef" } } ], - "let": [ + "relationship": [ { - "localId": "31", - "locator": "23:9-23:45", - "identifier": "procedure", + "localId": "77", + "locator": "27:5-40:9", + "alias": "OrderMedication2", + "type": "With", "expression": { - "localId": "30", - "locator": "23:20-23:45", - "name": "SOCProcedures", - "type": "FunctionRef", + "localId": "11", + "locator": "27:10-27:21", + "name": "Medication", + "type": "OperandRef" + }, + "suchThat": { + "localId": "76", + "locator": "28:17-40:9", + "type": "Or", "operand": [ { - "localId": "22", - "locator": "23:36-23:44", - "name": "Encounter", - "type": "AliasRef" - } - ] - } - } - ], - "relationship": [], - "return": { - "localId": "75", - "locator": "24:5-38:5", - "expression": { - "localId": "74", - "locator": "24:12-38:5", - "type": "Tuple", - "element": [ - { - "name": "id", - "value": { - "localId": "33", - "locator": "25:11-25:22", - "path": "id", - "scope": "Encounter", - "type": "Property" - } - }, - { - "name": "code", - "value": { - "localId": "35", - "locator": "26:13-26:26", - "path": "code", - "scope": "Encounter", - "type": "Property" - } - }, - { - "name": "procedures", - "value": { - "localId": "73", - "locator": "27:19-37:9", - "type": "Query", - "source": [ + "localId": "40", + "locator": "28:17-34:9", + "type": "Or", + "operand": [ { - "localId": "37", - "locator": "27:19-27:29", - "alias": "P", - "expression": { - "localId": "36", - "locator": "27:19-27:27", - "name": "procedure", - "type": "QueryLetRef" - } - } - ], - "relationship": [], - "return": { - "localId": "72", - "locator": "28:9-37:9", - "expression": { - "localId": "71", - "locator": "28:16-37:9", - "type": "Tuple", - "element": [ + "localId": "21", + "locator": "28:17-30:7", + "type": "And", + "operand": [ { - "name": "code", - "value": { - "localId": "38", - "locator": "29:17", - "name": "P", - "type": "AliasRef" - } + "localId": "16", + "locator": "28:19-28:77", + "type": "In", + "operand": [ + { + "localId": "14", + "locator": "28:19-28:49", + "path": "authorDatetime", + "scope": "OrderMedication1", + "type": "Property" + }, + { + "localId": "15", + "locator": "28:58-28:77", + "name": "Measurement Period", + "type": "ParameterRef" + } + ] }, { - "name": "SOCCategory", - "value": { - "localId": "70", - "locator": "30:24-36:25", - "type": "Case", - "caseItem": [ - { - "localId": "44", - "locator": "31:13-31:71", - "when": { - "localId": "42", - "locator": "31:18-31:46", - "type": "InValueSet", - "code": { - "localId": "40", - "locator": "31:18-31:23", - "path": "code", - "scope": "P", - "type": "Property" - }, - "valueset": { - "localId": "41", - "locator": "31:28-31:46", - "name": "Blood Transfusion", - "preserve": true - } - }, - "then": { - "localId": "43", - "locator": "31:53-31:71", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "Blood Transfusion", - "type": "Literal" - } - }, - { - "localId": "50", - "locator": "32:13-32:93", - "when": { - "localId": "48", - "locator": "32:18-32:57", - "type": "InValueSet", - "code": { - "localId": "46", - "locator": "32:18-32:23", - "path": "code", - "scope": "P", - "type": "Property" + "localId": "20", + "locator": "29:15-29:43", + "type": "GreaterOrEqual", + "operand": [ + { + "localId": "18", + "locator": "29:15-29:38", + "path": "refills", + "scope": "OrderMedication1", + "type": "Property" + }, + { + "localId": "19", + "locator": "29:43", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "1", + "type": "Literal" + } + ] + } + ] + }, + { + "localId": "39", + "locator": "31:12-34:9", + "type": "And", + "operand": [ + { + "localId": "34", + "locator": "31:14-32:75", + "type": "And", + "operand": [ + { + "localId": "29", + "locator": "31:14-31:99", + "type": "Not", + "operand": { + "localId": "28", + "locator": "31:14-31:99", + "type": "Equivalent", + "operand": [ + { + "localId": "24", + "locator": "31:14-31:54", + "type": "DateFrom", + "operand": { + "localId": "23", + "locator": "31:24-31:54", + "path": "authorDatetime", + "scope": "OrderMedication1", + "type": "Property" + } }, - "valueset": { - "localId": "47", - "locator": "32:28-32:57", - "name": "Conversion of Cardiac Rhythm", - "preserve": true + { + "localId": "27", + "locator": "31:59-31:99", + "type": "DateFrom", + "operand": { + "localId": "26", + "locator": "31:69-31:99", + "path": "authorDatetime", + "scope": "OrderMedication2", + "type": "Property" + } } + ] + } + }, + { + "localId": "33", + "locator": "32:17-32:75", + "type": "In", + "operand": [ + { + "localId": "31", + "locator": "32:17-32:47", + "path": "authorDatetime", + "scope": "OrderMedication1", + "type": "Property" }, - "then": { - "localId": "49", - "locator": "32:64-32:93", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "Conversion of cardiac rhythm", - "type": "Literal" + { + "localId": "32", + "locator": "32:56-32:75", + "name": "Measurement Period", + "type": "ParameterRef" } - }, - { - "localId": "56", - "locator": "33:13-33:61", - "when": { - "localId": "54", - "locator": "33:18-33:41", - "type": "InValueSet", - "code": { - "localId": "52", - "locator": "33:18-33:23", - "path": "code", - "scope": "P", - "type": "Property" - }, - "valueset": { - "localId": "53", - "locator": "33:28-33:41", - "name": "Hysterectomy", - "preserve": true - } - }, - "then": { - "localId": "55", - "locator": "33:48-33:61", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "Hysterectomy", - "type": "Literal" - } - }, - { - "localId": "62", - "locator": "34:13-34:61", - "when": { - "localId": "60", - "locator": "34:18-34:41", - "type": "InValueSet", - "code": { - "localId": "58", - "locator": "34:18-34:23", - "path": "code", - "scope": "P", - "type": "Property" - }, - "valueset": { - "localId": "59", - "locator": "34:28-34:41", - "name": "Tracheostomy", - "preserve": true - } - }, - "then": { - "localId": "61", - "locator": "34:48-34:61", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "Tracheostomy", - "type": "Literal" - } - }, - { - "localId": "68", - "locator": "35:13-35:59", - "when": { - "localId": "66", - "locator": "35:18-35:40", - "type": "InValueSet", - "code": { - "localId": "64", - "locator": "35:18-35:23", - "path": "code", - "scope": "P", - "type": "Property" - }, - "valueset": { - "localId": "65", - "locator": "35:28-35:40", - "name": "Ventilation", - "preserve": true - } - }, - "then": { - "localId": "67", - "locator": "35:47-35:59", - "valueType": "{urn:hl7-org:elm-types:r1}String", - "value": "Ventilation", - "type": "Literal" - } - } - ], - "else": { - "asType": "{urn:hl7-org:elm-types:r1}String", - "type": "As", - "operand": { - "localId": "69", - "locator": "36:18-36:21", - "type": "Null" - } + ] } - } - } - ] - } - } - } - } - ] - } - } - } - } - ] - } - } - }, - "cql": "library TestWhenCase version '0.0.001'\r\n\r\nusing QDM version '5.6'\r\n\r\nvalueset \"Blood Transfusion\": 'urn:oid:2.16.840.1.113762.1.4.1029.213'\r\nvalueset \"Conversion of Cardiac Rhythm\": 'urn:oid:2.16.840.1.113762.1.4.1029.357'\r\nvalueset \"Encounter Inpatient\": 'urn:oid:2.16.840.1.113883.3.666.5.307'\r\nvalueset \"Hysterectomy\": 'urn:oid:2.16.840.1.113762.1.4.1029.358'\r\nvalueset \"Severe Maternal Morbidity Procedures\": 'urn:oid:2.16.840.1.113762.1.4.1029.256'\r\nvalueset \"Tracheostomy\": 'urn:oid:2.16.840.1.113762.1.4.1029.359'\r\nvalueset \"Ventilation\": 'urn:oid:2.16.840.1.113762.1.4.1029.360'\r\n\r\nparameter \"Measurement Period\" Interval\r\n\r\ncontext Patient\r\n\r\ndefine \"Qualifying Encounters\":\r\n [\"Encounter, Performed\": \"Encounter Inpatient\"] Encounter\r\n where Encounter.relevantPeriod ends during \"Measurement Period\"\r\n\r\ndefine \"SDE SOC Procedure Detail\":\r\n \"Qualifying Encounters\" Encounter\r\n let procedure: \"SOCProcedures\"(Encounter)\r\n return {\r\n id: Encounter.id,\r\n code: Encounter.code,\r\n procedures: procedure P\r\n return {\r\n code: P,\r\n SOCCategory:\r\n case\r\n when P.code in \"Blood Transfusion\" then 'Blood Transfusion'\r\n when P.code in \"Conversion of Cardiac Rhythm\" then 'Conversion of cardiac rhythm'\r\n when P.code in \"Hysterectomy\" then 'Hysterectomy'\r\n when P.code in \"Tracheostomy\" then 'Tracheostomy'\r\n when P.code in \"Ventilation\" then 'Ventilation' \r\n else null end\r\n }\r\n }\r\n\r\ndefine function \"SOCProcedures\"(Encounter \"Encounter, Performed\"):\r\n ( [\"Procedure, Performed\": \"Severe Maternal Morbidity Procedures\"]\r\n union [\"Procedure, Performed\": \"Blood Transfusion\"] ) SMMProcedures", - "elm_annotations": { - "statements": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "define \"Qualifying Encounters\":\n " - } - ] - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ + ] + }, { - "children": [ - { - "children": [ - { - "text": "[\"Encounter, Performed\": " - } - ] - }, + "localId": "38", + "locator": "33:17-33:75", + "type": "In", + "operand": [ { - "children": [ - { - "children": [ - { - "text": "\"Encounter Inpatient\"" - } - ] - } - ] + "localId": "36", + "locator": "33:17-33:47", + "path": "authorDatetime", + "scope": "OrderMedication2", + "type": "Property" }, { - "children": [ - { - "text": "]" - } - ] + "localId": "37", + "locator": "33:56-33:75", + "name": "Measurement Period", + "type": "ParameterRef" } - ], - "node_type": "Retrieve", - "ref_id": "12" - } - ], - "node_type": "Retrieve", - "ref_id": "12" - }, - { - "children": [ - { - "text": " Encounter" + ] } ] } - ], - "ref_id": "13" - } - ] - }, - { - "children": [ - { - "text": "\n " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "where " - } ] }, { - "children": [ + "localId": "75", + "locator": "35:12-40:9", + "type": "And", + "operand": [ { - "children": [ + "localId": "69", + "locator": "35:14-38:84", + "type": "And", + "operand": [ { - "children": [ + "localId": "63", + "locator": "35:14-37:120", + "type": "And", + "operand": [ { - "children": [ + "localId": "52", + "locator": "35:14-36:75", + "type": "And", + "operand": [ + { + "localId": "47", + "locator": "35:14-35:98", + "type": "Equivalent", + "operand": [ + { + "localId": "43", + "locator": "35:14-35:54", + "type": "DateFrom", + "operand": { + "localId": "42", + "locator": "35:24-35:54", + "path": "authorDatetime", + "scope": "OrderMedication1", + "type": "Property" + } + }, + { + "localId": "46", + "locator": "35:58-35:98", + "type": "DateFrom", + "operand": { + "localId": "45", + "locator": "35:68-35:98", + "path": "authorDatetime", + "scope": "OrderMedication2", + "type": "Property" + } + } + ] + }, { - "text": "Encounter" + "localId": "51", + "locator": "36:17-36:75", + "type": "In", + "operand": [ + { + "localId": "49", + "locator": "36:17-36:47", + "path": "authorDatetime", + "scope": "OrderMedication1", + "type": "Property" + }, + { + "localId": "50", + "locator": "36:56-36:75", + "name": "Measurement Period", + "type": "ParameterRef" + } + ] } ] - } - ], - "ref_id": "14" - }, - { - "children": [ + }, { - "text": "." + "localId": "62", + "locator": "37:17-37:120", + "type": "Not", + "operand": { + "localId": "61", + "locator": "37:17-37:120", + "type": "Equivalent", + "operand": [ + { + "localId": "56", + "locator": "37:17-37:66", + "type": "DateFrom", + "operand": { + "localId": "55", + "locator": "37:27-37:66", + "type": "Start", + "operand": { + "localId": "54", + "locator": "37:36-37:66", + "path": "relevantPeriod", + "scope": "OrderMedication1", + "type": "Property" + } + } + }, + { + "localId": "60", + "locator": "37:71-37:120", + "type": "DateFrom", + "operand": { + "localId": "59", + "locator": "37:81-37:120", + "type": "Start", + "operand": { + "localId": "58", + "locator": "37:90-37:120", + "path": "relevantPeriod", + "scope": "OrderMedication2", + "type": "Property" + } + } + } + ] + } } ] }, { - "children": [ + "localId": "68", + "locator": "38:17-38:84", + "type": "In", + "operand": [ { - "children": [ - { - "text": "relevantPeriod" - } - ] + "localId": "66", + "locator": "38:17-38:56", + "type": "Start", + "operand": { + "localId": "65", + "locator": "38:26-38:56", + "path": "relevantPeriod", + "scope": "OrderMedication1", + "type": "Property" + } + }, + { + "localId": "67", + "locator": "38:65-38:84", + "name": "Measurement Period", + "type": "ParameterRef" } - ], - "node_type": "Property", - "ref_id": "15" + ] } - ], - "node_type": "Property", - "ref_id": "15" + ] }, { - "children": [ + "localId": "74", + "locator": "39:17-39:84", + "type": "In", + "operand": [ { - "text": " ends during " - } - ], - "ref_id": "17" - }, - { - "children": [ + "localId": "72", + "locator": "39:17-39:56", + "type": "Start", + "operand": { + "localId": "71", + "locator": "39:26-39:56", + "path": "relevantPeriod", + "scope": "OrderMedication2", + "type": "Property" + } + }, { - "children": [ - { - "text": "\"Measurement Period\"" - } - ] + "localId": "73", + "locator": "39:65-39:84", + "name": "Measurement Period", + "type": "ParameterRef" } - ], - "node_type": "ParameterRef", - "ref_id": "16" + ] } - ], - "ref_id": "17" - } - ], - "ref_id": "17" - } - ], - "node_type": "Query", - "ref_id": "18" - } - ], - "ref_id": "19" - } - ], - "define_name": "Qualifying Encounters" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "define function \"SOCProcedures\"(Encounter " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "\"Encounter, Performed\"" + ] } ] } - ], - "ref_id": "23" - }, + } + ], + "return": { + "localId": "79", + "locator": "41:5-41:27", + "expression": { + "localId": "78", + "locator": "41:12-41:27", + "name": "OrderMedication1", + "type": "AliasRef" + } + } + }, + "operand": [ { - "children": [ - { - "text": " ):\n " + "name": "Medication", + "operandTypeSpecifier": { + "localId": "8", + "locator": "25:50-25:74", + "type": "ListTypeSpecifier", + "elementType": { + "localId": "7", + "locator": "25:55-25:73", + "name": "{urn:healthit-gov:qdm:v5_6}PositiveMedicationOrder", + "type": "NamedTypeSpecifier" } - ] - }, + } + } + ] + }, + { + "localId": "106", + "locator": "14:1-23:31", + "name": "test when then case", + "context": "Patient", + "accessLevel": "Public", + "annotation": [ { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "( " - } - ] - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "[\"Procedure, Performed\": " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "\"Severe Maternal Morbidity Procedures\"" - } - ] - } - ] - }, - { - "children": [ - { - "text": "]" - } - ] - } - ], - "node_type": "Retrieve", - "ref_id": "24" - }, - { - "children": [ - { - "text": "\n union " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "[\"Procedure, Performed\": " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "\"Blood Transfusion\"" - } - ] - } - ] - }, - { - "children": [ - { - "text": "]" - } - ] - } - ], - "node_type": "Retrieve", - "ref_id": "25" - } - ], - "node_type": "Union", - "ref_id": "26" - }, - { - "children": [ - { - "text": " )" - } - ] - } - ], - "node_type": "Union", - "ref_id": "26" - }, - { - "children": [ - { - "text": " SMMProcedures" - } - ] - } - ], - "ref_id": "27" + "type": "Annotation", + "s": { + "r": "106", + "s": [ + { + "value": [ + "", + "define ", + "\"test when then case\"", + ":\n " + ] + }, + { + "r": "105", + "s": [ + { + "s": [ + { + "r": "83", + "s": [ + { + "r": "82", + "s": [ + { + "value": [ + "( " + ] + }, + { + "r": "82", + "s": [ + { + "value": [ + "\"More Than One Order\"", + "(" + ] + }, + { + "r": "6", + "s": [ + { + "value": [ + "[", + "\"Medication, Order\"", + ": " + ] + }, + { + "s": [ + { + "value": [ + "\"Digoxin Medications\"" + ] + } + ] + }, + { + "value": [ + "]" + ] + } + ] + }, + { + "value": [ + ")" + ] + } + ] + }, + { + "value": [ + " )" + ] + } + ] + }, + { + "value": [ + " ", + "DigoxinOrdered" + ] + } + ] + } + ] + }, + { + "value": [ + "\n " + ] + }, + { + "r": "104", + "s": [ + { + "value": [ + "return " + ] + }, + { + "r": "103", + "s": [ + { + "s": [ + { + "r": "85", + "s": [ + { + "r": "84", + "s": [ + { + "s": [ + { + "value": [ + "DigoxinOrdered" + ] + } + ] + } + ] + }, + { + "value": [ + " ", + "Order" + ] + } + ] + } + ] + }, + { + "value": [ + "\n " + ] + }, + { + "s": [ + { + "value": [ + "let " + ] + }, + { + "r": "100", + "s": [ + { + "value": [ + "MedicationStrength", + ": " + ] + }, + { + "r": "99", + "s": [ + { + "value": [ + "(\n " + ] + }, + { + "r": "99", + "s": [ + { + "value": [ + "case\n " + ] + }, + { + "r": "91", + "s": [ + { + "value": [ + "when " + ] + }, + { + "r": "89", + "s": [ + { + "r": "87", + "s": [ + { + "r": "86", + "s": [ + { + "value": [ + "Order" + ] + } + ] + }, + { + "value": [ + "." + ] + }, + { + "r": "87", + "s": [ + { + "value": [ + "refills" + ] + } + ] + } + ] + }, + { + "r": "88", + "value": [ + " ", + ">", + " ", + "10" + ] + } + ] + }, + { + "r": "90", + "value": [ + " then ", + "true" + ] + } + ] + }, + { + "value": [ + "\n " + ] + }, + { + "r": "97", + "s": [ + { + "value": [ + "when " + ] + }, + { + "r": "95", + "s": [ + { + "r": "93", + "s": [ + { + "r": "92", + "s": [ + { + "value": [ + "Order" + ] + } + ] + }, + { + "value": [ + "." + ] + }, + { + "r": "93", + "s": [ + { + "value": [ + "refills" + ] + } + ] + } + ] + }, + { + "r": "94", + "value": [ + " ", + "<", + " ", + "10" + ] + } + ] + }, + { + "r": "96", + "value": [ + " then ", + "false" + ] + } + ] + }, + { + "r": "98", + "value": [ + " \n else ", + "null", + " end" + ] + } + ] + }, + { + "value": [ + "\n )" + ] + } + ] + } + ] + } + ] + }, + { + "value": [ + "\n " + ] + }, + { + "r": "102", + "s": [ + { + "value": [ + "return " + ] + }, + { + "r": "101", + "s": [ + { + "value": [ + "MedicationStrength" + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + ] + } + } + ], + "expression": { + "localId": "105", + "locator": "15:3-23:31", + "type": "Query", + "source": [ + { + "localId": "83", + "locator": "15:3-15:88", + "alias": "DigoxinOrdered", + "expression": { + "localId": "82", + "locator": "15:3-15:73", + "name": "More Than One Order", + "type": "FunctionRef", + "operand": [ + { + "localId": "6", + "locator": "15:27-15:70", + "dataType": "{urn:healthit-gov:qdm:v5_6}PositiveMedicationOrder", + "templateId": "PositiveMedicationOrder", + "codeProperty": "code", + "codeComparator": "in", + "type": "Retrieve", + "codes": { + "locator": "15:49-15:69", + "name": "Digoxin Medications", + "preserve": true, + "type": "ValueSetRef" + } + } + ] + } + } + ], + "relationship": [], + "return": { + "localId": "104", + "locator": "16:5-23:31", + "expression": { + "localId": "103", + "locator": "16:12-23:31", + "type": "Query", + "source": [ + { + "localId": "85", + "locator": "16:12-16:31", + "alias": "Order", + "expression": { + "localId": "84", + "locator": "16:12-16:25", + "name": "DigoxinOrdered", + "type": "AliasRef" + } + } + ], + "let": [ + { + "localId": "100", + "locator": "17:11-22:7", + "identifier": "MedicationStrength", + "expression": { + "localId": "99", + "locator": "17:31-22:7", + "type": "Case", + "caseItem": [ + { + "localId": "91", + "locator": "19:11-19:43", + "when": { + "localId": "89", + "locator": "19:16-19:33", + "type": "Greater", + "operand": [ + { + "localId": "87", + "locator": "19:16-19:28", + "path": "refills", + "scope": "Order", + "type": "Property" + }, + { + "localId": "88", + "locator": "19:32-19:33", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "10", + "type": "Literal" + } + ] + }, + "then": { + "localId": "90", + "locator": "19:40-19:43", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "true", + "type": "Literal" + } + }, + { + "localId": "97", + "locator": "20:11-20:44", + "when": { + "localId": "95", + "locator": "20:16-20:33", + "type": "Less", + "operand": [ + { + "localId": "93", + "locator": "20:16-20:28", + "path": "refills", + "scope": "Order", + "type": "Property" + }, + { + "localId": "94", + "locator": "20:32-20:33", + "valueType": "{urn:hl7-org:elm-types:r1}Integer", + "value": "10", + "type": "Literal" + } + ] + }, + "then": { + "localId": "96", + "locator": "20:40-20:44", + "valueType": "{urn:hl7-org:elm-types:r1}Boolean", + "value": "false", + "type": "Literal" + } } - ] + ], + "else": { + "asType": "{urn:hl7-org:elm-types:r1}Boolean", + "type": "As", + "operand": { + "localId": "98", + "locator": "21:16-21:19", + "type": "Null" + } + } } - ], - "node_type": "Query", - "ref_id": "28" + } + ], + "relationship": [], + "return": { + "localId": "102", + "locator": "23:7-23:31", + "expression": { + "localId": "101", + "locator": "23:14-23:31", + "name": "MedicationStrength", + "type": "QueryLetRef" + } } - ], - "node_type": "Query", - "ref_id": "28" + } + } + } + }, + { + "localId": "109", + "locator": "11:1-12:30", + "name": "Initial Population", + "context": "Patient", + "accessLevel": "Public", + "annotation": [ + { + "type": "Annotation", + "s": { + "r": "109", + "s": [ + { + "value": [ + "", + "define ", + "\"Initial Population\"", + ":\n " + ] + }, + { + "r": "108", + "s": [ + { + "value": [ + "exists " + ] + }, + { + "r": "107", + "s": [ + { + "value": [ + "\"test when then case\"" + ] + } + ] + } + ] + } + ] + } } ], - "ref_id": "29" + "expression": { + "localId": "108", + "locator": "12:3-12:30", + "type": "Exists", + "operand": { + "localId": "107", + "locator": "12:10-12:30", + "name": "test when then case", + "type": "ExpressionRef" + } + } } - ], - "define_name": "SOCProcedures" - }, + ] + } + } + }, + "cql": "library TestWhenCase version '0.0.008'\r\n\r\nusing QDM version '5.6'\r\n\r\nvalueset \"Digoxin Medications\": 'urn:oid:2.16.840.1.113883.3.464.1003.1065'\r\n\r\nparameter \"Measurement Period\" Interval\r\n\r\ncontext Patient\r\n\r\ndefine \"Initial Population\":\r\n exists \"test when then case\"\r\n\r\ndefine \"test when then case\":\r\n ( \"More Than One Order\"([\"Medication, Order\": \"Digoxin Medications\"]) ) DigoxinOrdered\r\n return DigoxinOrdered Order\r\n let MedicationStrength: ( case\r\n when Order.refills > 10 then true\r\n when Order.refills < 10 then false \r\n else null end\r\n )\r\n return MedicationStrength\r\n\r\ndefine function \"More Than One Order\"(Medication List<\"Medication, Order\">):\r\n \"Medication\" OrderMedication1\r\n with \"Medication\" OrderMedication2\r\n such that ( OrderMedication1.authorDatetime during \"Measurement Period\"\r\n and OrderMedication1.refills >= 1\r\n )\r\n or ( date from OrderMedication1.authorDatetime !~ date from OrderMedication2.authorDatetime\r\n and OrderMedication1.authorDatetime during \"Measurement Period\"\r\n and OrderMedication2.authorDatetime during \"Measurement Period\"\r\n )\r\n or ( date from OrderMedication1.authorDatetime ~ date from OrderMedication2.authorDatetime\r\n and OrderMedication1.authorDatetime during \"Measurement Period\"\r\n and date from start of OrderMedication1.relevantPeriod !~ date from start of OrderMedication2.relevantPeriod\r\n and start of OrderMedication1.relevantPeriod during \"Measurement Period\"\r\n and start of OrderMedication2.relevantPeriod during \"Measurement Period\"\r\n )\r\n return OrderMedication1", + "elm_annotations": { + "statements": [ { "children": [ { @@ -2118,121 +2231,89 @@ { "children": [ { - "text": "define \"SDE SOC Procedure Detail\":\n " + "text": "define function \"More Than One Order\"(Medication " } ] }, { "children": [ + { + "children": [ + { + "text": "List<" + } + ] + }, { "children": [ { "children": [ { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "\"Qualifying Encounters\"" - } - ] - } - ] - } - ], - "node_type": "ExpressionRef", - "ref_id": "20" - }, - { - "children": [ - { - "text": " Encounter" - } - ] + "text": "\"Medication, Order\"" } - ], - "ref_id": "21" + ] } - ] + ], + "ref_id": "7" }, { "children": [ { - "text": "\n " + "text": ">" } ] - }, + } + ], + "ref_id": "8" + }, + { + "children": [ + { + "text": " ):\n " + } + ] + }, + { + "children": [ { "children": [ { "children": [ - { - "text": "let " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "procedure: " - } - ] - }, { "children": [ - { - "children": [ - { - "text": "\"SOCProcedures\"(" - } - ] - }, { "children": [ { "children": [ { - "text": "Encounter" + "children": [ + { + "text": "\"Medication\"" + } + ] } ] } ], - "node_type": "AliasRef", - "ref_id": "22" + "node_type": "OperandRef", + "ref_id": "9" }, { "children": [ { - "text": ")" + "text": " OrderMedication1" } ] } ], - "node_type": "FunctionRef", - "ref_id": "30" + "ref_id": "10" } - ], - "ref_id": "31" - } - ] - }, - { - "children": [ - { - "text": "\n " - } - ] - }, - { - "children": [ + ] + }, { "children": [ { - "text": "return " + "text": "\n " } ] }, @@ -2241,19 +2322,12 @@ { "children": [ { - "text": "{\n " + "text": "with " } ] }, { "children": [ - { - "children": [ - { - "text": "id: " - } - ] - }, { "children": [ { @@ -2261,111 +2335,46 @@ { "children": [ { - "text": "Encounter" + "text": "\"Medication\"" } ] } - ], - "ref_id": "32" - }, - { - "children": [ - { - "text": "." - } ] - }, - { - "children": [ - { - "children": [ - { - "text": "id" - } - ] - } - ], - "ref_id": "33" } ], - "ref_id": "33" - } - ] - }, - { - "children": [ - { - "text": ",\n " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "code: " - } - ] + "node_type": "OperandRef", + "ref_id": "11" }, { "children": [ { - "children": [ - { - "children": [ - { - "text": "Encounter" - } - ] - } - ], - "ref_id": "34" - }, - { - "children": [ - { - "text": "." - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "code" - } - ] - } - ], - "ref_id": "35" + "text": " OrderMedication2" } - ], - "ref_id": "35" + ] } - ] + ], + "ref_id": "12" }, { "children": [ { - "text": ",\n " + "text": "\n such that " } ] }, { "children": [ - { - "children": [ - { - "text": "procedures: " - } - ] - }, { "children": [ { "children": [ + { + "children": [ + { + "text": "( " + } + ] + }, { "children": [ { @@ -2375,32 +2384,144 @@ { "children": [ { - "text": "procedure" + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "ref_id": "13" + }, + { + "children": [ + { + "text": "." } ] + }, + { + "children": [ + { + "children": [ + { + "text": "authorDatetime" + } + ] + } + ], + "node_type": "Property", + "ref_id": "14" } - ] + ], + "node_type": "Property", + "ref_id": "14" + }, + { + "children": [ + { + "text": " during " + } + ], + "node_type": "In", + "ref_id": "16" + }, + { + "children": [ + { + "children": [ + { + "text": "\"Measurement Period\"" + } + ] + } + ], + "node_type": "ParameterRef", + "ref_id": "15" } ], - "node_type": "QueryLetRef", - "ref_id": "36" + "node_type": "In", + "ref_id": "16" }, { "children": [ { - "text": " P" + "text": "\n and " } ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "ref_id": "17" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "refills" + } + ] + } + ], + "node_type": "Property", + "ref_id": "18" + } + ], + "node_type": "Property", + "ref_id": "18" + }, + { + "children": [ + { + "text": " >= 1" + } + ], + "node_type": "Literal", + "ref_id": "19" + } + ], + "node_type": "GreaterOrEqual", + "ref_id": "20" } ], - "ref_id": "37" + "node_type": "And", + "ref_id": "21" + }, + { + "children": [ + { + "text": "\n )" + } + ] } - ] + ], + "node_type": "And", + "ref_id": "21" }, { "children": [ { - "text": "\n " + "text": "\n or " } ] }, @@ -2409,7 +2530,7 @@ { "children": [ { - "text": "return " + "text": "( " } ] }, @@ -2418,16 +2539,124 @@ { "children": [ { - "text": "{\n " - } - ] - }, - { - "children": [ + "children": [ + { + "children": [ + { + "children": [ + { + "text": "date from " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "ref_id": "22" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "authorDatetime" + } + ] + } + ], + "node_type": "Property", + "ref_id": "23" + } + ], + "node_type": "Property", + "ref_id": "23" + } + ], + "node_type": "DateFrom", + "ref_id": "24" + }, + { + "children": [ + { + "text": " !~ " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "date from " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "OrderMedication2" + } + ] + } + ], + "ref_id": "25" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "authorDatetime" + } + ] + } + ], + "node_type": "Property", + "ref_id": "26" + } + ], + "node_type": "Property", + "ref_id": "26" + } + ], + "node_type": "DateFrom", + "ref_id": "27" + } + ], + "node_type": "Not", + "ref_id": "29" + }, { "children": [ { - "text": "code: " + "text": "\n and " } ] }, @@ -2436,19 +2665,75 @@ { "children": [ { - "text": "P" + "children": [ + { + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "ref_id": "30" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "authorDatetime" + } + ] + } + ], + "node_type": "Property", + "ref_id": "31" + } + ], + "node_type": "Property", + "ref_id": "31" + }, + { + "children": [ + { + "text": " during " } - ] + ], + "node_type": "In", + "ref_id": "33" + }, + { + "children": [ + { + "children": [ + { + "text": "\"Measurement Period\"" + } + ] + } + ], + "node_type": "ParameterRef", + "ref_id": "32" } ], - "ref_id": "38" + "node_type": "In", + "ref_id": "33" } - ] + ], + "node_type": "And", + "ref_id": "34" }, { "children": [ { - "text": ",\n " + "text": "\n and " } ] }, @@ -2457,30 +2742,179 @@ { "children": [ { - "text": "SOCCategory: " + "children": [ + { + "children": [ + { + "text": "OrderMedication2" + } + ] + } + ], + "ref_id": "35" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "authorDatetime" + } + ] + } + ], + "node_type": "Property", + "ref_id": "36" + } + ], + "node_type": "Property", + "ref_id": "36" + }, + { + "children": [ + { + "text": " during " } - ] + ], + "node_type": "In", + "ref_id": "38" }, { "children": [ { "children": [ { - "text": "case\n " + "text": "\"Measurement Period\"" } ] - }, + } + ], + "node_type": "ParameterRef", + "ref_id": "37" + } + ], + "node_type": "In", + "ref_id": "38" + } + ], + "node_type": "And", + "ref_id": "39" + }, + { + "children": [ + { + "text": "\n )" + } + ] + } + ], + "node_type": "And", + "ref_id": "39" + } + ], + "node_type": "Or", + "ref_id": "40" + }, + { + "children": [ + { + "text": "\n or " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "( " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ { "children": [ { "children": [ { - "text": "when " + "children": [ + { + "text": "date from " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "ref_id": "41" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "authorDatetime" + } + ] + } + ], + "node_type": "Property", + "ref_id": "42" + } + ], + "node_type": "Property", + "ref_id": "42" + } + ], + "node_type": "DateFrom", + "ref_id": "43" + }, + { + "children": [ + { + "text": " ~ " } ] }, { "children": [ + { + "children": [ + { + "text": "date from " + } + ] + }, { "children": [ { @@ -2488,12 +2922,12 @@ { "children": [ { - "text": "P" + "text": "OrderMedication2" } ] } ], - "ref_id": "39" + "ref_id": "44" }, { "children": [ @@ -2507,20 +2941,53 @@ { "children": [ { - "text": "code" + "text": "authorDatetime" } ] } ], - "ref_id": "40" + "node_type": "Property", + "ref_id": "45" } ], - "ref_id": "40" + "node_type": "Property", + "ref_id": "45" + } + ], + "node_type": "DateFrom", + "ref_id": "46" + } + ], + "node_type": "Equivalent", + "ref_id": "47" + }, + { + "children": [ + { + "text": "\n and " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "ref_id": "48" }, { "children": [ { - "text": " in " + "text": "." } ] }, @@ -2529,56 +2996,75 @@ { "children": [ { - "text": "\"Blood Transfusion\"" + "text": "authorDatetime" } ] } ], - "ref_id": "41" + "node_type": "Property", + "ref_id": "49" } ], - "ref_id": "42" + "node_type": "Property", + "ref_id": "49" }, { "children": [ { - "text": " then " + "text": " during " } - ] + ], + "node_type": "In", + "ref_id": "51" }, { "children": [ { "children": [ { - "text": "'Blood Transfusion'" + "text": "\"Measurement Period\"" } ] } ], - "ref_id": "43" + "node_type": "ParameterRef", + "ref_id": "50" } ], - "ref_id": "44" - }, + "node_type": "In", + "ref_id": "51" + } + ], + "node_type": "And", + "ref_id": "52" + }, + { + "children": [ { - "children": [ - { - "text": "\n " - } - ] - }, + "text": "\n and " + } + ] + }, + { + "children": [ { "children": [ { "children": [ { - "text": "when " + "text": "date from " } ] }, { "children": [ + { + "children": [ + { + "text": "start of " + } + ] + }, { "children": [ { @@ -2586,12 +3072,12 @@ { "children": [ { - "text": "P" + "text": "OrderMedication1" } ] } ], - "ref_id": "45" + "ref_id": "53" }, { "children": [ @@ -2605,64 +3091,30 @@ { "children": [ { - "text": "code" + "text": "relevantPeriod" } ] } ], - "ref_id": "46" - } - ], - "ref_id": "46" - }, - { - "children": [ - { - "text": " in " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "\"Conversion of Cardiac Rhythm\"" - } - ] + "node_type": "Property", + "ref_id": "54" } ], - "ref_id": "47" - } - ], - "ref_id": "48" - }, - { - "children": [ - { - "text": " then " - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "'Conversion of cardiac rhythm'" - } - ] + "node_type": "Property", + "ref_id": "54" } ], - "ref_id": "49" + "node_type": "Start", + "ref_id": "55" } ], - "ref_id": "50" + "node_type": "DateFrom", + "ref_id": "56" }, { "children": [ { - "text": "\n " + "text": " !~ " } ] }, @@ -2671,12 +3123,19 @@ { "children": [ { - "text": "when " + "text": "date from " } ] }, { "children": [ + { + "children": [ + { + "text": "start of " + } + ] + }, { "children": [ { @@ -2684,12 +3143,12 @@ { "children": [ { - "text": "P" + "text": "OrderMedication2" } ] } ], - "ref_id": "51" + "ref_id": "57" }, { "children": [ @@ -2703,140 +3162,501 @@ { "children": [ { - "text": "code" + "text": "relevantPeriod" } ] } ], - "ref_id": "52" + "node_type": "Property", + "ref_id": "58" } ], - "ref_id": "52" - }, + "node_type": "Property", + "ref_id": "58" + } + ], + "node_type": "Start", + "ref_id": "59" + } + ], + "node_type": "DateFrom", + "ref_id": "60" + } + ], + "node_type": "Not", + "ref_id": "62" + } + ], + "node_type": "And", + "ref_id": "63" + }, + { + "children": [ + { + "text": "\n and " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "start of " + } + ] + }, + { + "children": [ + { + "children": [ { "children": [ { - "text": " in " + "text": "OrderMedication1" } ] - }, + } + ], + "ref_id": "64" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ { "children": [ { - "children": [ - { - "text": "\"Hysterectomy\"" - } - ] + "text": "relevantPeriod" } - ], - "ref_id": "53" + ] } ], - "ref_id": "54" - }, + "node_type": "Property", + "ref_id": "65" + } + ], + "node_type": "Property", + "ref_id": "65" + } + ], + "node_type": "Start", + "ref_id": "66" + }, + { + "children": [ + { + "text": " during " + } + ], + "node_type": "In", + "ref_id": "68" + }, + { + "children": [ + { + "children": [ + { + "text": "\"Measurement Period\"" + } + ] + } + ], + "node_type": "ParameterRef", + "ref_id": "67" + } + ], + "node_type": "In", + "ref_id": "68" + } + ], + "node_type": "And", + "ref_id": "69" + }, + { + "children": [ + { + "text": "\n and " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "start of " + } + ] + }, + { + "children": [ + { + "children": [ { "children": [ { - "text": " then " + "text": "OrderMedication2" } ] - }, + } + ], + "ref_id": "70" + }, + { + "children": [ + { + "text": "." + } + ] + }, + { + "children": [ { "children": [ { - "children": [ - { - "text": "'Hysterectomy'" - } - ] + "text": "relevantPeriod" } - ], - "ref_id": "55" + ] } ], - "ref_id": "56" - }, + "node_type": "Property", + "ref_id": "71" + } + ], + "node_type": "Property", + "ref_id": "71" + } + ], + "node_type": "Start", + "ref_id": "72" + }, + { + "children": [ + { + "text": " during " + } + ], + "node_type": "In", + "ref_id": "74" + }, + { + "children": [ + { + "children": [ + { + "text": "\"Measurement Period\"" + } + ] + } + ], + "node_type": "ParameterRef", + "ref_id": "73" + } + ], + "node_type": "In", + "ref_id": "74" + } + ], + "node_type": "And", + "ref_id": "75" + }, + { + "children": [ + { + "text": "\n )" + } + ] + } + ], + "node_type": "And", + "ref_id": "75" + } + ], + "node_type": "Or", + "ref_id": "76" + } + ], + "ref_id": "77" + }, + { + "children": [ + { + "text": "\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "return " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "OrderMedication1" + } + ] + } + ], + "node_type": "AliasRef", + "ref_id": "78" + } + ], + "ref_id": "79" + } + ], + "node_type": "Query", + "ref_id": "80" + } + ], + "node_type": "Query", + "ref_id": "80" + } + ], + "ref_id": "81" + } + ], + "define_name": "More Than One Order" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "define \"test when then case\":\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "( " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "\"More Than One Order\"(" + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "[\"Medication, Order\": " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "\"Digoxin Medications\"" + } + ] + } + ] + }, + { + "children": [ + { + "text": "]" + } + ] + } + ], + "node_type": "Retrieve", + "ref_id": "6" + }, + { + "children": [ + { + "text": ")" + } + ] + } + ], + "node_type": "FunctionRef", + "ref_id": "82" + }, + { + "children": [ + { + "text": " )" + } + ] + } + ], + "node_type": "FunctionRef", + "ref_id": "82" + }, + { + "children": [ + { + "text": " DigoxinOrdered" + } + ] + } + ], + "ref_id": "83" + } + ] + }, + { + "children": [ + { + "text": "\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "return " + } + ] + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "DigoxinOrdered" + } + ] + } + ] + } + ], + "node_type": "AliasRef", + "ref_id": "84" + }, + { + "children": [ + { + "text": " Order" + } + ] + } + ], + "ref_id": "85" + } + ] + }, + { + "children": [ + { + "text": "\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "let " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "MedicationStrength: " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "(\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "case\n " + } + ] + }, + { + "children": [ + { + "children": [ { - "children": [ - { - "text": "\n " - } - ] - }, + "text": "when " + } + ] + }, + { + "children": [ { "children": [ { "children": [ - { - "text": "when " - } - ] - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "P" - } - ] - } - ], - "ref_id": "57" - }, - { - "children": [ - { - "text": "." - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "code" - } - ] - } - ], - "ref_id": "58" - } - ], - "ref_id": "58" - }, { "children": [ { - "text": " in " + "text": "Order" } ] - }, - { - "children": [ - { - "children": [ - { - "text": "\"Tracheostomy\"" - } - ] - } - ], - "ref_id": "59" } ], - "ref_id": "60" + "ref_id": "86" }, { "children": [ { - "text": " then " + "text": "." } ] }, @@ -2845,96 +3665,77 @@ { "children": [ { - "text": "'Tracheostomy'" + "text": "refills" } ] } ], - "ref_id": "61" + "node_type": "Property", + "ref_id": "87" } ], - "ref_id": "62" + "node_type": "Property", + "ref_id": "87" }, { "children": [ { - "text": "\n " + "text": " > 10" } - ] - }, + ], + "node_type": "Literal", + "ref_id": "88" + } + ], + "ref_id": "89" + }, + { + "children": [ + { + "text": " then true" + } + ], + "ref_id": "90" + } + ], + "ref_id": "91" + }, + { + "children": [ + { + "text": "\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "when " + } + ] + }, + { + "children": [ { "children": [ { "children": [ - { - "text": "when " - } - ] - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "children": [ - { - "text": "P" - } - ] - } - ], - "ref_id": "63" - }, - { - "children": [ - { - "text": "." - } - ] - }, - { - "children": [ - { - "children": [ - { - "text": "code" - } - ] - } - ], - "ref_id": "64" - } - ], - "ref_id": "64" - }, { "children": [ { - "text": " in " + "text": "Order" } ] - }, - { - "children": [ - { - "children": [ - { - "text": "\"Ventilation\"" - } - ] - } - ], - "ref_id": "65" } ], - "ref_id": "66" + "ref_id": "92" }, { "children": [ { - "text": " then " + "text": "." } ] }, @@ -2943,108 +3744,198 @@ { "children": [ { - "text": "'Ventilation'" + "text": "refills" } ] } ], - "ref_id": "67" + "node_type": "Property", + "ref_id": "93" } ], - "ref_id": "68" + "node_type": "Property", + "ref_id": "93" }, { "children": [ { - "text": " \n else null end" + "text": " < 10" } ], - "node_type": "Null", - "ref_id": "69" + "node_type": "Literal", + "ref_id": "94" + } + ], + "ref_id": "95" + }, + { + "children": [ + { + "text": " then false" } ], - "ref_id": "70" + "ref_id": "96" } - ] + ], + "ref_id": "97" }, { "children": [ { - "text": "\n }" + "text": " \n else null end" } - ] + ], + "node_type": "Null", + "ref_id": "98" } ], - "node_type": "Tuple", - "ref_id": "71" + "node_type": "Case", + "ref_id": "99" + }, + { + "children": [ + { + "text": "\n )" + } + ] } ], - "ref_id": "72" + "node_type": "Case", + "ref_id": "99" } ], - "ref_id": "73" + "ref_id": "100" } ] }, { "children": [ { - "text": "\n }" + "text": "\n " } ] + }, + { + "children": [ + { + "children": [ + { + "text": "return " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "MedicationStrength" + } + ] + } + ], + "node_type": "QueryLetRef", + "ref_id": "101" + } + ], + "ref_id": "102" } ], - "node_type": "Tuple", - "ref_id": "74" + "node_type": "Query", + "ref_id": "103" } ], - "ref_id": "75" + "ref_id": "104" } ], "node_type": "Query", - "ref_id": "76" + "ref_id": "105" + } + ], + "ref_id": "106" + } + ], + "define_name": "test when then case" + }, + { + "children": [ + { + "children": [ + { + "children": [ + { + "text": "define \"Initial Population\":\n " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "exists " + } + ] + }, + { + "children": [ + { + "children": [ + { + "text": "\"test when then case\"" + } + ] + } + ], + "node_type": "ExpressionRef", + "ref_id": "107" + } + ], + "node_type": "Exists", + "ref_id": "108" } ], - "ref_id": "77" + "ref_id": "109" } ], - "define_name": "SDE SOC Procedure Detail" + "define_name": "Initial Population" } ], "identifier": { "id": "TestWhenCase", - "version": "0.0.001" + "version": "0.0.008" } }, "statement_dependencies": [ { - "_id": "65ba97456068b16c755ed92a", + "_id": "65c4ea736068b11663b7481e", "statement_name": "Patient", "statement_references": [] }, { - "_id": "65ba97456068b16c755ed92b", - "statement_name": "Qualifying Encounters", - "statement_references": [] - }, - { - "_id": "65ba97456068b16c755ed92c", - "statement_name": "SOCProcedures", + "_id": "65c4ea736068b11663b7481f", + "statement_name": "More Than One Order", "statement_references": [] }, { - "_id": "65ba97456068b16c755ed92d", - "statement_name": "SDE SOC Procedure Detail", + "_id": "65c4ea736068b11663b74820", + "statement_name": "test when then case", "statement_references": [ { - "_id": "65ba97456068b16c755ed92e", + "_id": "65c4ea736068b11663b74821", "library_name": "TestWhenCase", - "statement_name": "Qualifying Encounters" - }, + "statement_name": "More Than One Order" + } + ] + }, + { + "_id": "65c4ea736068b11663b74822", + "statement_name": "Initial Population", + "statement_references": [ { - "_id": "65ba97456068b16c755ed92f", + "_id": "65c4ea736068b11663b74823", "library_name": "TestWhenCase", - "statement_name": "SOCProcedures" + "statement_name": "test when then case" } ] } @@ -3053,17 +3944,17 @@ ], "population_sets": [ { - "_id": "65ba97456068b16c755ed933", + "_id": "65c4ea736068b11663b74825", "title": "Population Criteria Section", "population_set_id": "PopulationSet_1", "populations": { - "_id": "65ba97456068b16c755ed934", + "_id": "65c4ea736068b11663b74826", "_type": "CQM::CohortPopulationMap", "IPP": { - "_id": "65ba97456068b16c755ed935", + "_id": "65c4ea736068b11663b74827", "library_name": "TestWhenCase", - "statement_name": "SDE SOC Procedure Detail", - "hqmf_id": "9C288484-8902-4099-9751-EB420FE57F23" + "statement_name": "Initial Population", + "hqmf_id": "8507F30A-36AB-4B77-9C71-EB6BF7ECCD30" } }, "stratifications": [], @@ -3071,4 +3962,4 @@ "observations": [] } ] -} +} \ No newline at end of file diff --git a/spec/fixtures/json/cqm_measures/Case_When_Test/value_sets.json b/spec/fixtures/json/cqm_measures/Case_When_Test/value_sets.json index 377856e..f4ba4de 100644 --- a/spec/fixtures/json/cqm_measures/Case_When_Test/value_sets.json +++ b/spec/fixtures/json/cqm_measures/Case_When_Test/value_sets.json @@ -1,2126 +1,65 @@ [ { - "_id": "65ba97456068b16c755ed920", + "_id": "65c4ea736068b11663b7481a", "concepts": [ { - "_id": "65ba97456068b16c755ed936", - "code": "11397000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Autotransfusion of whole blood (procedure)", + "_id": "65c4ea736068b11663b74828", + "code": "104208", + "code_system_name": "RXNORM", + "code_system_oid": "2.16.840.1.113883.6.88", + "code_system_version": "2024-01", + "display_name": "2 ML digoxin 0.25 MG/ML Injection", "hasLongDisplayName": false }, { - "_id": "65ba97456068b16c755ed937", - "code": "116788004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of albumin (procedure)", + "_id": "65c4ea736068b11663b74829", + "code": "197604", + "code_system_name": "RXNORM", + "code_system_oid": "2.16.840.1.113883.6.88", + "code_system_version": "2024-01", + "display_name": "digoxin 0.125 MG Oral Tablet", "hasLongDisplayName": false }, { - "_id": "65ba97456068b16c755ed938", - "code": "116795008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of cryoprecipitate (procedure)", + "_id": "65c4ea736068b11663b7482a", + "code": "197606", + "code_system_name": "RXNORM", + "code_system_oid": "2.16.840.1.113883.6.88", + "code_system_version": "2024-01", + "display_name": "digoxin 0.25 MG Oral Tablet", "hasLongDisplayName": false }, { - "_id": "65ba97456068b16c755ed939", - "code": "116797000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of factor IX (procedure)", + "_id": "65c4ea736068b11663b7482b", + "code": "204504", + "code_system_name": "RXNORM", + "code_system_oid": "2.16.840.1.113883.6.88", + "code_system_version": "2024-01", + "display_name": "1 ML digoxin 0.1 MG/ML Injection", "hasLongDisplayName": false }, { - "_id": "65ba97456068b16c755ed93a", - "code": "116798005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of factor VII (procedure)", + "_id": "65c4ea736068b11663b7482c", + "code": "245273", + "code_system_name": "RXNORM", + "code_system_oid": "2.16.840.1.113883.6.88", + "code_system_version": "2024-01", + "display_name": "digoxin 0.0625 MG Oral Tablet", "hasLongDisplayName": false }, { - "_id": "65ba97456068b16c755ed93b", - "code": "116808005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of cryo-poor plasma (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed93c", - "code": "116810007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of plateletpheresis product (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed93d", - "code": "116861002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of fresh frozen plasma (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed93e", - "code": "116863004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of red blood cells (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed93f", - "code": "117078000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of platelet concentrate (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed940", - "code": "12719002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Platelet transfusion (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed941", - "code": "13569004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of plasma (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed942", - "code": "180206004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Intra-arterial blood transfusion (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed943", - "code": "180207008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Intravenous blood transfusion of packed cells (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed944", - "code": "180208003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Intravenous blood transfusion of platelets (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed945", - "code": "19647005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Therapeutic plasmapheresis using plasma as the major replacement fluid (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed946", - "code": "225284006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusing whole blood under pressure (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed947", - "code": "274501008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Serum transfusion (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed948", - "code": "274502001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Antihemophilic factor transfusion (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed949", - "code": "288170000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Packed blood cell transfusion (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed94a", - "code": "30233H0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Whole Blood into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed94b", - "code": "30233H1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Whole Blood into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed94c", - "code": "30233J0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Serum Albumin into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed94d", - "code": "30233J1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Serum Albumin into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed94e", - "code": "30233K0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Frozen Plasma into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed94f", - "code": "30233K1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Frozen Plasma into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed950", - "code": "30233L0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Fresh Plasma into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed951", - "code": "30233L1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Fresh Plasma into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed952", - "code": "30233M0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Plasma Cryoprecipitate into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed953", - "code": "30233M1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Plasma Cryoprecipitate into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed954", - "code": "30233N0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Red Blood Cells into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed955", - "code": "30233N1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Red Blood Cells into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed956", - "code": "30233P0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Frozen Red Cells into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed957", - "code": "30233P1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Frozen Red Cells into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed958", - "code": "30233Q0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous White Cells into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed959", - "code": "30233Q1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous White Cells into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed95a", - "code": "30233R0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Platelets into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed95b", - "code": "30233R1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Platelets into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed95c", - "code": "30233S0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Globulin into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed95d", - "code": "30233S1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Globulin into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed95e", - "code": "30233T0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Fibrinogen into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed95f", - "code": "30233T1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Fibrinogen into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed960", - "code": "30233V0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Antihemophilic Factors into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed961", - "code": "30233V1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Antihemophilic Factors into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed962", - "code": "30233W0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Factor IX into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed963", - "code": "30233W1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Factor IX into Peripheral Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed964", - "code": "30243H0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Whole Blood into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed965", - "code": "30243H1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Whole Blood into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed966", - "code": "30243J0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Serum Albumin into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed967", - "code": "30243J1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Serum Albumin into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed968", - "code": "30243K0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Frozen Plasma into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed969", - "code": "30243K1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Frozen Plasma into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed96a", - "code": "30243L0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Fresh Plasma into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed96b", - "code": "30243L1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Fresh Plasma into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed96c", - "code": "30243M0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Plasma Cryoprecipitate into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed96d", - "code": "30243M1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Plasma Cryoprecipitate into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed96e", - "code": "30243N0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Red Blood Cells into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed96f", - "code": "30243N1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Red Blood Cells into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed970", - "code": "30243P0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Frozen Red Cells into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed971", - "code": "30243P1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Frozen Red Cells into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed972", - "code": "30243Q0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous White Cells into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed973", - "code": "30243Q1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous White Cells into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed974", - "code": "30243R0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Platelets into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed975", - "code": "30243R1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Platelets into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed976", - "code": "30243S0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Globulin into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed977", - "code": "30243S1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Globulin into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed978", - "code": "30243T0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Fibrinogen into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed979", - "code": "30243T1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Fibrinogen into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed97a", - "code": "30243V0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Antihemophilic Factors into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed97b", - "code": "30243V1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Antihemophilic Factors into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed97c", - "code": "30243W0", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Autologous Factor IX into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed97d", - "code": "30243W1", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Transfusion of Nonautologous Factor IX into Central Vein, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed97e", - "code": "33389009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of whole blood (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed97f", - "code": "35108008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of leukocytes (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed980", - "code": "425513008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of leucoreduced red blood cells (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed981", - "code": "425524005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion antithrombin III factor (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed982", - "code": "426290002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of washed red blood cells (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed983", - "code": "426518006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of granulocytes (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed984", - "code": "449017001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Autologous transfusion of blood components (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed985", - "code": "54790000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of blood component (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed986", - "code": "71493000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of packed red blood cells (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed987", - "code": "74287006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transfusion of coagulation factors (procedure)", - "hasLongDisplayName": false - } - ], - "display_name": "Blood Transfusion", - "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113762.1.4.1029.213", - "version": "Draft" - }, - { - "_id": "65ba97456068b16c755ed921", - "concepts": [ - { - "_id": "65ba97456068b16c755ed988", - "code": "250041003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Conversion of cardiac rhythm to sinus rhythm (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed989", - "code": "5A12012", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Performance of Cardiac Output, Single, Manual", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed98a", - "code": "5A2204Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Restoration of Cardiac Rhythm, Single", - "hasLongDisplayName": false - } - ], - "display_name": "Conversion of Cardiac Rhythm", - "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113762.1.4.1029.357", - "version": "Draft" - }, - { - "_id": "65ba97456068b16c755ed922", - "concepts": [ - { - "_id": "65ba97456068b16c755ed98b", - "code": "183452005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Emergency hospital admission (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed98c", - "code": "32485007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hospital admission (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed98d", - "code": "8715000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hospital admission, elective (procedure)", - "hasLongDisplayName": false - } - ], - "display_name": "Encounter Inpatient", - "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113883.3.666.5.307", - "version": "Draft" - }, - { - "_id": "65ba97456068b16c755ed923", - "concepts": [ - { - "_id": "65ba97456068b16c755ed98e", - "code": "0UT90ZZ", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Resection of Uterus, Open Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed98f", - "code": "0UT97ZL", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Resection of Uterus, Supracervical, Via Natural or Artificial Opening", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed990", - "code": "0UT97ZZ", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Resection of Uterus, Via Natural or Artificial Opening", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed991", - "code": "11050006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Closure of vesicouterine fistula with hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed992", - "code": "112918004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with colpo-urethrocystopexy, Marshall-Marchetti-Krantz type (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed993", - "code": "116140006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed994", - "code": "116141005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed995", - "code": "116142003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Radical hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed996", - "code": "116143008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed997", - "code": "116144002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total abdominal hysterectomy with bilateral salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed998", - "code": "13254001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy with colpo-urethrocystopexy, Marshall-Marchetti-Krantz type (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed999", - "code": "176795006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Subtotal abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed99a", - "code": "176873000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transcervical resection endometrium (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed99b", - "code": "17744000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Subtotal hysterectomy after cesarean delivery (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed99c", - "code": "236886002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed99d", - "code": "236897002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Endometrial resection (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed99e", - "code": "236906003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Excision of rudimentary uterine horn (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed99f", - "code": "236987005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Emergency cesarean hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a0", - "code": "265056007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a1", - "code": "27185000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with partial colpectomy and repair of enterocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a2", - "code": "288042004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysterectomy and fetus removal (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a3", - "code": "288043009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysterectomy in pregnancy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a4", - "code": "29529008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Supracervical hysterectomy with removal of both tubes and ovaries (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a5", - "code": "30160001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with total colpectomy and repair of enterocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a6", - "code": "302190000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy and right salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a7", - "code": "302191001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy and left salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a8", - "code": "307771009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Radical abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9a9", - "code": "309879006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterocolpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9aa", - "code": "309880009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterocolpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ab", - "code": "31191000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Excision of septum of uterus (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ac", - "code": "35955002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Radical vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ad", - "code": "359971002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Ward-Mayo operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ae", - "code": "359974005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Tuffier operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9af", - "code": "359977003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Mayo operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b0", - "code": "359980002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal panhysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b1", - "code": "359983000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Heaney operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b2", - "code": "387643005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Partial hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b3", - "code": "387644004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Supracervical hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b4", - "code": "387646002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Uterine fundectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b5", - "code": "41059002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Cesarean hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b6", - "code": "413144006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy with conservation of ovaries (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b7", - "code": "413145007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with conservation of ovaries (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b8", - "code": "431316002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic subtotal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9b9", - "code": "43791001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with total colpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ba", - "code": "441820006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopy assisted vaginal hysterectomy with bilateral salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9bb", - "code": "446446002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total abdominal hysterectomy and removal of vaginal cuff (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9bc", - "code": "447771005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy and excision of periuterine tissue (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9bd", - "code": "448539002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy and excision of periuterine tissue (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9be", - "code": "49493009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Resection of cornua of bilateral fallopian tubes (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9bf", - "code": "54130005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysteroscopy with resection of intrauterine septum (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c0", - "code": "54490004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with repair of enterocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c1", - "code": "608805000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic assisted vaginal hysterectomy with repair of cystocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c2", - "code": "608806004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic assisted vaginal hysterectomy with repair of rectocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c3", - "code": "608807008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic assisted vaginal hysterectomy with repair of cystocele and rectocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c4", - "code": "63516002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with colpo-urethrocystopexy, Pereyra type (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c5", - "code": "699789005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with repair of cystocele and rectocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c6", - "code": "708985003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic vaginal hysterectomy using robotic assistance (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c7", - "code": "713157005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic resection of uterine cornua (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c8", - "code": "75835007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic-assisted vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9c9", - "code": "77902002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with partial colpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ca", - "code": "86477000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total hysterectomy with removal of both tubes and ovaries (procedure)", - "hasLongDisplayName": false - } - ], - "display_name": "Hysterectomy", - "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113762.1.4.1029.358", - "version": "Draft" - }, - { - "_id": "65ba97456068b16c755ed924", - "concepts": [ - { - "_id": "65ba97456068b16c755ed9cb", - "code": "0B110F4", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Bypass Trachea to Cutaneous with Tracheostomy Device, Open Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9cc", - "code": "0B113F4", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Bypass Trachea to Cutaneous with Tracheostomy Device, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9cd", - "code": "0B114F4", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Bypass Trachea to Cutaneous with Tracheostomy Device, Percutaneous Endoscopic Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ce", - "code": "0UT90ZZ", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Resection of Uterus, Open Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9cf", - "code": "0UT97ZL", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Resection of Uterus, Supracervical, Via Natural or Artificial Opening", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d0", - "code": "0UT97ZZ", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Resection of Uterus, Via Natural or Artificial Opening", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d1", - "code": "11050006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Closure of vesicouterine fistula with hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d2", - "code": "112918004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with colpo-urethrocystopexy, Marshall-Marchetti-Krantz type (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d3", - "code": "116140006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d4", - "code": "116141005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d5", - "code": "116142003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Radical hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d6", - "code": "116143008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d7", - "code": "116144002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total abdominal hysterectomy with bilateral salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d8", - "code": "13254001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy with colpo-urethrocystopexy, Marshall-Marchetti-Krantz type (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9d9", - "code": "176795006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Subtotal abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9da", - "code": "176873000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Transcervical resection endometrium (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9db", - "code": "17744000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Subtotal hysterectomy after cesarean delivery (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9dc", - "code": "236886002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9dd", - "code": "236897002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Endometrial resection (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9de", - "code": "236906003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Excision of rudimentary uterine horn (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9df", - "code": "236987005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Emergency cesarean hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e0", - "code": "250041003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Conversion of cardiac rhythm to sinus rhythm (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e1", - "code": "265056007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e2", - "code": "27185000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with partial colpectomy and repair of enterocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e3", - "code": "288042004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysterectomy and fetus removal (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e4", - "code": "288043009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysterectomy in pregnancy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e5", - "code": "29529008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Supracervical hysterectomy with removal of both tubes and ovaries (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e6", - "code": "30160001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with total colpectomy and repair of enterocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e7", - "code": "302190000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy and right salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e8", - "code": "302191001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy and left salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9e9", - "code": "307771009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Radical abdominal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ea", - "code": "309879006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterocolpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9eb", - "code": "309880009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterocolpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ec", - "code": "31191000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Excision of septum of uterus (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ed", - "code": "35955002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Radical vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ee", - "code": "359971002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Ward-Mayo operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ef", - "code": "359974005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Tuffier operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f0", - "code": "359977003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Mayo operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f1", - "code": "359980002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal panhysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f2", - "code": "359983000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Heaney operation for vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f3", - "code": "387643005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Partial hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f4", - "code": "387644004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Supracervical hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f5", - "code": "387646002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Uterine fundectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f6", - "code": "41059002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Cesarean hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f7", - "code": "413144006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy with conservation of ovaries (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f8", - "code": "413145007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with conservation of ovaries (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9f9", - "code": "431316002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic subtotal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9fa", - "code": "43791001", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with total colpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9fb", - "code": "43988005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Temporary tracheostomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9fc", - "code": "441820006", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopy assisted vaginal hysterectomy with bilateral salpingo-oophorectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9fd", - "code": "446446002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total abdominal hysterectomy and removal of vaginal cuff (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9fe", - "code": "447771005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Abdominal hysterectomy and excision of periuterine tissue (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755ed9ff", - "code": "448539002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy and excision of periuterine tissue (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda00", - "code": "47545007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Continuous positive airway pressure ventilation treatment (regime/therapy)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda01", - "code": "49493009", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Resection of cornua of bilateral fallopian tubes (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda02", - "code": "54130005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Hysteroscopy with resection of intrauterine septum (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda03", - "code": "54490004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with repair of enterocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda04", - "code": "5A12012", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Performance of Cardiac Output, Single, Manual", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda05", - "code": "5A1935Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Respiratory Ventilation, Less than 24 Consecutive Hours", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda06", - "code": "5A1945Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Respiratory Ventilation, 24-96 Consecutive Hours", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda07", - "code": "5A1955Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Respiratory Ventilation, Greater than 96 Consecutive Hours", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda08", - "code": "5A2204Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Restoration of Cardiac Rhythm, Single", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda09", - "code": "608805000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic assisted vaginal hysterectomy with repair of cystocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda0a", - "code": "608806004", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic assisted vaginal hysterectomy with repair of rectocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda0b", - "code": "608807008", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic assisted vaginal hysterectomy with repair of cystocele and rectocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda0c", - "code": "63516002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with colpo-urethrocystopexy, Pereyra type (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda0d", - "code": "699789005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with repair of cystocele and rectocele (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda0e", - "code": "708985003", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic vaginal hysterectomy using robotic assistance (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda0f", - "code": "713157005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic resection of uterine cornua (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda10", - "code": "75835007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Laparoscopic-assisted vaginal hysterectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda11", - "code": "77902002", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Vaginal hysterectomy with partial colpectomy (procedure)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda12", - "code": "86477000", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Total hysterectomy with removal of both tubes and ovaries (procedure)", - "hasLongDisplayName": false - } - ], - "display_name": "Severe Maternal Morbidity Procedures", - "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113762.1.4.1029.256", - "version": "Draft" - }, - { - "_id": "65ba97456068b16c755ed925", - "concepts": [ - { - "_id": "65ba97456068b16c755eda13", - "code": "0B110F4", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Bypass Trachea to Cutaneous with Tracheostomy Device, Open Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda14", - "code": "0B113F4", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Bypass Trachea to Cutaneous with Tracheostomy Device, Percutaneous Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda15", - "code": "0B114F4", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Bypass Trachea to Cutaneous with Tracheostomy Device, Percutaneous Endoscopic Approach", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda16", - "code": "43988005", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Temporary tracheostomy (procedure)", - "hasLongDisplayName": false - } - ], - "display_name": "Tracheostomy", - "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113762.1.4.1029.359", - "version": "Draft" - }, - { - "_id": "65ba97456068b16c755ed926", - "concepts": [ - { - "_id": "65ba97456068b16c755eda17", - "code": "47545007", - "code_system_name": "SNOMEDCT", - "code_system_oid": "2.16.840.1.113883.6.96", - "code_system_version": "2023-09", - "display_name": "Continuous positive airway pressure ventilation treatment (regime/therapy)", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda18", - "code": "5A1935Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Respiratory Ventilation, Less than 24 Consecutive Hours", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda19", - "code": "5A1945Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Respiratory Ventilation, 24-96 Consecutive Hours", - "hasLongDisplayName": false - }, - { - "_id": "65ba97456068b16c755eda1a", - "code": "5A1955Z", - "code_system_name": "ICD10PCS", - "code_system_oid": "2.16.840.1.113883.6.4", - "code_system_version": "2024", - "display_name": "Respiratory Ventilation, Greater than 96 Consecutive Hours", + "_id": "65c4ea736068b11663b7482d", + "code": "393245", + "code_system_name": "RXNORM", + "code_system_oid": "2.16.840.1.113883.6.88", + "code_system_version": "2024-01", + "display_name": "digoxin 0.05 MG/ML Oral Solution", "hasLongDisplayName": false } ], - "display_name": "Ventilation", + "display_name": "Digoxin Medications", "group_id": "62154e3cf074ce0e63a20685", - "oid": "2.16.840.1.113762.1.4.1029.360", + "oid": "2.16.840.1.113883.3.464.1003.1065", "version": "Draft" } -] +] \ No newline at end of file diff --git a/spec/fixtures/json/patients/Case_When_Test/patient.json b/spec/fixtures/json/patients/Case_When_Test/patient.json index ad673e7..917700f 100644 --- a/spec/fixtures/json/patients/Case_When_Test/patient.json +++ b/spec/fixtures/json/patients/Case_When_Test/patient.json @@ -1,12 +1,12 @@ { "givenNames": [ - "TheCase" + "Test" ], "expectedValues": [ { "population_index": 0, "measure_id": "25B51662-1A12-411E-AC9D-22657E11EED8", - "IPP": 1, + "IPP": 0, "DENOM_OBSERV": [], "NUMER_OBSERV": [] } @@ -16,7 +16,7 @@ ], "_id": "65ba97abf3f95300004b62d4", "bundleId": null, - "familyName": "TestWhen", + "familyName": "CaseWhenThen", "notes": "", "qdmPatient": { "qdmVersion": "5.6", @@ -24,133 +24,134 @@ { "dataElementCodes": [ { - "code": "183452005", - "system": "2.16.840.1.113883.6.96", + "code": "197604", + "system": "2.16.840.1.113883.6.88", "version": null, "display": null } ], - "_id": "65ba97aff3f95300004b62dd", - "participant": [], + "_id": "65c2594f3f2290000083f3b9", + "prescriber": [], "relatedTo": [], - "qdmTitle": "Encounter, Performed", - "hqmfOid": "2.16.840.1.113883.10.20.28.4.5", - "qdmCategory": "encounter", - "qdmStatus": "performed", + "qdmTitle": "Medication, Order", + "hqmfOid": "2.16.840.1.113883.10.20.28.4.51", + "qdmCategory": "medication", + "qdmStatus": "order", "qdmVersion": "5.6", - "_type": "QDM::EncounterPerformed", - "admissionSource": null, - "authorDatetime": "2012-01-31T08:00:00.000+00:00", - "codeListId": "2.16.840.1.113883.3.666.5.307", - "description": "Encounter, Performed: Encounter Inpatient", - "diagnoses": [], - "dischargeDisposition": null, - "facilityLocations": [], - "id": "65ba97aff3f95300004b62dd", - "lengthOfStay": null, - "priority": null, + "_type": "QDM::MedicationOrder", + "authorDatetime": "2012-02-06T08:00:00.000+00:00", + "codeListId": "2.16.840.1.113883.3.464.1003.1065", + "daysSupplied": null, + "description": "Medication, Order: Digoxin Medications", + "dosage": null, + "frequency": null, + "id": "65c2594f3f2290000083f3b9", + "negationRationale": null, + "reason": null, + "refills": 11, "relevantPeriod": { - "low": "2012-01-31T08:00:00.000+00:00", - "high": "2012-01-31T08:15:00.000+00:00", + "low": "2012-02-06T08:00:00.000+00:00", + "high": "2012-02-06T08:15:00.000+00:00", "lowClosed": true, "highClosed": true - } + }, + "route": null, + "setting": null, + "supply": null }, { "dataElementCodes": [ { - "code": "0B110F4", - "system": "2.16.840.1.113883.6.4", + "code": "104208", + "system": "2.16.840.1.113883.6.88", "version": null, "display": null } ], - "_id": "65ba97c1f3f95300004b62e0", - "performer": [], + "_id": "65c259b3bff35300001b5172", + "prescriber": [], "relatedTo": [], - "qdmTitle": "Procedure, Performed", - "hqmfOid": "2.16.840.1.113883.10.20.28.4.67", - "qdmCategory": "procedure", - "qdmStatus": "performed", + "qdmTitle": "Medication, Order", + "hqmfOid": "2.16.840.1.113883.10.20.28.4.51", + "qdmCategory": "medication", + "qdmStatus": "order", "qdmVersion": "5.6", - "_type": "QDM::ProcedurePerformed", - "anatomicalLocationSite": null, - "authorDatetime": "2012-01-31T08:00:00.000+00:00", - "codeListId": "2.16.840.1.113762.1.4.1029.256", - "components": [], - "description": "Procedure, Performed: Severe Maternal Morbidity Procedures", - "id": "65ba97c1f3f95300004b62e0", - "incisionDatetime": null, - "method": null, + "_type": "QDM::MedicationOrder", + "authorDatetime": "2012-02-06T08:00:00.000+00:00", + "codeListId": "2.16.840.1.113883.3.464.1003.1065", + "daysSupplied": null, + "description": "Medication, Order: Digoxin Medications", + "dosage": null, + "frequency": null, + "id": "65c259b3bff35300001b5172", "negationRationale": null, - "rank": null, "reason": null, - "relevantDatetime": "2012-01-31T08:00:00.000+00:00", + "refills": 2, "relevantPeriod": { - "low": "2012-01-31T08:00:00.000+00:00", - "high": "2012-01-31T08:15:00.000+00:00", + "low": "2012-02-06T08:00:00.000+00:00", + "high": "2012-02-06T08:15:00.000+00:00", "lowClosed": true, "highClosed": true }, - "result": null, - "status": null + "route": null, + "setting": null, + "supply": null }, { "dataElementCodes": [ { - "code": "11397000", - "system": "2.16.840.1.113883.6.96", + "code": "104208", + "system": "2.16.840.1.113883.6.88", "version": null, "display": null } ], - "_id": "65ba97e1f3f95300004b62e4", - "performer": [], + "_id": "65c4e902456baf0000cd9819", + "prescriber": [], "relatedTo": [], - "qdmTitle": "Procedure, Performed", - "hqmfOid": "2.16.840.1.113883.10.20.28.4.67", - "qdmCategory": "procedure", - "qdmStatus": "performed", + "qdmTitle": "Medication, Order", + "hqmfOid": "2.16.840.1.113883.10.20.28.4.51", + "qdmCategory": "medication", + "qdmStatus": "order", "qdmVersion": "5.6", - "_type": "QDM::ProcedurePerformed", - "anatomicalLocationSite": null, - "authorDatetime": "2012-01-31T08:00:00.000+00:00", - "codeListId": "2.16.840.1.113762.1.4.1029.213", - "components": [], - "description": "Procedure, Performed: Blood Transfusion", - "id": "65ba97e1f3f95300004b62e4", - "incisionDatetime": null, - "method": null, + "_type": "QDM::MedicationOrder", + "authorDatetime": "2012-02-08T08:00:00.000+00:00", + "codeListId": "2.16.840.1.113883.3.464.1003.1065", + "daysSupplied": null, + "description": "Medication, Order: Digoxin Medications", + "dosage": null, + "frequency": null, + "id": "65c4e902456baf0000cd9819", "negationRationale": null, - "rank": null, "reason": null, - "relevantDatetime": "2012-01-31T08:00:00.000+00:00", + "refills": null, "relevantPeriod": { - "low": "2012-01-31T08:00:00.000+00:00", - "high": "2012-01-31T08:15:00.000+00:00", + "low": "2012-02-08T08:00:00.000+00:00", + "high": "2012-02-08T08:15:00.000+00:00", "lowClosed": true, "highClosed": true }, - "result": null, - "status": null + "route": null, + "setting": null, + "supply": null }, { "dataElementCodes": [], - "_id": "65ba982ef3f95300004b62f9", + "_id": "65c504304b91bd00007e9c3f", "qdmTitle": "Patient Characteristic Birthdate", "hqmfOid": "2.16.840.1.113883.10.20.28.4.54", "qdmCategory": "patient_characteristic", "qdmStatus": "birthdate", "qdmVersion": "5.6", "_type": "QDM::PatientCharacteristicBirthdate", - "birthDatetime": "2023-12-01T08:00:00.000+00:00", + "birthDatetime": "1998-12-01T01:00:00.000+00:00", "codeListId": null, "description": null, - "id": "65ba982ef3f95300004b62f9" + "id": "65c504304b91bd00007e9c3f" } ], - "_id": "65ba982e6068b16c755eda20", - "birthDatetime": "2023-12-01T08:00:00.000+00:00", + "_id": "65c504306068b11663b74833", + "birthDatetime": "1998-12-01T01:00:00.000+00:00", "extendedData": null }, "providers": [] diff --git a/spec/helpers/measure_helpers.spec.js b/spec/helpers/measure_helpers.spec.js index 82f7469..e46030b 100644 --- a/spec/helpers/measure_helpers.spec.js +++ b/spec/helpers/measure_helpers.spec.js @@ -136,9 +136,18 @@ describe('MeasureHelpers', () => { }); describe('case, when and null literals', () => { it('executes the results correctly', () => { - const elm = getJSONFixture('elm/example.json'); - const results = MeasureHelpers.findAllLocalIdsInStatementByName(elm, 'SDE SOC Procedure Detail'); - expect(results).not.toBeUndefined(); + const measure = getJSONFixture('cqm_measures/Case_When_Test/measure.json'); + const elm = measure.cql_libraries[0].elm; + const localIds = MeasureHelpers.findAllLocalIdsInStatementByName(elm, 'test when then case'); + // finds localIds for case statement items and properly finds sourceLocalId for them + expect(localIds[91]).toEqual({ localId: '91', sourceLocalId: '89' }); + expect(localIds[97]).toEqual({ localId: '97', sourceLocalId: '95' }); + + // finds localIds for null literals and properly sets isFalsyLiteral to true + expect(localIds[98]).toEqual({ localId: '98', isFalsyLiteral: true }); + + // finds localIds for false literals and properly sets isFalsyLiteral to true + expect(localIds[96]).toEqual({ localId: '96', isFalsyLiteral: true }); }); }); }); diff --git a/spec/helpers/results_helpers.spec.js b/spec/helpers/results_helpers.spec.js index e32f16d..4f9ed1c 100644 --- a/spec/helpers/results_helpers.spec.js +++ b/spec/helpers/results_helpers.spec.js @@ -234,7 +234,7 @@ describe('ResultsHelpers', () => { describe('Calculate results for CQL with case when.. statements', () => { it('should handle the case statement correctly', () => { const valueSets = getJSONFixture('cqm_measures/Case_When_Test/value_sets.json'); - const measure = getJSONFixture('cqm_measures/Case_When_Test/Measure.json'); + const measure = getJSONFixture('cqm_measures/Case_When_Test/measure.json'); const patients = []; patients.push(getJSONFixture('patients/Case_When_Test/patient.json').qdmPatient); const calculationResults = Calculator.calculate(measure, patients, valueSets, { requestDocument: true }); @@ -242,8 +242,8 @@ describe('ResultsHelpers', () => { const result = Object.values(calculationResults[Object.keys(calculationResults)[0]])[0]; const resultsByStatement = result.statement_results_by_statement(); expect(resultsByStatement).not.toBeUndefined(); - expect(resultsByStatement.TestWhenCase['SDE SOC Procedure Detail']).not.toBeUndefined(); - expect(resultsByStatement.TestWhenCase['SDE SOC Procedure Detail'].final).toBeTruthy(); + expect(resultsByStatement.TestWhenCase['Initial Population']).toBeTruthy(); + expect(resultsByStatement.TestWhenCase['test when then case']).toBeTruthy(); }); }); describe('buildPopulationRelevanceMap', () => {