forked from rdingwell/measures
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ec94abf
commit cefeabc
Showing
11 changed files
with
940 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
fixtures/measures/0105_anti_depressant/patients/denominator.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// names generated by http://rockstarname.com/ | ||
{ | ||
"first": "Rod", // personal data | ||
"last": "Idol", | ||
"gender": "M", | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"measures": { // bag of measures, one entry per measure | ||
"0105": { | ||
"encounter_outpt_bh_encounter": [1262304000], // Time.gm(2010, 1, 1).to_i | ||
"major_depression_diagnosis_active": [1262304000, 1279152000], | ||
"antidepressant_medications_medication_dispensed": [1262303000,1262305000], | ||
"antidepressant_medications_medication_ordered": [1262303000,1262305000], | ||
"antidepressant_medications_medication_active": [1262303000,1262305000] | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
fixtures/measures/0105_anti_depressant/patients/not_population.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// names generated by http://rockstarname.com/ | ||
{ | ||
"first": "Sindy", // personal data | ||
"last": "Ford", | ||
"gender": "F", | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"measures": { // bag of measures, one entry per measure | ||
"0105": { | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
fixtures/measures/0105_anti_depressant/patients/numerator.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// names generated by http://rockstarname.com/ | ||
{ | ||
"first": "Major", // personal data | ||
"last": "Burns", | ||
"gender": "M", | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"measures": { // bag of measures, one entry per measure | ||
"0105": { | ||
"encounter_outpt_bh_encounter": [1262304000], // Time.gm(2010, 1, 1).to_i | ||
"major_depression_diagnosis_active": [1262304000, 1279152000], | ||
"antidepressant_medications_medication_dispensed": [1262303000,1262305000,1271030400,1271050400], // 2010-04-12 | ||
"antidepressant_medications_medication_ordered": [1262303000,1262305000], | ||
"antidepressant_medications_medication_active": [1262303000,1262305000] | ||
|
||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
fixtures/measures/0105_anti_depressant/patients/numerator2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// names generated by http://rockstarname.com/ | ||
{ | ||
"first": "Mike", // personal data | ||
"last": "Bundy", | ||
"gender": "M", | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"measures": { // bag of measures, one entry per measure | ||
"0105": { | ||
"encounter_outpt_bh_encounter": [1262304000], // Time.gm(2010, 1, 1).to_i | ||
"major_depression_diagnosis_active": [1262304000, 1279152000], | ||
"antidepressant_medications_medication_dispensed": [1262303000,1262305000,1278633600,1278643600],// 2010-07-09 | ||
"antidepressant_medications_medication_ordered": [1262303000,1262305000], | ||
"antidepressant_medications_medication_active": [1262303000,1262305000] | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
fixtures/measures/0105_anti_depressant/patients/population.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// names generated by http://rockstarname.com/ | ||
{ | ||
"first": "Mindy", // personal data | ||
"last": "Chrysler", | ||
"gender": "F", | ||
"birthdate": 645408000, // Time.gm(1990, 6, 15).to_i | ||
"measures": { // bag of measures, one entry per measure | ||
"0105": { | ||
"encounter_outpt_bh_encounter": [1262304000], // Time.gm(2010, 1, 1).to_i | ||
"major_depression_diagnosis_active": [1262304000, 1279152000], | ||
"antidepressant_medications_medication_dispensed": [1262303000,1262305000], | ||
"antidepressant_medications_medication_ordered": [1262303000,1262305000], | ||
"antidepressant_medications_medication_active": [1262303000,1262305000] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"results":[ | ||
{ | ||
"id": "0105", | ||
"sub_id": "a", | ||
"initialPopulation": 4, | ||
"numerator": 2, | ||
"denominator": 4, | ||
"exclusions": 0 | ||
}, | ||
{ | ||
"id": "0105", | ||
"sub_id": "b", | ||
"initialPopulation": 4, | ||
"numerator": 1, | ||
"denominator": 4, | ||
"exclusions": 0 | ||
} | ||
] | ||
} | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
38 changes: 38 additions & 0 deletions
38
measures/0105_anti_depressant/0105_NQF_Anti_Depressant_Treatment.col
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"root": "root.json", | ||
"combinations": [ | ||
{ | ||
"metadata": { | ||
"sub_id": "a", | ||
"subtitle": "Antidepressant medication dispensed for at least 84 days following first diagnosis of major depression", | ||
"short_subtitle": "84day", | ||
"numerator": { | ||
"and": [ | ||
{ | ||
"category": "Medication Dispensed", | ||
"title": "Antidepressant medication dispensed for at least 84 days following first diagnosis of major depression" | ||
} | ||
] | ||
} | ||
}, | ||
"map_fn": "84day_map.js" | ||
}, | ||
{ | ||
"metadata": { | ||
"sub_id": "b", | ||
"subtitle": "Antidepressant medication dispensed for at least 180 days following first diagnosis of major depression", | ||
"short_subtitle": "180day", | ||
"numerator": { | ||
"and": [ | ||
{ | ||
"category": "Medication Dispensed", | ||
"title": "Antidepressant medication dispensed for at least 180 days following first diagnosis of major depression" | ||
} | ||
] | ||
} | ||
}, | ||
"map_fn": "180day_map.js" | ||
|
||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function () { | ||
var patient = this; | ||
var measure = patient.measures["0105"]; | ||
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 +245*day); | ||
var earliest_encounter = effective_date - (1*year + 245*day); | ||
var latest_encounter = effective_date - 245*day; | ||
var first_diagnosis = null; | ||
var encounters_during_interval = null; | ||
|
||
var population = function() { | ||
if(patient.birthdate > latest_birthdate){ | ||
return(false); | ||
} | ||
var all_encounters = normalize([ | ||
measure.encounter_ed_encounter, measure.encounter_outpt_bh_req_pos_encounter,measure.encounter_outpt_bh_encounter]); | ||
var encounters_during_interval = inRange(all_encounters, earliest_encounter, latest_encounter); | ||
var major_depression_during_interval = inRange(measure.major_depression_diagnosis_active, earliest_encounter, latest_encounter); | ||
|
||
var depression_during_encounter = allDiagnosesDuringEncounter(measure.major_depression_diagnosis_active, all_encounters, earliest_encounter, latest_encounter); | ||
if(depression_during_encounter.length == 0) return(false); | ||
|
||
first_diagnosis = _.min(depression_during_encounter); | ||
var meds_dispensed_before_first_diagnosis30 = inRange(measure.antidepressant_medications_medication_dispensed,first_diagnosis - 30*day, first_diagnosis); | ||
var meds_dispensed_after_first_diagnosis14 = inRange(measure.antidepressant_medications_medication_dispensed, first_diagnosis, first_diagnosis + 14*day); | ||
var meds_ordered_before_first_diagnosis30 = inRange(measure.antidepressant_medications_medication_ordered,first_diagnosis - 30*day, first_diagnosis); | ||
var meds_ordered_after_first_diagnosis14 = inRange(measure.antidepressant_medications_medication_ordered, first_diagnosis, first_diagnosis + 14*day); | ||
var meds_active_before_first_diagnosis30 = inRange(measure.antidepressant_medications_medication_active,first_diagnosis - 30*day, first_diagnosis); | ||
var meds_active_after_first_diagnosis14 = inRange(measure.antidepressant_medications_medication_active, first_diagnosis, first_diagnosis + 14*day); | ||
|
||
return(meds_dispensed_before_first_diagnosis30 && meds_ordered_before_first_diagnosis30 && | ||
meds_active_before_first_diagnosis30 && | ||
meds_dispensed_after_first_diagnosis14 && meds_ordered_after_first_diagnosis14 && | ||
meds_active_after_first_diagnosis14); | ||
|
||
} | ||
|
||
var denominator = function() { | ||
var earlier_major_depression = inRange(measure.major_depression_diagnosis_active, first_diagnosis - 120*day, first_diagnosis-1); | ||
var earlier_depression = inRange(measure.depression_diagnosis_active, first_diagnosis - 120*day, first_diagnosis-1); | ||
|
||
return((earlier_major_depression + earlier_depression) == 0); | ||
} | ||
|
||
|
||
var numerator = function() { | ||
var meds_after = first_diagnosis + 180*day; | ||
var max_meds = _.max(measure.antidepressant_medications_medication_dispensed); | ||
return(meds_after < max_meds); | ||
} | ||
|
||
var exclusion = function() { | ||
return false; | ||
} | ||
|
||
map(patient, population, denominator, numerator, exclusion); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
function () { | ||
var patient = this; | ||
var measure = patient.measures["0105"]; | ||
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 +245*day); | ||
var earliest_encounter = effective_date - (1*year + 245*day); | ||
var latest_encounter = effective_date - 245*day; | ||
var first_diagnosis = null; | ||
var encounters_during_interval = null; | ||
|
||
var population = function() { | ||
if(patient.birthdate > latest_birthdate){ | ||
return(false); | ||
} | ||
var all_encounters = normalize([ | ||
measure.encounter_ed_encounter, measure.encounter_outpt_bh_req_pos_encounter,measure.encounter_outpt_bh_encounter]); | ||
var encounters_during_interval = inRange(all_encounters, earliest_encounter, latest_encounter); | ||
var major_depression_during_interval = inRange(measure.major_depression_diagnosis_active, earliest_encounter, latest_encounter); | ||
|
||
var depression_during_encounter = allDiagnosesDuringEncounter(measure.major_depression_diagnosis_active, all_encounters, earliest_encounter, latest_encounter); | ||
if(depression_during_encounter.length == 0) return(false); | ||
|
||
first_diagnosis = _.min(depression_during_encounter); | ||
var meds_dispensed_before_first_diagnosis30 = inRange(measure.antidepressant_medications_medication_dispensed,first_diagnosis - 30*day, first_diagnosis); | ||
var meds_dispensed_after_first_diagnosis14 = inRange(measure.antidepressant_medications_medication_dispensed, first_diagnosis, first_diagnosis + 14*day); | ||
var meds_ordered_before_first_diagnosis30 = inRange(measure.antidepressant_medications_medication_ordered,first_diagnosis - 30*day, first_diagnosis); | ||
var meds_ordered_after_first_diagnosis14 = inRange(measure.antidepressant_medications_medication_ordered, first_diagnosis, first_diagnosis + 14*day); | ||
var meds_active_before_first_diagnosis30 = inRange(measure.antidepressant_medications_medication_active,first_diagnosis - 30*day, first_diagnosis); | ||
var meds_active_after_first_diagnosis14 = inRange(measure.antidepressant_medications_medication_active, first_diagnosis, first_diagnosis + 14*day); | ||
|
||
return(meds_dispensed_before_first_diagnosis30 && meds_ordered_before_first_diagnosis30 && | ||
meds_active_before_first_diagnosis30 && | ||
meds_dispensed_after_first_diagnosis14 && meds_ordered_after_first_diagnosis14 && | ||
meds_active_after_first_diagnosis14); | ||
|
||
|
||
} | ||
|
||
var denominator = function() { | ||
var earlier_major_depression = inRange(measure.major_depression_diagnosis_active, first_diagnosis - 120*day, first_diagnosis-1); | ||
var earlier_depression = inRange(measure.depression_diagnosis_active, first_diagnosis - 120*day, first_diagnosis-1); | ||
|
||
return((earlier_major_depression + earlier_depression) == 0); | ||
} | ||
|
||
|
||
var numerator = function() { | ||
var meds_after = first_diagnosis + 84*day; | ||
var max_meds = _.max(measure.antidepressant_medications_medication_dispensed); | ||
return(meds_after < max_meds); } | ||
|
||
var exclusion = function() { | ||
return false; | ||
} | ||
|
||
map(patient, population, denominator, numerator, exclusion); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
{ | ||
"id": "0105", | ||
"properties": "NQF_Retooled_Measure_0105.xlsx.json", | ||
"name": "Anti‐depressant medication management: (a) Effective Acute Phase Treatment, (b)Effective Continuation Phase Treatment", | ||
"description": "The percentage of patients 18 years of age and older who were diagnosed with a new episode of major depression, treated with antidepressant medication, and who remained on an antidepressant medication treatment.", | ||
"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" | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"population": { | ||
"and": [ | ||
{ | ||
"category": "Patient characteristic", | ||
"title": "Age 18 years of age or older as of April 30 of the measurement period" | ||
}, | ||
{ | ||
"category": "Diagnosis active", | ||
"title": "New diagnosis of Major Depression during an encounter from May 1st in the previous year until April 30 of the measurement period" | ||
}, | ||
{ | ||
"category": "Medication dispensed", | ||
"title": "Antidepressant medication dispensed within 30 days prior to first diagnosis of major depression" | ||
}, | ||
{ | ||
"category": "Medication dispensed", | ||
"title": "Antidepressant medication dispensed within 14 days following first diagnosis of major depression" | ||
}, | ||
{ | ||
"category": "Medication ordered", | ||
"title": "Antidepressant medication ordered within 30 days prior to first diagnosis of major depression" | ||
}, | ||
{ | ||
"category": "Medication ordered", | ||
"title": "Antidepressant medication ordered within 14 days following first diagnosis of major depression" | ||
}, | ||
{ | ||
"category": "Medication active", | ||
"title": "Antidepressant medication active within 30 days prior to first diagnosis of major depression" | ||
}, | ||
{ | ||
"category": "Medication active", | ||
"title": "Antidepressant medication active within 14 days following first diagnosis of major depression" | ||
} | ||
] | ||
}, | ||
"denominator": { | ||
"not": [ | ||
{ | ||
"or": [ | ||
{ | ||
"category": "Diagnosis Active", | ||
"title": "Diagnosis of Major Depression less than 120 days prior to first diagnosis of major depression in population criteria" | ||
}, | ||
{ | ||
"category": "Diagnosis Active", | ||
"title": "Diagnosis of Depression less than 120 days prior to first diagnosis of major depression in population criteria" | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
"exclusions": { | ||
|
||
} | ||
} |