health-data-standards 3.0.6 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/README.md +3 -1
  2. data/Rakefile +2 -0
  3. data/lib/health-data-standards.rb +10 -0
  4. data/lib/health-data-standards/export/cat_3.rb +24 -0
  5. data/lib/health-data-standards/export/html.rb +2 -1
  6. data/lib/health-data-standards/import/bundle/importer.rb +178 -146
  7. data/lib/health-data-standards/import/cat1/diagnosis_active_importer.rb +0 -5
  8. data/lib/health-data-standards/import/cat1/diagnosis_inactive_importer.rb +1 -6
  9. data/lib/health-data-standards/import/cat1/diagnostic_study_order_importer.rb +0 -4
  10. data/lib/health-data-standards/import/cat1/ecog_status_importer.rb +12 -0
  11. data/lib/health-data-standards/import/cat1/encounter_order_importer.rb +0 -5
  12. data/lib/health-data-standards/import/cat1/lab_order_importer.rb +1 -5
  13. data/lib/health-data-standards/import/cat1/lab_result_importer.rb +18 -0
  14. data/lib/health-data-standards/import/cat1/medication_active_importer.rb +27 -0
  15. data/lib/health-data-standards/import/cat1/patient_importer.rb +54 -46
  16. data/lib/health-data-standards/import/cat1/procedure_performed_importer.rb +28 -0
  17. data/lib/health-data-standards/import/cat1/symptom_active_importer.rb +12 -0
  18. data/lib/health-data-standards/import/cda/condition_importer.rb +2 -0
  19. data/lib/health-data-standards/import/cda/encounter_importer.rb +6 -0
  20. data/lib/health-data-standards/import/cda/procedure_importer.rb +1 -0
  21. data/lib/health-data-standards/import/cda/section_importer.rb +27 -5
  22. data/lib/health-data-standards/models/cda_identifier.rb +17 -0
  23. data/lib/health-data-standards/models/cqm/aggregate_objects.rb +92 -0
  24. data/lib/health-data-standards/models/cqm/measure.rb +51 -30
  25. data/lib/health-data-standards/models/cqm/query_cache.rb +64 -0
  26. data/lib/health-data-standards/models/entry.rb +1 -1
  27. data/lib/health-data-standards/models/record.rb +28 -3
  28. data/lib/health-data-standards/models/svs/value_set.rb +20 -0
  29. data/lib/health-data-standards/tasks/bundle.rake +18 -8
  30. data/lib/health-data-standards/util/hqmf_template_helper.rb +6 -2
  31. data/lib/health-data-standards/util/hqmf_template_oid_map.json +4 -0
  32. data/lib/health-data-standards/util/vs_api.rb +9 -6
  33. data/lib/hqmf-model/data_criteria.json +10 -10
  34. data/lib/hqmf-parser.rb +0 -2
  35. data/lib/hqmf-parser/1.0/range.rb +21 -9
  36. data/templates/c32/show.c32.erb +1 -1
  37. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.4.cat1.erb +1 -0
  38. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.40.cat1.erb +2 -1
  39. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.44.cat1.erb +1 -0
  40. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.46.cat1.erb +1 -1
  41. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.54.cat1.erb +16 -1
  42. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.62.cat1.erb +1 -1
  43. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.69.cat1.erb +7 -2
  44. data/templates/cat1/_2.16.840.1.113883.10.20.24.3.76.cat1.erb +2 -1
  45. data/templates/cat1/_medication_details.cat1.erb +4 -4
  46. data/templates/cat1/_record_target.cat1.erb +2 -2
  47. data/templates/cat1/_result_value.cat1.erb +1 -1
  48. data/templates/cat1/show.cat1.erb +2 -2
  49. data/templates/cat3/_continuous_variable_value.cat3.erb +20 -0
  50. data/templates/cat3/_measure_data.cat3.erb +126 -0
  51. data/templates/cat3/_performance_rate.cat3.erb +16 -0
  52. data/templates/cat3/_supplemental_data.cat3.erb +36 -0
  53. data/templates/cat3/show.cat3.erb +157 -0
  54. data/templates/ccda/show.ccda.erb +1 -1
  55. metadata +25 -45
  56. data/lib/hqmf-parser/value_sets/value_set_parser.rb +0 -241
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- This is a project to generate and consume HITSP C32, ASTM CCR and PQRI
1
+ This is a project to generate and consume HITSP C32, ASTM CCR, QRDA Category I and PQRI.
2
+
3
+ In addition this project also contains libaries for parsing hqmf documents and for dealing with NLM valuesets.
2
4
 
3
5
  Environment
4
6
  ===========
data/Rakefile CHANGED
@@ -2,6 +2,8 @@ require 'rake/testtask'
2
2
  require 'cane/rake_task'
3
3
  require "simplecov"
4
4
 
5
+ import 'lib/tasks/hqmf.rake'
6
+
5
7
  Rake::TestTask.new(:test_unit) do |t|
6
8
  t.libs << "test"
7
9
  t.test_files = FileList['test/**/*_test.rb']
@@ -7,6 +7,7 @@ require 'csv'
7
7
  require 'nokogiri'
8
8
  require 'ostruct'
9
9
  require 'log4r'
10
+ require 'memoist'
10
11
 
11
12
  # Freedom patches
12
13
  require_relative 'health-data-standards/ext/symbol'
@@ -40,6 +41,7 @@ require_relative 'health-data-standards/models/thing_with_codes'
40
41
  require_relative 'health-data-standards/models/result_value'
41
42
  require_relative 'health-data-standards/models/coded_result_value'
42
43
  require_relative 'health-data-standards/models/physical_quantity_result_value'
44
+ require_relative 'health-data-standards/models/cda_identifier'
43
45
  require_relative 'health-data-standards/models/entry'
44
46
  require_relative 'health-data-standards/models/allergy'
45
47
  require_relative 'health-data-standards/models/encounter'
@@ -76,6 +78,7 @@ require_relative 'health-data-standards/models/metadata/pedigree'
76
78
  require_relative 'health-data-standards/export/qrda/entry_template_resolver'
77
79
  require_relative 'health-data-standards/export/helper/cat1_view_helper'
78
80
  require_relative 'health-data-standards/export/cat_1'
81
+ require_relative 'health-data-standards/export/cat_3'
79
82
 
80
83
  require_relative 'health-data-standards/import/cda/narrative_reference_handler'
81
84
  require_relative 'health-data-standards/import/cda/entry_finder'
@@ -135,17 +138,24 @@ require_relative 'health-data-standards/import/green_c32/care_goal_importer'
135
138
 
136
139
  require_relative 'health-data-standards/import/cat1/gestational_age_importer'
137
140
  require_relative 'health-data-standards/import/cat1/procedure_intolerance_importer'
141
+ require_relative 'health-data-standards/import/cat1/procedure_performed_importer'
138
142
  require_relative 'health-data-standards/import/cat1/procedure_order_importer'
139
143
  require_relative 'health-data-standards/import/cat1/diagnosis_active_importer'
140
144
  require_relative 'health-data-standards/import/cat1/diagnosis_inactive_importer'
141
145
  require_relative 'health-data-standards/import/cat1/patient_importer'
142
146
  require_relative 'health-data-standards/import/cat1/lab_order_importer'
147
+ require_relative 'health-data-standards/import/cat1/medication_active_importer'
143
148
  require_relative 'health-data-standards/import/cat1/medication_dispensed_importer'
144
149
  require_relative 'health-data-standards/import/cat1/encounter_order_importer'
145
150
  require_relative 'health-data-standards/import/cat1/diagnostic_study_order_importer'
146
151
  require_relative 'health-data-standards/import/cat1/tobacco_use_importer'
147
152
  require_relative 'health-data-standards/import/cat1/entry_package'
153
+ require_relative 'health-data-standards/import/cat1/lab_result_importer'
154
+ require_relative 'health-data-standards/import/cat1/ecog_status_importer'
155
+ require_relative 'health-data-standards/import/cat1/symptom_active_importer'
148
156
 
157
+ require_relative 'health-data-standards/models/cqm/aggregate_objects'
158
+ require_relative 'health-data-standards/models/cqm/query_cache'
149
159
  require_relative 'health-data-standards/models/cqm/bundle'
150
160
  require_relative 'health-data-standards/models/cqm/measure'
151
161
  require_relative 'health-data-standards/import/bundle/importer'
@@ -0,0 +1,24 @@
1
+ module HealthDataStandards
2
+ module Export
3
+ class Cat3
4
+ def initialize
5
+ template_helper = HealthDataStandards::Export::TemplateHelper.new('cat3', 'cat3')
6
+ @rendering_context = HealthDataStandards::Export::RenderingContext.new
7
+ @rendering_context.template_helper = template_helper
8
+ @cat1_renderer = HealthDataStandards::Export::RenderingContext.new
9
+ @cat1_renderer.template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1')
10
+ end
11
+
12
+ def export(measures, effective_date, start_date, end_date, test_id=nil)
13
+ results = {}
14
+ measures.each do |measure|
15
+ results[measure['hqmf_id']] = HealthDataStandards::CQM::QueryCache.aggregate_measure(measure['hqmf_id'], effective_date, test_id)
16
+ end
17
+ @rendering_context.render(:template => 'show',
18
+ :locals => {:measures => measures, :start_date => start_date,
19
+ :end_date => end_date, :cat1_renderer => @cat1_renderer,
20
+ :results => results})
21
+ end
22
+ end
23
+ end
24
+ end
@@ -6,10 +6,11 @@ module HealthDataStandards
6
6
  @rendering_context = RenderingContext.new
7
7
  @rendering_context.template_helper = template_helper
8
8
  @rendering_context.extensions = [HealthDataStandards::Export::Helper::HTMLViewHelper]
9
- @code_map ||= self.build_code_map
9
+ @code_map = nil
10
10
  end
11
11
 
12
12
  def export(patient)
13
+ @code_map ||= self.build_code_map
13
14
  @rendering_context.render(:template => 'show', :locals => {:patient => patient, :code_map => @code_map})
14
15
  end
15
16
 
@@ -1,148 +1,180 @@
1
+ require 'zip/zipfilesystem'
1
2
  module HealthDataStandards
2
- module Import
3
- module Bundle
4
-
5
- class Importer
6
- COLLECTION_NAMES = ["bundles", "records", "measures", "selected_measures", "patient_cache", "query_cache", "system.js"]
7
- DEFAULTS = {clear_db: false,
8
- type: nil,
9
- delete_existing: false,
10
- update_measures: true,
11
- clear_collections: COLLECTION_NAMES
12
- }
13
- # Import a quality bundle into the database. This includes metadata, measures, test patients, supporting JS libraries, and expected results.
14
- #
15
- # @param [File] zip The bundle zip file.
16
- # @param [String] Type of measures to import, either 'ep', 'eh' or nil for all
17
- # @param [Boolean] keep_existing If true, delete all current collections related to patients and measures.
18
- def self.import(zip, options={})
19
- options = DEFAULTS.merge(options)
20
- bundle_versions = Hash[* HealthDataStandards::CQM::Bundle.where({}).collect{|b| [b._id, b.version]}.flatten]
21
- # Unpack content from the bundle.
22
- bundle_contents = unpack_bundle_contents(zip, options[:type])
23
- bundle = HealthDataStandards::CQM::Bundle.new( JSON.parse(bundle_contents[:bundle]))
24
-
25
- if bundle_versions.invert[bundle.version] && !(options[:delete_existing] || options[:clear_db])
26
- raise "A bundle with version #{bundle.version} already exists in the database. "
27
- end
28
-
29
- drop_collections(COLLECTION_NAMES+(options[:clear_collections]||[])) if options[:clear_db]
30
- HealthDataStandards::CQM::Bundle.where({:version => bundle.version}).each {|b| b.delete}
31
- # Store all JS libraries.
32
- bundle_contents[:extensions].each do |key, contents|
33
- save_system_js_fn(key, contents)
34
- end
35
-
36
- # Store the bundle metadata.
37
-
38
-
39
- unless bundle.save
40
- raise bundle.errors.full_messages.join(",")
41
- end
42
-
43
- bundle_id = bundle.id
44
-
45
-
46
- # Store all measures.
47
- bundle_contents[:measures].each do |key, contents|
48
- json = JSON.parse(contents, {:max_nesting => 100})
49
- measure = json.clone
50
- # measure = HealthDataStandards::CQM::Measure.new(json)
51
- measure['bundle_id'] = bundle_id
52
- Mongoid.default_session["measures"].insert(measure)
53
-
54
-
55
- if options[:update_measures]
56
- Mongoid.default_session["measures"].where({hqmf_id: measure["hqmf_id"], sub_id: measure["sub_id"]}).each do |m|
57
- b = HealthDataStandards::CQM::Bundle.find(m["bundle_id"])
58
- if b.version < bundle.version
59
- m.merge!(json)
60
- Mongoid.default_session["measures"].where({"_id" => m["_id"]}).update(m)
61
- end
62
-
63
- end
64
- end
65
- end
66
-
67
-
68
- bundle_contents[:patients].each do |key, contents|
69
- patient = Record.new( JSON.parse(contents, {:max_nesting => 100}))
70
- patient['bundle_id'] = bundle_id
71
- patient.save
72
- end
73
-
74
- bundle_contents[:valuesets].each do |key, contents|
75
- json = JSON.parse(contents, {:max_nesting => 100})
76
- vs = HealthDataStandards::SVS::ValueSet.new(json)
77
- vs['bundle_id'] = bundle_id
78
- vs.save
79
- end
80
-
81
- # Store the expected results into the query and patient caches.
82
- bundle_contents[:results].each do |name, contents|
83
- collection = name == "by_patient" ? "patient_cache" : "query_cache"
84
- contents = JSON.parse(contents, {:max_nesting => 100})
85
-
86
- contents.each {|document|
87
- document['bundle_id'] = bundle_id
88
- Mongoid.default_session[collection].insert(document)
89
- }
90
-
91
- end
92
-
93
- bundle
94
- end
95
-
96
- # Delete a list of collections. By default, this function drops all of collections related to measures and patients.
97
- #
98
- # @param [Array] collection_names Optionally, an array of collection names to be dropped.
99
- def self.drop_collections(collection_names=[])
100
- collection_names = COLLECTION_NAMES if collection_names.empty?
101
- collection_names.each {|collection| Mongoid.default_session[collection].drop}
102
- end
103
-
104
- # Save a javascript function into Mongo's system.js collection for measure execution.
105
- #
106
- # @param [String] name The name by which the function will be referred.
107
- # @param [String] fn The body of the function being saved.
108
- def self.save_system_js_fn(name, fn)
109
- fn = "function () {\n #{fn} \n }"
110
- Mongoid.default_session['system.js'].find('_id' => name).upsert(
111
- {
112
- "_id" => name,
113
- "value" => Moped::BSON::Code.new(fn)
114
- }
115
- )
116
- end
117
-
118
- # A utility function for finding files in a bundle. Strip a file path of it's extension and just give the filename.
119
- #
120
- # @param [String] original A file path.
121
- # @param [String] extension A file extension.
122
- # @return The filename at the end of the original String path with the extension removed. e.g. "/boo/urns.html" -> "urns"
123
- def self.entry_key(original, extension)
124
- original.split('/').last.gsub(".#{extension}", '')
125
- end
126
-
127
- def self.unpack_bundle_contents(zip, type = nil)
128
- bundle_contents = { bundle: nil, measures: {}, patients: {}, extensions: {}, results: {}, valuesets: {} }
129
- Zip::ZipFile.open(zip.path) do |zipfile|
130
- zipfile.entries.each do |entry|
131
- bundle_contents[:bundle] = zipfile.read(entry.name) if entry.name.include? "bundle"
132
- if type.nil? || entry.name.match(Regexp.new("/#{type}/"))
133
- bundle_contents[:measures][entry_key(entry.name, "json")] = zipfile.read(entry.name) if entry.name.match /^measures.*\.json$/
134
- bundle_contents[:patients][entry_key(entry.name, "json")] = zipfile.read(entry.name) if entry.name.match /^patients.*\.json$/ # Only need to import one of the formats
135
- bundle_contents[:results][entry_key(entry.name,"json")] = zipfile.read(entry.name) if entry.name.match /^results.*\.json/
136
- end
137
- bundle_contents[:extensions][entry_key(entry.name,"js")] = zipfile.read(entry.name) if entry.name.match /^library_functions.*\.js/
138
-
139
- bundle_contents[:valuesets][entry_key(entry.name,"json")] = zipfile.read(entry.name) if entry.name.match /^value_sets.*\.json/
140
- end
141
- end
142
- bundle_contents
143
- end
144
- end
145
-
146
- end
147
- end
3
+ module Import
4
+ module Bundle
5
+
6
+ class Importer
7
+
8
+ SOURCE_ROOTS = {bundle: 'bundle.json',
9
+ libraries: File.join('library_functions','*.js'),
10
+ measures: 'measures', results: 'results',
11
+ valuesets: File.join('value_sets','json','*.json'),
12
+ patients: 'patients'}
13
+ COLLECTION_NAMES = ["bundles", "records", "measures", "selected_measures", "patient_cache", "query_cache", "system.js"]
14
+ CLEAR_ONLY_COLLECTIONS = ["system.js"]
15
+ DEFAULTS = {type: nil,
16
+ delete_existing: false,
17
+ update_measures: true,
18
+ clear_collections: COLLECTION_NAMES
19
+ }
20
+
21
+ # Import a quality bundle into the database. This includes metadata, measures, test patients, supporting JS libraries, and expected results.
22
+ #
23
+ # @param [File] zip The bundle zip file.
24
+ # @param [String] Type of measures to import, either 'ep', 'eh' or nil for all
25
+ # @param [Boolean] keep_existing If true, delete all current collections related to patients and measures.
26
+ def self.import(zip, options={})
27
+ options = DEFAULTS.merge(options)
28
+
29
+ bundle = nil
30
+ Zip::ZipFile.open(zip.path) do |zip_file|
31
+
32
+ bundle = unpack_bundle(zip_file)
33
+
34
+ bundle_versions = Hash[* HealthDataStandards::CQM::Bundle.where({}).collect{|b| [b._id, b.version]}.flatten]
35
+ if bundle_versions.invert[bundle.version] && !(options[:delete_existing])
36
+ raise "A bundle with version #{bundle.version} already exists in the database. "
37
+ end
38
+
39
+ HealthDataStandards::CQM::Bundle.where({:version => bundle.version}).each do |b|
40
+ puts "deleting existing bundle version: #{b.version}"
41
+ b.delete
42
+ end if options[:delete_existing]
43
+
44
+ unpack_and_store_system_js(zip_file)
45
+
46
+ # Store the bundle metadata.
47
+ unless bundle.save
48
+ raise bundle.errors.full_messages.join(",")
49
+ end
50
+ puts "bundle metadata unpacked..."
51
+
52
+ measure_ids = unpack_and_store_measures(zip_file, options[:type], bundle, options[:update_measures])
53
+ unpack_and_store_patients(zip_file, options[:type], bundle)
54
+ unpack_and_store_valuesets(zip_file, bundle)
55
+ unpack_and_store_results(zip_file, options[:type], measure_ids, bundle)
56
+
57
+ end
58
+
59
+ bundle
60
+ end
61
+
62
+
63
+ # Save a javascript function into Mongo's system.js collection for measure execution.
64
+ #
65
+ # @param [String] name The name by which the function will be referred.
66
+ # @param [String] fn The body of the function being saved.
67
+ def self.save_system_js_fn(name, fn)
68
+ fn = "function () {\n #{fn} \n }"
69
+ Mongoid.default_session['system.js'].find('_id' => name).upsert(
70
+ {
71
+ "_id" => name,
72
+ "value" => Moped::BSON::Code.new(fn)
73
+ }
74
+ )
75
+ end
76
+
77
+ # A utility function for finding files in a bundle. Strip a file path of it's extension and just give the filename.
78
+ #
79
+ # @param [String] original A file path.
80
+ # @param [String] extension A file extension.
81
+ # @return The filename at the end of the original String path with the extension removed. e.g. "/boo/urns.html" -> "urns"
82
+ def self.entry_key(original, extension)
83
+ original.split('/').last.gsub(".#{extension}", '')
84
+ end
85
+
86
+ def self.unpack_bundle(zip)
87
+ HealthDataStandards::CQM::Bundle.new(JSON.parse(zip.read(SOURCE_ROOTS[:bundle]),max_nesting: 100))
88
+ end
89
+
90
+ def self.unpack_and_store_system_js(zip)
91
+ zip.glob(SOURCE_ROOTS[:libraries]).each do |entry|
92
+ name = Pathname.new(entry.name).basename('.js').to_s
93
+ contents = entry.get_input_stream.read
94
+ save_system_js_fn(name, contents)
95
+ end
96
+ end
97
+
98
+ def self.unpack_and_store_measures(zip, type, bundle, update_measures)
99
+ measure_ids = []
100
+ entries = zip.glob(File.join(SOURCE_ROOTS[:measures],type || '**','*.json'))
101
+ entries.each_with_index do |entry, index|
102
+ source_measure = unpack_json(entry)
103
+ # we clone so that we have a source without a bundle id
104
+ measure = source_measure.clone
105
+ measure_ids << measure['id']
106
+ measure['bundle_id'] = bundle.id
107
+ Mongoid.default_session["measures"].insert(measure)
108
+
109
+ if update_measures
110
+ Mongoid.default_session["measures"].where({hqmf_id: measure["hqmf_id"], sub_id: measure["sub_id"]}).each do |m|
111
+ b = HealthDataStandards::CQM::Bundle.find(m["bundle_id"])
112
+ if b.version < bundle.version
113
+ m.merge!(source_measure)
114
+ Mongoid.default_session["measures"].where({"_id" => m["_id"]}).update(m)
115
+ end
116
+ end
117
+ end
118
+ report_progress('measures', (index*100/entries.length)) if index%10 == 0
119
+ end
120
+ puts "\rLoading: Measures Complete "
121
+ measure_ids
122
+ end
123
+
124
+ def self.unpack_and_store_patients(zip, type, bundle)
125
+ entries = zip.glob(File.join(SOURCE_ROOTS[:patients],type || '**','json','*.json'))
126
+ entries.each_with_index do |entry, index|
127
+ patient = Record.new(unpack_json(entry))
128
+ patient['bundle_id'] = bundle.id
129
+ patient.save
130
+ report_progress('patients', (index*100/entries.length)) if index%10 == 0
131
+ end
132
+ puts "\rLoading: Patients Complete "
133
+ end
134
+
135
+ def self.unpack_and_store_valuesets(zip, bundle)
136
+ entries = zip.glob(SOURCE_ROOTS[:valuesets])
137
+ bulk = []
138
+ entries.each_with_index do |entry, index|
139
+ vs = HealthDataStandards::SVS::ValueSet.new(unpack_json(entry))
140
+ vs['bundle_id'] = bundle.id
141
+ bulk << vs
142
+ report_progress('Value Sets', (index*100/entries.length)) if index%10 == 0
143
+ end
144
+ HealthDataStandards::SVS::ValueSet.collection.insert(bulk.map {|vs| vs.as_document})
145
+ puts "\rLoading: Value Sets Complete "
146
+ end
147
+
148
+ def self.unpack_and_store_results(zip, type, measure_ids, bundle)
149
+ zip.glob(File.join(SOURCE_ROOTS[:results],'*.json')).each do |entry|
150
+ name = Pathname.new(entry.name).basename('.json').to_s
151
+ collection = (name == "by_patient") ? "patient_cache" : "query_cache"
152
+
153
+ contents = unpack_json(entry)
154
+
155
+ if (type)
156
+ contents.select! {|entry| measure_ids.include? entry['measure_id']} if collection == 'query_cache'
157
+ contents.select! {|entry| measure_ids.include? entry['value']['measure_id']} if collection == 'patient_cache'
158
+ end
159
+
160
+ contents.each do |document|
161
+ document['bundle_id'] = bundle.id
162
+ Mongoid.default_session[collection].insert(document)
163
+ end
164
+ end
165
+ puts "\rLoading: Results Complete "
166
+ end
167
+
168
+ def self.unpack_json(entry)
169
+ JSON.parse(entry.get_input_stream.read,:max_nesting => 100)
170
+ end
171
+
172
+ def self.report_progress(label, percent)
173
+ print "\rLoading: #{label} #{percent}% complete"
174
+ STDOUT.flush
175
+ end
176
+
177
+ end
178
+ end
179
+ end
148
180
  end
@@ -8,11 +8,6 @@ module HealthDataStandards
8
8
  @status_xpath = nil # We'll hardcode this to active in create entry because this is from the
9
9
  # diagnosis active template
10
10
  end
11
-
12
- def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
13
- condition = super
14
- condition
15
- end
16
11
  end
17
12
  end
18
13
  end
@@ -5,14 +5,9 @@ module HealthDataStandards
5
5
 
6
6
  def initialize
7
7
  super(CDA::EntryFinder.new("//cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.13']"))
8
- @status_xpath = nil # We'll hardcode this to active in create entry because this is from the
8
+ @status_xpath = nil # We'll hardcode this to inactive in create entry because this is from the
9
9
  # diagnosis active template
10
10
  end
11
-
12
- def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
13
- condition = super
14
- condition
15
- end
16
11
  end
17
12
  end
18
13
  end