health-data-standards 3.2.12 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +19 -5
- data/lib/health-data-standards.rb +5 -6
- data/lib/health-data-standards/export/cat_3.rb +2 -2
- data/lib/health-data-standards/export/helper/scooped_view_helper.rb +10 -17
- data/lib/health-data-standards/models/cqm/bundle.rb +8 -8
- data/lib/health-data-standards/models/cqm/measure.rb +58 -102
- data/lib/health-data-standards/models/cqm/patient_cache.rb +1 -0
- data/lib/health-data-standards/models/cqm/query_cache.rb +5 -2
- data/lib/health-data-standards/models/record.rb +1 -0
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.20.cat1.erb +2 -6
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.28.cat1.erb +2 -6
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.40.cat1.erb +2 -6
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.57.cat1.erb +2 -6
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.59.cat1.erb +1 -5
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.66.cat1.erb +3 -3
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.69.cat1.erb +2 -3
- data/templates/cat1/_result_value.cat1.erb +1 -1
- data/templates/cat3/_author.cat3.erb +2 -2
- data/templates/cat3/_continuous_variable_value.cat3.erb +1 -1
- data/templates/cat3/_organization.cat3.erb +3 -3
- data/templates/cat3/show.cat3.erb +1 -1
- metadata +31 -10
- checksums.yaml +0 -15
- data/VERSION +0 -1
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
|
-
This is a project to generate and consume HITSP C32, ASTM CCR, QRDA Category I and PQRI.
|
1
|
+
This is a project to generate and consume HITSP C32, ASTM CCR, QRDA Category I, QRDA Category III and PQRI.
|
2
2
|
|
3
|
-
In addition this project also contains libaries for parsing
|
3
|
+
In addition this project also contains libaries for parsing HQMF documents and for dealing with NLM valuesets.
|
4
4
|
|
5
5
|
Environment
|
6
6
|
===========
|
7
7
|
|
8
|
-
This project currently uses Ruby 1.9.3 and is built using [Bundler](http://gembundler.com/). To get all of the dependencies for the project, first install bundler:
|
8
|
+
This project currently uses Ruby 1.9.3, Ruby 2.0.0 and JRuby 1.7.5 and is built using [Bundler](http://gembundler.com/). To get all of the dependencies for the project, first install bundler:
|
9
9
|
|
10
10
|
gem install bundler
|
11
11
|
|
@@ -13,18 +13,32 @@ Then run bundler to grab all of the necessary gems:
|
|
13
13
|
|
14
14
|
bundle install
|
15
15
|
|
16
|
-
The Quality Measure engine relies on a MongoDB [MongoDB](http://www.mongodb.org/) running a minimum of version
|
16
|
+
The Quality Measure engine relies on a MongoDB [MongoDB](http://www.mongodb.org/) running a minimum of version 2.4.* or higher. To get and install Mongo refer to:
|
17
17
|
|
18
18
|
http://www.mongodb.org/display/DOCS/Quickstart
|
19
19
|
|
20
20
|
Project Practices
|
21
21
|
=================
|
22
22
|
|
23
|
-
Please try to follow
|
23
|
+
Please try to follow the [GitHub Coding Style Guides](https://github.com/styleguide). Additionally, we are switching to the git workflow described in [Juan Batiz-Benet's Gist](https://gist.github.com/jbenet/ee6c9ac48068889b0912). If you are new to the project and would like to make changes, please fork and do your work in a feature branch. Submit a pull request and we'll check to see if it is suitable to be merged in.
|
24
24
|
|
25
25
|
Change Log
|
26
26
|
==========
|
27
27
|
|
28
|
+
3.3.0 - November 7, 2013
|
29
|
+
|
30
|
+
* Removing hardcoded headers in QRDA documents and replacing them with templates populated by Ruby objects
|
31
|
+
* XML structural fixes in QRDA Category III generation
|
32
|
+
* QRDA Category I generation was previously dependent on a patient being associated with a bundle id, it will now use the latest bundle if one is not provided
|
33
|
+
* Specified a version in our dependency on rubyzip. API changes in rubyzip were breaking our code
|
34
|
+
* Fixed discrepancies between our Measure model and the JSON representation provided in measure bundles
|
35
|
+
|
36
|
+
3.2.11 - September 4, 2013
|
37
|
+
|
38
|
+
* Adding rake tasks for working with measure bundles
|
39
|
+
* Fixes for XPath expression execution when using JRuby
|
40
|
+
* OID fixes for ordinality in QRDA Category
|
41
|
+
|
28
42
|
3.2.8 - August 23, 2013
|
29
43
|
|
30
44
|
* Bug fixes for QRDA Category III generation
|
@@ -83,7 +83,11 @@ require_relative 'health-data-standards/models/qrda/legal_authenticator'
|
|
83
83
|
require_relative 'health-data-standards/models/qrda/author'
|
84
84
|
require_relative 'health-data-standards/models/qrda/header'
|
85
85
|
|
86
|
-
|
86
|
+
require_relative 'health-data-standards/models/cqm/aggregate_objects'
|
87
|
+
require_relative 'health-data-standards/models/cqm/query_cache'
|
88
|
+
require_relative 'health-data-standards/models/cqm/bundle'
|
89
|
+
require_relative 'health-data-standards/models/cqm/measure'
|
90
|
+
require_relative 'health-data-standards/models/cqm/patient_cache'
|
87
91
|
|
88
92
|
require_relative 'health-data-standards/export/qrda/entry_template_resolver'
|
89
93
|
require_relative 'health-data-standards/export/helper/scooped_view_helper'
|
@@ -168,11 +172,6 @@ require_relative 'health-data-standards/import/cat1/ecog_status_importer'
|
|
168
172
|
require_relative 'health-data-standards/import/cat1/symptom_active_importer'
|
169
173
|
require_relative 'health-data-standards/import/cat1/insurance_provider_importer'
|
170
174
|
|
171
|
-
require_relative 'health-data-standards/models/cqm/aggregate_objects'
|
172
|
-
require_relative 'health-data-standards/models/cqm/query_cache'
|
173
|
-
require_relative 'health-data-standards/models/cqm/bundle'
|
174
|
-
require_relative 'health-data-standards/models/cqm/measure'
|
175
|
-
require_relative 'health-data-standards/models/cqm/patient_cache'
|
176
175
|
require_relative 'health-data-standards/import/bundle/importer'
|
177
176
|
|
178
177
|
|
@@ -9,10 +9,10 @@ module HealthDataStandards
|
|
9
9
|
@cat1_renderer.template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1')
|
10
10
|
end
|
11
11
|
|
12
|
-
def export(measures, header, effective_date, start_date, end_date, test_id=nil)
|
12
|
+
def export(measures, header, effective_date, start_date, end_date, filter=nil,test_id=nil)
|
13
13
|
results = {}
|
14
14
|
measures.each do |measure|
|
15
|
-
results[measure['hqmf_id']] = HealthDataStandards::CQM::QueryCache.aggregate_measure(measure['hqmf_id'], effective_date, test_id)
|
15
|
+
results[measure['hqmf_id']] = HealthDataStandards::CQM::QueryCache.aggregate_measure(measure['hqmf_id'], effective_date, filter, test_id)
|
16
16
|
end
|
17
17
|
@rendering_context.render(:template => 'show',
|
18
18
|
:locals => {:measures => measures, :start_date => start_date,
|
@@ -5,9 +5,16 @@ module HealthDataStandards
|
|
5
5
|
include HealthDataStandards::Util
|
6
6
|
include HealthDataStandards::SVS
|
7
7
|
VS_MAP = {}
|
8
|
+
|
8
9
|
def value_set_map(bundle_id=nil)
|
9
|
-
|
10
|
-
|
10
|
+
bundle_id_to_use = nil
|
11
|
+
if bundle_id
|
12
|
+
bundle_id_to_use = bundle_id
|
13
|
+
else
|
14
|
+
latest_bundle_id = HealthDataStandards::CQM::Bundle.latest_bundle_id
|
15
|
+
bundle_id_to_use = Moped::BSON::ObjectId.from_string(latest_bundle_id) if latest_bundle_id
|
16
|
+
end
|
17
|
+
VS_MAP[bundle_id_to_use] ||= Hash[ValueSet.where({bundle_id: bundle_id_to_use}).map{ |p| [p.oid, p.code_set_map] }]
|
11
18
|
end
|
12
19
|
|
13
20
|
# Given a set of measures, find the data criteria/value set pairs that are unique across all of them
|
@@ -130,7 +137,7 @@ module HealthDataStandards
|
|
130
137
|
|
131
138
|
def handle_patient_expired(patient)
|
132
139
|
if patient.expired
|
133
|
-
[OpenStruct.new(start_date: patient.deathdate)]
|
140
|
+
[OpenStruct.new(start_date: patient.deathdate, id: UUID.generate)]
|
134
141
|
else
|
135
142
|
[]
|
136
143
|
end
|
@@ -139,20 +146,6 @@ module HealthDataStandards
|
|
139
146
|
def handle_payer_information(patient)
|
140
147
|
patient.insurance_providers
|
141
148
|
end
|
142
|
-
|
143
|
-
def code_in_valueset( code, valuesets=[],bundle_id=nil)
|
144
|
-
unless(bundle_id.nil?)
|
145
|
-
bundle = Bundle.find(bundle_id)
|
146
|
-
vs_matches = []
|
147
|
-
valuesets.each do |vs|
|
148
|
-
vset = bundle.valuesets.where({"oid"=>vs}).first
|
149
|
-
if vset && vset.concepts.where({"code" => code["code"], "codeSystem" => code["code_system"]}).first
|
150
|
-
vs_matches << vs
|
151
|
-
end
|
152
|
-
end
|
153
|
-
return vs_matches
|
154
|
-
end
|
155
|
-
end
|
156
149
|
end
|
157
150
|
end
|
158
151
|
end
|
@@ -3,6 +3,7 @@ module HealthDataStandards
|
|
3
3
|
|
4
4
|
class Bundle
|
5
5
|
include Mongoid::Document
|
6
|
+
include Mongoid::Timestamps
|
6
7
|
store_in collection: 'bundles'
|
7
8
|
field :title, type: String
|
8
9
|
field :version, type: String
|
@@ -15,19 +16,20 @@ module HealthDataStandards
|
|
15
16
|
|
16
17
|
validates_presence_of :version
|
17
18
|
|
18
|
-
|
19
|
-
|
19
|
+
scope :active, where(active: true)
|
20
|
+
|
21
|
+
def self.latest_bundle_id
|
22
|
+
desc(:exported).first.try(:_id)
|
20
23
|
end
|
21
24
|
|
22
25
|
def measures
|
23
|
-
|
26
|
+
HealthDataStandards::CQM::Measure.where({bundle_id: self.id}).order_by([["id", :asc],["sub_id",:asc]])
|
24
27
|
end
|
25
28
|
|
26
29
|
def records
|
27
|
-
|
30
|
+
Record.where(bundle_id: self._id, test_id: nil).order_by([["last", :asc]])
|
28
31
|
end
|
29
32
|
|
30
|
-
|
31
33
|
def value_sets
|
32
34
|
HealthDataStandards::SVS::ValueSet.in(bundle_id: self.id)
|
33
35
|
end
|
@@ -38,8 +40,6 @@ module HealthDataStandards
|
|
38
40
|
self.value_sets.destroy
|
39
41
|
super
|
40
42
|
end
|
41
|
-
|
42
|
-
|
43
|
-
end
|
43
|
+
end
|
44
44
|
end
|
45
45
|
end
|
@@ -2,6 +2,10 @@ module HealthDataStandards
|
|
2
2
|
module CQM
|
3
3
|
class Measure
|
4
4
|
include Mongoid::Document
|
5
|
+
include Mongoid::Timestamps
|
6
|
+
|
7
|
+
MSRPOPL = 'MSRPOPL'
|
8
|
+
|
5
9
|
store_in collection: 'measures'
|
6
10
|
field :id, type: String
|
7
11
|
field :sub_id, type: String
|
@@ -18,7 +22,7 @@ module HealthDataStandards
|
|
18
22
|
field :oids, type: Array
|
19
23
|
|
20
24
|
field :population_criteria, type: Hash
|
21
|
-
field :data_criteria, type:
|
25
|
+
field :data_criteria, type: Array, default: []
|
22
26
|
field :source_data_criteria, type: Hash, default: {}
|
23
27
|
field :measure_period, type: Hash
|
24
28
|
field :measure_attributes, type: Hash
|
@@ -29,13 +33,12 @@ module HealthDataStandards
|
|
29
33
|
scope :top_level , any_of({"sub_id" => nil}, {"sub_id" => "a"})
|
30
34
|
scope :order_by_id_sub_id, order_by([["id", :asc],["sub_id", :asc]])
|
31
35
|
|
32
|
-
index
|
33
|
-
index
|
34
|
-
index
|
35
|
-
index
|
36
|
-
index
|
37
|
-
|
38
|
-
index "bundle_id" => 1
|
36
|
+
index oids: 1
|
37
|
+
index hqmf_id: 1
|
38
|
+
index category: 1
|
39
|
+
index sub_id: 1
|
40
|
+
index _id: 1, sub_id: 1
|
41
|
+
index bundle_id: 1
|
39
42
|
|
40
43
|
validates_presence_of :id
|
41
44
|
validates_presence_of :name
|
@@ -70,109 +73,62 @@ module HealthDataStandards
|
|
70
73
|
@hqmf ||= HQMF::Document.from_json(self.hqmf_document)
|
71
74
|
end
|
72
75
|
|
73
|
-
def
|
74
|
-
|
76
|
+
def key
|
77
|
+
"#{self['id']}#{sub_id}"
|
78
|
+
end
|
79
|
+
|
80
|
+
def is_cv?
|
81
|
+
! population_ids[MSRPOPL].nil?
|
75
82
|
end
|
76
|
-
# Calculate the smoking gun data for the given hqmf_id with the given patient_cache_filter
|
77
|
-
# The filter will allow us to segment the cache by things like test_id required for Cypress.
|
78
|
-
|
79
|
-
def self.calculate_smoking_gun_data(bundle_id, hqmf_id, patient_cache_filter={})
|
80
|
-
population_keys = ('a'..'zz').to_a
|
81
|
-
values = {}
|
82
|
-
measure = Measure.top_level.where({hqmf_id: hqmf_id, bundle_id: bundle_id}).first
|
83
|
-
sub_ids = []
|
84
|
-
hqmf_measure = measure.as_hqmf_model
|
85
|
-
population_codes = []
|
86
|
-
if hqmf_measure.populations.length == 1
|
87
|
-
sub_ids = nil
|
88
|
-
population = hqmf_measure.populations[0]
|
89
|
-
HQMF::PopulationCriteria::ALL_POPULATION_CODES.each do |code|
|
90
|
-
population_codes << population[code] if population[code]
|
91
|
-
end
|
92
|
-
else
|
93
|
-
#Do not bother with populaions that contain stratifications
|
94
|
-
hqmf_measure.populations.each_with_index do |population,index|
|
95
|
-
if population["stratification"].nil?
|
96
|
-
sub_ids << population_keys[index]
|
97
|
-
HQMF::PopulationCriteria::ALL_POPULATION_CODES.each do |code|
|
98
|
-
population_codes << population[code] if population[code]
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
103
83
|
|
104
|
-
|
105
|
-
|
106
|
-
rationals = PatientCache.smoking_gun_rational(measure.hqmf_id,sub_ids,patient_cache_filter)
|
107
|
-
rationals.each_pair do |mrn,rash|
|
108
|
-
values[mrn] = []
|
109
|
-
population_codes.each do |pop_code|
|
110
|
-
# if (population[pop_code])
|
111
|
-
population_criteria = hqmf_measure.population_criteria(pop_code)
|
112
|
-
if population_criteria.preconditions
|
113
|
-
array = []
|
114
|
-
|
115
|
-
parent = population_criteria.preconditions[0]
|
116
|
-
values[mrn].concat self.loop_preconditions(hqmf_measure, parent, rash)
|
117
|
-
end # end population_criteria.preconditions
|
118
|
-
#end # end (population[pop_code])
|
119
|
-
end # population_codes
|
120
|
-
values[mrn].uniq!
|
121
|
-
end
|
122
|
-
values
|
84
|
+
def self.installed
|
85
|
+
Measure.order_by([["id", :asc],["sub_id", :asc]]).to_a
|
123
86
|
end
|
87
|
+
|
124
88
|
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
def self.
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
begin
|
136
|
-
qrda_template = HealthDataStandards::Export::QRDA::EntryTemplateResolver.qrda_oid_for_hqmf_oid(template,value_set_oid)
|
137
|
-
rescue
|
138
|
-
value_set_oid = 'In QRDA Header (Non Null Value)'
|
139
|
-
qrda_template = 'N/A'
|
140
|
-
end # end begin recue
|
141
|
-
description = "#{HQMF::DataCriteria.title_for_template_id(template).titleize}: #{data_criteria.title}"
|
142
|
-
result << {description: description, oid: value_set_oid, template: qrda_template, rationale: rationale[data_criteria.id]}
|
143
|
-
if data_criteria.temporal_references
|
144
|
-
data_criteria.temporal_references.each do |temporal_reference|
|
145
|
-
if temporal_reference.reference.id != 'MeasurePeriod'
|
146
|
-
result.concat loop_data_criteria(hqmf, hqmf.data_criteria(temporal_reference.reference.id), rationale)
|
147
|
-
end #if temporal_reference.reference.id
|
148
|
-
end # end data_criteria.temporal_references.each do |temporal_reference|
|
149
|
-
end# end if data_criteria.temporal_references
|
150
|
-
else #data_criteria.type != :derived
|
151
|
-
(data_criteria.children_criteria || []).each do |child_id|
|
152
|
-
result.concat loop_data_criteria(hqmf, hqmf.data_criteria(child_id), rationale)
|
153
|
-
end
|
154
|
-
end
|
155
|
-
end
|
156
|
-
result
|
89
|
+
# Finds all measures and groups the sub measures
|
90
|
+
# @return Array - This returns an Array of Hashes. Each Hash will represent a top level measure with an ID, name, and category.
|
91
|
+
# It will also have an array called subs containing hashes with an ID and name for each sub-measure.
|
92
|
+
def self.all_by_measure
|
93
|
+
reduce = 'function(obj,prev) {
|
94
|
+
if (obj.sub_id != null)
|
95
|
+
prev.subs.push({id : obj.id + obj.sub_id, name : obj.subtitle});
|
96
|
+
}'
|
97
|
+
|
98
|
+
self.moped_session.command( :group=> {:ns=>"measures", :key => {:id=>1, :name=>1, :category=>1}, :initial => {:subs => []}, "$reduce" => reduce})["retval"]
|
157
99
|
end
|
158
100
|
|
159
|
-
def
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
101
|
+
def display_name
|
102
|
+
"#{self['cms_id']}/#{self['nqf_id']} - #{name}"
|
103
|
+
end
|
104
|
+
|
105
|
+
|
106
|
+
def set_id
|
107
|
+
self.hqmf_set_id
|
108
|
+
end
|
109
|
+
|
110
|
+
def measure_id
|
111
|
+
self['id']
|
112
|
+
end
|
113
|
+
|
114
|
+
def continuous?
|
115
|
+
population_ids[MSRPOPL]
|
116
|
+
end
|
117
|
+
|
118
|
+
def title
|
119
|
+
self.name
|
120
|
+
end
|
121
|
+
|
122
|
+
def all_data_criteria
|
123
|
+
return @crit if @crit
|
124
|
+
@crit = []
|
125
|
+
self.data_criteria.each do |dc|
|
126
|
+
dc.each_pair do |k,v|
|
127
|
+
@crit << HQMF::DataCriteria.from_json(k,v)
|
171
128
|
end
|
172
129
|
end
|
173
|
-
|
130
|
+
@crit
|
174
131
|
end
|
175
|
-
|
176
132
|
end
|
177
133
|
end
|
178
134
|
end
|
@@ -2,8 +2,11 @@ module HealthDataStandards
|
|
2
2
|
module CQM
|
3
3
|
class QueryCache
|
4
4
|
include Mongoid::Document
|
5
|
+
include Mongoid::Timestamps
|
5
6
|
store_in collection: 'query_cache'
|
6
7
|
|
8
|
+
field :calculation_date, type: Time
|
9
|
+
field :status, type: Hash
|
7
10
|
field :measure_id, type: String
|
8
11
|
field :sub_id, type: String
|
9
12
|
field :population_ids, type: Hash
|
@@ -18,8 +21,8 @@ module HealthDataStandards
|
|
18
21
|
field :OBSERV, type: Float
|
19
22
|
field :supplemental_data, type: Hash
|
20
23
|
|
21
|
-
def self.aggregate_measure(measure_id, effective_date, test_id=nil)
|
22
|
-
cache_entries = self.where(effective_date: effective_date, measure_id: measure_id, test_id: test_id)
|
24
|
+
def self.aggregate_measure(measure_id, effective_date, filter=nil, test_id=nil)
|
25
|
+
cache_entries = self.where(effective_date: effective_date, measure_id: measure_id, test_id: test_id, filter: filter)
|
23
26
|
aggregate_count = AggregateCount.new
|
24
27
|
aggregate_count.measure_id = measure_id
|
25
28
|
cache_entries.each do |cache_entry|
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
-
vals.each do |value|
|
3
|
-
%>
|
4
1
|
<entry>
|
5
2
|
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
6
3
|
<!-- Consolidated Result Observation templateId (Implied Template) -->
|
@@ -17,8 +14,7 @@
|
|
17
14
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
18
15
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
19
16
|
</effectiveTime>
|
20
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
17
|
+
<%== render(:partial => 'result_value', :locals => {:values => [entry.values.first], :result_oids=>result_oids}) %>
|
21
18
|
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
22
19
|
</observation>
|
23
|
-
</entry>
|
24
|
-
<% end %>
|
20
|
+
</entry>
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
-
vals.each do |value|
|
3
|
-
%>
|
4
1
|
<entry>
|
5
2
|
<observation classCode="OBS" moodCode="EVN">
|
6
3
|
<!-- Functional Status Result Observation (consolidation) template -->
|
@@ -18,7 +15,6 @@
|
|
18
15
|
</effectiveTime>
|
19
16
|
|
20
17
|
<!-- Result -->
|
21
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
18
|
+
<%== render(:partial => 'result_value', :locals => {:values => [entry.values.first], :result_oids=>result_oids}) %>
|
22
19
|
</observation>
|
23
|
-
</entry>
|
24
|
-
<% end %>
|
20
|
+
</entry>
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
-
vals.each do |value|
|
3
|
-
%>
|
4
1
|
<entry>
|
5
2
|
<!--Laboratory test, result -->
|
6
3
|
<observation classCode="OBS" moodCode="EVN">
|
@@ -16,7 +13,6 @@
|
|
16
13
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
17
14
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
18
15
|
</effectiveTime>
|
19
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
16
|
+
<%== render(:partial => 'result_value', :locals => {:values => [entry.values.first], :result_oids=>result_oids}) %>
|
20
17
|
</observation>
|
21
|
-
</entry>
|
22
|
-
<% end %>
|
18
|
+
</entry>
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
-
vals.each do |value|
|
3
|
-
%>
|
4
1
|
<entry>
|
5
2
|
<!-- Physical Exam Finding -->
|
6
3
|
<observation classCode="OBS" moodCode="EVN">
|
@@ -16,7 +13,6 @@
|
|
16
13
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
17
14
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
18
15
|
</effectiveTime>
|
19
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
16
|
+
<%== render(:partial => 'result_value', :locals => {:values => [entry.values.first], :result_oids=>result_oids}) %>
|
20
17
|
</observation>
|
21
|
-
</entry>
|
22
|
-
<% end %>
|
18
|
+
</entry>
|
@@ -1,6 +1,3 @@
|
|
1
|
-
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
-
vals.each do |value|
|
3
|
-
%>
|
4
1
|
<entry>
|
5
2
|
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
6
3
|
<!-- Procedure Activity Procedure (Consolidation) template -->
|
@@ -15,7 +12,6 @@
|
|
15
12
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
16
13
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
17
14
|
</effectiveTime>
|
18
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
15
|
+
<%== render(:partial => 'result_value', :locals => {:values => [entry.values.first], :result_oids=>result_oids}) %>
|
19
16
|
</observation>
|
20
17
|
</entry>
|
21
|
-
<% end %>
|
@@ -1,6 +1,5 @@
|
|
1
|
-
<% vals = entry.values
|
2
|
-
vals.each do |value|
|
3
|
-
%>
|
1
|
+
<% vals = entry.values || [nil]
|
2
|
+
vals.each do |value| %>
|
4
3
|
<entry>
|
5
4
|
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
6
5
|
<!-- Consolidation Assessment Scale Observation templateId -->
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<%== code_display(ev, 'preferred_code_sets' => ['LOINC', 'SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM'], 'tag_name' => 'value', 'extra_content' => extra_content) %>
|
15
15
|
<% elsif ev.respond_to?(:scalar) -%>
|
16
16
|
<% if is_num?(ev.scalar) -%>
|
17
|
-
<value xsi:type="PQ" value="<%= ev.scalar
|
17
|
+
<value xsi:type="PQ" value="<%= ev.scalar %>" <% if ev.units && (ev.units != "") -%>unit="<%= ev.units %>"<% end -%>/>
|
18
18
|
<% elsif is_bool?(ev.scalar)%>
|
19
19
|
<value xsi:type="BL" value="<%= ev.scalar %>" />
|
20
20
|
<% else -%>
|
@@ -17,12 +17,12 @@
|
|
17
17
|
</assignedPerson>
|
18
18
|
<% elsif author.device %>
|
19
19
|
<assignedAuthoringDevice>
|
20
|
-
<softwareName><%= author.device.name %></softwareName>
|
21
20
|
<manufacturerModelName><%= author.device.model %></manufacturerModelName>
|
21
|
+
<softwareName><%= author.device.name %></softwareName>
|
22
22
|
</assignedAuthoringDevice>
|
23
23
|
<% end %>
|
24
24
|
|
25
25
|
<%== render :partial=>"organization", :locals=>{organization: author.organization} %>
|
26
26
|
|
27
27
|
</assignedAuthor>
|
28
|
-
</author>
|
28
|
+
</author>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
|
1
|
+
<% tag_name ||= "representedOrganization" %>
|
2
|
+
<<%=tag_name %>>
|
2
3
|
<!-- Represents unique registry organization TIN -->
|
3
|
-
|
4
4
|
<%== render :partial=>"id", :collection=>organization.ids, :id=> "identifier" %>
|
5
5
|
<!-- Contains name - specific registry not required-->
|
6
6
|
<name><%= organization.name %></name>
|
7
|
-
|
7
|
+
</<%=tag_name %>>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
<custodian>
|
43
43
|
<assignedCustodian>
|
44
44
|
<%== render :partial=>"id", :collection=>header.custodian.organization.ids, :id=>"identifier" %>
|
45
|
-
<%== render :partial=>"organization", :locals=>{organization: header.custodian.organization} %>
|
45
|
+
<%== render :partial=>"organization", :locals=>{organization: header.custodian.organization, tag_name: "representedCustodianOrganization"} %>
|
46
46
|
</assignedCustodian>
|
47
47
|
</custodian>
|
48
48
|
<!-- The legal authenticator of the CDA document is a single person who is at the
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: health-data-standards
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Andy Gregorowicz
|
@@ -12,11 +13,12 @@ authors:
|
|
12
13
|
autorequire:
|
13
14
|
bindir: bin
|
14
15
|
cert_chain: []
|
15
|
-
date: 2013-
|
16
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
16
17
|
dependencies:
|
17
18
|
- !ruby/object:Gem::Dependency
|
18
19
|
name: rest-client
|
19
20
|
requirement: !ruby/object:Gem::Requirement
|
21
|
+
none: false
|
20
22
|
requirements:
|
21
23
|
- - ~>
|
22
24
|
- !ruby/object:Gem::Version
|
@@ -24,6 +26,7 @@ dependencies:
|
|
24
26
|
type: :runtime
|
25
27
|
prerelease: false
|
26
28
|
version_requirements: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
27
30
|
requirements:
|
28
31
|
- - ~>
|
29
32
|
- !ruby/object:Gem::Version
|
@@ -31,6 +34,7 @@ dependencies:
|
|
31
34
|
- !ruby/object:Gem::Dependency
|
32
35
|
name: erubis
|
33
36
|
requirement: !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
34
38
|
requirements:
|
35
39
|
- - ~>
|
36
40
|
- !ruby/object:Gem::Version
|
@@ -38,6 +42,7 @@ dependencies:
|
|
38
42
|
type: :runtime
|
39
43
|
prerelease: false
|
40
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
41
46
|
requirements:
|
42
47
|
- - ~>
|
43
48
|
- !ruby/object:Gem::Version
|
@@ -45,6 +50,7 @@ dependencies:
|
|
45
50
|
- !ruby/object:Gem::Dependency
|
46
51
|
name: mongoid
|
47
52
|
requirement: !ruby/object:Gem::Requirement
|
53
|
+
none: false
|
48
54
|
requirements:
|
49
55
|
- - ~>
|
50
56
|
- !ruby/object:Gem::Version
|
@@ -52,6 +58,7 @@ dependencies:
|
|
52
58
|
type: :runtime
|
53
59
|
prerelease: false
|
54
60
|
version_requirements: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
55
62
|
requirements:
|
56
63
|
- - ~>
|
57
64
|
- !ruby/object:Gem::Version
|
@@ -59,6 +66,7 @@ dependencies:
|
|
59
66
|
- !ruby/object:Gem::Dependency
|
60
67
|
name: activesupport
|
61
68
|
requirement: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
62
70
|
requirements:
|
63
71
|
- - ~>
|
64
72
|
- !ruby/object:Gem::Version
|
@@ -66,6 +74,7 @@ dependencies:
|
|
66
74
|
type: :runtime
|
67
75
|
prerelease: false
|
68
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
69
78
|
requirements:
|
70
79
|
- - ~>
|
71
80
|
- !ruby/object:Gem::Version
|
@@ -73,6 +82,7 @@ dependencies:
|
|
73
82
|
- !ruby/object:Gem::Dependency
|
74
83
|
name: uuid
|
75
84
|
requirement: !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
76
86
|
requirements:
|
77
87
|
- - ~>
|
78
88
|
- !ruby/object:Gem::Version
|
@@ -80,6 +90,7 @@ dependencies:
|
|
80
90
|
type: :runtime
|
81
91
|
prerelease: false
|
82
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
83
94
|
requirements:
|
84
95
|
- - ~>
|
85
96
|
- !ruby/object:Gem::Version
|
@@ -87,6 +98,7 @@ dependencies:
|
|
87
98
|
- !ruby/object:Gem::Dependency
|
88
99
|
name: builder
|
89
100
|
requirement: !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
90
102
|
requirements:
|
91
103
|
- - ~>
|
92
104
|
- !ruby/object:Gem::Version
|
@@ -94,6 +106,7 @@ dependencies:
|
|
94
106
|
type: :runtime
|
95
107
|
prerelease: false
|
96
108
|
version_requirements: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
97
110
|
requirements:
|
98
111
|
- - ~>
|
99
112
|
- !ruby/object:Gem::Version
|
@@ -101,6 +114,7 @@ dependencies:
|
|
101
114
|
- !ruby/object:Gem::Dependency
|
102
115
|
name: nokogiri
|
103
116
|
requirement: !ruby/object:Gem::Requirement
|
117
|
+
none: false
|
104
118
|
requirements:
|
105
119
|
- - ~>
|
106
120
|
- !ruby/object:Gem::Version
|
@@ -108,6 +122,7 @@ dependencies:
|
|
108
122
|
type: :runtime
|
109
123
|
prerelease: false
|
110
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
111
126
|
requirements:
|
112
127
|
- - ~>
|
113
128
|
- !ruby/object:Gem::Version
|
@@ -115,20 +130,23 @@ dependencies:
|
|
115
130
|
- !ruby/object:Gem::Dependency
|
116
131
|
name: rubyzip
|
117
132
|
requirement: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
118
134
|
requirements:
|
119
|
-
- -
|
135
|
+
- - '='
|
120
136
|
- !ruby/object:Gem::Version
|
121
|
-
version:
|
137
|
+
version: 0.9.9
|
122
138
|
type: :runtime
|
123
139
|
prerelease: false
|
124
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
none: false
|
125
142
|
requirements:
|
126
|
-
- -
|
143
|
+
- - '='
|
127
144
|
- !ruby/object:Gem::Version
|
128
|
-
version:
|
145
|
+
version: 0.9.9
|
129
146
|
- !ruby/object:Gem::Dependency
|
130
147
|
name: log4r
|
131
148
|
requirement: !ruby/object:Gem::Requirement
|
149
|
+
none: false
|
132
150
|
requirements:
|
133
151
|
- - ~>
|
134
152
|
- !ruby/object:Gem::Version
|
@@ -136,6 +154,7 @@ dependencies:
|
|
136
154
|
type: :runtime
|
137
155
|
prerelease: false
|
138
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
|
+
none: false
|
139
158
|
requirements:
|
140
159
|
- - ~>
|
141
160
|
- !ruby/object:Gem::Version
|
@@ -143,6 +162,7 @@ dependencies:
|
|
143
162
|
- !ruby/object:Gem::Dependency
|
144
163
|
name: memoist
|
145
164
|
requirement: !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
146
166
|
requirements:
|
147
167
|
- - ~>
|
148
168
|
- !ruby/object:Gem::Version
|
@@ -150,6 +170,7 @@ dependencies:
|
|
150
170
|
type: :runtime
|
151
171
|
prerelease: false
|
152
172
|
version_requirements: !ruby/object:Gem::Requirement
|
173
|
+
none: false
|
153
174
|
requirements:
|
154
175
|
- - ~>
|
155
176
|
- !ruby/object:Gem::Version
|
@@ -517,29 +538,29 @@ files:
|
|
517
538
|
- Gemfile
|
518
539
|
- README.md
|
519
540
|
- Rakefile
|
520
|
-
- VERSION
|
521
541
|
homepage: https://github.com/projectcypress/health-data-standards
|
522
542
|
licenses:
|
523
543
|
- APL 2.0
|
524
|
-
metadata: {}
|
525
544
|
post_install_message:
|
526
545
|
rdoc_options: []
|
527
546
|
require_paths:
|
528
547
|
- lib
|
529
548
|
required_ruby_version: !ruby/object:Gem::Requirement
|
549
|
+
none: false
|
530
550
|
requirements:
|
531
551
|
- - ! '>='
|
532
552
|
- !ruby/object:Gem::Version
|
533
553
|
version: '0'
|
534
554
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
555
|
+
none: false
|
535
556
|
requirements:
|
536
557
|
- - ! '>='
|
537
558
|
- !ruby/object:Gem::Version
|
538
559
|
version: '0'
|
539
560
|
requirements: []
|
540
561
|
rubyforge_project:
|
541
|
-
rubygems_version:
|
562
|
+
rubygems_version: 1.8.25
|
542
563
|
signing_key:
|
543
|
-
specification_version:
|
564
|
+
specification_version: 3
|
544
565
|
summary: A library for generating and consuming various healthcare related formats.
|
545
566
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
ZTU3MzQ3NTYyZDJmYjk2NDc4ZWFhNWExNzkyZWJkYjZmYWE1MzIwNg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NzhlZWM4ZTA4MWVmYjRjMDE1ZjBiNDg2YTAyNmE2Mzg3MDZhZDFjYg==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
ZjJlODQ5M2Q1YjM1YjZmNGJhOWIwOTczMzMyNGVhYTUzZTIzMWQwNzE2ZWI4
|
10
|
-
ZGVlODI3OTIzMmU2MmFjMmUxMjMwM2U2ZjVhODhhMzMyYWYyYzQ3NGIyZDlk
|
11
|
-
MjVkYjA3NWI5MDlkMzdlYmIxZWQxYWJhMzUzZTdjZWM0MmM3MDg=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NDE1MGVkOTM1YTVjYmFjZGViZDE0NWQxZTM5ZDNhODIyZWY2MWQ3MDhiYzJl
|
14
|
-
M2RjM2RiODBhMGY1MWQ4NjJlM2Q1MDgxYzYxOWIzNzYyN2UxZjIyODk5NWQ0
|
15
|
-
NGZiNGMwYWQ2ZGZiYzU5ZWQ1YWM0YmNkYTkxMTQ4MmU0Nzg3YTA=
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.7.0
|