health-data-standards 3.2.5 → 3.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,7 @@ module HealthDataStandards
17
17
  end
18
18
 
19
19
  def render_patient_data(patient, measures)
20
+ HealthDataStandards.logger.warn("Generating CAT I for #{patient.first} #{patient.last}")
20
21
  udcs = unique_data_criteria(measures)
21
22
  data_criteria_html = udcs.map do |udc|
22
23
  entries = entries_for_data_criteria(udc['data_criteria'], patient)
@@ -51,7 +51,8 @@ module HealthDataStandards
51
51
  def entries_for_data_criteria(data_criteria, patient)
52
52
  data_criteria_oid = HQMFTemplateHelper.template_id_by_definition_and_status(data_criteria.definition,
53
53
  data_criteria.status || '',
54
- data_criteria.negation)
54
+ data_criteria.negation)
55
+ HealthDataStandards.logger.warn("Looking for dc [#{data_criteria_oid}]")
55
56
  filtered_entries = []
56
57
  case data_criteria_oid
57
58
  when '2.16.840.1.113883.3.560.1.404'
@@ -62,6 +63,19 @@ module HealthDataStandards
62
63
  filtered_entries = handle_payer_information(patient)
63
64
  else
64
65
  entries = patient.entries_for_oid(data_criteria_oid)
66
+
67
+ case data_criteria_oid
68
+ when '2.16.840.1.113883.3.560.1.5'
69
+ #special case handling for Lab Test: Performed being implicitly available through a Lab Test: Result
70
+ entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.12')
71
+ when '2.16.840.1.113883.3.560.1.12'
72
+ entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.5')
73
+ when '2.16.840.1.113883.3.560.1.6'
74
+ entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.63')
75
+ when '2.16.840.1.113883.3.560.1.63'
76
+ entries.concat patient.entries_for_oid('2.16.840.1.113883.3.560.1.6')
77
+ end
78
+
65
79
  codes = (value_set_map(patient["bundle_id"])[data_criteria.code_list_id] || [])
66
80
  if codes.empty?
67
81
  HealthDataStandards.logger.warn("No codes for #{data_criteria.code_list_id}")
@@ -29,6 +29,3 @@
29
29
  </procedure>
30
30
  </entry>
31
31
 
32
- <% unless entry.values.compact.empty? %>
33
- <%== render(:partial => '2.16.840.1.113883.10.20.24.3.66', :locals => {:entry => entry,:value_set_oid=>value_set_oid,:value_set_map=>value_set_map }) %>
34
- <% end -%>
@@ -5,7 +5,7 @@
5
5
  <%
6
6
  # get the pateint id , treate it as a hex number, turn it to a string and strip the last 9 characters off of it
7
7
  hic = patient.id.to_s.hex.to_s
8
- hic.slice!(hic.length-9,9)
8
+ hic = hic.slice(hic.length-9,9)
9
9
  %>
10
10
  <id extension="<%= hic %>A" root="2.16.840.1.113883.4.572"/>
11
11
  <addr use="HP">
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: health-data-standards
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.5
4
+ version: 3.2.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-07-09 00:00:00.000000000 Z
16
+ date: 2013-07-10 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rest-client