health-data-standards 2.1.2 → 2.1.3
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.
- data/lib/health-data-standards/models/entry.rb +3 -3
- data/templates/_allergies_no_current.c32.erb +1 -1
- data/templates/_narrative_block.c32.erb +1 -1
- data/templates/ccda/_allergies_no_current.ccda.erb +2 -1
- data/templates/ccda/_conditions_no_current.ccda.erb +2 -1
- data/templates/ccda/_medications_no_current.ccda.erb +1 -1
- data/templates/ccda/_narrative_block.ccda.erb +1 -1
- data/templates/ccda/_procedures_no_current.ccda.erb +2 -1
- data/templates/html/_entries_by_encounter.html.erb +1 -1
- data/templates/html/_entries_by_section.html.erb +7 -5
- data/templates/html/_entry.html.erb +1 -1
- data/templates/html/_header.html.erb +15 -3
- data/templates/show.c32.erb +2 -0
- metadata +2 -2
@@ -31,10 +31,10 @@ class Entry
|
|
31
31
|
attr_protected :created_at
|
32
32
|
attr_protected :updated_at
|
33
33
|
|
34
|
-
def times_to_s
|
34
|
+
def times_to_s(nil_string='UNK')
|
35
35
|
if start_time.present? || end_time.present?
|
36
|
-
start_string = start_time ? Time.at(start_time).utc.to_formatted_s(:long_ordinal) :
|
37
|
-
end_string = end_time ? Time.at(end_time).utc.to_formatted_s(:long_ordinal) :
|
36
|
+
start_string = start_time ? Time.at(start_time).utc.to_formatted_s(:long_ordinal) : nil_string
|
37
|
+
end_string = end_time ? Time.at(end_time).utc.to_formatted_s(:long_ordinal) : nil_string
|
38
38
|
"#{start_string} - #{end_string}"
|
39
39
|
elsif time.present?
|
40
40
|
Time.at(time).utc.to_formatted_s(:long_ordinal)
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<templateId root="2.16.840.1.113883.3.88.11.83.102" assigningAuthorityName="HITSP/C83"/>
|
5
5
|
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.3.13" assigningAuthorityName="IHE PCC"/>
|
6
6
|
<templateId root="2.16.840.1.113883.10.20.1.2" assigningAuthorityName="HL7 CCD"/>
|
7
|
-
<code code="
|
7
|
+
<code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
|
8
8
|
<title>Allergies and Adverse Reactions</title>
|
9
9
|
<text>
|
10
10
|
<table border="1" width="100%">
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<% entries.each_with_index do |entry, i| -%>
|
19
19
|
<tr>
|
20
20
|
<td ID="<%= section %>-desc-<%= i %>"><%= entry.description %></td>
|
21
|
-
<td ID="<%= section %>-code-<%= i %>"><%= entry.codes_to_s %><br
|
21
|
+
<td ID="<%= section %>-code-<%= i %>"><%= entry.codes_to_s %><br/><%= entry.specifics %></td>
|
22
22
|
<td><%= entry.times_to_s %></td>
|
23
23
|
<% if status.present? %>
|
24
24
|
<td><%= entry.status %></td>
|
@@ -19,10 +19,11 @@
|
|
19
19
|
<templateId root="2.16.840.1.113883.10.20.22.4.7"/>
|
20
20
|
<id root="<%= UUID.generate %>"/>
|
21
21
|
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
|
22
|
+
<statusCode code="completed"/>
|
22
23
|
<effectiveTime>
|
23
24
|
<low nullFlavor="UNK"/>
|
24
25
|
</effectiveTime>
|
25
|
-
|
26
|
+
|
26
27
|
<value xsi:type="CD" code="419199007"
|
27
28
|
codeSystem="2.16.840.1.113883.6.96" displayName="Allergy to Substance"/>
|
28
29
|
</observation>
|
@@ -19,10 +19,11 @@
|
|
19
19
|
<templateId root="2.16.840.1.113883.10.20.22.4.4"/>
|
20
20
|
<id root="<%= UUID.generate %>"/>
|
21
21
|
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
|
22
|
+
<statusCode code="completed"/>
|
22
23
|
<effectiveTime>
|
23
24
|
<low nullFlavor="UNK"/>
|
24
25
|
</effectiveTime>
|
25
|
-
|
26
|
+
|
26
27
|
</observation>
|
27
28
|
</entryRelationship>
|
28
29
|
</act>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>Medications</title>
|
7
7
|
<text>There are no current medications at the time of this document's creation.</text>
|
8
8
|
<entry>
|
9
|
-
<substanceAdministration moodCode="EVN" classCode="SBADM" negationInd
|
9
|
+
<substanceAdministration moodCode="EVN" classCode="SBADM" negationInd="true">
|
10
10
|
<text>No known medications.</text>
|
11
11
|
<consumable>
|
12
12
|
<manufacturedProduct>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<% entries.each_with_index do |entry, i| -%>
|
19
19
|
<tr>
|
20
20
|
<td ID="<%= section %>-desc-<%= i %>"><%= entry.description %></td>
|
21
|
-
<td ID="<%= section %>-code-<%= i %>"><%= entry.codes_to_s %><br
|
21
|
+
<td ID="<%= section %>-code-<%= i %>"><%= entry.codes_to_s %><br/><%= entry.specifics %></td>
|
22
22
|
<td><%= entry.times_to_s %></td>
|
23
23
|
<% if status.present? %>
|
24
24
|
<td><%= entry.status %></td>
|
@@ -10,10 +10,11 @@
|
|
10
10
|
<templateId root="2.16.840.1.113883.10.20.22.4.14"/>
|
11
11
|
<id root="<%= UUID.generate %>"/>
|
12
12
|
<code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
|
13
|
+
<statusCode code="completed"/>
|
13
14
|
<effectiveTime>
|
14
15
|
<low nullFlavor="UNK"/>
|
15
16
|
</effectiveTime>
|
16
|
-
|
17
|
+
|
17
18
|
</procedure>
|
18
19
|
</entry>
|
19
20
|
</section>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
all_entries = []
|
7
7
|
entry_section = {}
|
8
8
|
Record::Sections.each do |section|
|
9
|
-
if section != :encounters
|
9
|
+
if section != :encounters and section != :insurance_providers
|
10
10
|
patient.send(section).each do |entry|
|
11
11
|
all_entries << entry
|
12
12
|
entry_section[entry.hash] = section
|
@@ -2,11 +2,13 @@
|
|
2
2
|
<%
|
3
3
|
entries_by_section = {}
|
4
4
|
Record::Sections.each do |section|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
if section != :insurance_providers
|
6
|
+
patient.send(section).each do |entry|
|
7
|
+
decoded_section = decode_hqmf_section(section, entry.oid)
|
8
|
+
entries_by_section[decoded_section] ||= []
|
9
|
+
entries_by_section[decoded_section] << entry
|
10
|
+
end if patient.respond_to? section
|
11
|
+
end
|
10
12
|
end
|
11
13
|
%>
|
12
14
|
<% entries_by_section.each do |section, entries| %>
|
@@ -11,10 +11,22 @@
|
|
11
11
|
<td><%= (patient.gender == 'M') ? "Male" : (patient.gender == 'F') ? 'Female' : 'Unknown'%></td>
|
12
12
|
</tr>
|
13
13
|
<tr>
|
14
|
-
<td bgcolor="#3399ff"><span class="td_label">
|
15
|
-
<td
|
14
|
+
<td width="20%" bgcolor="#3399ff"><span class="td_label">Race</span></td>
|
15
|
+
<td width="30%"><%= patient.race.nil? ? 'Unknown' : (patient.race['name'] ? patient.race['name'] : "CDC-RE: #{patient.race['code']}") %></td>
|
16
|
+
<td width="15%" bgcolor="#3399ff"><span class="td_label">Ethnicity</span></td>
|
17
|
+
<td><%= patient.ethnicity.nil? ? 'Unknown' : (patient.ethnicity['name'] ? patient.ethnicity['name'] : "CDC-RE: #{patient.ethnicity['code']}") %></td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td bgcolor="#3399ff"><span class="td_label">Insurance Providers</span></td>
|
21
|
+
<td>
|
22
|
+
<%= (patient.insurance_providers.map {|provider| provider.name }).join(", ") %>
|
23
|
+
</td>
|
16
24
|
<td bgcolor="#3399ff"><span class="td_label">Patient IDs</span></td>
|
17
|
-
<td><%= patient.id %> Cypress
|
25
|
+
<td><%= patient.id %> Cypress</td>
|
26
|
+
</tr>
|
27
|
+
<tr>
|
28
|
+
<td bgcolor="#3399ff"><span class="td_label">Contact info</span></td>
|
29
|
+
<td colspan="3"> Pirmary Home: 202 Burlington Rd. Bedford, MA 01730<br />Tel: +1-781-271-3000</td>
|
18
30
|
</tr>
|
19
31
|
</tbody>
|
20
32
|
</table>
|
data/templates/show.c32.erb
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
<templateId root="2.16.840.1.113883.3.27.1776" assigningAuthorityName="CDA/R2"/>
|
6
6
|
<templateId root="2.16.840.1.113883.10.20.3" assigningAuthorityName="HL7/CDT Header"/>
|
7
7
|
<templateId root="1.3.6.1.4.1.19376.1.5.3.1.1.1" assigningAuthorityName="IHE/PCC"/>
|
8
|
+
<templateId root="2.16.840.1.113883.3.88.10.20.3" assigningAuthorityName="HITSP/C32"/>
|
9
|
+
|
8
10
|
<templateId root="2.16.840.1.113883.3.88.11.32.1" assigningAuthorityName="HITSP/C32"/>
|
9
11
|
<id root="2.16.840.1.113883.3.72" extension="<%= patient.id %>" assigningAuthorityName="NIST Healthcare Project"/>
|
10
12
|
<code code="34133-9" displayName="Summarization of episode note" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
|
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: 2.1.
|
4
|
+
version: 2.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2012-11-
|
15
|
+
date: 2012-11-14 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rest-client
|