quality-measure-engine 3.1.2 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +12 -5
- data/Gemfile +3 -4
- data/Gemfile.lock +76 -96
- data/LICENSE +201 -0
- data/lib/qme/database_access.rb +1 -1
- data/lib/qme/map/map_reduce_executor.rb +31 -18
- data/lib/qme/quality_report.rb +4 -3
- data/lib/qme/version.rb +1 -1
- data/lib/quality-measure-engine.rb +0 -1
- data/quality-measure-engine.gemspec +11 -10
- data/test/mongoid.yml +1 -1
- data/test/test_helper.rb +46 -14
- data/test/unit/qme/map/map_reduce_builder_test.rb +1 -1
- data/test/unit/qme/map/map_reduce_executor_test.rb +5 -5
- data/test/unit/qme/map/measure_calculation_job_test.rb +4 -4
- data/test/unit/qme/quality_measure_test.rb +3 -3
- data/test/unit/qme/quality_report_test.rb +46 -44
- metadata +28 -47
- data/LICENSE.txt +0 -13
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 54f1d94d1b3c43ee810b625b40c6082208812a30
|
4
|
+
data.tar.gz: 3c5283e6e770e9b7e278c4fe99cdf62a5929cdf4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 58370f38f783d1ea5e014cf812611faf2cc0f7884a09664c4e2d4c27100e84931f870bb4d4af5dff87811ddfa5492177e5451ac3380aaedec806bdd5952f367b
|
7
|
+
data.tar.gz: 38a9fd3db563f81e183d7862aa8c80698c1fca4285f715dc93e20aee609f55887453dcadb289b77fe9320a6849f89a9d19259d7620579e357f2cd0c593f7b5cc
|
data/.travis.yml
CHANGED
@@ -1,8 +1,15 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
-
|
4
|
-
|
5
|
-
|
3
|
+
- 2.3.5
|
4
|
+
sudo: false
|
5
|
+
dist: precise
|
6
|
+
addons:
|
7
|
+
apt:
|
8
|
+
sources:
|
9
|
+
- sourceline: 'deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse'
|
10
|
+
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x9ECBEC467F0CEB10'
|
11
|
+
packages:
|
12
|
+
- mongodb-org-server=3.4.5
|
6
13
|
script: bundle exec rake test
|
7
14
|
services:
|
8
15
|
- mongodb
|
@@ -12,7 +19,7 @@ notifications:
|
|
12
19
|
- healthcare-ci@googlegroups.com
|
13
20
|
on_failure: change
|
14
21
|
|
15
|
-
branches:
|
22
|
+
branches:
|
16
23
|
only:
|
17
24
|
- master
|
18
|
-
-
|
25
|
+
- bump_mongoid
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,144 +1,124 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
quality-measure-engine (3.
|
5
|
-
delayed_job_mongoid (~> 2.
|
6
|
-
mongoid (~>
|
7
|
-
|
8
|
-
|
4
|
+
quality-measure-engine (3.2.0)
|
5
|
+
delayed_job_mongoid (~> 2.2)
|
6
|
+
mongoid (~> 5.0)
|
7
|
+
rubyzip (~> 1.0)
|
8
|
+
zip-zip (~> 0.3)
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
actionmailer (4.1.
|
14
|
-
actionpack (= 4.1.
|
15
|
-
actionview (= 4.1.
|
16
|
-
mail (~> 2.5.4)
|
17
|
-
actionpack (4.1.
|
18
|
-
actionview (= 4.1.
|
19
|
-
activesupport (= 4.1.
|
13
|
+
actionmailer (4.1.15)
|
14
|
+
actionpack (= 4.1.15)
|
15
|
+
actionview (= 4.1.15)
|
16
|
+
mail (~> 2.5, >= 2.5.4)
|
17
|
+
actionpack (4.1.15)
|
18
|
+
actionview (= 4.1.15)
|
19
|
+
activesupport (= 4.1.15)
|
20
20
|
rack (~> 1.5.2)
|
21
21
|
rack-test (~> 0.6.2)
|
22
|
-
actionview (4.1.
|
23
|
-
activesupport (= 4.1.
|
22
|
+
actionview (4.1.15)
|
23
|
+
activesupport (= 4.1.15)
|
24
24
|
builder (~> 3.1)
|
25
25
|
erubis (~> 2.7.0)
|
26
|
-
activemodel (4.1.
|
27
|
-
activesupport (= 4.1.
|
26
|
+
activemodel (4.1.15)
|
27
|
+
activesupport (= 4.1.15)
|
28
28
|
builder (~> 3.1)
|
29
|
-
activerecord (4.1.
|
30
|
-
activemodel (= 4.1.
|
31
|
-
activesupport (= 4.1.
|
29
|
+
activerecord (4.1.15)
|
30
|
+
activemodel (= 4.1.15)
|
31
|
+
activesupport (= 4.1.15)
|
32
32
|
arel (~> 5.0.0)
|
33
|
-
activesupport (4.1.
|
33
|
+
activesupport (4.1.15)
|
34
34
|
i18n (~> 0.6, >= 0.6.9)
|
35
35
|
json (~> 1.7, >= 1.7.7)
|
36
36
|
minitest (~> 5.1)
|
37
37
|
thread_safe (~> 0.1)
|
38
38
|
tzinfo (~> 1.1)
|
39
39
|
arel (5.0.1.20140414130214)
|
40
|
-
|
41
|
-
debug_inspector (>= 0.0.1)
|
42
|
-
bson (2.3.0)
|
40
|
+
bson (4.2.2)
|
43
41
|
builder (3.2.2)
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
42
|
+
byebug (5.0.0)
|
43
|
+
columnize (= 0.9.0)
|
44
|
+
columnize (0.9.0)
|
45
|
+
concurrent-ruby (1.0.5)
|
46
|
+
delayed_job (4.1.3)
|
47
|
+
activesupport (>= 3.0, < 5.2)
|
48
|
+
delayed_job_mongoid (2.2.0)
|
50
49
|
delayed_job (>= 3.0, < 5)
|
51
|
-
mongoid (>= 3.0, <
|
50
|
+
mongoid (>= 3.0, < 6)
|
51
|
+
mongoid-compatibility
|
52
52
|
docile (1.1.5)
|
53
53
|
erubis (2.7.0)
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
mime-types (~>
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
mongoid (
|
54
|
+
i18n (0.7.0)
|
55
|
+
json (1.8.3)
|
56
|
+
mail (2.6.4)
|
57
|
+
mime-types (>= 1.16, < 4)
|
58
|
+
mime-types (3.0)
|
59
|
+
mime-types-data (~> 3.2015)
|
60
|
+
mime-types-data (3.2016.0221)
|
61
|
+
minitest (5.4.3)
|
62
|
+
mongo (2.4.3)
|
63
|
+
bson (>= 4.2.1, < 5.0.0)
|
64
|
+
mongoid (5.0.2)
|
65
65
|
activemodel (~> 4.0)
|
66
|
-
|
66
|
+
mongo (~> 2.1)
|
67
67
|
origin (~> 2.1)
|
68
68
|
tzinfo (>= 0.3.37)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
optionable (~> 0.2.0)
|
69
|
+
mongoid-compatibility (0.5.0)
|
70
|
+
activesupport
|
71
|
+
mongoid (>= 2.0)
|
73
72
|
multi_json (1.10.1)
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
pry (0.10.1)
|
78
|
-
coderay (~> 1.1.0)
|
79
|
-
method_source (~> 0.8.1)
|
80
|
-
slop (~> 3.4)
|
81
|
-
pry-nav (0.2.4)
|
82
|
-
pry (>= 0.9.10, < 0.11.0)
|
83
|
-
pry-rescue (1.4.1)
|
84
|
-
interception (>= 0.5)
|
85
|
-
pry
|
86
|
-
pry-stack_explorer (0.4.9.1)
|
87
|
-
binding_of_caller (>= 0.7)
|
88
|
-
pry (>= 0.9.11)
|
89
|
-
rack (1.5.2)
|
90
|
-
rack-test (0.6.2)
|
73
|
+
origin (2.3.1)
|
74
|
+
rack (1.5.5)
|
75
|
+
rack-test (0.6.3)
|
91
76
|
rack (>= 1.0)
|
92
|
-
rails (4.1.
|
93
|
-
actionmailer (= 4.1.
|
94
|
-
actionpack (= 4.1.
|
95
|
-
actionview (= 4.1.
|
96
|
-
activemodel (= 4.1.
|
97
|
-
activerecord (= 4.1.
|
98
|
-
activesupport (= 4.1.
|
77
|
+
rails (4.1.15)
|
78
|
+
actionmailer (= 4.1.15)
|
79
|
+
actionpack (= 4.1.15)
|
80
|
+
actionview (= 4.1.15)
|
81
|
+
activemodel (= 4.1.15)
|
82
|
+
activerecord (= 4.1.15)
|
83
|
+
activesupport (= 4.1.15)
|
99
84
|
bundler (>= 1.3.0, < 2.0)
|
100
|
-
railties (= 4.1.
|
85
|
+
railties (= 4.1.15)
|
101
86
|
sprockets-rails (~> 2.0)
|
102
|
-
railties (4.1.
|
103
|
-
actionpack (= 4.1.
|
104
|
-
activesupport (= 4.1.
|
87
|
+
railties (4.1.15)
|
88
|
+
actionpack (= 4.1.15)
|
89
|
+
activesupport (= 4.1.15)
|
105
90
|
rake (>= 0.8.7)
|
106
91
|
thor (>= 0.18.1, < 2.0)
|
107
|
-
rake (
|
108
|
-
rubyzip (
|
92
|
+
rake (11.1.2)
|
93
|
+
rubyzip (1.2.1)
|
109
94
|
simplecov (0.9.0)
|
110
95
|
docile (~> 1.1.0)
|
111
96
|
multi_json
|
112
97
|
simplecov-html (~> 0.8.0)
|
113
98
|
simplecov-html (0.8.0)
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
rack (~> 1.0)
|
119
|
-
tilt (~> 1.1, != 1.3.0)
|
120
|
-
sprockets-rails (2.1.3)
|
99
|
+
sprockets (3.6.0)
|
100
|
+
concurrent-ruby (~> 1.0)
|
101
|
+
rack (> 1, < 3)
|
102
|
+
sprockets-rails (2.3.3)
|
121
103
|
actionpack (>= 3.0)
|
122
104
|
activesupport (>= 3.0)
|
123
|
-
sprockets (
|
105
|
+
sprockets (>= 2.8, < 4.0)
|
124
106
|
thor (0.19.1)
|
125
|
-
thread_safe (0.3.
|
126
|
-
tilt (1.4.1)
|
127
|
-
treetop (1.4.15)
|
128
|
-
polyglot
|
129
|
-
polyglot (>= 0.3.1)
|
107
|
+
thread_safe (0.3.5)
|
130
108
|
tzinfo (1.2.2)
|
131
109
|
thread_safe (~> 0.1)
|
110
|
+
zip-zip (0.3)
|
111
|
+
rubyzip (>= 1.0.0)
|
132
112
|
|
133
113
|
PLATFORMS
|
134
114
|
ruby
|
135
115
|
|
136
116
|
DEPENDENCIES
|
137
|
-
|
138
|
-
|
139
|
-
pry-nav
|
140
|
-
pry-rescue
|
141
|
-
pry-stack_explorer
|
117
|
+
byebug
|
118
|
+
minitest (~> 5.4)
|
142
119
|
quality-measure-engine!
|
143
|
-
rails (~> 4.1
|
144
|
-
simplecov (~> 0.9
|
120
|
+
rails (~> 4.1)
|
121
|
+
simplecov (~> 0.9)
|
122
|
+
|
123
|
+
BUNDLED WITH
|
124
|
+
1.15.4
|
data/LICENSE
ADDED
@@ -0,0 +1,201 @@
|
|
1
|
+
Apache License
|
2
|
+
Version 2.0, January 2004
|
3
|
+
http://www.apache.org/licenses/
|
4
|
+
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
6
|
+
|
7
|
+
1. Definitions.
|
8
|
+
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
11
|
+
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
13
|
+
the copyright owner that is granting the License.
|
14
|
+
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
16
|
+
other entities that control, are controlled by, or are under common
|
17
|
+
control with that entity. For the purposes of this definition,
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
19
|
+
direction or management of such entity, whether by contract or
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
22
|
+
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
24
|
+
exercising permissions granted by this License.
|
25
|
+
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
27
|
+
including but not limited to software source code, documentation
|
28
|
+
source, and configuration files.
|
29
|
+
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
31
|
+
transformation or translation of a Source form, including but
|
32
|
+
not limited to compiled object code, generated documentation,
|
33
|
+
and conversions to other media types.
|
34
|
+
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
36
|
+
Object form, made available under the License, as indicated by a
|
37
|
+
copyright notice that is included in or attached to the work
|
38
|
+
(an example is provided in the Appendix below).
|
39
|
+
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
46
|
+
the Work and Derivative Works thereof.
|
47
|
+
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
49
|
+
the original version of the Work and any modifications or additions
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
61
|
+
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
64
|
+
subsequently incorporated within the Work.
|
65
|
+
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
72
|
+
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
78
|
+
where such license applies only to those patent claims licensable
|
79
|
+
by such Contributor that are necessarily infringed by their
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
82
|
+
institute patent litigation against any entity (including a
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
85
|
+
or contributory patent infringement, then any patent licenses
|
86
|
+
granted to You under this License for that Work shall terminate
|
87
|
+
as of the date such litigation is filed.
|
88
|
+
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
91
|
+
modifications, and in Source or Object form, provided that You
|
92
|
+
meet the following conditions:
|
93
|
+
|
94
|
+
(a) You must give any other recipients of the Work or
|
95
|
+
Derivative Works a copy of this License; and
|
96
|
+
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
98
|
+
stating that You changed the files; and
|
99
|
+
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
102
|
+
attribution notices from the Source form of the Work,
|
103
|
+
excluding those notices that do not pertain to any part of
|
104
|
+
the Derivative Works; and
|
105
|
+
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
108
|
+
include a readable copy of the attribution notices contained
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
111
|
+
of the following places: within a NOTICE text file distributed
|
112
|
+
as part of the Derivative Works; within the Source form or
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
114
|
+
within a display generated by the Derivative Works, if and
|
115
|
+
wherever such third-party notices normally appear. The contents
|
116
|
+
of the NOTICE file are for informational purposes only and
|
117
|
+
do not modify the License. You may add Your own attribution
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
120
|
+
that such additional attribution notices cannot be construed
|
121
|
+
as modifying the License.
|
122
|
+
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
124
|
+
may provide additional or different license terms and conditions
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
128
|
+
the conditions stated in this License.
|
129
|
+
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
133
|
+
this License, without any additional terms or conditions.
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
135
|
+
the terms of any separate license agreement you may have executed
|
136
|
+
with Licensor regarding such Contributions.
|
137
|
+
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
140
|
+
except as required for reasonable and customary use in describing the
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
142
|
+
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
152
|
+
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
158
|
+
incidental, or consequential damages of any character arising as a
|
159
|
+
result of this License or out of the use or inability to use the
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
162
|
+
other commercial damages or losses), even if such Contributor
|
163
|
+
has been advised of the possibility of such damages.
|
164
|
+
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
168
|
+
or other liability obligations and/or rights consistent with this
|
169
|
+
License. However, in accepting such obligations, You may act only
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
174
|
+
of your accepting any such warranty or additional liability.
|
175
|
+
|
176
|
+
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
data/lib/qme/database_access.rb
CHANGED
@@ -51,10 +51,13 @@ module QME
|
|
51
51
|
if (filters['genders'] && filters['genders'].size > 0)
|
52
52
|
match['value.gender'] = {'$in' => filters['genders']}
|
53
53
|
end
|
54
|
+
if (filters['patients'] && filters['patients'].size > 0)
|
55
|
+
match['value.patient_id'] = {'$in' => filters['patients']}
|
56
|
+
end
|
54
57
|
if (filters['providers'] && filters['providers'].size > 0)
|
55
58
|
providers = filters['providers'].map { |pv| {'providers' => BSON::ObjectId.from_string(pv) } }
|
56
|
-
pipeline.concat [{'$project' => {'value' => 1, 'providers' => "$value.provider_performances.provider_id"}},
|
57
|
-
{'$unwind' => '$providers'},
|
59
|
+
pipeline.concat [{'$project' => {'value' => 1, 'providers' => "$value.provider_performances.provider_id"}},
|
60
|
+
{'$unwind' => '$providers'},
|
58
61
|
{'$match' => {'$or' => providers}},
|
59
62
|
{'$group' => {"_id" => "$_id", "value" => {"$first" => "$value"}}}]
|
60
63
|
end
|
@@ -87,19 +90,23 @@ module QME
|
|
87
90
|
supplemental_data = Hash[*keys.map{|k| [k,{QME::QualityReport::RACE => {},
|
88
91
|
QME::QualityReport::ETHNICITY => {},
|
89
92
|
QME::QualityReport::SEX => {},
|
90
|
-
QME::QualityReport::PAYER => {}}]}.flatten]
|
91
|
-
|
93
|
+
QME::QualityReport::PAYER => {}}]}.flatten]
|
92
94
|
keys.each do |pop_id|
|
93
|
-
|
95
|
+
pline = build_query
|
96
|
+
|
97
|
+
_match = pline[0]["$match"]
|
94
98
|
_match["value.#{pop_id}"] = {"$gt" => 0}
|
95
99
|
SUPPLEMENTAL_DATA_ELEMENTS.each_pair do |supp_element,location|
|
96
100
|
group1 = {"$group" => { "_id" => { "id" => "$_id", "val" => location}}}
|
97
101
|
group2 = {"$group" => {"_id" => "$_id.val", "val" =>{"$sum" => 1} }}
|
98
|
-
pipeline =
|
99
|
-
|
102
|
+
pipeline = pline.clone
|
103
|
+
pipeline << group1
|
104
|
+
pipeline << group2
|
100
105
|
|
106
|
+
aggregate = get_db.command(:aggregate => 'patient_cache', :pipeline => pipeline)
|
107
|
+
aggregate_document = aggregate.documents[0]
|
101
108
|
v = {}
|
102
|
-
(
|
109
|
+
(aggregate_document["result"] || []).each do |entry|
|
103
110
|
code = entry["_id"].nil? ? "UNK" : entry["_id"]
|
104
111
|
v[code] = entry["val"]
|
105
112
|
end
|
@@ -127,14 +134,16 @@ module QME
|
|
127
134
|
QME::QualityReport::EXCLUSIONS => {"$sum" => "$value.#{QME::QualityReport::EXCLUSIONS}"},
|
128
135
|
QME::QualityReport::EXCEPTIONS => {"$sum" => "$value.#{QME::QualityReport::EXCEPTIONS}"},
|
129
136
|
QME::QualityReport::MSRPOPL => {"$sum" => "$value.#{QME::QualityReport::MSRPOPL}"},
|
137
|
+
QME::QualityReport::MSRPOPLEX => {"$sum" => "$value.#{QME::QualityReport::MSRPOPLEX}"},
|
130
138
|
QME::QualityReport::CONSIDERED => {"$sum" => 1}
|
131
139
|
}}
|
132
140
|
|
133
141
|
aggregate = get_db.command(:aggregate => 'patient_cache', :pipeline => pipeline)
|
134
|
-
|
142
|
+
aggregate_document = aggregate.documents[0]
|
143
|
+
if !aggregate.successful?
|
135
144
|
raise RuntimeError, "Aggregation Failed"
|
136
|
-
elsif
|
137
|
-
|
145
|
+
elsif aggregate_document['result'].size !=1
|
146
|
+
aggregate_document['result'] =[{"defaults" => true,
|
138
147
|
QME::QualityReport::POPULATION => 0,
|
139
148
|
QME::QualityReport::DENOMINATOR => 0,
|
140
149
|
QME::QualityReport::NUMERATOR =>0,
|
@@ -142,6 +151,7 @@ module QME
|
|
142
151
|
QME::QualityReport::EXCLUSIONS => 0,
|
143
152
|
QME::QualityReport::EXCEPTIONS => 0,
|
144
153
|
QME::QualityReport::MSRPOPL => 0,
|
154
|
+
QME::QualityReport::MSRPOPLEX => 0,
|
145
155
|
QME::QualityReport::CONSIDERED => 0}]
|
146
156
|
end
|
147
157
|
|
@@ -155,7 +165,7 @@ module QME
|
|
155
165
|
result[QME::QualityReport::OBSERVATION] = aggregated_value
|
156
166
|
end
|
157
167
|
|
158
|
-
agg_result =
|
168
|
+
agg_result = aggregate_document['result'].first
|
159
169
|
agg_result.reject! {|k, v| k == '_id'} # get rid of the group id the Mongo forced us to use
|
160
170
|
# result['exclusions'] += get_db['patient_cache'].find(base_query.merge({'value.manual_exclusion'=>true})).count
|
161
171
|
agg_result.merge!(execution_time: (Time.now.to_i - @parameter_values['start_time'].to_i)) if @parameter_values['start_time']
|
@@ -179,11 +189,12 @@ module QME
|
|
179
189
|
cv_pipeline << {'$group' => {'_id' => '$value.values', 'count' => {'$sum' => 1}}}
|
180
190
|
|
181
191
|
aggregate = get_db.command(:aggregate => 'patient_cache', :pipeline => cv_pipeline)
|
192
|
+
aggregate_document = aggregate.documents[0]
|
182
193
|
|
183
|
-
raise RuntimeError, "Aggregation Failed" if
|
194
|
+
raise RuntimeError, "Aggregation Failed" if aggregate_document['ok'] != 1
|
184
195
|
|
185
196
|
frequencies = {}
|
186
|
-
|
197
|
+
aggregate_document['result'].each do |freq_count_pair|
|
187
198
|
frequencies[freq_count_pair['_id']] = freq_count_pair['count']
|
188
199
|
end
|
189
200
|
QME::MapReduce::CVAggregator.send(@measure_def.aggregator.parameterize, frequencies)
|
@@ -224,15 +235,17 @@ module QME
|
|
224
235
|
# result is returned directly.
|
225
236
|
def get_patient_result(patient_id)
|
226
237
|
measure = Builder.new(get_db(), @measure_def, @parameter_values)
|
227
|
-
|
238
|
+
operation = get_db().command(:mapreduce => 'records',
|
228
239
|
:map => measure.map_function,
|
229
240
|
:reduce => "function(key, values){return values;}",
|
230
241
|
:out => {:inline => true},
|
231
|
-
:raw => true,
|
242
|
+
# :raw => true,
|
232
243
|
:query => {:medical_record_number => patient_id, :test_id => @parameter_values["test_id"]})
|
233
244
|
|
234
|
-
|
235
|
-
|
245
|
+
|
246
|
+
raise operation.documents[0]['err'] if !operation.successful?
|
247
|
+
return nil if operation.documents[0]['results'].empty?
|
248
|
+
operation.documents[0]['results'][0]['value']
|
236
249
|
end
|
237
250
|
|
238
251
|
|
data/lib/qme/quality_report.rb
CHANGED
@@ -47,6 +47,7 @@ module QME
|
|
47
47
|
EXCLUSIONS = 'DENEX'
|
48
48
|
EXCEPTIONS = 'DENEXCEP'
|
49
49
|
MSRPOPL = 'MSRPOPL'
|
50
|
+
MSRPOPLEX = 'MSRPOPLEX'
|
50
51
|
OBSERVATION = 'OBSERV'
|
51
52
|
ANTINUMERATOR = 'antinumerator'
|
52
53
|
CONSIDERED = 'considered'
|
@@ -100,13 +101,13 @@ module QME
|
|
100
101
|
end
|
101
102
|
|
102
103
|
def self.queue_staged_rollups(measure_id,sub_id,effective_date)
|
103
|
-
query = Mongoid.
|
104
|
+
query = Mongoid.default_client["rollup_buffer"].find({measure_id: measure_id, sub_id: sub_id, effective_date: effective_date})
|
104
105
|
query.each do |options|
|
105
106
|
if QME::QualityReport.where("_id" => options["quality_report_id"]).count == 1
|
106
107
|
QME::QualityReport.enque_job(options,:rollup)
|
107
108
|
end
|
108
109
|
end
|
109
|
-
query.
|
110
|
+
query.delete_many
|
110
111
|
end
|
111
112
|
|
112
113
|
# Determines whether the quality report has been calculated for the given
|
@@ -149,7 +150,7 @@ module QME
|
|
149
150
|
self.status["state"] = "stagged"
|
150
151
|
self.save
|
151
152
|
options.merge!( {measure_id: self.measure_id, sub_id: self.sub_id, effective_date: self.effective_date })
|
152
|
-
Mongoid.
|
153
|
+
Mongoid.default_client["rollup_buffer"].insert_one(options)
|
153
154
|
else
|
154
155
|
# queue the job for calculation
|
155
156
|
QME::QualityReport.enque_job(options,:calculation)
|
data/lib/qme/version.rb
CHANGED
@@ -6,23 +6,24 @@ require 'qme/version'
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.name = "quality-measure-engine"
|
8
8
|
gem.version = QME::VERSION
|
9
|
-
gem.authors = ["
|
10
|
-
gem.email = ["
|
9
|
+
gem.authors = ["The MITRE Corporation"]
|
10
|
+
gem.email = ["tacoma-list@lists.mitre.org"]
|
11
11
|
gem.description = %q{A library for running clinical quality measures}
|
12
12
|
gem.summary = %q{This library can run JavaScript based clinical quality measures on a repository of patients stored in MongoDB}
|
13
|
-
gem.homepage = "
|
13
|
+
gem.homepage = "https://github.com/projectcypress/quality-measure-engine"
|
14
|
+
gem.license = 'Apache-2.0'
|
14
15
|
|
15
16
|
gem.files = `git ls-files`.split($/)
|
16
17
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
18
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
19
|
gem.require_paths = ["lib"]
|
19
20
|
|
20
|
-
gem.add_dependency '
|
21
|
-
gem.add_dependency '
|
22
|
-
gem.add_dependency '
|
23
|
-
gem.add_dependency 'delayed_job_mongoid', '~> 2.
|
21
|
+
gem.add_dependency 'mongoid', '~> 5.0'
|
22
|
+
gem.add_dependency 'rubyzip', '~> 1.0'
|
23
|
+
gem.add_dependency 'zip-zip', "~> 0.3"
|
24
|
+
gem.add_dependency 'delayed_job_mongoid', '~> 2.2'
|
24
25
|
|
25
|
-
gem.add_development_dependency "minitest", "~> 5.4
|
26
|
-
gem.add_development_dependency "simplecov", "~> 0.9
|
27
|
-
gem.add_development_dependency "rails", "~> 4.1
|
26
|
+
gem.add_development_dependency "minitest", "~> 5.4"
|
27
|
+
gem.add_development_dependency "simplecov", "~> 0.9"
|
28
|
+
gem.add_development_dependency "rails", "~> 4.1"
|
28
29
|
end
|
data/test/mongoid.yml
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,39 +1,71 @@
|
|
1
1
|
require 'simplecov_setup'
|
2
2
|
require 'minitest/autorun'
|
3
3
|
require 'quality-measure-engine'
|
4
|
-
require 'pry-nav'
|
5
4
|
|
5
|
+
Mongo::Logger.logger.level = Logger::WARN
|
6
6
|
Mongoid.load!(File.join(File.dirname(__FILE__),"mongoid.yml"), :test)
|
7
7
|
|
8
8
|
class MiniTest::Unit::TestCase
|
9
9
|
|
10
10
|
def load_system_js
|
11
|
-
Mongoid.
|
11
|
+
Mongoid.default_client['system.js'].delete_many({})
|
12
12
|
Dir.glob(File.join(File.dirname(__FILE__), 'fixtures', "library_functions", '*.js')).each do |json_fixture_file|
|
13
13
|
name = File.basename(json_fixture_file,".*")
|
14
14
|
fn = "function () {\n #{File.read(json_fixture_file)} \n }"
|
15
|
-
Mongoid.
|
15
|
+
Mongoid.default_client['system.js'].update_one({
|
16
|
+
"_id" => name},
|
16
17
|
{
|
17
18
|
"_id" => name,
|
18
19
|
"value" => BSON::Code.new(fn)
|
19
|
-
}
|
20
|
+
},{upsert: true}
|
20
21
|
)
|
21
22
|
end
|
22
23
|
|
23
24
|
end
|
24
25
|
|
25
|
-
# Add more helper methods to be used by all tests here...
|
26
26
|
|
27
|
-
def
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
fixture_json[attr] = BSON::ObjectId.from_string(fixture_json[attr])
|
27
|
+
def value_or_bson(v)
|
28
|
+
if v.is_a? Hash
|
29
|
+
if v['$oid']
|
30
|
+
BSON::ObjectId.from_string(v['$oid'])
|
31
|
+
else
|
32
|
+
map_bson_ids(v)
|
34
33
|
end
|
34
|
+
else
|
35
|
+
v
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def map_array(arr)
|
40
|
+
ret = []
|
41
|
+
arr.each do |v|
|
42
|
+
ret << value_or_bson(v)
|
43
|
+
end
|
44
|
+
ret
|
45
|
+
end
|
35
46
|
|
36
|
-
|
47
|
+
def map_bson_ids(json)
|
48
|
+
json.each_pair do |k, v|
|
49
|
+
if v.is_a? Hash
|
50
|
+
json[k] = value_or_bson(v)
|
51
|
+
elsif v.is_a? Array
|
52
|
+
json[k] = map_array(v)
|
53
|
+
elsif k == 'create_at' || k == 'updated_at'
|
54
|
+
json[k] = Time.at.local(v).in_time_zone
|
55
|
+
end
|
56
|
+
end
|
57
|
+
json
|
58
|
+
end
|
59
|
+
|
60
|
+
def collection_fixtures(*collections)
|
61
|
+
collections.each do |collection|
|
62
|
+
get_db()[collection].drop
|
63
|
+
Dir.glob(File.join(File.dirname(__FILE__), 'fixtures', collection, '*.json')).each do |json_fixture_file|
|
64
|
+
fixture_json = JSON.parse(File.read(json_fixture_file), max_nesting: 250)
|
65
|
+
fixture_json['_id'] = BSON::ObjectId.from_string(fixture_json['_id']) if fixture_json['_id']
|
66
|
+
map_bson_ids(fixture_json)
|
67
|
+
Mongoid.default_client[collection].insert_one(fixture_json)
|
68
|
+
end
|
37
69
|
end
|
38
70
|
end
|
39
|
-
end
|
71
|
+
end
|
@@ -4,7 +4,7 @@ class MapReduceBuilderTest < MiniTest::Unit::TestCase
|
|
4
4
|
include QME::DatabaseAccess
|
5
5
|
|
6
6
|
def setup
|
7
|
-
collection_fixtures(
|
7
|
+
collection_fixtures('measures')
|
8
8
|
@measure_json = QME::QualityMeasure.where({"nqf_id" => '0043'}).first
|
9
9
|
load_system_js
|
10
10
|
end
|
@@ -7,9 +7,9 @@ class MapReduceExecutorTest < MiniTest::Unit::TestCase
|
|
7
7
|
|
8
8
|
get_db['query_cache'].drop()
|
9
9
|
get_db['patient_cache'].drop()
|
10
|
-
collection_fixtures(
|
11
|
-
collection_fixtures(
|
12
|
-
collection_fixtures(
|
10
|
+
collection_fixtures('measures')
|
11
|
+
collection_fixtures('records')
|
12
|
+
collection_fixtures('bundles')
|
13
13
|
options = {'measure_id' => "2E679CD2-3FEC-4A75-A75A-61403E5EFEE8",
|
14
14
|
'effective_date' => Time.gm(2011, 1, 15).to_i}
|
15
15
|
@quality_report =QME::QualityReport.find_or_create_by(options)
|
@@ -117,7 +117,7 @@ class MapReduceExecutorTest < MiniTest::Unit::TestCase
|
|
117
117
|
def test_get_patient_result_with_bundle_id
|
118
118
|
measure_id = "2E679CD2-3FEC-4A75-A75A-61403E5EFEE8"
|
119
119
|
bundle_id = get_db()['bundles'].find.first
|
120
|
-
get_db()['measures'].
|
120
|
+
get_db()['measures'].update_many({'id' => measure_id}, {:$set => {'bundle_id' => bundle_id}})
|
121
121
|
executor = QME::MapReduce::Executor.new(measure_id, nil,
|
122
122
|
'effective_date' => Time.gm(2011, 1, 15).to_i, 'bundle_id' => bundle_id)
|
123
123
|
result = executor.get_patient_result("12345")
|
@@ -125,4 +125,4 @@ class MapReduceExecutorTest < MiniTest::Unit::TestCase
|
|
125
125
|
assert result[QME::QualityReport::NUMERATOR]
|
126
126
|
end
|
127
127
|
|
128
|
-
end
|
128
|
+
end
|
@@ -6,9 +6,9 @@ class MapCalculationJobTest < MiniTest::Unit::TestCase
|
|
6
6
|
def setup
|
7
7
|
get_db['query_cache'].drop()
|
8
8
|
get_db['patient_cache'].drop()
|
9
|
-
collection_fixtures(
|
10
|
-
collection_fixtures(
|
11
|
-
collection_fixtures(
|
9
|
+
collection_fixtures('measures')
|
10
|
+
collection_fixtures('records')
|
11
|
+
collection_fixtures('bundles')
|
12
12
|
load_system_js
|
13
13
|
|
14
14
|
Delayed::Worker.delay_jobs = false
|
@@ -21,4 +21,4 @@ class MapCalculationJobTest < MiniTest::Unit::TestCase
|
|
21
21
|
job = Delayed::Job.enqueue(QME::MapReduce::MeasureCalculationJob.new({'quality_report_id' => qr.id,"oid_dictionary"=>{}}))
|
22
22
|
assert job
|
23
23
|
end
|
24
|
-
end
|
24
|
+
end
|
@@ -4,8 +4,8 @@ class QualityMeasureTest < MiniTest::Unit::TestCase
|
|
4
4
|
include QME::DatabaseAccess
|
5
5
|
def setup
|
6
6
|
|
7
|
-
collection_fixtures(
|
8
|
-
collection_fixtures(
|
7
|
+
collection_fixtures('measures')
|
8
|
+
collection_fixtures('bundles')
|
9
9
|
load_system_js
|
10
10
|
end
|
11
11
|
|
@@ -14,4 +14,4 @@ class QualityMeasureTest < MiniTest::Unit::TestCase
|
|
14
14
|
assert_equal 5, all_measures.size
|
15
15
|
assert all_measures.where({"hqmf_id" => "2E679CD2-3FEC-4A75-A75A-61403E5EFEE8"}).first
|
16
16
|
end
|
17
|
-
end
|
17
|
+
end
|
@@ -5,50 +5,51 @@ class QualityReportTest < MiniTest::Unit::TestCase
|
|
5
5
|
|
6
6
|
def setup
|
7
7
|
load_system_js
|
8
|
-
collection_fixtures(
|
9
|
-
collection_fixtures(
|
10
|
-
collection_fixtures(
|
8
|
+
collection_fixtures('bundles')
|
9
|
+
collection_fixtures('records')
|
10
|
+
collection_fixtures('measures')
|
11
|
+
|
11
12
|
get_db()['query_cache'].drop()
|
12
13
|
get_db()['patient_cache'].drop()
|
13
|
-
get_db()['query_cache'].
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
get_db()['query_cache'].insert_one({
|
15
|
+
"measure_id" => "test2",
|
16
|
+
"sub_id" => "b",
|
17
|
+
"status" =>{"state" => "completed"},
|
18
|
+
"initialPopulation" => 4,
|
19
|
+
"result" => {
|
20
|
+
QME::QualityReport::NUMERATOR => 1,
|
21
|
+
QME::QualityReport::DENOMINATOR => 2,
|
22
|
+
QME::QualityReport::EXCLUSIONS => 1},
|
23
|
+
"effective_date" => Time.gm(2010, 9, 19).to_i}
|
23
24
|
)
|
24
|
-
get_db()['patient_cache'].
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
25
|
+
get_db()['patient_cache'].insert_one({
|
26
|
+
"value" => {
|
27
|
+
QME::QualityReport::POPULATION => 0,
|
28
|
+
QME::QualityReport::DENOMINATOR => 0,
|
29
|
+
QME::QualityReport::NUMERATOR => 0,
|
30
|
+
QME::QualityReport::EXCLUSIONS => 0,
|
31
|
+
QME::QualityReport::ANTINUMERATOR => 0,
|
32
|
+
"medical_record_id" => "0616911582",
|
33
|
+
"first" => "Mary",
|
34
|
+
"last" => "Edwards",
|
35
|
+
"gender" => "F",
|
36
|
+
"birthdate" => Time.gm(1940, 9, 19).to_i,
|
37
|
+
"test_id" => nil,
|
38
|
+
"provider_performances" => nil,
|
39
|
+
"race" => {
|
40
|
+
"code" => "2106-3",
|
41
|
+
"code_set" => "CDC-RE"
|
42
|
+
},
|
43
|
+
"ethnicity" => {
|
44
|
+
"code" => "2135-2",
|
45
|
+
"code_set" => "CDC-RE"
|
46
|
+
},
|
47
|
+
"measure_id" => "test2",
|
48
|
+
"sub_id" => "b",
|
49
|
+
"effective_date" => Time.gm(2010, 9, 19).to_i
|
50
|
+
}}
|
50
51
|
)
|
51
|
-
collection_fixtures(
|
52
|
+
collection_fixtures('delayed_backend_mongoid_jobs')
|
52
53
|
end
|
53
54
|
|
54
55
|
def test_calculated
|
@@ -86,6 +87,7 @@ class QualityReportTest < MiniTest::Unit::TestCase
|
|
86
87
|
def test_status
|
87
88
|
status = QME::MapReduce::MeasureCalculationJob.status('not really a job id')
|
88
89
|
assert_equal :complete, status
|
90
|
+
|
89
91
|
status = QME::MapReduce::MeasureCalculationJob.status("508aeff07042f9f88900000d")
|
90
92
|
assert_equal :queued, status
|
91
93
|
end
|
@@ -95,7 +97,7 @@ class QualityReportTest < MiniTest::Unit::TestCase
|
|
95
97
|
assert Delayed::Worker.delay_jobs
|
96
98
|
Delayed::Job.destroy_all
|
97
99
|
QME::QualityReport.destroy_all
|
98
|
-
Mongoid.
|
100
|
+
Mongoid.default_client["rollup_buffer"].delete_many({})
|
99
101
|
qr = QME::QualityReport.find_or_create('2E679CD2-3FEC-4A75-A75A-61403E5EFEE8', nil, "effective_date" => Time.gm(2011, 9, 19).to_i)
|
100
102
|
qr2 = QME::QualityReport.find_or_create('2E679CD2-3FEC-4A75-A75A-61403E5EFEE8', nil, {"effective_date" => Time.gm(2011, 9, 19).to_i,:filters=>{"providers"=>["a"]}})
|
101
103
|
assert !qr.calculated?
|
@@ -112,9 +114,9 @@ class QualityReportTest < MiniTest::Unit::TestCase
|
|
112
114
|
assert qr.calculation_queued_or_running?
|
113
115
|
assert qr2.calculation_queued_or_running?
|
114
116
|
|
115
|
-
assert_equal 0, Mongoid.
|
117
|
+
assert_equal 0, Mongoid.default_client["rollup_buffer"].count({})
|
116
118
|
qr2.calculate({"oid_dictionary"=>{}},true)
|
117
|
-
assert_equal 1, Mongoid.
|
119
|
+
assert_equal 1, Mongoid.default_client["rollup_buffer"].count({})
|
118
120
|
|
119
121
|
|
120
122
|
assert_equal 1, Delayed::Job.count()
|
@@ -127,6 +129,6 @@ class QualityReportTest < MiniTest::Unit::TestCase
|
|
127
129
|
job = Delayed::Job.where({}).first
|
128
130
|
assert_equal "rollup", job.queue
|
129
131
|
|
130
|
-
assert_equal 0, Mongoid.
|
132
|
+
assert_equal 0, Mongoid.default_client["rollup_buffer"].count({})
|
131
133
|
end
|
132
134
|
end
|
metadata
CHANGED
@@ -1,135 +1,116 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quality-measure-engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
5
|
-
prerelease:
|
4
|
+
version: 3.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
|
-
-
|
9
|
-
- Andy Gregorowicz
|
10
|
-
- Rob Dingwell
|
11
|
-
- Adam Goldstein
|
12
|
-
- Andre Quina
|
7
|
+
- The MITRE Corporation
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
date:
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
17
12
|
dependencies:
|
18
13
|
- !ruby/object:Gem::Dependency
|
19
|
-
name:
|
14
|
+
name: mongoid
|
20
15
|
requirement: !ruby/object:Gem::Requirement
|
21
|
-
none: false
|
22
16
|
requirements:
|
23
17
|
- - "~>"
|
24
18
|
- !ruby/object:Gem::Version
|
25
|
-
version:
|
19
|
+
version: '5.0'
|
26
20
|
type: :runtime
|
27
21
|
prerelease: false
|
28
22
|
version_requirements: !ruby/object:Gem::Requirement
|
29
|
-
none: false
|
30
23
|
requirements:
|
31
24
|
- - "~>"
|
32
25
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
26
|
+
version: '5.0'
|
34
27
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
28
|
+
name: rubyzip
|
36
29
|
requirement: !ruby/object:Gem::Requirement
|
37
|
-
none: false
|
38
30
|
requirements:
|
39
31
|
- - "~>"
|
40
32
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
33
|
+
version: '1.0'
|
42
34
|
type: :runtime
|
43
35
|
prerelease: false
|
44
36
|
version_requirements: !ruby/object:Gem::Requirement
|
45
|
-
none: false
|
46
37
|
requirements:
|
47
38
|
- - "~>"
|
48
39
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
40
|
+
version: '1.0'
|
50
41
|
- !ruby/object:Gem::Dependency
|
51
|
-
name:
|
42
|
+
name: zip-zip
|
52
43
|
requirement: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
44
|
requirements:
|
55
45
|
- - "~>"
|
56
46
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
47
|
+
version: '0.3'
|
58
48
|
type: :runtime
|
59
49
|
prerelease: false
|
60
50
|
version_requirements: !ruby/object:Gem::Requirement
|
61
|
-
none: false
|
62
51
|
requirements:
|
63
52
|
- - "~>"
|
64
53
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
54
|
+
version: '0.3'
|
66
55
|
- !ruby/object:Gem::Dependency
|
67
56
|
name: delayed_job_mongoid
|
68
57
|
requirement: !ruby/object:Gem::Requirement
|
69
|
-
none: false
|
70
58
|
requirements:
|
71
59
|
- - "~>"
|
72
60
|
- !ruby/object:Gem::Version
|
73
|
-
version: 2.
|
61
|
+
version: '2.2'
|
74
62
|
type: :runtime
|
75
63
|
prerelease: false
|
76
64
|
version_requirements: !ruby/object:Gem::Requirement
|
77
|
-
none: false
|
78
65
|
requirements:
|
79
66
|
- - "~>"
|
80
67
|
- !ruby/object:Gem::Version
|
81
|
-
version: 2.
|
68
|
+
version: '2.2'
|
82
69
|
- !ruby/object:Gem::Dependency
|
83
70
|
name: minitest
|
84
71
|
requirement: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
72
|
requirements:
|
87
73
|
- - "~>"
|
88
74
|
- !ruby/object:Gem::Version
|
89
|
-
version: 5.4
|
75
|
+
version: '5.4'
|
90
76
|
type: :development
|
91
77
|
prerelease: false
|
92
78
|
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
none: false
|
94
79
|
requirements:
|
95
80
|
- - "~>"
|
96
81
|
- !ruby/object:Gem::Version
|
97
|
-
version: 5.4
|
82
|
+
version: '5.4'
|
98
83
|
- !ruby/object:Gem::Dependency
|
99
84
|
name: simplecov
|
100
85
|
requirement: !ruby/object:Gem::Requirement
|
101
|
-
none: false
|
102
86
|
requirements:
|
103
87
|
- - "~>"
|
104
88
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.9
|
89
|
+
version: '0.9'
|
106
90
|
type: :development
|
107
91
|
prerelease: false
|
108
92
|
version_requirements: !ruby/object:Gem::Requirement
|
109
|
-
none: false
|
110
93
|
requirements:
|
111
94
|
- - "~>"
|
112
95
|
- !ruby/object:Gem::Version
|
113
|
-
version: 0.9
|
96
|
+
version: '0.9'
|
114
97
|
- !ruby/object:Gem::Dependency
|
115
98
|
name: rails
|
116
99
|
requirement: !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
100
|
requirements:
|
119
101
|
- - "~>"
|
120
102
|
- !ruby/object:Gem::Version
|
121
|
-
version: 4.1
|
103
|
+
version: '4.1'
|
122
104
|
type: :development
|
123
105
|
prerelease: false
|
124
106
|
version_requirements: !ruby/object:Gem::Requirement
|
125
|
-
none: false
|
126
107
|
requirements:
|
127
108
|
- - "~>"
|
128
109
|
- !ruby/object:Gem::Version
|
129
|
-
version: 4.1
|
110
|
+
version: '4.1'
|
130
111
|
description: A library for running clinical quality measures
|
131
112
|
email:
|
132
|
-
-
|
113
|
+
- tacoma-list@lists.mitre.org
|
133
114
|
executables: []
|
134
115
|
extensions: []
|
135
116
|
extra_rdoc_files: []
|
@@ -138,7 +119,7 @@ files:
|
|
138
119
|
- ".travis.yml"
|
139
120
|
- Gemfile
|
140
121
|
- Gemfile.lock
|
141
|
-
- LICENSE
|
122
|
+
- LICENSE
|
142
123
|
- README.md
|
143
124
|
- Rakefile
|
144
125
|
- lib/qme/database_access.rb
|
@@ -180,29 +161,29 @@ files:
|
|
180
161
|
- test/unit/qme/map/measure_calculation_job_test.rb
|
181
162
|
- test/unit/qme/quality_measure_test.rb
|
182
163
|
- test/unit/qme/quality_report_test.rb
|
183
|
-
homepage:
|
184
|
-
licenses:
|
164
|
+
homepage: https://github.com/projectcypress/quality-measure-engine
|
165
|
+
licenses:
|
166
|
+
- Apache-2.0
|
167
|
+
metadata: {}
|
185
168
|
post_install_message:
|
186
169
|
rdoc_options: []
|
187
170
|
require_paths:
|
188
171
|
- lib
|
189
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
190
|
-
none: false
|
191
173
|
requirements:
|
192
174
|
- - ">="
|
193
175
|
- !ruby/object:Gem::Version
|
194
176
|
version: '0'
|
195
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
|
-
none: false
|
197
178
|
requirements:
|
198
179
|
- - ">="
|
199
180
|
- !ruby/object:Gem::Version
|
200
181
|
version: '0'
|
201
182
|
requirements: []
|
202
183
|
rubyforge_project:
|
203
|
-
rubygems_version:
|
184
|
+
rubygems_version: 2.6.12
|
204
185
|
signing_key:
|
205
|
-
specification_version:
|
186
|
+
specification_version: 4
|
206
187
|
summary: This library can run JavaScript based clinical quality measures on a repository
|
207
188
|
of patients stored in MongoDB
|
208
189
|
test_files:
|
data/LICENSE.txt
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
Copyright (c) 2012 The MITRE Corporation
|
2
|
-
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
you may not use this file except in compliance with the License.
|
5
|
-
You may obtain a copy of the License at
|
6
|
-
|
7
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
See the License for the specific language governing permissions and
|
13
|
-
limitations under the License.
|