From b14d06d573dfad579ac5e8f4ceb5364487f0c1ed Mon Sep 17 00:00:00 2001 From: saulkravitz Date: Tue, 5 Apr 2011 13:28:10 -0400 Subject: [PATCH] initial version of measure 0004 --- .../patients/denominator_adult.json | 14 + .../patients/denominator_youth.json | 14 + .../patients/numerator1_adult.json | 15 + .../patients/numerator1_youth.json | 15 + .../patients/numerator2_adult.json | 15 + .../patients/numerator2_youth.json | 15 + .../patients/population_adult.json | 14 + .../patients/population_youth.json | 14 + .../measures/0004_aod_treatment/result.json | 54 +++ js/aod_treatment.js | 82 +++++ .../NQF_Retooled_Measure_0004.xlsx.json | 322 ++++++++++++++++++ .../0004_aod_treatment/0004_AOD_Treatment.col | 65 ++++ .../components/AODadult.json | 24 ++ .../components/AODadult14_map.js | 33 ++ .../components/AODadult30_map.js | 33 ++ .../0004_aod_treatment/components/AODall.json | 24 ++ .../components/AODall14_map.js | 32 ++ .../components/AODall30_map.js | 32 ++ .../components/AODnumerator1.json | 13 + .../components/AODnumerator2.json | 9 + .../components/AODyouth.json | 24 ++ .../components/AODyouth14_map.js | 35 ++ .../components/AODyouth30_map.js | 34 ++ .../0004_aod_treatment/components/root.json | 43 +++ 24 files changed, 975 insertions(+) create mode 100644 fixtures/measures/0004_aod_treatment/patients/denominator_adult.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/denominator_youth.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/numerator1_adult.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/numerator1_youth.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/numerator2_adult.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/numerator2_youth.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/population_adult.json create mode 100644 fixtures/measures/0004_aod_treatment/patients/population_youth.json create mode 100644 fixtures/measures/0004_aod_treatment/result.json create mode 100644 js/aod_treatment.js create mode 100644 measure_props/NQF_Retooled_Measure_0004.xlsx.json create mode 100644 measures/0004_aod_treatment/0004_AOD_Treatment.col create mode 100644 measures/0004_aod_treatment/components/AODadult.json create mode 100644 measures/0004_aod_treatment/components/AODadult14_map.js create mode 100644 measures/0004_aod_treatment/components/AODadult30_map.js create mode 100644 measures/0004_aod_treatment/components/AODall.json create mode 100644 measures/0004_aod_treatment/components/AODall14_map.js create mode 100644 measures/0004_aod_treatment/components/AODall30_map.js create mode 100644 measures/0004_aod_treatment/components/AODnumerator1.json create mode 100644 measures/0004_aod_treatment/components/AODnumerator2.json create mode 100644 measures/0004_aod_treatment/components/AODyouth.json create mode 100644 measures/0004_aod_treatment/components/AODyouth14_map.js create mode 100644 measures/0004_aod_treatment/components/AODyouth30_map.js create mode 100644 measures/0004_aod_treatment/components/root.json diff --git a/fixtures/measures/0004_aod_treatment/patients/denominator_adult.json b/fixtures/measures/0004_aod_treatment/patients/denominator_adult.json new file mode 100644 index 0000000..03e2e3b --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/denominator_adult.json @@ -0,0 +1,14 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Happy", // personal data + "last": "Golucky", + "gender": "F", + "birthdate": 549504000, // Time.gm(1987,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period) + "alcohol_or_drug_dependence_diagnosis_active": [1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1255910400] //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/denominator_youth.json b/fixtures/measures/0004_aod_treatment/patients/denominator_youth.json new file mode 100644 index 0000000..5987dda --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/denominator_youth.json @@ -0,0 +1,14 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Mindy", // personal data + "last": "Chrysler", + "gender": "F", + "birthdate": 865123200, // Time.gm(1997,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period) + "alcohol_or_drug_dependence_diagnosis_active": [1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1255910400] //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/numerator1_adult.json b/fixtures/measures/0004_aod_treatment/patients/numerator1_adult.json new file mode 100644 index 0000000..2b2ebd5 --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/numerator1_adult.json @@ -0,0 +1,15 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Milo", // personal data + "last": "Jones", + "gender": "F", + "birthdate": 865123200, // Time.gm(1997,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period) + "alcohol_or_drug_dependence_diagnosis_active": [1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_outpatient_BH_encounter":[ 1256515200] // Time.gm(2009,10,26).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/numerator1_youth.json b/fixtures/measures/0004_aod_treatment/patients/numerator1_youth.json new file mode 100644 index 0000000..5a0f8ec --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/numerator1_youth.json @@ -0,0 +1,15 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Mindy", // personal data + "last": "Chrysler", + "gender": "F", + "birthdate": 865123200, // Time.gm(1997,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period) + "alcohol_or_drug_dependence_diagnosis_active": [1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_outpatient_BH_encounter":[ 1256515200] // Time.gm(2009,10,26).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/numerator2_adult.json b/fixtures/measures/0004_aod_treatment/patients/numerator2_adult.json new file mode 100644 index 0000000..49ad2c5 --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/numerator2_adult.json @@ -0,0 +1,15 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Jose", // personal data + "last": "Feliciano", + "gender": "M", + "birthdate": 549504000, // Time.gm(1987,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period) + "alcohol_or_drug_dependence_diagnosis_active": [1255910400], // Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1255910400], // Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_outpatient_bh_encounter":[ 1256515200,1256517000] // Treatment Events: Time.gm(2009,10,26).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/numerator2_youth.json b/fixtures/measures/0004_aod_treatment/patients/numerator2_youth.json new file mode 100644 index 0000000..82517fd --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/numerator2_youth.json @@ -0,0 +1,15 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Juanita", // personal data + "last": "Sombrero", + "gender": "F", + "birthdate": 865123200, // Time.gm(1997,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period) + "alcohol_or_drug_dependence_diagnosis_active": [1255910400], // Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1255910400], // Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_outpatient_bh_encounter":[ 1256515200,1256517000] // Treatment Events: Time.gm(2009,10,26).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/population_adult.json b/fixtures/measures/0004_aod_treatment/patients/population_adult.json new file mode 100644 index 0000000..ddecdae --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/population_adult.json @@ -0,0 +1,14 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Fox", // personal data + "last": "Trot", + "gender": "F", + "birthdate": 549504000, // Time.gm(1987,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period), preceeded by diagnosis on 2009/9/1...this is within 60 days and prevents denominator + "alcohol_or_drug_dependence_diagnosis_active": [1251763200, 1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1251763200, 1255910400] //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/patients/population_youth.json b/fixtures/measures/0004_aod_treatment/patients/population_youth.json new file mode 100644 index 0000000..6902031 --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/patients/population_youth.json @@ -0,0 +1,14 @@ +// names generated by http://rockstarname.com/ +{ + "first": "Mindy", // personal data + "last": "Chrysler", + "gender": "F", + "birthdate": 865123200, // Time.gm(1997,6,1).to_i + "measures": { // bag of measures, one entry per measure + "0004": { + // Diagnosis on 2009/10/19 (within measurement period), preceeded by diagnosis on 2009/9/1...this is within 60 days and prevents denominator + "alcohol_or_drug_dependence_diagnosis_active": [1251763200, 1255910400], //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + "encounter_acute_inpt_encounter": [1251763200, 1255910400] //Time.gm(2009,10,19).to_i and Time.gm(2009,9,1).to_i + } + } +} diff --git a/fixtures/measures/0004_aod_treatment/result.json b/fixtures/measures/0004_aod_treatment/result.json new file mode 100644 index 0000000..db6a36d --- /dev/null +++ b/fixtures/measures/0004_aod_treatment/result.json @@ -0,0 +1,54 @@ +{ + "results":[ + { + "id": "0004", + "sub_id": "a", + "initialPopulation": 5, + "numerator": 1, + "denominator": 4, + "exclusions": 0 + }, + { + "id": "0004", + "sub_id": "b", + "initialPopulation": 5, + "numerator": 1, + "denominator": 4, + "exclusions": 0 + }, + { + "id": "0004", + "sub_id": "c", + "initialPopulation": 3, + "numerator": 1, + "denominator": 2, + "exclusions": 0 + }, + { + "id": "0004", + "sub_id": "d", + "initialPopulation": 3, + "numerator": 1, + "denominator": 2, + "exclusions": 0 + }, + { + "id": "0004", + "sub_id": "e", + "initialPopulation": 8, + "numerator": 2, + "denominator": 6, + "exclusions": 0 + }, + { + "id": "0004", + "sub_id": "f", + "initialPopulation": 8, + "numerator": 2, + "denominator": 6, + "exclusions": 0 + } + + ] +} + diff --git a/js/aod_treatment.js b/js/aod_treatment.js new file mode 100644 index 0000000..806b13e --- /dev/null +++ b/js/aod_treatment.js @@ -0,0 +1,82 @@ +// Adds alcohol and drug treatment utility functions to the root JS object. +// Since measure 0004 has 3 populations with two numerators each, this allows code reuse. +// +// lib/qme/mongo_helpers.rb executes this function on a database +// connection. +(function () { + var root = this; + + var day = 24 * 60 * 60; + var year = 365 * day; + var latest_birthdate; + var earliest_birthdate; + var earliest_encounter; + var earliest_diagnosis; + var latest_diagnosis; + var diagnoses_during_period; + var inpatient_encounters; + var encounters; + var diagnoses_during_encounters; + var rehab_and_detox_during_inpatient_encounters; + + var first_alcohol_drug_event; + var first_alcohol_drug_treatment_event; + + + root.alcoholDrugFirstEvent = function(measure, effective_date){ + + earliest_encounter = effective_date - 1*year; + earliest_diagnosis = effective_date - 1*year; + latest_diagnosis = effective_date - 45*day; + + + + diagnoses_during_period = selectWithinRange(measure.alcohol_or_drug_dependence_diagnosis_active,earliest_diagnosis, latest_diagnosis); + inpatient_encounters = normalize(measure.encounter_acute_inpt_encounter,measure.encounter_non_acute_inpatient_encounter); + encounters = normalize( inpatient_encounters, + measure.encounter_ed_encounter, + measure.encounter_outpatient_bh_encounter); + diagnoses_during_encounters = allDiagnosesDuringEncounter( + measure.alcohol_or_drug_dependence_diagnosis_active, + encounters, earliest_diagnosis, latest_diagnosis); + rehab_and_detox_during_inpatient_encounters = allEventsDuringEncounter( + measure.alcohol_drug_rehab_and_detox_interventions_procedure_performed, + inpatient_encounters, + earliest_diagnosis, latest_diagnosis); + + var first_diagnosis_during_encounter = _.min(diagnoses_during_encounters); + var first_rehab_and_detox_during_inpatient_encounter = _.min(rehab_and_detox_during_inpatient_encounters); + + first_alcohol_drug_event = Math.min(first_diagnosis_during_encounter, first_rehab_and_detox_during_inpatient_encounter); + + return(first_alcohol_drug_event); + + }; + + + root.alcohol_drug_denominator = function(measure) { + // first_alcohol_drug_event is defined in population + var begin_range = first_alcohol_drug_event - 60*day; + var previous_event = inRange(measure.alcohol_or_drug_dependence_diagnosis_active, begin_range, first_alcohol_drug_event-1); + return(previous_event == 0 ); + }; + + root.alcohol_drug_numerator1 = function(measure) { + alcohol_drug_treatments = normalize( + selectWithinRange( measure.encounter_acute_inpt_encounter, first_alcohol_drug_event+1, first_alcohol_drug_event + 14*day), + selectWithinRange( measure.encounter_non_acute_inpatient_encounter, first_alcohol_drug_event+1, first_alcohol_drug_event + 14*day), + selectWithinRange( measure.encounter_outpatient_bh_encounter, first_alcohol_drug_event+1, first_alcohol_drug_event + 14*day)); + + if(alcohol_drug_treatments.length > 0) first_alcohol_drug_treatment_event = _.min(alcohol_drug_treatments); + + return(alcohol_drug_treatments.length > 0); + }; + + root.alcohol_drug_numerator2 = function(measure) { + return (inRange(encounters, first_alcohol_drug_treatment_event+1, first_alcohol_drug_treatment_event + 30*day) ); + }; + + +})(); + + diff --git a/measure_props/NQF_Retooled_Measure_0004.xlsx.json b/measure_props/NQF_Retooled_Measure_0004.xlsx.json new file mode 100644 index 0000000..a0b30f4 --- /dev/null +++ b/measure_props/NQF_Retooled_Measure_0004.xlsx.json @@ -0,0 +1,322 @@ +{ + "N_2024": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2024", + "comment": null, + "descriptive_type": "alcohol or drug dependence", + "group_type": "synonym", + "standard_concept": "alcohol or drug dependence", + "standard_category": "Diagnosis / Condition / Problem", + "QDS_data_type": "diagnosis active", + "standard_concept_id": "N_c608", + "standard_taxonomy": "GROUPING", + "standard_taxonomy_version": null, + "standard_code_list": "N_c600, N_c606, N_c607", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2023": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2023", + "comment": null, + "descriptive_type": "alcohol or drug dependence", + "group_type": null, + "standard_concept": "alcohol or drug dependence", + "standard_category": "Diagnosis / Condition / Problem", + "QDS_data_type": "diagnosis active", + "standard_concept_id": "N_c607", + "standard_taxonomy": "ICD-10-CM", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "F10, F10.2, F10.22, F11, F12, F13, F14, F15, F16, F17, F18, F19, F19.12, F19.14, F19.15, F19.16, F19.17, F19.18, F19.24, F19.25, F19.29, F19.9, K29.2, K70.1", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2022": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2022", + "comment": null, + "descriptive_type": "alcohol or drug dependence", + "group_type": null, + "standard_concept": "alcohol or drug dependence", + "standard_category": "Diagnosis / Condition / Problem", + "QDS_data_type": "diagnosis active", + "standard_concept_id": "N_c606", + "standard_taxonomy": "ICD-9-CM", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "291, 291.0, 291.1, 291.2, 291.3, 291.4, 291.5, 291.8, 291.81, 291.82, 291.89, 291.9, 292, 292.0, 292.1, 292.11, 292.12, 292.2, 292.8, 292.81, 292.82, 292.83, 292.84, 292.85, 292.89, 292.9, 303.00, 303.01, 303.02, 303.90, 303.91, 303.92, 304.00, 304.01, 304.02, 304.10, 304.11, 304.12, 304.20, 304.21, 304.22, 304.30, 304.31, 304.32, 304.40, 304.41, 304.42, 304.50, 304.51, 304.52, 304.60, 304.61, 304.62, 304.70, 304.71, 304.72, 304.80, 304.81, 304.82, 304.90, 304.91, 304.92, 305.00, 305.01, 305.02, 305.20, 305.21, 305.22, 305.30, 305.31, 305.32, 305.40, 305.41, 305.42, 305.50, 305.51, 305.52, 305.60, 305.61, 305.62, 305.70, 305.71, 305.72, 305.80, 305.81, 305.82, 305.90, 305.91, 305.92, 535.3, 535.30, 535.31, 571.1", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2012": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2012", + "comment": null, + "descriptive_type": "alcohol or drug dependence", + "group_type": null, + "standard_concept": "alcohol or drug dependence", + "standard_category": "Diagnosis / Condition / Problem", + "QDS_data_type": "diagnosis active", + "standard_concept_id": "N_c600", + "standard_taxonomy": "SNOMED-CT", + "standard_taxonomy_version": "07/2009", + "standard_code_list": "191811004, 191812006, 191816009, 191819002, 191820008, 191825003, 191826002, 191829009, 191831000, 191832007, 191837001, 191838006, 191839003, 191849000, 191850000, 191853003, 191855005, 191856006, 191865004, 191867007, 191868002, 191869005, 191871005, 191873008, 191874002, 191875001, 191877009, 199255000, 21647008, 231468005, 231469002, 231470001, 231472009, 231473004, 231474005, 231475006, 231477003, 231478008, 231479000, 231480002, 231481003, 231482005, 237228001, 2403008, 267206008, 268640002, 268641003, 31956009, 38247002, 426001001, 426873000, 427327003, 429299000, 441681009, 442406005, 5002000, 51339003, 56294008, 58727001, 66590003, 7200002, 75544000, 85005007, 87858002", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2062": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2062", + "comment": null, + "descriptive_type": "Alcohol, drug rehab and detox interventions", + "group_type": "synonym", + "standard_concept": "Alcohol, drug rehab and detox interventions", + "standard_category": "Procedure", + "QDS_data_type": "procedure performed", + "standard_concept_id": "N_c632", + "standard_taxonomy": "GROUPING", + "standard_taxonomy_version": null, + "standard_code_list": "N_c602, N_c626", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2052": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2052", + "comment": null, + "descriptive_type": "Alcohol, drug rehab and detox interventions", + "group_type": null, + "standard_concept": "Alcohol, drug rehab and detox interventions", + "standard_category": "Procedure", + "QDS_data_type": "procedure performed", + "standard_concept_id": "N_c626", + "standard_taxonomy": "ICD-9-CM", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "94.61, 94.63, 94.64, 94.66, 94.67, 94.69", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2014": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2014", + "comment": null, + "descriptive_type": "Alcohol, drug rehab and detox interventions", + "group_type": null, + "standard_concept": "Alcohol, drug rehab and detox interventions", + "standard_category": "Procedure", + "QDS_data_type": "procedure performed", + "standard_concept_id": "N_c602", + "standard_taxonomy": "SNOMED-CT", + "standard_taxonomy_version": "07/2009", + "standard_code_list": "20093000, 23915005, 35637008, 52052004, 56876005, 62213004, 78092008", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2011": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2011", + "comment": null, + "descriptive_type": "Birthdate", + "group_type": null, + "standard_concept": "birthdate", + "standard_category": "Individual characteristic", + "QDS_data_type": "patient characteristic", + "standard_concept_id": "N_c8", + "standard_taxonomy": "HL7", + "standard_taxonomy_version": "3.0", + "standard_code_list": "00110", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2061": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2061", + "comment": null, + "descriptive_type": "Detoxification interventions", + "group_type": "synonym", + "standard_concept": "Detoxification interventions", + "standard_category": "Procedure", + "QDS_data_type": "procedure performed", + "standard_concept_id": "N_c631", + "standard_taxonomy": "GROUPING", + "standard_taxonomy_version": null, + "standard_code_list": "N_c627, N_c630", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2049": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2049", + "comment": null, + "descriptive_type": "Detoxification interventions", + "group_type": null, + "standard_concept": "Detoxification interventions", + "standard_category": "Procedure", + "QDS_data_type": "procedure performed", + "standard_concept_id": "N_c627", + "standard_taxonomy": "ICD-9-CM", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "94.62, 94.65, 94.68", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2063": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2063", + "comment": null, + "descriptive_type": "Detoxification interventions", + "group_type": null, + "standard_concept": "Detoxification interventions", + "standard_category": "Procedure", + "QDS_data_type": "procedure performed", + "standard_concept_id": "N_c630", + "standard_taxonomy": "SNOMED-CT", + "standard_taxonomy_version": "07/2009", + "standard_code_list": "67516001", + "QDS_datatype_specific_attributes": "datetime" + }, + "added": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "added", + "comment": null, + "descriptive_type": "Patient Encounter", + "group_type": "abstract", + "standard_concept": "Encounter – Inpt/ED/non-acute inpatient/BH/Outpatient", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "added-N_c60-N_c28-N_c603-N_c604-N_c605-N_c26", + "standard_taxonomy": "GROUPING", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "N_c60, N_c28, N_c603, N_c604, N_c605,N_c26", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2060": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2060", + "comment": null, + "descriptive_type": "encounter acute inpt", + "group_type": null, + "standard_concept": "encounter acute inpt", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "N_c26", + "standard_taxonomy": "CPT", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "99221, 99222, 99223, 99231, 99232, 99233, 99238, 99239, 99251, 99252, 99253, 99254, 99255, 99291", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2015": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2015", + "comment": null, + "descriptive_type": "encounter ED", + "group_type": null, + "standard_concept": "encounter ED", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "N_c60", + "standard_taxonomy": "CPT", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "99281, 99282, 99283, 99284, 99285", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2059": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2059", + "comment": null, + "descriptive_type": "encounter non-acute inpatient", + "group_type": null, + "standard_concept": "encounter non-acute inpatient", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "N_c28", + "standard_taxonomy": "CPT", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "99304, 99305, 99306, 99307, 99308, 99309, 99310, 99315, 99316, 99318, 99324, 99325, 99326, 99327, 99328, 99334, 99335, 99336, 99337", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2016": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2016", + "comment": null, + "descriptive_type": "encounter outpatient BH", + "group_type": null, + "standard_concept": "encounter outpatient BH", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "N_c603", + "standard_taxonomy": "CPT", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "90804, 90805, 90806, 90807, 90808, 90809, 90810, 90811, 90812, 90813, 90814, 90815, 98960, 98961, 98962, 99078, 99201, 99202, 99203, 99204, 99205, 99211, 99212, 99213, 99214, 99215, 99217, 99218, 99219, 99220, 99241, 99242, 99243, 99244, 99245, 99341, 99342, 99343, 99344, 99345, 99347, 99348, 99349, 99350, 99384, 99385, 99386, 99387, 99394, 99395, 99396, 99397, 99401, 99402, 99403, 99404, 99408, 99409, 99411, 99412, 99510", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2018": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2018", + "comment": null, + "descriptive_type": "encounter outpt BH req POS", + "group_type": null, + "standard_concept": "encounter outpt BH req POS", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "N_c604", + "standard_taxonomy": "CPT", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "90801, 90802, 90816, 90817, 90818, 90819, 90821, 90822, 90823, 90824, 90826, 90827, 90828, 90829, 90845, 90847, 90849, 90853, 90857, 90862, 90875, 90876, 99221, 99222, 99223, 99231, 99232, 99233, 99238, 99239, 99251, 99252, 99253, 99254, 99255", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2021": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2021", + "comment": null, + "descriptive_type": "Encounter point of service modifier", + "group_type": null, + "standard_concept": "Encounter point of service modifier", + "standard_category": "Encounter", + "QDS_data_type": "encounter", + "standard_concept_id": "N_c605", + "standard_taxonomy": "CPT", + "standard_taxonomy_version": "06/2009", + "standard_code_list": "03, 05, 07, 09, 11, 12, 13, 14, 15, 20, 22, 33, 49, 50, 52, 53, 57, 71, 72", + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2019": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2019", + "comment": null, + "descriptive_type": null, + "group_type": null, + "standard_concept": "measurement enddate", + "standard_category": "Measure timing", + "QDS_data_type": "end: 12/31/yyyy 23:59:59 (prompt for year)", + "standard_concept_id": "N_c1", + "standard_taxonomy": null, + "standard_taxonomy_version": null, + "standard_code_list": null, + "QDS_datatype_specific_attributes": "datetime" + }, + "N_2020": { + "NQF_id": "0004", + "measure_name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment: (a) Initiation, (b) Engagement", + "QDS_id": "N_2020", + "comment": null, + "descriptive_type": null, + "group_type": null, + "standard_concept": "measurement period", + "standard_category": "Measure timing", + "QDS_data_type": "end: 12/31/yyyy 23:59:59 (prompt for year)", + "standard_concept_id": "N_c2", + "standard_taxonomy": null, + "standard_taxonomy_version": null, + "standard_code_list": null, + "QDS_datatype_specific_attributes": "datetime" + } +} \ No newline at end of file diff --git a/measures/0004_aod_treatment/0004_AOD_Treatment.col b/measures/0004_aod_treatment/0004_AOD_Treatment.col new file mode 100644 index 0000000..b97fd7c --- /dev/null +++ b/measures/0004_aod_treatment/0004_AOD_Treatment.col @@ -0,0 +1,65 @@ +{ + "root": "root.json", + "combinations": [ + { + "metadata": { + "sub_id": "a", + "subtitle": "(ages 12-17) ", + "short_subtitle": "AODyouth14", + "population:": "AODyouth.json", + "numerator": "AODnumerator1.json" + }, + "map_fn": "AODyouth14_map.js" + }, + { + "metadata": { + "sub_id": "b", + "subtitle": "(ages 12-17) with followup within 14 and 30 days. ", + "short_subtitle": "AODyouth30", + "population:": "AODyouth.json", + "numerator": "AODnumerator2.json" + }, + "map_fn": "AODyouth30_map.js" + }, + { + "metadata": { + "sub_id": "c", + "subtitle": "(ages 17+) with followup within 14 days ", + "short_subtitle": "AODyouth14", + "population:": "AODadult.json", + "numerator": "AODnumerator1.json" + }, + "map_fn": "AODadult14_map.js" + }, + { + "metadata": { + "sub_id": "d", + "subtitle": "(ages 17+) with followup within 14 and 30 days ", + "short_subtitle": "AODadult30", + "population:": "AODadult.json", + "numerator": "AODnumerator2.json" + }, + "map_fn": "AODadult14_map.js" + }, + { + "metadata": { + "sub_id": "e", + "subtitle": "(ages 12+) with followup within 14 days ", + "short_subtitle": "AODall14", + "population:": "AODall.json", + "numerator": "AODnumerator1.json" + }, + "map_fn": "AODall14_map.js" + }, + { + "metadata": { + "sub_id": "f", + "subtitle": " (ages 12+) with followup within 14 and 30 days ", + "short_subtitle": "AODall30", + "population:": "AODall.json", + "numerator": "AODnumerator2.json" + }, + "map_fn": "AODall30_map.js" + } + ] +} diff --git a/measures/0004_aod_treatment/components/AODadult.json b/measures/0004_aod_treatment/components/AODadult.json new file mode 100644 index 0000000..fc56269 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODadult.json @@ -0,0 +1,24 @@ +{ + "and": [ + { + "category": "Patient characteristic", + "title": "Age 17 years of age or older before the measurement period" + }, + { + "or": [ + { + "category": "Diagnosis active", + "title": "First diagnosis of alcohol or drug dependence during an ED, acute or non-acute inpatient, or BH encounter from one year to 45 days before the end of the measurement period = FIRST" + }, + { + "category": "Procedure performed", + "title": "First Alcohol, drug rehab and detox interventions during an acute or non-acute inpatient encounter from one year to 45 days before the end of the measurement period = FIRST" + }, + { + "category": "Procedure Performed", + "title": "First detoxification intervention from one year to 45 days before the end of the measurement period = FIRST" + } + ] + } + ] +} diff --git a/measures/0004_aod_treatment/components/AODadult14_map.js b/measures/0004_aod_treatment/components/AODadult14_map.js new file mode 100644 index 0000000..97e7591 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODadult14_map.js @@ -0,0 +1,33 @@ +function () { + var patient = this; + var measure = patient.measures["0004"]; + if (measure==null) + measure={}; + + <%= init_js_frameworks %> + + var day = 24*60*60; + var year = 365*day; + var effective_date = <%= effective_date %>; + var latest_birthdate = effective_date - 17*year; + + var population = function() { + return((patient.birthdate < latest_birthdate) && + alcoholDrugFirstEvent(measure, effective_date)); //This has a sideeffect....see aod_treatment.js + }; + + var denominator = function() { + return(alcohol_drug_denominator(measure)); + }; + + var numerator = function() { + // numerator1 + return(alcohol_drug_numerator1(measure) ); + }; + + var exclusion = function() { + return false; + }; + + map(patient, population, denominator, numerator, exclusion); +}; diff --git a/measures/0004_aod_treatment/components/AODadult30_map.js b/measures/0004_aod_treatment/components/AODadult30_map.js new file mode 100644 index 0000000..b294394 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODadult30_map.js @@ -0,0 +1,33 @@ +function () { + var patient = this; + var measure = patient.measures["0004"]; + if (measure==null) + measure={}; + + <%= init_js_frameworks %> + + var day = 24*60*60; + var year = 365*day; + var effective_date = <%= effective_date %>; + var latest_birthdate = effective_date - 17*year; + + var population = function() { + return((patient.birthdate < latest_birthdate) && + alcoholDrugFirstEvent(measure, effective_date)); //This has a sideeffect....see aod_treatment.js + }; + + var denominator = function() { + return(alcohol_drug_denominator(measure)); + }; + + var numerator = function() { + // numerator1 && numerator2 + return(alcohol_drug_numerator1(measure) && alcohol_drug_numerator2(measure)); + }; + + var exclusion = function() { + return false; + }; + + map(patient, population, denominator, numerator, exclusion); +}; diff --git a/measures/0004_aod_treatment/components/AODall.json b/measures/0004_aod_treatment/components/AODall.json new file mode 100644 index 0000000..5b7c315 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODall.json @@ -0,0 +1,24 @@ +{ + "and": [ + { + "category": "Patient characteristic", + "title": "Age 12 years of age or older before the measurement period" + }, + { + "or": [ + { + "category": "Diagnosis active", + "title": "First diagnosis of alcohol or drug dependence during an ED, acute or non-acute inpatient, or BH encounter from one year to 45 days before the end of the measurement period = FIRST" + }, + { + "category": "Procedure performed", + "title": "First Alcohol, drug rehab and detox interventions during an acute or non-acute inpatient encounter from one year to 45 days before the end of the measurement period = FIRST" + }, + { + "category": "Procedure Performed", + "title": "First detoxification intervention from one year to 45 days before the end of the measurement period = FIRST" + } + ] + } + ] +} diff --git a/measures/0004_aod_treatment/components/AODall14_map.js b/measures/0004_aod_treatment/components/AODall14_map.js new file mode 100644 index 0000000..f9eefed --- /dev/null +++ b/measures/0004_aod_treatment/components/AODall14_map.js @@ -0,0 +1,32 @@ +function () { + var patient = this; + var measure = patient.measures["0004"]; + if (measure==null) + measure={}; + + <%= init_js_frameworks %> + + var day = 24*60*60; + var year = 365*day; + var effective_date = <%= effective_date %>; + var latest_birthdate = effective_date - 12*year; + + var population = function() { + return((patient.birthdate < latest_birthdate) && alcoholDrugFirstEvent(measure, effective_date)); //This has a sideeffect....see aod_treatment.js + } + + var denominator = function() { + return(alcohol_drug_denominator(measure)); + } + + var numerator = function() { + // numerator1 + return(alcohol_drug_numerator1(measure)); + } + + var exclusion = function() { + return false; + } + + map(patient, population, denominator, numerator, exclusion); +}; diff --git a/measures/0004_aod_treatment/components/AODall30_map.js b/measures/0004_aod_treatment/components/AODall30_map.js new file mode 100644 index 0000000..862fe57 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODall30_map.js @@ -0,0 +1,32 @@ +function () { + var patient = this; + var measure = patient.measures["0004"]; + if (measure==null) + measure={}; + + <%= init_js_frameworks %> + + var day = 24*60*60; + var year = 365*day; + var effective_date = <%= effective_date %>; + var latest_birthdate = effective_date - 12*year; + + var population = function() { + return((patient.birthdate < latest_birthdate) && alcoholDrugFirstEvent(measure, effective_date)); //This has a sideeffect....see aod_treatment.js + } + + var denominator = function() { + return(alcohol_drug_denominator(measure)); + } + + var numerator = function() { + // numerator1 && numerator2 + return(alcohol_drug_numerator1(measure) && alcohol_drug_numerator2(measure)); + } + + var exclusion = function() { + return false; + } + + map(patient, population, denominator, numerator, exclusion); +}; diff --git a/measures/0004_aod_treatment/components/AODnumerator1.json b/measures/0004_aod_treatment/components/AODnumerator1.json new file mode 100644 index 0000000..f08649e --- /dev/null +++ b/measures/0004_aod_treatment/components/AODnumerator1.json @@ -0,0 +1,13 @@ +{ + "or": [ + { + "category": "Procedure Performed", + "title": "Alcohol, drug, rehab an ddetox interventions performed during an acute or non-acute inpatient encounter from one year to 45 days before the end of the measurement period = FIRST_TREATMENT" + }, + { + "category": "Encounter", + "title": "Acute or non-acute inpatient encounter or BH encounter within 14 days of FIRST = FIRST_TREATMENT" + } + ] +} + diff --git a/measures/0004_aod_treatment/components/AODnumerator2.json b/measures/0004_aod_treatment/components/AODnumerator2.json new file mode 100644 index 0000000..3016c76 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODnumerator2.json @@ -0,0 +1,9 @@ +{ + "or": [ + { + "category": "Encounter", + "title": "Acute or non-acute inpatient encounter or BH encounter within 30 days of FIRST_TREATMENT" + } + ] +} + diff --git a/measures/0004_aod_treatment/components/AODyouth.json b/measures/0004_aod_treatment/components/AODyouth.json new file mode 100644 index 0000000..c04b2c0 --- /dev/null +++ b/measures/0004_aod_treatment/components/AODyouth.json @@ -0,0 +1,24 @@ +{ + "and": [ + { + "category": "Patient characteristic", + "title": "Age 12-16 years of age or older before the measurement period" + }, + { + "or": [ + { + "category": "Diagnosis active", + "title": "First diagnosis of alcohol or drug dependence during an ED, acute or non-acute inpatient, or BH encounter from one year to 45 days before the end of the measurement period = FIRST" + }, + { + "category": "Procedure performed", + "title": "First Alcohol, drug rehab and detox interventions during an acute or non-acute inpatient encounter from one year to 45 days before the end of the measurement period = FIRST" + }, + { + "category": "Procedure Performed", + "title": "First detoxification intervention from one year to 45 days before the end of the measurement period = FIRST" + } + ] + } + ] +} diff --git a/measures/0004_aod_treatment/components/AODyouth14_map.js b/measures/0004_aod_treatment/components/AODyouth14_map.js new file mode 100644 index 0000000..e17681d --- /dev/null +++ b/measures/0004_aod_treatment/components/AODyouth14_map.js @@ -0,0 +1,35 @@ +function () { + var patient = this; + var measure = patient.measures["0004"]; + if (measure==null) + measure={}; + + <%= init_js_frameworks %> + + var day = 24*60*60; + var year = 365*day; + var effective_date = <%= effective_date %>; + var latest_birthdate = effective_date - 12*year; + var earliest_birthdate = effective_date - 17*year; + + + var population = function() { + return((patient.birthdate < latest_birthdate) && (patient.birthdate > earliest_birthdate) && + alcoholDrugFirstEvent(measure, effective_date)); //This has a sideeffect....see aod_treatment.js + }; + + var denominator = function() { + return(alcohol_drug_denominator(measure)); + }; + + var numerator = function() { + // numerator1 + return(alcohol_drug_numerator1(measure)); + }; + + var exclusion = function() { + return false; + }; + + map(patient, population, denominator, numerator, exclusion); +}; diff --git a/measures/0004_aod_treatment/components/AODyouth30_map.js b/measures/0004_aod_treatment/components/AODyouth30_map.js new file mode 100644 index 0000000..45fc96d --- /dev/null +++ b/measures/0004_aod_treatment/components/AODyouth30_map.js @@ -0,0 +1,34 @@ +function () { + var patient = this; + var measure = patient.measures["0004"]; + if (measure==null) + measure={}; + + <%= init_js_frameworks %> + + var day = 24*60*60; + var year = 365*day; + var effective_date = <%= effective_date %>; + var latest_birthdate = effective_date - 12*year; + var earliest_birthdate = effective_date - 17*year; + + var population = function() { + return((patient.birthdate < latest_birthdate) && (patient.birthdate > earliest_birthdate) && + alcoholDrugFirstEvent(measure, effective_date)); //This has a sideeffect....see aod_treatment.js + }; + + var denominator = function() { + return(alcohol_drug_denominator(measure)); + }; + + var numerator = function() { + // numerator1 && numerator2 + return(alcohol_drug_numerator1(measure) && alcohol_drug_numerator2(measure)); + }; + + var exclusion = function() { + return false; + }; + + map(patient, population, denominator, numerator, exclusion); +}; diff --git a/measures/0004_aod_treatment/components/root.json b/measures/0004_aod_treatment/components/root.json new file mode 100644 index 0000000..69d1e7c --- /dev/null +++ b/measures/0004_aod_treatment/components/root.json @@ -0,0 +1,43 @@ +{ + "id": "0004", + "properties": "NQF_Retooled_Measure_0004.xlsx.json", + "name": "Initiation and Engagement of Alcohol and Other Drug Dependence Treatment:(a) Initiation, (b) Engagement", + "description": "The percentage of adolescent and adult patients with a new episode of alcohol and other drug (AOD) dependence who initiate treatment through an inpatient AOD admission, outpatient visit, intensive outpatient encounter or partial hospitalization within 14 days of the diagnosis and who initiated treatment and who had two or more additional services with an AOD diagnosis within 30 days of the initiation visit. ", + "category": "Miscellaneous", + "steward": "NCQA", + "parameters": { + "effective_date": { + "description": "Effective end date for measure", + "type": "number", + "format": "utc-sec" + } + }, + "patient": { + "birthdate": { + "description": "Date of birth", + "type": "number", + "category_type": "patient_characteristic", + "format": "utc-sec", + "codes": [ + { + "set": "HL7", + "version": "3.0", + "values": [ + "00110" + ] + } + ] + } + }, + "denominator": { + "not": [ + { + "category": "Diagnosis Active", + "title": "Diagnosis of Alcholol or Drug Dependence less than 60 days prior to FIRST" + } + ] + }, + "exclusions": { + + } +}