Skip to content

Commit

Permalink
Rework measure 0061 diabetes bp to use generated properties
Browse files Browse the repository at this point in the history
  • Loading branch information
hadleynet committed Feb 24, 2011
1 parent 4ce3882 commit 389c8d3
Show file tree
Hide file tree
Showing 15 changed files with 297 additions and 168 deletions.
11 changes: 11 additions & 0 deletions fixtures/measures/0061_diabetes_bp/patients/denominator1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"first": "Bert", // personal data
"last": "Bloggs",
"gender": "M",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0061": {
"medications_indicative_of_diabetes_medication_dispensed": 1277856000 // Time.gm(2010, 6, 30).to_i
}
}
}
12 changes: 12 additions & 0 deletions fixtures/measures/0061_diabetes_bp/patients/denominator2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"first": "Sarah", // personal data
"last": "Bloggs",
"gender": "F",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0061": {
"diabetes_diagnosis_active": 1277856000, // Time.gm(2010, 6, 30).to_i
"encounter_acute_inpatient_or_ed_encounter": 1277856000 // Time.gm(2010, 6, 30).to_i
}
}
}
12 changes: 12 additions & 0 deletions fixtures/measures/0061_diabetes_bp/patients/denominator3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"first": "Paul", // personal data
"last": "Hewson",
"gender": "M",
"birthdate": 340761600, // Time.gm(1980, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0061": {
"diabetes_diagnosis_active": 1277856000, // Time.gm(2010, 6, 30).to_i
"encounter_non_acute_inpatient_outpatient_or_ophthalmology_encounter": [1275177600, 1277856000] // Time.gm(2010, 5, 30).to_i and Time.gm(2010, 6, 30).to_i
}
}
}
32 changes: 32 additions & 0 deletions fixtures/measures/0061_diabetes_bp/patients/denominator4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{ // not in the numerator since bp result is normal
"first": "Curt", // personal data
"last": "Smith",
"gender": "M",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0061": {
"medications_indicative_of_diabetes_medication_dispensed": 1277856000, // Time.gm(2010, 6, 30).to_i
"encounter_non_acute_inpatient_outpatient_or_ophthalmology_encounter": [1275177600, 1277856000], // Time.gm(2010, 5, 30).to_i and Time.gm(2010, 6, 30).to_i
"systolic_blood_pressure_physical_exam_finding": [
{
"date": 1277856000, // Time.gm(2010, 6, 30).to_i
"value": 130
},
{
"date": 1277856000, // Time.gm(2010, 6, 30).to_i
"value": 150
}
],
"diastolic_blood_pressure_physical_exam_finding": [
{
"date": 1277856000, // Time.gm(2010, 6, 30).to_i
"value": 85
},
{
"date": 1277856000, // Time.gm(2010, 6, 30).to_i
"value": 100
}
]
}
}
}
12 changes: 12 additions & 0 deletions fixtures/measures/0061_diabetes_bp/patients/exclusion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"first": "Sarah", // personal data
"last": "Evans",
"gender": "F",
"birthdate": -467337600, // Time.gm(1955, 3, 12).to_i
"measures": { // bag of measures, one entry per measure
"0061": {
"medications_indicative_of_diabetes_medication_dispensed": 1277856000, // Time.gm(2010, 6, 30).to_i
"polycystic_ovaries_diagnosis_active": 1272585600 // Time.gm(2010, 4, 30).to_i
}
}
}
24 changes: 24 additions & 0 deletions fixtures/measures/0061_diabetes_bp/patients/numerator1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"first": "Suzanne",
"last": "Smith",
"gender": "F",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": {
"0061": {
"medications_indicative_of_diabetes_medication_dispensed": 1277856000, // Time.gm(2010, 6, 30).to_i
"encounter_non_acute_inpatient_outpatient_or_ophthalmology_encounter": [1275177600, 1277856000], // Time.gm(2010, 5, 30).to_i and Time.gm(2010, 6, 30).to_i
"systolic_blood_pressure_physical_exam_finding": [
{
"date": 1277856000, // Time.gm(2010, 6, 30).to_i
"value": 145
}
],
"diastolic_blood_pressure_physical_exam_finding": [
{
"date": 1277856000, // Time.gm(2010, 6, 30).to_i
"value": 85
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"first": "Lilian", // personal data
"last": "Smith",
"gender": "F",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"first": "Jennifer", // personal data
"last": "Thompson",
"gender": "F",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"first": "Emily", // personal data
"last": "Jones",
"gender": "F",
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
}
}
7 changes: 7 additions & 0 deletions fixtures/measures/0061_diabetes_bp/result.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"id": "0061",
"initialPopulation": 9,
"numerator": 1,
"denominator": 5,
"exclusions": 1
}
19 changes: 19 additions & 0 deletions measure_props/NQF_Retooled_Measure_0061.xlsx.json.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"N_364": {
"standard_code_list": "163031004, 174255007, 23154005, 251073000, 271650006, 314451001, 314452008, 314453003, 314454009, 314455005, 314456006, 314457002, 314458007, 314459004, 314460009, 314461008, 314462001, 314465004, 315613000, 400975005, 407555005, 407557002, 42689008, 53813002",
"value": {
"type": "number",
"description": "diastolic blood pressure",
"date_description": "Date of diastolic blood pressure"
}
},
"N_1279": {
"standard_code_list": "12929001, 163030003, 251070002, 251071003, 271649006, 314438006, 314439003, 314440001, 314441002, 314442009, 314443004, 314444005, 314445006, 314446007, 314447003, 314448008, 314449000, 314464000, 315612005, 399304008, 400974009, 407554009, 407556006, 72313002, 81010002",
"value": {
"type": "number",
"description": "systolic blood pressure",
"date_description": "Date of systolic blood pressure"
}
}
}

44 changes: 0 additions & 44 deletions measures/0055_diabetes_foot/0055_NQF_Diabetes_Eye_Exam.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,12 @@ function () {
// the denominator, and the exclusions are shared in the 'diabetes_utils.js' file
// that is located in the /js directory of the project
var numerator = function() {
var latest_encounter_acute_inpatient=null, latest_encounter_non_acute_inpatient=null, latest_encounter_outpatient=null, latest_encounter_outpatient_ophthamological_services=null;
if (measure.encounter_acute_inpatient)
latest_encounter_acute_inpatient = _.max(_.select(measure.encounter_acute_inpatient, function(when){return inRange(when, period_start, effective_date); }));
if (measure.encounter_non_acute_inpatient)
latest_encounter_non_acute_inpatient = _.max(_.select(measure.encounter_non_acute_inpatient, function(when){return inRange(when, period_start, effective_date); }));
if (measure.encounter_outpatient)
latest_encounter_outpatient = _.max(_.select(measure.encounter_outpatient, function(when){return inRange(when, period_start, effective_date); }));
if (measure.encounter_outpatient_ophthamological_services)
latest_encounter_outpatient_ophthamological_services = _.max(_.select(measure.encounter_outpatient_ophthamological_services, function(when){return inRange(when, period_start, effective_date); }));
latest_encounter = _.max([latest_encounter_acute_inpatient, latest_encounter_non_acute_inpatient, latest_encounter_outpatient, latest_encounter_outpatient_ophthamological_services]);
var latest_encounter_acute=null, latest_encounter_other=null;
if (measure.encounter_acute_inpatient_or_ed_encounter)
latest_encounter_acute = _.max(_.select(measure.encounter_acute_inpatient_or_ed_encounter, function(when){return inRange(when, period_start, effective_date); }));
if (measure.encounter_non_acute_inpatient_outpatient_or_ophthalmology_encounter)
latest_encounter_other = _.max(_.select(measure.encounter_non_acute_inpatient_outpatient_or_ophthalmology_encounter, function(when){return inRange(when, period_start, effective_date); }));
latest_encounter = _.max([latest_encounter_acute, latest_encounter_other]);

if (latest_encounter==null)
return false;
Expand All @@ -47,8 +43,8 @@ function () {
start_latest_encounter = latest_encounter-day;
end_latest_encounter = latest_encounter+day;

systolic_min = minValueInDateRange(measure.systolic_blood_pressure, start_latest_encounter, end_latest_encounter, 200);
diastolic_min = minValueInDateRange(measure.diastolic_blood_pressure, start_latest_encounter, end_latest_encounter, 200);
systolic_min = minValueInDateRange(measure.systolic_blood_pressure_physical_exam_finding, start_latest_encounter, end_latest_encounter, 200);
diastolic_min = minValueInDateRange(measure.diastolic_blood_pressure_physical_exam_finding, start_latest_encounter, end_latest_encounter, 200);
return (systolic_min<140 && diastolic_min<90);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"id": "0061",
"properties": "NQF_Retooled_Measure_0061.xlsx.json",
"name": "Diabetes Blood Pressure Management",
"description": "The percentage of patients 18–75 years of age with diabetes (type 1 or type 2) who had BP <140/90 mmHg.",
"category": "Diabetes",
"steward": "NCQA",
"parameters": {
"effective_date": {
"description": "Effective end date for measure",
"type": "number",
"format": "utc-sec"
}
},
"patient": {
"birthdate": {
"description": "Date of birth",
"critical": true,
"type": "number",
"format": "utc-sec",
"codes": [
{
"set": "HL7",
"version": "3.0",
"values": [
"00110"
]
}
]
}
},
"population": {
"category": "Patient Characteristic",
"title": "Age between 17 and 74"
},
"denominator": {
"or": [
{
"category": "Medication",
"title": "Medication Indicative of Diabetes Within 2 years"
},
{
"and": [
{
"category": "Diagnosis",
"title": "Diabetes Active Within 2 years"
},
{
"or": [
{
"category": "Encounter",
"title": "Acute Inpatient or ED"
},
{
"category": "Encounter",
"title": "Non‐Acute Inpatient, Outpatient, or Ophthalmology"
}
]
}
]
}
]
},
"numerator": {
"and": [
{
"category": "Physical Exam Finding",
"title": "Minimum diastolic BP during most recent encounter < 90"
},
{
"category": "Physical Exam Finding",
"title": "Minimum systolic BP during most recent encounter < 140"
}
]
},
"exclusions": {
"or": [
{
"and": [
{
"category": "Diagnosis",
"title": "Polycystic Ovaries"
},
{
"and": [
{
"category": "Diagnosis",
"title": "Diabetes Not Active Within 2 years"
},
{
"or": [
{
"category": "Encounter",
"title": "No Acute Inpatient or ED"
},
{
"category": "Encounter",
"title": "No Non‐Acute Inpatient, Outpatient, or Ophthalmology"
}
]
}
]
}
]
},
{
"and": [
{
"category": "Diagnosis",
"title": "Gestational Diabetes or Steroid Induced Diabetes Within 2 years"
},
{
"category": "Medication",
"title": "Medications Indicative of Diabetes Within 2 years"
},
{
"category": "Diagnosis",
"title": "Diabetes Active within 2 years"
},
{
"or": [
{
"category": "Encounter",
"title": "Acute Inpatient or ED Within 2 years"
},
{
"category": "Encounter",
"title": "Non‐Acute Inpatient, Outpatient, or Opthalmology"
}
]
}
]
}
]
}
}
Loading

0 comments on commit 389c8d3

Please sign in to comment.