Skip to content

Commit

Permalink
Add measure 0389 overuse of bone scan for prostate cancer
Browse files Browse the repository at this point in the history
  • Loading branch information
hadleynet committed Mar 24, 2011
1 parent d1cf979 commit 90c3e8c
Show file tree
Hide file tree
Showing 11 changed files with 273 additions and 133 deletions.
@@ -0,0 +1,26 @@
{
"first": "Mercy", // personal data
"last": "Watson",
"gender": "F",
"birthdate": -132624000, // Time.gm(1965, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0389": {
"prostate_cancer_diagnosis_active": [1272672000], // Time.gm(2010,5,1).to_i
"prostate_cancer_treatment_procedure_performed": [1272672000], // Time.gm(2010,5,1).to_i
"ajcc_cancer_stage_low_risk_recurrence_prostate_cancer_procedure_result": [1270080000], // Time.gm(2010,4,1).to_i
"prostate_specific_antigen_test_laboratory_test_result": [
{
"date": [1270080000], // Time.gm(2010,4,1).to_i
"value": 9
}
],
"gleason_score_laboratory_test_result": [
{
"date": [1270080000], // Time.gm(2010,4,1).to_i
"value": 5
}
],
"bone_scan_diagnostic_study_performed": [1275350400] // Time.gm(2010,6,1).to_i]
}
}
}
27 changes: 27 additions & 0 deletions fixtures/measures/0389_prostate_bone_scan/patients/exclusion.json
@@ -0,0 +1,27 @@
{
"first": "Doug", // personal data
"last": "Bobbins",
"gender": "M",
"birthdate": -132624000, // Time.gm(1965, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0389": {
"prostate_cancer_diagnosis_active": [1272672000], // Time.gm(2010,5,1).to_i
"prostate_cancer_treatment_procedure_performed": [1272672000], // Time.gm(2010,5,1).to_i
"ajcc_cancer_stage_low_risk_recurrence_prostate_cancer_procedure_result": [1270080000], // Time.gm(2010,4,1).to_i
"prostate_specific_antigen_test_laboratory_test_result": [
{
"date": [1270080000], // Time.gm(2010,4,1).to_i
"value": 9
}
],
"gleason_score_laboratory_test_result": [
{
"date": [1270080000], // Time.gm(2010,4,1).to_i
"value": 5
}
],
"bone_scan_diagnostic_study_performed": [1275350400], // Time.gm(2010,6,1).to_i]
"salvage_therapy_procedure_performed": [1275350400] // Time.gm(2010,6,1).to_i
}
}
}
@@ -0,0 +1,10 @@
{
"first": "Marnie", // personal data
"last": "Mason",
"gender": "F",
"birthdate": -132624000, // Time.gm(1965, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0389": {
}
}
}
26 changes: 26 additions & 0 deletions fixtures/measures/0389_prostate_bone_scan/patients/numerator.json
@@ -0,0 +1,26 @@
{
"first": "Mercy", // personal data
"last": "Street",
"gender": "F",
"birthdate": -132624000, // Time.gm(1965, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0389": {
"prostate_cancer_diagnosis_active": [1272672000], // Time.gm(2010,5,1).to_i
"prostate_cancer_treatment_procedure_performed": [1272672000], // Time.gm(2010,5,1).to_i
"ajcc_cancer_stage_low_risk_recurrence_prostate_cancer_procedure_result": [1270080000], // Time.gm(2010,4,1).to_i
"prostate_specific_antigen_test_laboratory_test_result": [
{
"date": [1270080000], // Time.gm(2010,4,1).to_i
"value": 9
}
],
"gleason_score_laboratory_test_result": [
{
"date": [1270080000], // Time.gm(2010,4,1).to_i
"value": 5
}
],
"bone_scan_diagnostic_study_performed": [1270080000] // Time.gm(2010,4,1).to_i] before diagnosis so shouldn't count
}
}
}
11 changes: 11 additions & 0 deletions fixtures/measures/0389_prostate_bone_scan/patients/population.json
@@ -0,0 +1,11 @@
{
"first": "Merril", // personal data
"last": "Peterson",
"gender": "M",
"birthdate": -132624000, // Time.gm(1965, 10, 19).to_i
"measures": { // bag of measures, one entry per measure
"0389": {
"prostate_cancer_diagnosis_active": [1272672000] // Time.gm(2010,5,1).to_i
}
}
}
6 changes: 6 additions & 0 deletions fixtures/measures/0389_prostate_bone_scan/result.json
@@ -0,0 +1,6 @@
{
"initialPopulation": 4,
"numerator": 1,
"denominator": 2,
"exclusions": 1
}
16 changes: 16 additions & 0 deletions measure_props/NQF_Retooled_Measure_0389.xlsx.json.patch
@@ -0,0 +1,16 @@
{
"A_1335": {
"value": {
"type": "number",
"description": "Gleason score",
"date_description": "Date of Gleason score"
}
},
"A_1338": {
"value": {
"type": "number",
"description": "Prostate cancer specific antigen test",
"date_description": "Date of prostate cancer specific antigen test"
}
}
}
58 changes: 58 additions & 0 deletions measures/0389_prostate_bone_scan/0389_NQF_Prostate_Bone_Scan.js
@@ -0,0 +1,58 @@
function () {
var patient = this;
var measure = patient.measures["0389"];
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 - 18*year;
var earliest_encounter = effective_date - 1*year;

var population = function() {
var prostate_cancer = lessThan(measure.prostate_cancer_diagnosis_active, effective_date);

return prostate_cancer;
}

var denominator = function() {
var prostate_cancer_treatments = selectWithinRange(measure.prostate_cancer_treatment_procedure_performed,
earliest_encounter, effective_date);
if (prostate_cancer_treatments.length==0)
return false;
var final_treatment = _.max(prostate_cancer_treatments);
var low_risk_prostate_cancer = actionFollowingSomething(
measure.ajcc_cancer_stage_low_risk_recurrence_prostate_cancer_procedure_result,
measure.prostate_cancer_treatment_procedure_performed);
var MAX_ANTIGEN = 10;
var antigens = minValueInDateRange(measure.prostate_specific_antigen_test_laboratory_test_result, -Infinity, final_treatment, MAX_ANTIGEN+1);
var MAX_GLEASON = 6;
var gleason = minValueInDateRange(measure.gleason_score_laboratory_test_result, -Infinity, final_treatment, MAX_GLEASON+1);
var gleason_six = inRange(measure.gleason_score_6_laboratory_test_result, -Infinity, final_treatment);
return low_risk_prostate_cancer && // already checked for treatment above
(antigens <= MAX_ANTIGEN) &&
(gleason<=MAX_GLEASON || gleason6);
}

var numerator = function() {
var bone_scan = actionFollowingSomething(
measure.prostate_cancer_diagnosis_active, measure.bone_scan_diagnostic_study_performed);
return !(bone_scan);
}

var exclusion = function() {
var pain = actionFollowingSomething(
measure.prostate_cancer_diagnosis_active, measure.pain_related_to_prostate_cancer_diagnosis_active);
var salvage = actionFollowingSomething(
measure.prostate_cancer_diagnosis_active, measure.salvage_therapy_procedure_performed);
// commented out waiting for issue response - would yield 100% result for measure if included
// var bone_scan = actionFollowingSomething(
// measure.prostate_cancer_diagnosis_active, measure.bone_scan_diagnostic_study_performed);
return (pain || salvage /* || bone_scan */);
}

map(patient, population, denominator, numerator, exclusion);
};
@@ -1,92 +1,92 @@
{
"id": "0389",
"properties": "NQF_Retooled_Measure_0387.xlsx.json",
"name": "Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer Patients",
"description": "Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy, OR cryotherapy who did not have a bone scan performed at any time since diagnosis of prostate cancer.",
"category": "Cancer",
"steward": "AMA",
"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": "Diagnosis active",
"title": "Active prostate cancer"
}
]
},
"denominator": {
"and": [
{
"category": "Procedure performed",
"title": "Prostate cancer treatment performed"
},
{
"category": "Procedure result",
"title": "AJCC cancer stage low risk recurrence prostate cancer"
},
{
"category": "Laboratory test result",
"title": "Prostate-specific antigen test result <= 10mg/dL"
},
{
"or": [
{
"category": "Laboratory test result",
"title": "Gleason score result <= 6"
},
{
"category": "Laboratory test result",
"title": "Gleason score <= 6"
}
]
}
]
},
"numerator": {
"and": [
{
"category": "Diagnostic study not performed",
"title": "Bone scan not performed"
}
]
},
"exclusions": {
"or": [
{
"category": "Diagnosis active",
"title": "Active pain related to prostate cancer"
},
{
"category": "Procedure performed",
"title": "Salvage therapy performed"
},
{
"category": "Diagnostic study performed",
"title": "Bone scan performed"
}
]
}
}
{
"id": "0389",
"properties": "NQF_Retooled_Measure_0389.xlsx.json",
"name": "Prostate Cancer: Avoidance of Overuse of Bone Scan for Staging Low Risk Prostate Cancer Patients",
"description": "Percentage of patients, regardless of age, with a diagnosis of prostate cancer at low risk of recurrence receiving interstitial prostate brachytherapy, OR external beam radiotherapy to the prostate, OR radical prostatectomy, OR cryotherapy who did not have a bone scan performed at any time since diagnosis of prostate cancer.",
"category": "Cancer",
"steward": "AMA",
"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": "Diagnosis active",
"title": "Prostate cancer"
}
]
},
"denominator": {
"and": [
{
"category": "Procedure performed",
"title": "Prostate cancer treatment"
},
{
"category": "Procedure result",
"title": "AJCC cancer stage low risk recurrence prostate cancer"
},
{
"category": "Laboratory test result",
"title": "Prostate-specific antigen result <= 10mg/dL"
},
{
"or": [
{
"category": "Laboratory test result",
"title": "Gleason score, result <= 6"
},
{
"category": "Laboratory test result",
"title": "Gleason score <= 6"
}
]
}
]
},
"numerator": {
"and": [
{
"category": "Diagnostic study",
"title": "Bone scan not performed"
}
]
},
"exclusions": {
"or": [
{
"category": "Diagnosis active",
"title": "Pain related to prostate cancer"
},
{
"category": "Procedure performed",
"title": "Salvage therapy"
},
{
"category": "Diagnostic study performed",
"title": "Bone scan with reason"
}
]
}
}
3 changes: 1 addition & 2 deletions spec/importer/importer_spec.rb
Expand Up @@ -64,9 +64,8 @@ def get_measure_info(c32_file, measure_id, loader)

# 0389/A_c271 Bone Scan
it "should import the information relevant to 0389" do
pending "Waiting for measure 0389 to be completed"
measure_info = get_measure_info('fixtures/c32_fragments/testingc32.xml', '0389', @loader)
measure_info['bone_scan'].should include(955026000)
measure_info['bone_scan_diagnostic_study_performed'].should include(955026000)
end

# 0387/A_c278History of Breast Cancer (basically inactive breast cancer)
Expand Down

0 comments on commit 90c3e8c

Please sign in to comment.