cqm-reports 3.1.3 → 3.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/communication_performed.mustache +0 -1
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_reaction_observation.mustache +1 -1
- data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_reason.mustache +0 -1
- data/lib/qrda-export/catIII-r2-1/_continuous_variable_value.mustache +5 -5
- data/lib/qrda-export/catIII-r2-1/_measure_data.mustache +0 -2
- data/lib/qrda-export/catIII-r2-1/_stratification.mustache +3 -5
- data/lib/qrda-export/catIII-r2-1/qrda3_r21.rb +2 -5
- data/lib/qrda-export/helper/aggregate_object_helper.rb +14 -18
- data/lib/qrda-export/helper/date_helper.rb +2 -2
- metadata +16 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 294e31e72ca88d7e9a85c08b1995728693cb2cf80a906273a8f1762ef5a1cc01
|
4
|
+
data.tar.gz: c969fcf65e9f7f8efabb02c636aad2bef9659d2221c0e72a94afe9ec993c8e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa75bf444859f1fdff85ae788fa277f0acb8f75e4d6e036717a0545f7af2a19800f446500101f36f9773bff9eb815b3cf4601bf1694d26af2468f04ffa3cc5cc
|
7
|
+
data.tar.gz: 78fe7570a996c1cd80517e74a856c2149a5cb351b933dccda3870f8b6781f707cd0c957b343421a0b54a5d8205c3bcfe96d535f4fe2fc53658c2cd0db8e2ba95
|
data/Gemfile
CHANGED
@@ -48,7 +48,6 @@
|
|
48
48
|
<entryRelationship typeCode="REFR">
|
49
49
|
<observation classCode="OBS" moodCode="EVN">
|
50
50
|
<templateId root="2.16.840.1.113883.10.20.24.3.88" extension="2017-08-01"/>
|
51
|
-
<id root="1.3.6.1.4.1.115" extension="{{object_id}}" />
|
52
51
|
<code code="77301-0" codeSystem="2.16.840.1.113883.6.1" displayName="reason" codeSystemName="LOINC"/>
|
53
52
|
<statusCode code="completed"/>
|
54
53
|
<!-- QDM Attribute: Code -->
|
data/lib/qrda-export/catI-r5/qrda_templates/template_partials/_reaction_observation.mustache
CHANGED
@@ -4,6 +4,6 @@
|
|
4
4
|
<id root="4adc1020-7b14-11db-9fe1-0800200c9a64" />
|
5
5
|
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4" />
|
6
6
|
<statusCode code="completed" />
|
7
|
-
{{>
|
7
|
+
<value xsi:type="CD" {{> _code}}/>
|
8
8
|
</observation>
|
9
9
|
</entryRelationship>
|
@@ -1,7 +1,6 @@
|
|
1
1
|
<entryRelationship typeCode="RSON">
|
2
2
|
<observation classCode="OBS" moodCode="EVN">
|
3
3
|
<templateId root="2.16.840.1.113883.10.20.24.3.88" extension="2017-08-01"/>
|
4
|
-
<id root="1.3.6.1.4.1.115" extension="{{random_id}}" />
|
5
4
|
<code code="77301-0" codeSystem="2.16.840.1.113883.6.1" displayName="reason" codeSystemName="LOINC"/>
|
6
5
|
{{#relevantPeriod}}
|
7
6
|
{{{relevant_period}}}
|
@@ -2,16 +2,16 @@
|
|
2
2
|
<observation classCode="OBS" moodCode="EVN">
|
3
3
|
<templateId root="2.16.840.1.113883.10.20.27.3.2"/>
|
4
4
|
<code nullFlavor="OTH">
|
5
|
-
<originalText>
|
5
|
+
<originalText>Other</originalText>
|
6
6
|
</code>
|
7
7
|
<statusCode code="completed"/>
|
8
|
-
<value xsi:type="
|
9
|
-
<methodCode code="
|
8
|
+
<value xsi:type="REAL" value="{{value}}"/>
|
9
|
+
<methodCode code="{{method}}" displayName="{{method}}" codeSystem="2.16.840.1.113883.5.84" codeSystemName="ObservationMethod"/>
|
10
10
|
<reference typeCode="REFR">
|
11
11
|
<!-- reference to the relevant measure observation in the eMeasure -->
|
12
12
|
<externalObservation classCode="OBS" moodCode="EVN">
|
13
|
-
<id root="{{
|
13
|
+
<id root="{{hqmf_id}}"/>
|
14
14
|
</externalObservation>
|
15
15
|
</reference>
|
16
16
|
</observation>
|
17
|
-
</entryRelationship>
|
17
|
+
</entryRelationship>
|
@@ -27,11 +27,9 @@
|
|
27
27
|
{{> _supplemental_data}}
|
28
28
|
{{/population_supplemental_data}}
|
29
29
|
{{/supplemental_data}}
|
30
|
-
{{#msrpopl?}}
|
31
30
|
{{#population_observation}}
|
32
31
|
{{> _continuous_variable_value}}
|
33
32
|
{{/population_observation}}
|
34
|
-
{{/msrpopl?}}
|
35
33
|
<reference typeCode="REFR">
|
36
34
|
<externalObservation classCode="OBS" moodCode="EVN">
|
37
35
|
<id root="{{id}}"/>
|
@@ -15,11 +15,9 @@
|
|
15
15
|
<methodCode code="COUNT" displayName="Count" codeSystem="2.16.840.1.113883.5.84" codeSystemName="ObservationMethod"/>
|
16
16
|
</observation>
|
17
17
|
</entryRelationship>
|
18
|
-
{{#
|
19
|
-
{{
|
20
|
-
|
21
|
-
{{/stratification_observation}}
|
22
|
-
{{/msrpopl?}}
|
18
|
+
{{#stratification_observation}}
|
19
|
+
{{> _continuous_variable_value}}
|
20
|
+
{{/stratification_observation}}
|
23
21
|
<reference typeCode="REFR">
|
24
22
|
<externalObservation classCode="OBS" moodCode="EVN">
|
25
23
|
<id root="{{id}}"/>
|
@@ -58,14 +58,11 @@ class Qrda3R21 < Mustache
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def stratification_observation
|
61
|
-
|
62
|
-
stratification_observation = @measure_result_hash[self['measure_id']].aggregate_count.populations.find {|p| p.type == "OBSERV"}.stratifications.find {|s| s.id == self['id'] }
|
63
|
-
stratification_observation.id = observation.id
|
64
|
-
stratification_observation
|
61
|
+
self['observation']
|
65
62
|
end
|
66
63
|
|
67
64
|
def population_observation
|
68
|
-
|
65
|
+
self['observation']
|
69
66
|
end
|
70
67
|
|
71
68
|
def supplemental_template_ids
|
@@ -57,23 +57,24 @@ module Qrda
|
|
57
57
|
end
|
58
58
|
end
|
59
59
|
class Population
|
60
|
-
attr_accessor :type, :value, :id, :stratifications, :supplemental_data
|
60
|
+
attr_accessor :type, :value, :id, :stratifications, :supplemental_data, :observation
|
61
61
|
|
62
62
|
def initialize
|
63
63
|
@stratifications = []
|
64
64
|
end
|
65
65
|
|
66
|
-
def add_stratification(id,value)
|
67
|
-
stratifications << Stratification.new(id,value) unless stratifications.find {|st| st.id == id}
|
66
|
+
def add_stratification(id,value,observation)
|
67
|
+
stratifications << Stratification.new(id,value,observation) unless stratifications.find {|st| st.id == id}
|
68
68
|
end
|
69
69
|
|
70
70
|
end
|
71
71
|
|
72
72
|
class Stratification
|
73
|
-
attr_accessor :id, :value
|
74
|
-
def initialize(id,value)
|
73
|
+
attr_accessor :id, :value, :observation
|
74
|
+
def initialize(id,value, observation)
|
75
75
|
@id = id
|
76
76
|
@value = value
|
77
|
+
@observation = observation
|
77
78
|
end
|
78
79
|
|
79
80
|
end
|
@@ -107,15 +108,17 @@ module Qrda
|
|
107
108
|
def add_entry(cache_entry, population_sets)
|
108
109
|
population_set = population_sets.where(population_set_id: cache_entry.pop_set_hash[:population_set_id]).first
|
109
110
|
entry_populations = []
|
110
|
-
%w[IPP DENOM NUMER NUMEX DENEX DENEXCEP MSRPOPL MSRPOPLEX
|
111
|
-
next unless population_set.populations[pop_code]
|
111
|
+
%w[IPP DENOM NUMER NUMEX DENEX DENEXCEP MSRPOPL MSRPOPLEX].each do |pop_code|
|
112
|
+
next unless population_set.populations[pop_code]
|
112
113
|
|
113
114
|
population = create_population_from_population_set(pop_code, population_set, cache_entry)
|
114
115
|
if cache_entry.pop_set_hash[:stratification_id]
|
115
116
|
strat_id = population_set.stratifications.where(stratification_id: cache_entry.pop_set_hash[:stratification_id]).first&.hqmf_id
|
116
|
-
|
117
|
+
observation = cache_entry['observations'][pop_code] if cache_entry['observations'] && cache_entry['observations'][pop_code]
|
118
|
+
population.add_stratification(strat_id,cache_entry[pop_code], observation)
|
117
119
|
else
|
118
120
|
population.value = cache_entry[pop_code]
|
121
|
+
population.observation = cache_entry['observations'][pop_code] if cache_entry['observations'] && cache_entry['observations'][pop_code]
|
119
122
|
population.supplemental_data = cache_entry.supplemental_data[pop_code]
|
120
123
|
end
|
121
124
|
entry_populations << population if population
|
@@ -128,19 +131,12 @@ module Qrda
|
|
128
131
|
end
|
129
132
|
|
130
133
|
def create_population_from_population_set(pop_code, population_set, cache_entry)
|
131
|
-
population = if pop_code
|
132
|
-
populations.find { |pop| pop.id == population_set.observations&.first&.hqmf_id }
|
133
|
-
elsif pop_code != 'STRAT'
|
134
|
-
populations.find { |pop| pop.id == population_set.populations[pop_code]&.hqmf_id }
|
135
|
-
end
|
134
|
+
population = populations.find { |pop| pop.id == population_set.populations[pop_code]&.hqmf_id } if pop_code != 'STRAT'
|
136
135
|
return population unless population.nil? && !cache_entry.pop_set_hash[:stratification_id]
|
136
|
+
|
137
137
|
population = Population.new
|
138
138
|
population.type = pop_code
|
139
|
-
population.id =
|
140
|
-
population_set.observations&.first&.hqmf_id
|
141
|
-
else
|
142
|
-
population_set.populations[pop_code]&.hqmf_id
|
143
|
-
end
|
139
|
+
population.id = population_set.populations[pop_code]&.hqmf_id
|
144
140
|
populations << population
|
145
141
|
population
|
146
142
|
end
|
@@ -101,7 +101,7 @@ module Qrda
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def relevant_date_period_or_null_flavor
|
104
|
-
return relevant_period if self['relevantPeriod']
|
104
|
+
return relevant_period if self['relevantPeriod'] && (self['relevantPeriod']['low'] || self['relevantPeriod']['high'])
|
105
105
|
return relevant_date_time_value if self['relevantDatetime']
|
106
106
|
"<effectiveTime nullFlavor='UNK'/>"
|
107
107
|
end
|
@@ -128,4 +128,4 @@ module Qrda
|
|
128
128
|
end
|
129
129
|
end
|
130
130
|
end
|
131
|
-
end
|
131
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cqm-reports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The MITRE Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cqm-models
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0
|
26
|
+
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cqm-validators
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.0
|
33
|
+
version: '3.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.0
|
40
|
+
version: '3.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mustache
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,16 +84,22 @@ dependencies:
|
|
84
84
|
name: nokogiri
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.8.5
|
90
|
+
- - "<"
|
88
91
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
92
|
+
version: 1.12.0
|
90
93
|
type: :runtime
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
|
-
- - "
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 1.8.5
|
100
|
+
- - "<"
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
102
|
+
version: 1.12.0
|
97
103
|
- !ruby/object:Gem::Dependency
|
98
104
|
name: uuid
|
99
105
|
requirement: !ruby/object:Gem::Requirement
|