quality-measure-engine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +6 -0
- data/Gemfile +18 -0
- data/Gemfile.lock +50 -0
- data/README.md +24 -0
- data/Rakefile +26 -0
- data/VERSION +1 -0
- data/fixtures/complex_measure.json +36 -0
- data/fixtures/result_example.json +6 -0
- data/lib/patches/v8.rb +20 -0
- data/lib/qme/map/map_reduce_builder.rb +169 -0
- data/lib/qme/map/map_reduce_executor.rb +31 -0
- data/lib/qme/query/json_document_builder.rb +124 -0
- data/lib/quality_measure_engine.rb +11 -0
- data/measures/0032/0032_NQF_Cervical_Cancer_Screening.json +171 -0
- data/measures/0032/patients/denominator1.json +10 -0
- data/measures/0032/patients/denominator2.json +10 -0
- data/measures/0032/patients/numerator1.json +11 -0
- data/measures/0032/patients/population1.json +9 -0
- data/measures/0032/patients/population2.json +11 -0
- data/measures/0032/result/result.json +6 -0
- data/measures/0043/0043_NQF_PneumoniaVaccinationStatusForOlderAdults.json +71 -0
- data/measures/0043/patients/denominator.json +11 -0
- data/measures/0043/patients/numerator.json +11 -0
- data/measures/0043/patients/population.json +10 -0
- data/measures/0043/result/result.json +6 -0
- data/quality-measure-engine.gemspec +102 -0
- data/schema/result.json +28 -0
- data/schema/schema.json +143 -0
- data/spec/qme/map/map_reduce_builder_spec.rb +64 -0
- data/spec/qme/measures_spec.rb +50 -0
- data/spec/qme/query/json_document_builder_spec.rb +56 -0
- data/spec/schema_spec.rb +21 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/validate_measures_spec.rb +21 -0
- metadata +221 -0
@@ -0,0 +1,171 @@
|
|
1
|
+
{
|
2
|
+
"id": "0032",
|
3
|
+
"name": "Cervical Cancer Screening",
|
4
|
+
"steward": "NCQA",
|
5
|
+
"parameters": {
|
6
|
+
"effective_date": {
|
7
|
+
"name": "Effective end date for measure",
|
8
|
+
"type": "long"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
"properties": {
|
12
|
+
"birthdate": {
|
13
|
+
"name": "Date of birth",
|
14
|
+
"type": "long",
|
15
|
+
"codes": [
|
16
|
+
{
|
17
|
+
"set": "HL7",
|
18
|
+
"version": "3.0",
|
19
|
+
"values": ["00110"]
|
20
|
+
}
|
21
|
+
]
|
22
|
+
},
|
23
|
+
"encounter_outpatient": {
|
24
|
+
"name": "Date of outpatient encounter",
|
25
|
+
"type": "long",
|
26
|
+
"codes": [
|
27
|
+
{
|
28
|
+
"set": "CPT",
|
29
|
+
"version": "06/2009",
|
30
|
+
"values": ["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-99350", "99384", "99385", "99386", "99387", "99394", "99395", "99396", "99397", "99401", "99402", "99403", "99404", "99411", "99412", "99420", "99429", "99455", "99456"]
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"set": "ICD-9-CM",
|
34
|
+
"version": "06/2009",
|
35
|
+
"values": ["V70.0", "V70.3", "V70.5", "V70.6", "V70.8", "V70.9"]
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
39
|
+
"encounter_obgyn": {
|
40
|
+
"name": "Date of ObGyn encounter",
|
41
|
+
"type": "long",
|
42
|
+
"codes": [
|
43
|
+
{
|
44
|
+
"set": "ICD-9-CM",
|
45
|
+
"version": "06/2009",
|
46
|
+
"values": ["V24", "V25", "V26", "V27", "V28", "V45.5", "V61.5", "V61.6", "V61.7", "V69.2", "V72.3", "V72.4"]
|
47
|
+
}
|
48
|
+
]
|
49
|
+
},
|
50
|
+
"hysterectomy": {
|
51
|
+
"name": "Hysterectomy performed",
|
52
|
+
"type": "long",
|
53
|
+
"codes": [
|
54
|
+
{
|
55
|
+
"set": "CPT",
|
56
|
+
"version": "06/2009",
|
57
|
+
"values": ["51925", "56308", "58150", "58152", "58200", "58210", "58240", "58260", "58262", "58263", "58267", "58270", "58275", "58280", "58285", "58290", "58291", "58292", "58293", "58294", "58550", "58552", "58553", "58554", "58570", "58571", "58572", "58573", "58951", "58953", "58954", "58956", "59135"]
|
58
|
+
},
|
59
|
+
{
|
60
|
+
"set": "ICD-9-CM",
|
61
|
+
"version": "06/2009",
|
62
|
+
"values": ["618.5", "68.4", "68.41", "68.49", "68.5", "68.51", "68.59", "68.6", "68.61", "68.69", "68.7", "68.71", "68.79", "68.8", "V67.01", "V76.47", "V88.01", "V88.03"]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"set": "ICD-10-CM",
|
66
|
+
"version": "06/2009",
|
67
|
+
"values": ["N81.81", "Z12.72", "Z90.71", "Z90.710", "Z90.7112"]
|
68
|
+
},
|
69
|
+
{
|
70
|
+
"set": "SNOMED-CT",
|
71
|
+
"version": "07/2009",
|
72
|
+
"values": ["116140006", "116142003", "116143008", "116144002", "236886002", "236888001", "236891001", "27950001", "307771009", "31545000", "35955002", "361222003", "361223008", "414575003", "59750000", "79095000", "86477000", "88144003"]
|
73
|
+
}
|
74
|
+
]
|
75
|
+
},
|
76
|
+
"pap_test": {
|
77
|
+
"name": "Pap test",
|
78
|
+
"type": "long",
|
79
|
+
"codes": [
|
80
|
+
{
|
81
|
+
"set": "CPT",
|
82
|
+
"version": "06/2009",
|
83
|
+
"values": ["88141", "88142", "88143", "88147", "88148", "88150", "88152", "88153", "88154", "88155", "88164", "88165", "88166", "88167", "88174", "88175"]
|
84
|
+
},
|
85
|
+
{
|
86
|
+
"set": "HCPCS",
|
87
|
+
"version": "06/2009",
|
88
|
+
"values": ["G0123", "G0124", "G0141", "G0143", "G0144", "G0145", "G0147", "G0148", "P3000", "P3001", "Q0091"]
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"set": "ICD-10-CM",
|
92
|
+
"version": "06/2009",
|
93
|
+
"values": ["Z12.4", "Z12.72"]
|
94
|
+
},
|
95
|
+
{
|
96
|
+
"set": "ICD-9-CM",
|
97
|
+
"version": "06/2009",
|
98
|
+
"values": ["91.46", "V72.32"]
|
99
|
+
},
|
100
|
+
{
|
101
|
+
"set": "LOINC",
|
102
|
+
"version": "06/2009",
|
103
|
+
"values": ["10524-7", "18500-9", "19762-4", "19764-0", "19765-7", "19766-5", "19774-9", "33717-0", "47527-7", "47528-5"]
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"set": "SNOMED-CT",
|
107
|
+
"version": "07/2009",
|
108
|
+
"values": ["439958008", "440615002", "440623000"]
|
109
|
+
}
|
110
|
+
]
|
111
|
+
}
|
112
|
+
},
|
113
|
+
"calculated_dates": {
|
114
|
+
"earliest_birthdate": "effective_date - 64*year",
|
115
|
+
"latest_birthdate": "effective_date - 23*year",
|
116
|
+
"earliest_encounter": "effective_date - 2*year",
|
117
|
+
"earliest_pap": "effective_date - 3*year"
|
118
|
+
},
|
119
|
+
"population": {
|
120
|
+
"and": [
|
121
|
+
{
|
122
|
+
"category": "Patient Characteristic",
|
123
|
+
"title": "Age >= 23 before measure period",
|
124
|
+
"query": {"birthdate": {"_lte": "@latest_birthdate"}}
|
125
|
+
},
|
126
|
+
{
|
127
|
+
"category": "Patient Characteristic",
|
128
|
+
"title": "Age <= 64 before measure period",
|
129
|
+
"query": {"birthdate": {"_gte": "@earliest_birthdate"}}
|
130
|
+
}
|
131
|
+
]
|
132
|
+
},
|
133
|
+
"denominator": {
|
134
|
+
"and": [
|
135
|
+
{
|
136
|
+
"or": [
|
137
|
+
{
|
138
|
+
"category": "Outpatient Encounter",
|
139
|
+
"title": "Outpatient encounter within last three years",
|
140
|
+
"query": {"encounter_outpatient": {"_gte": "@earliest_encounter"}}
|
141
|
+
},
|
142
|
+
{
|
143
|
+
"category": "ObGyn Encounter",
|
144
|
+
"title": "ObGyn encounter within last three years",
|
145
|
+
"query": {"encounter_obgyn": {"_gte": "@earliest_encounter"}}
|
146
|
+
}
|
147
|
+
]
|
148
|
+
},
|
149
|
+
{
|
150
|
+
"or": [
|
151
|
+
{
|
152
|
+
"category": "Procedure performed",
|
153
|
+
"title": "No hysterectomy",
|
154
|
+
"query": {"hysterectomy": null}
|
155
|
+
},
|
156
|
+
{
|
157
|
+
"category": "Procedure performed",
|
158
|
+
"title": "Hysterectomy after effective date",
|
159
|
+
"query": {"hysterectomy": {"_gte": "@effective_date"}}
|
160
|
+
}
|
161
|
+
]
|
162
|
+
}
|
163
|
+
]
|
164
|
+
},
|
165
|
+
"numerator": {
|
166
|
+
"category": "Medication Administered",
|
167
|
+
"title": "Pneumococcal vaccination",
|
168
|
+
"query": {"pap_test": {"_gte": "@earliest_pap"}}
|
169
|
+
},
|
170
|
+
"exception": {}
|
171
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"first": "Bert", // personal data
|
3
|
+
"last": "Bloggs",
|
4
|
+
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
|
5
|
+
"measures": { // bag of measures, one entry per measure
|
6
|
+
"0032": {
|
7
|
+
"encounter_outpatient": 1277856000 // Time.gm(2010, 6, 30).to_i
|
8
|
+
}
|
9
|
+
}
|
10
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"first": "Bert", // personal data
|
3
|
+
"last": "Bloggs",
|
4
|
+
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
|
5
|
+
"measures": { // bag of measures, one entry per measure
|
6
|
+
"0032": {
|
7
|
+
"encounter_obgyn": 1277856000, // Time.gm(2010, 6, 30).to_i
|
8
|
+
"pap_test": 1214784000 // Time.gm(2008, 6, 30).to_i
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"first": "Bert", // personal data
|
3
|
+
"last": "Bloggs",
|
4
|
+
"birthdate": -290390400, // Time.gm(1960, 10, 19).to_i
|
5
|
+
"measures": { // bag of measures, one entry per measure
|
6
|
+
"0032": {
|
7
|
+
"encounter_obgyn": 1277856000, // Time.gm(2010, 6, 30).to_i
|
8
|
+
"hysterectomy": 1277856000
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
{
|
2
|
+
"id": "0043",
|
3
|
+
"name": "Pneumonia Vaccination Status for Older Adults",
|
4
|
+
"steward": "NCQA",
|
5
|
+
"parameters": {
|
6
|
+
"effective_date": {
|
7
|
+
"name": "Effective end date for measure",
|
8
|
+
"type": "long"
|
9
|
+
}
|
10
|
+
},
|
11
|
+
"properties": {
|
12
|
+
"birthdate": {
|
13
|
+
"name": "Date of birth",
|
14
|
+
"type": "long",
|
15
|
+
"codes": [
|
16
|
+
{
|
17
|
+
"set": "HL7",
|
18
|
+
"version": "3.0",
|
19
|
+
"values": ["00110"]
|
20
|
+
}
|
21
|
+
]
|
22
|
+
},
|
23
|
+
"encounter": {
|
24
|
+
"name": "Date of encounter",
|
25
|
+
"type": "long",
|
26
|
+
"codes": [
|
27
|
+
{
|
28
|
+
"set": "CPT",
|
29
|
+
"version": "06/2009",
|
30
|
+
"values": ["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-99350", "99384", "99385", "99386", "99387", "99394", "99395", "99396", "99397", "99401", "99402", "99403", "99404", "99411", "99412", "99420", "99429", "99455", "99456"]
|
31
|
+
},
|
32
|
+
{
|
33
|
+
"set": "ICD-9-CM",
|
34
|
+
"version": "06/2009",
|
35
|
+
"values": ["V70.0", "V70.3", "V70.5", "V70.6", "V70.8", "V70.9"]
|
36
|
+
}
|
37
|
+
]
|
38
|
+
},
|
39
|
+
"vaccination": {
|
40
|
+
"name": "Pneumococcal vaccination",
|
41
|
+
"type": "boolean",
|
42
|
+
"codes": [
|
43
|
+
{
|
44
|
+
"set": "RxNorm",
|
45
|
+
"version": "07/2009",
|
46
|
+
"values": ["854931", "854933", "854935", "854937", "854939", "854941", "854943", "854945", "854947", "854949", "854951", "854953", "854955", "854957", "854959", "854961", "854963", "854965", "854967", "854969", "854971", "854973", "854975", "854977"]
|
47
|
+
}
|
48
|
+
]
|
49
|
+
}
|
50
|
+
},
|
51
|
+
"calculated_dates": {
|
52
|
+
"earliest_birthdate": "effective_date - 65*year",
|
53
|
+
"earliest_encounter": "effective_date - year"
|
54
|
+
},
|
55
|
+
"population": {
|
56
|
+
"category": "Patient Characteristics",
|
57
|
+
"title": "Age >= 64 before measure period",
|
58
|
+
"query": {"birthdate": {"_lte": "@earliest_birthdate"}}
|
59
|
+
},
|
60
|
+
"denominator": {
|
61
|
+
"category": "Outpatient Encounter",
|
62
|
+
"title": "Outpatient encounter within the measurement period",
|
63
|
+
"query": {"encounter": {"_gte": "@earliest_encounter"}}
|
64
|
+
},
|
65
|
+
"numerator": {
|
66
|
+
"category": "Medication Administered",
|
67
|
+
"title": "Pneumococcal vaccination",
|
68
|
+
"query": {"vaccination": true}
|
69
|
+
},
|
70
|
+
"exception": {}
|
71
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"first": "Bert", // personal data
|
3
|
+
"last": "Bloggs",
|
4
|
+
"birthdate": -921542400, // Time.gm(1940, 10, 19).to_i
|
5
|
+
"measures": { // bag of measures, one entry per measure
|
6
|
+
"0043": {
|
7
|
+
"encounter": 1284854400, // Time.gm(2010, 9, 19)
|
8
|
+
"vaccination": false
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
{
|
2
|
+
"first": "Fred", // personal data
|
3
|
+
"last": "Bloggs",
|
4
|
+
"birthdate": -921542400, // Time.gm(1940, 10, 19).to_i
|
5
|
+
"measures": { // bag of measures, one entry per measure
|
6
|
+
"0043": {
|
7
|
+
"encounter": 1284854400, // Time.gm(2010, 9, 19)
|
8
|
+
"vaccination": true
|
9
|
+
}
|
10
|
+
}
|
11
|
+
}
|
@@ -0,0 +1,102 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{quality-measure-engine}
|
8
|
+
s.version = "0.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Marc Hadley", "Andy Gregorowicz"]
|
12
|
+
s.date = %q{2010-10-28}
|
13
|
+
s.description = %q{A library for extracting quality measure information from HITSP C32's and ASTM CCR's}
|
14
|
+
s.email = %q{talk@projectpophealth.org}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README.md"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"Gemfile",
|
21
|
+
"Gemfile.lock",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"fixtures/complex_measure.json",
|
26
|
+
"fixtures/result_example.json",
|
27
|
+
"lib/patches/v8.rb",
|
28
|
+
"lib/qme/map/map_reduce_builder.rb",
|
29
|
+
"lib/qme/map/map_reduce_executor.rb",
|
30
|
+
"lib/qme/query/json_document_builder.rb",
|
31
|
+
"lib/quality_measure_engine.rb",
|
32
|
+
"measures/0032/0032_NQF_Cervical_Cancer_Screening.json",
|
33
|
+
"measures/0032/patients/denominator1.json",
|
34
|
+
"measures/0032/patients/denominator2.json",
|
35
|
+
"measures/0032/patients/numerator1.json",
|
36
|
+
"measures/0032/patients/population1.json",
|
37
|
+
"measures/0032/patients/population2.json",
|
38
|
+
"measures/0032/result/result.json",
|
39
|
+
"measures/0043/0043_NQF_PneumoniaVaccinationStatusForOlderAdults.json",
|
40
|
+
"measures/0043/patients/denominator.json",
|
41
|
+
"measures/0043/patients/numerator.json",
|
42
|
+
"measures/0043/patients/population.json",
|
43
|
+
"measures/0043/result/result.json",
|
44
|
+
"quality-measure-engine.gemspec",
|
45
|
+
"schema/result.json",
|
46
|
+
"schema/schema.json",
|
47
|
+
"spec/qme/map/map_reduce_builder_spec.rb",
|
48
|
+
"spec/qme/measures_spec.rb",
|
49
|
+
"spec/qme/query/json_document_builder_spec.rb",
|
50
|
+
"spec/schema_spec.rb",
|
51
|
+
"spec/spec_helper.rb",
|
52
|
+
"spec/validate_measures_spec.rb"
|
53
|
+
]
|
54
|
+
s.homepage = %q{http://github.com/pophealth/quality-measure-engine}
|
55
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
56
|
+
s.require_paths = ["lib"]
|
57
|
+
s.rubygems_version = %q{1.3.7}
|
58
|
+
s.summary = %q{A library for extracting quality measure information from HITSP C32's and ASTM CCR's}
|
59
|
+
s.test_files = [
|
60
|
+
"spec/qme/map/map_reduce_builder_spec.rb",
|
61
|
+
"spec/qme/measures_spec.rb",
|
62
|
+
"spec/qme/query/json_document_builder_spec.rb",
|
63
|
+
"spec/schema_spec.rb",
|
64
|
+
"spec/spec_helper.rb",
|
65
|
+
"spec/validate_measures_spec.rb"
|
66
|
+
]
|
67
|
+
|
68
|
+
if s.respond_to? :specification_version then
|
69
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
70
|
+
s.specification_version = 3
|
71
|
+
|
72
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
73
|
+
s.add_runtime_dependency(%q<mongo>, ["~> 1.1"])
|
74
|
+
s.add_runtime_dependency(%q<mongomatic>, ["~> 0.5.8"])
|
75
|
+
s.add_runtime_dependency(%q<therubyracer>, ["~> 0.7.5"])
|
76
|
+
s.add_runtime_dependency(%q<bson_ext>, ["~> 1.1.1"])
|
77
|
+
s.add_development_dependency(%q<jsonschema>, ["~> 2.0.0"])
|
78
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
|
79
|
+
s.add_development_dependency(%q<awesome_print>, ["~> 0.2.1"])
|
80
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.4.0"])
|
81
|
+
else
|
82
|
+
s.add_dependency(%q<mongo>, ["~> 1.1"])
|
83
|
+
s.add_dependency(%q<mongomatic>, ["~> 0.5.8"])
|
84
|
+
s.add_dependency(%q<therubyracer>, ["~> 0.7.5"])
|
85
|
+
s.add_dependency(%q<bson_ext>, ["~> 1.1.1"])
|
86
|
+
s.add_dependency(%q<jsonschema>, ["~> 2.0.0"])
|
87
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0"])
|
88
|
+
s.add_dependency(%q<awesome_print>, ["~> 0.2.1"])
|
89
|
+
s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
|
90
|
+
end
|
91
|
+
else
|
92
|
+
s.add_dependency(%q<mongo>, ["~> 1.1"])
|
93
|
+
s.add_dependency(%q<mongomatic>, ["~> 0.5.8"])
|
94
|
+
s.add_dependency(%q<therubyracer>, ["~> 0.7.5"])
|
95
|
+
s.add_dependency(%q<bson_ext>, ["~> 1.1.1"])
|
96
|
+
s.add_dependency(%q<jsonschema>, ["~> 2.0.0"])
|
97
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0"])
|
98
|
+
s.add_dependency(%q<awesome_print>, ["~> 0.2.1"])
|
99
|
+
s.add_dependency(%q<jeweler>, ["~> 1.4.0"])
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|