health-data-standards 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,52 @@
1
+
2
+ <component>
3
+ <!--Allergies/Reactions-->
4
+ <section>
5
+ <templateId root="2.16.840.1.113883.10.20.22.2.6"/>
6
+ <!--Allergies/Reactions section template-->
7
+ <code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergies"/>
8
+ <title>Allergies and Adverse Reactions</title>
9
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'allergies'} %>
10
+ <% entries.each_with_index do |entry, i| -%>
11
+ <entry typeCode="DRIV">
12
+ <act classCode="ACT" moodCode="EVN">
13
+ <templateId root="2.16.840.1.113883.10.20.22.4.30"/>
14
+ <!--Allergy act template -->
15
+ <id root="<%= UUID.generate %>"/>
16
+ <code nullFlavor="NA"/>
17
+ <statusCode code="active"/>
18
+ <effectiveTime>
19
+ <low <%= value_or_null_flavor(entry.as_point_in_time) %>/>
20
+ </effectiveTime>
21
+ <entryRelationship typeCode="SUBJ" inversionInd="false">
22
+ <observation classCode="OBS" moodCode="EVN">
23
+ <templateId root="2.16.840.1.113883.10.20.22.4.7"/>
24
+ <id root="<%= UUID.generate %>"/>
25
+ <code code="416098002" codeSystem="2.16.840.1.113883.6.96" displayName="drug allergy" codeSystemName="SNOMED CT">
26
+ <originalText><reference value="#allergies-desc-<%= i %>"/></originalText>
27
+ </code>
28
+ <text>
29
+ <reference value="#allergies-desc-<%= i %>"/>
30
+ </text>
31
+ <statusCode code="completed"/>
32
+ <effectiveTime>
33
+ <low <%= value_or_null_flavor(entry.as_point_in_time) %>/>
34
+ </effectiveTime>
35
+ <value xsi:type="CD" nullFlavor="UNK"/>
36
+ <participant typeCode="CSM">
37
+ <participantRole classCode="MANU">
38
+ <playingEntity classCode="MMAT">
39
+ <%== render :partial => 'code_with_reference',
40
+ :locals => {:entry => entry, :i => i, :section => 'allergies',
41
+ :preferred_code_sets => ['RxNorm']} %>
42
+ <name><%= entry.description %></name>
43
+ </playingEntity>
44
+ </participantRole>
45
+ </participant>
46
+ </observation>
47
+ </entryRelationship>
48
+ </act>
49
+ </entry>
50
+ <% end -%>
51
+ </section>
52
+ </component>
@@ -0,0 +1,33 @@
1
+ <component>
2
+ <!-- Allergies: patient has no allergies -->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.6"/>
5
+ <code code="48765-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Allergy List"/>
6
+ <title>Allergies</title>
7
+ <text>There are no current allergies at the time of this document's creation.</text>
8
+ <entry typeCode="DRIV">
9
+ <act classCode="ACT" moodCode="EVN">
10
+ <templateId root="2.16.840.1.113883.10.20.22.4.30"/>
11
+ <id root="<%= UUID.generate %>"/>
12
+ <code nullFlavor="NA"/>
13
+ <statusCode code="active"/>
14
+ <effectiveTime>
15
+ <low nullFlavor="NA"/>
16
+ </effectiveTime>
17
+ <entryRelationship typeCode="SUBJ" inversionInd="false">
18
+ <observation classCode="OBS" moodCode="EVN" negationInd="true">
19
+ <templateId root="2.16.840.1.113883.10.20.22.4.7"/>
20
+ <id root="<%= UUID.generate %>"/>
21
+ <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
22
+ <effectiveTime>
23
+ <low nullFlavor="UNK"/>
24
+ </effectiveTime>
25
+ <statusCode code="completed"/>
26
+ <value xsi:type="CD" code="419199007"
27
+ codeSystem="2.16.840.1.113883.6.96" displayName="Allergy to Substance"/>
28
+ </observation>
29
+ </entryRelationship>
30
+ </act>
31
+ </entry>
32
+ </section>
33
+ </component>
@@ -0,0 +1,10 @@
1
+ <component>
2
+ <!--Plan of Care-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.10"/>
5
+ <!--Plan of Care section template-->
6
+ <code code="18776-5" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Treatment plan"/>
7
+ <title>Plan of Care</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'plan_of_care'} %>
9
+ </section>
10
+ </component>
@@ -0,0 +1,13 @@
1
+ <% preferred_code = entry.preferred_code(preferred_code_sets)
2
+ if preferred_code
3
+ code_system_oid = HealthDataStandards::Util::CodeSystemHelper.oid_for_code_system(preferred_code['code_set'])
4
+ -%>
5
+ <code code="<%= preferred_code['code'] %>" codeSystem="<%= code_system_oid %>" displayName="<%= entry.description %>">
6
+ <% else -%>
7
+ <code nullFlavor="UNK">
8
+ <% end -%>
9
+ <originalText><reference value="#<%= section %>-desc-<%= i %>"/></originalText>
10
+ <% entry.translation_codes(preferred_code_sets).each do |translation| -%>
11
+ <translation code="<%= translation['code'] %>" codeSystem="<%= HealthDataStandards::Util::CodeSystemHelper.oid_for_code_system(translation['code_set']) %>" />
12
+ <% end -%>
13
+ </code>
@@ -0,0 +1,59 @@
1
+ <component>
2
+ <!--Problems-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.5.1"/>
5
+ <!--Problems section template-->
6
+ <code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem list"/>
7
+ <title>Problems</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'conditions', :status => true } %>
9
+ <% entries.each_with_index do |entry, i| -%>
10
+ <entry typeCode="DRIV">
11
+ <act classCode="ACT" moodCode="EVN">
12
+ <templateId root="2.16.840.1.113883.10.20.22.4.3"/>
13
+ <!-- Problem act template -->
14
+ <id root="<%= UUID.generate %>"/>
15
+ <code nullFlavor="NA"/>
16
+ <% if entry.status.eql? 'resolved' -%>
17
+ <statusCode code="completed"/>
18
+ <% else -%>
19
+ <statusCode code="active"/>
20
+ <% end -%>
21
+ <effectiveTime>
22
+ <low <%= value_or_null_flavor(entry.as_point_in_time) %>/>
23
+ </effectiveTime>
24
+ <entryRelationship typeCode="SUBJ" inversionInd="false">
25
+ <observation classCode="OBS" moodCode="EVN">
26
+ <templateId root="2.16.840.1.113883.10.20.22.4.4"/>
27
+
28
+ <!--Problem observation template - NOT episode template-->
29
+ <id root="<%= UUID.generate %>"/>
30
+ <code code="64572001" displayName="Condition" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED-CT"/>
31
+ <text>
32
+ <reference value="#conditions-desc-<%= i %>"/>
33
+ </text>
34
+ <statusCode code="completed"/>
35
+ <effectiveTime>
36
+ <low <%= value_or_null_flavor(entry.as_point_in_time) %>/>
37
+ </effectiveTime>
38
+ <% if entry.ordinality -%>
39
+ <priorityCode code="8319008" codeSystem="2.16.840.1.113883.6.96" displayName="Principal diagnosis" />
40
+ <% end -%>
41
+ <%== code_display(entry, {'tag_name' => 'value', 'extra_content' => 'xsi:type="CD"', 'preferred_code_sets' => ['SNOMED-CT']}) %>
42
+ <% if entry.status -%>
43
+ <entryRelationship typeCode="REFR">
44
+ <observation classCode="OBS" moodCode="EVN">
45
+ <templateId root="2.16.840.1.113883.10.20.22.4.6"/>
46
+ <!-- Problem status observation template -->
47
+ <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
48
+ <statusCode code="completed"/>
49
+ <value xsi:type="CE" code="<%= status_code_for(entry) %>" codeSystem="2.16.840.1.113883.6.96"/>
50
+ </observation>
51
+ </entryRelationship>
52
+ <% end -%>
53
+ </observation>
54
+ </entryRelationship>
55
+ </act>
56
+ </entry>
57
+ <% end -%>
58
+ </section>
59
+ </component>
@@ -0,0 +1,31 @@
1
+ <component>
2
+ <!-- Conditions: patient has no conditions -->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.5"/>
5
+ <code code="11450-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Problem List"/>
6
+ <title>Problems</title>
7
+ <text>There are no current problem concern acts at the time of this document's creation.</text>
8
+ <entry typeCode="DRIV">
9
+ <act classCode="ACT" moodCode="EVN">
10
+ <templateId root="2.16.840.1.113883.10.20.22.4.3"/>
11
+ <id root="<%= UUID.generate %>"/>
12
+ <code nullFlavor="NA"/>
13
+ <statusCode code="active"/>
14
+ <effectiveTime>
15
+ <low nullFlavor="NA"/>
16
+ </effectiveTime>
17
+ <entryRelationship typeCode="SUBJ" inversionInd="false">
18
+ <observation classCode="OBS" moodCode="EVN" negationInd="true">
19
+ <templateId root="2.16.840.1.113883.10.20.22.4.4"/>
20
+ <id root="<%= UUID.generate %>"/>
21
+ <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
22
+ <effectiveTime>
23
+ <low nullFlavor="UNK"/>
24
+ </effectiveTime>
25
+ <statusCode code="completed"/>
26
+ </observation>
27
+ </entryRelationship>
28
+ </act>
29
+ </entry>
30
+ </section>
31
+ </component>
@@ -0,0 +1,25 @@
1
+ <component>
2
+ <!--Encounters-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.22" /> <!-- CCDA Template id -->
5
+ <!--Encounters section template-->
6
+ <code code="46240-8" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of encounters"/>
7
+ <title>Encounters</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'encounters'} %>
9
+ <% entries.each_with_index do |entry, i| -%>
10
+ <entry typeCode="DRIV">
11
+ <encounter classCode="ENC" moodCode="EVN">
12
+ <templateId root="2.16.840.1.113883.10.20.22.4.49"/>
13
+ <!-- Encounter activity template -->
14
+ <id root="<%= UUID.generate %>"/>
15
+ <%== render :partial => 'code_with_reference', :locals => {:entry => entry, :i => i, :section => 'encounters',
16
+ :preferred_code_sets => ['CPT']} %>
17
+ <text>
18
+ <reference value="#encounters-desc-<%= i %>"/>
19
+ </text>
20
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
21
+ </encounter>
22
+ </entry>
23
+ <% end -%>
24
+ </section>
25
+ </component>
@@ -0,0 +1,37 @@
1
+ <component>
2
+ <!--Immunizations-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.2" />
5
+ <!--Immunizations section template-->
6
+ <code code="11369-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of immunizations"/>
7
+ <title>Immunizations</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'immunizations'} %>
9
+ <% entries.each_with_index do |entry, i| -%>
10
+ <entry typeCode="DRIV">
11
+ <substanceAdministration classCode="SBADM" moodCode="EVN" negationInd="false">
12
+ <templateId root="2.16.840.1.113883.10.20.22.4.52"/>
13
+ <!-- Medication activity template -->
14
+ <id root="<%= UUID.generate %>"/>
15
+ <code code='IMMUNIZ' codeSystem='2.16.840.1.113883.5.4' codeSystemName='ActCode'/>
16
+ <text>
17
+ <reference value="#immunizations-desc-<%= i %>"/>
18
+ </text>
19
+ <statusCode code="completed"/>
20
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
21
+ <doseQuantity nullFlavor="UNK"/>
22
+ <consumable>
23
+ <manufacturedProduct classCode="MANU">
24
+ <templateId root="2.16.840.1.113883.10.20.22.4.54"/>
25
+ <!-- Product template -->
26
+ <manufacturedMaterial>
27
+ <%== render :partial => 'code_with_reference', :locals => {:entry => entry, :i => i, :section => 'immunizations',
28
+ :preferred_code_sets => ['CVX']} %>
29
+ <name><%= entry.description %></name>
30
+ </manufacturedMaterial>
31
+ </manufacturedProduct>
32
+ </consumable>
33
+ </substanceAdministration>
34
+ </entry>
35
+ <% end -%>
36
+ </section>
37
+ </component>
@@ -0,0 +1,38 @@
1
+ <component>
2
+ <!--Medical Equipment - Not C32-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.23" />
5
+ <!-- Medical equipment section template -->
6
+ <code code="46264-8" codeSystem="2.16.840.1.113883.6.1"/>
7
+ <title>Medical Equipment</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'medical_equipment'} %>
9
+ <% entries.each_with_index do |entry, i| -%>
10
+ <entry typeCode="DRIV">
11
+ <supply classCode="SPLY" moodCode="EVN">
12
+ <templateId root="2.16.840.1.113883.10.20.22.4.50"/>
13
+ <!-- Supply activity template -->
14
+ <id root="<%= UUID.generate %>"/>
15
+ <statusCode code="completed"/>
16
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
17
+ <participant typeCode="DEV">
18
+ <participantRole classCode="MANU">
19
+ <templateId root="2.16.840.1.113883.10.20.22.4.37"/>
20
+ <!-- Product instance template -->
21
+ <addr/>
22
+ <telecom/>
23
+ <playingDevice>
24
+ <%== code_display(entry, {:preferred_code_sets => ['SNOMED-CT']}) %>
25
+ </playingDevice>
26
+ <% if entry.manufacturer %>
27
+ <scopingEntity>
28
+ <id root="<%= UUID.generate %>"/>
29
+ <desc><%= entry.manufacturer %></desc>
30
+ </scopingEntity>
31
+ <% end %>
32
+ </participantRole>
33
+ </participant>
34
+ </supply>
35
+ </entry>
36
+ <% end -%>
37
+ </section>
38
+ </component>
@@ -0,0 +1,34 @@
1
+ <component>
2
+ <!--Medications-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.1" />
5
+ <code code="10160-0" displayName="History of medication use" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
6
+ <title>Medications</title>
7
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'medications'} %>
8
+ <% entries.each_with_index do |entry, i| -%>
9
+ <entry>
10
+ <!--CCD Medication activity - Required-->
11
+ <substanceAdministration classCode="SBADM" moodCode="EVN">
12
+ <templateId root='2.16.840.1.113883.10.20.22.4.16'/>
13
+ <id root="<%= UUID.generate %>"/>
14
+ <statusCode code="completed"/>
15
+ <effectiveTime xsi:type="IVL_TS">
16
+ <low <%= value_or_null_flavor(entry.as_point_in_time) %>/>
17
+ <high nullFlavor="UNK"/>
18
+ </effectiveTime>
19
+ <consumable>
20
+ <!--CCD Product - Required-->
21
+ <manufacturedProduct classCode="MANU">
22
+ <templateId root='2.16.840.1.113883.10.20.22.4.23'/>
23
+ <manufacturedMaterial>
24
+ <%== render :partial => 'code_with_reference', :locals => {:entry => entry, :i => i, :section => 'medications',
25
+ :preferred_code_sets => ['RxNorm']} %>
26
+ <name><%= entry.description %></name>
27
+ </manufacturedMaterial>
28
+ </manufacturedProduct>
29
+ </consumable>
30
+ </substanceAdministration>
31
+ </entry>
32
+ <% end -%>
33
+ </section>
34
+ </component>
@@ -0,0 +1,23 @@
1
+ <component>
2
+ <!-- Medications: patient has no medications -->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.1" />
5
+ <code code="10160-0" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="History of medication use"/>
6
+ <title>Medications</title>
7
+ <text>There are no current medications at the time of this document's creation.</text>
8
+ <entry>
9
+ <substanceAdministration moodCode="EVN" classCode="SBADM" negationInd=”true”>
10
+ <text>No known medications.</text>
11
+ <consumable>
12
+ <manufacturedProduct>
13
+ <manufacturedLabeledDrug>
14
+ <code code="410942007" displayName="drug or medication"
15
+ codeSystem="2.16.840.1.113883.6.96"
16
+ codeSystemName="SNOMED CT"/>
17
+ </manufacturedLabeledDrug>
18
+ </manufacturedProduct>
19
+ </consumable>
20
+ </substanceAdministration>
21
+ </entry>
22
+ </section>
23
+ </component>
@@ -0,0 +1,46 @@
1
+ <text>
2
+ <table border="1" width="100%">
3
+ <thead>
4
+ <tr>
5
+ <th>Description</th>
6
+ <th>Codes</th>
7
+ <th>Time</th>
8
+ <% if status.present? %>
9
+ <th>Status</th>
10
+ <% end %>
11
+
12
+ <% if value.present? %>
13
+ <th>Value</th>
14
+ <% end %>
15
+ </tr>
16
+ </thead>
17
+ <tbody>
18
+ <% entries.each_with_index do |entry, i| -%>
19
+ <tr>
20
+ <td ID="<%= section %>-desc-<%= i %>"><%= entry.description %></td>
21
+ <td ID="<%= section %>-code-<%= i %>"><%= entry.codes_to_s %><br/><i><%= entry.specifics %></i></td>
22
+ <td><%= entry.times_to_s %></td>
23
+ <% if status.present? %>
24
+ <td><%= entry.status %></td>
25
+ <% end %>
26
+
27
+ <% if value.present?%>
28
+ <td>
29
+ <% entry.values.each do |value| %>
30
+ <% if value.respond_to? :scalar %>
31
+ <%= value.try(:scalar) %><br/>
32
+ <% elsif value.respond_to? :codes %>
33
+ <% value.codes.each do |system, vals| %>
34
+ <%= system %>: <%= vals.join(',') %><br/>
35
+ <% end %>
36
+ <% else %>
37
+ UNKNOWN VALUE
38
+ <% end %>
39
+ <% end %>
40
+ </td>
41
+ <% end %>
42
+ </tr>
43
+ <%- end -%>
44
+ </tbody>
45
+ </table>
46
+ </text>
@@ -0,0 +1,26 @@
1
+ <component>
2
+ <!--Surgeries-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.7"/>
5
+ <!--Surgeries section template-->
6
+ <code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="List of surgeries"/>
7
+ <title>Surgeries</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'procedures'} %>
9
+ <% entries.each_with_index do |entry, i| -%>
10
+ <entry typeCode="DRIV">
11
+ <procedure classCode="PROC" moodCode="EVN">
12
+ <templateId root="2.16.840.1.113883.10.20.22.4.14"/>
13
+ <!-- Procedure activity template -->
14
+ <id root="<%= UUID.generate %>"/>
15
+ <%== render :partial => 'code_with_reference', :locals => {:entry => entry, :i => i, :section => 'procedures',
16
+ :preferred_code_sets => ['CPT', 'ICD-9-CM', 'ICD-10-CM', 'HCPCS', 'SNOMED-CT']} %>
17
+ <text>
18
+ <reference value="#procedures-desc-<%= i %>"/>
19
+ </text>
20
+ <statusCode code="completed"/>
21
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
22
+ </procedure>
23
+ </entry>
24
+ <% end -%>
25
+ </section>
26
+ </component>
@@ -0,0 +1,20 @@
1
+ <component>
2
+ <!-- Procedures: patient has no procedures -->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.7"/>
5
+ <code code="47519-4" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Procedures"/>
6
+ <title>Procedures</title>
7
+ <text>There are no current procedures at the time of this document's creation.</text>
8
+ <entry typeCode="DRIV">
9
+ <procedure classCode="PROC" moodCode="EVN" negationInd="true">
10
+ <templateId root="2.16.840.1.113883.10.20.22.4.14"/>
11
+ <id root="<%= UUID.generate %>"/>
12
+ <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
13
+ <effectiveTime>
14
+ <low nullFlavor="UNK"/>
15
+ </effectiveTime>
16
+ <statusCode code="completed"/>
17
+ </procedure>
18
+ </entry>
19
+ </section>
20
+ </component>
@@ -0,0 +1,61 @@
1
+ <component>
2
+ <!--Diagnostic Results-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.3.1"/>
5
+ <!--Diagnostic Results section template-->
6
+ <code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Results"/>
7
+ <title>Diagnostic Results</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'results', :value=>true} %>
9
+ <entry typeCode="DRIV">
10
+ <organizer classCode="BATTERY" moodCode="EVN">
11
+ <templateId root="2.16.840.1.113883.10.20.22.4.1"/>
12
+ <!--Result organizer template -->
13
+ <id root="<%= UUID.generate %>"/>
14
+ <code nullFlavor="NA"/>
15
+ <statusCode code="completed"/>
16
+ <effectiveTime value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
17
+ <component>
18
+ <observation classCode="OBS" moodCode="EVN">
19
+ <templateId root="2.16.840.1.113883.10.20.22.4.2"/>
20
+ <id root="<%= UUID.generate %>"/>
21
+ <code nullFlavor="UNK">
22
+ <originalText><reference value="Unknown"/></originalText>
23
+ </code>
24
+ <text>
25
+ <reference value="Unknown"/>
26
+ </text>
27
+ <statusCode code="completed"/>
28
+ <effectiveTime nullFlavor="UNK"/>
29
+ </observation>
30
+ </component>
31
+ <% entries.each_with_index do |entry, i| -%>
32
+ <component>
33
+ <observation classCode="OBS" moodCode="EVN">
34
+ <templateId root="2.16.840.1.113883.10.20.22.4.2"/>
35
+ <!-- Result observation template -->
36
+ <id root="<%= UUID.generate %>"/>
37
+ <%== code_display(entry, 'preferred_code_sets' => ['LOINC', 'SNOMED-CT']) %>
38
+ <text>
39
+ <reference value="#results-desc-<%= i %>"/>
40
+ </text>
41
+ <statusCode code="completed"/>
42
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
43
+ <% ev = entry.values.first
44
+ if ev.present? && ev.respond_to?(:scalar) -%>
45
+ <% if is_num?(ev.scalar) -%>
46
+ <value xsi:type="PQ" value="<%= ev.scalar %>" <% if ev.units -%>unit="<%= ev.units %>"<% end -%>/>
47
+ <% elsif is_bool?(ev.scalar)%>
48
+ <value xsi:type="BL" value="<%= ev.scalar %>" />
49
+ <% else -%>
50
+ <value xsi:type="ST" ><%= ev.scalar %></value>
51
+ <% end -%>
52
+ <% else -%>
53
+ <value xsi:type="PQ" nullFlavor="UNK"/>
54
+ <% end -%>
55
+ </observation>
56
+ </component>
57
+ <% end -%>
58
+ </organizer>
59
+ </entry>
60
+ </section>
61
+ </component>
@@ -0,0 +1,31 @@
1
+ <component>
2
+ <!-- Diagnostic Results: patient has no results -->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.3.1"/>
5
+ <code code="30954-2" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Results"/>
6
+ <title>Diagnostic Results</title>
7
+ <text>There are no current results at the time of this document's creation.</text>
8
+ <entry typeCode="DRIV">
9
+ <organizer classCode="BATTERY" moodCode="EVN">
10
+ <templateId root="2.16.840.1.113883.10.20.22.4.1"/>
11
+ <id root="<%= UUID.generate %>"/>
12
+ <code nullFlavor="NA"/>
13
+ <statusCode code="completed"/>
14
+ <effectiveTime>
15
+ <low nullFlavor="UNK"/>
16
+ </effectiveTime>
17
+ <component>
18
+ <observation classCode="OBS" moodCode="EVN" negationInd="true">
19
+ <templateId root="2.16.840.1.113883.10.20.22.4.2"/>
20
+ <id root="<%= UUID.generate %>"/>
21
+ <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
22
+ <statusCode code="completed"/>
23
+ <effectiveTime>
24
+ <low nullFlavor="UNK"/>
25
+ </effectiveTime>
26
+ </observation>
27
+ </component>
28
+ </organizer>
29
+ </entry>
30
+ </section>
31
+ </component>
@@ -0,0 +1,22 @@
1
+ <component>
2
+ <!--Social History - CCDA-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.17"/>
5
+ <!-- Social history section template -->
6
+ <code code="29762-2" codeSystem="2.16.840.1.113883.6.1"/>
7
+ <title>Social History</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'social_history'} %>
9
+ <% entries.each_with_index do |entry, i| -%>
10
+ <entry typeCode="DRIV">
11
+ <observation classCode="OBS" moodCode="EVN">
12
+ <templateId root="2.16.840.1.113883.10.20.22.4.38"/>
13
+ <!-- Social history observation template -->
14
+ <id root="<%= UUID.generate %>"/>
15
+ <%== code_display(entry, {:preferred_code_sets => ['SNOMED-CT']}) %>
16
+ <statusCode code="completed"/>
17
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
18
+ </observation>l
19
+ </entry>
20
+ <% end -%>
21
+ </section>
22
+ </component>
@@ -0,0 +1,47 @@
1
+ <component>
2
+ <!--Vital Signs-->
3
+ <section>
4
+ <templateId root="2.16.840.1.113883.10.20.22.2.4"/>
5
+ <!--Vital Signs section template-->
6
+ <code code="8716-3" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Vital signs"/>
7
+ <title>Vital Signs</title>
8
+ <%== render :partial => 'narrative_block', :locals => {:entries => entries, :section => 'vitals', :value=>true} %>
9
+ <entry typeCode="DRIV">
10
+ <organizer classCode="CLUSTER" moodCode="EVN">
11
+ <templateId root="2.16.840.1.113883.10.20.22.4.26"/>
12
+ <!-- Vital signs organizer template -->
13
+ <id root="<%= UUID.generate %>"/>
14
+ <code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs" codeSystemName="SNOMED CT"/>
15
+ <statusCode code="completed"/>
16
+ <effectiveTime value="19991114"/>
17
+ <% entries.each_with_index do |entry, i| -%>
18
+ <component>
19
+ <observation classCode="OBS" moodCode="EVN">
20
+ <templateId root="2.16.840.1.113883.10.20.22.4.27"/>
21
+ <!-- Result observation template -->
22
+ <id root="<%= UUID.generate %>"/>
23
+ <%== code_display(entry, {'preferred_code_sets' => ['LOINC','SNOMED']}) %>
24
+ <text>
25
+ <reference value="vitals-desc-<%= i %>"/>
26
+ </text>
27
+ <statusCode code="completed"/>
28
+ <effectiveTime <%= value_or_null_flavor(entry.as_point_in_time) %>/>
29
+ <% ev = entry.values.first
30
+ if ev.present? && ev.respond_to?(:scalar) -%>
31
+ <% if is_num?(ev.scalar) -%>
32
+ <value xsi:type="PQ" value="<%= ev.scalar %>" <% if ev.units -%>unit="<%= ev.units %>"<% end -%>/>
33
+ <% elsif is_bool?(ev.scalar)%>
34
+ <value xsi:type="BL" value="<%= ev.scalar %>" />
35
+ <% else -%>
36
+ <value xsi:type="ST" ><%= ev.scalar %></value>
37
+ <% end -%>
38
+ <% else -%>
39
+ <value xsi:type="PQ" nullFlavor="UNK"/>
40
+ <% end -%>
41
+ </observation>
42
+ </component>
43
+ <% end -%>
44
+ </organizer>
45
+ </entry>
46
+ </section>
47
+ </component>
@@ -0,0 +1,120 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:sdtc="urn:hl7-org:sdtc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 http://xreg2.nist.gov:8080/hitspValidation/schema/cdar2c32/infrastructure/cda/C32_CDA.xsd">
3
+ <realmCode code="US"/>
4
+ <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
5
+ <templateId root="2.16.840.1.113883.10.20.22.1.1" />
6
+ <templateId root='2.16.840.1.113883.10.20.22.1.2'/>
7
+ <id root="2.16.840.1.113883.3.72" extension="<%= patient.id %>" assigningAuthorityName="NIST Healthcare Project"/>
8
+ <code code="34133-9" displayName="Summarization of episode note" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"/>
9
+ <title>Cypress C32 Patient Test Record: <%= patient.first %> <%= patient.last %></title>
10
+ <effectiveTime value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
11
+ <confidentialityCode code="N"/>
12
+ <languageCode code="en-US"/>
13
+ <recordTarget>
14
+ <patientRole>
15
+ <id root="Cypress" extension="<%= patient.id %>"/>
16
+ <addr use="HP">
17
+ <streetAddressLine>202 Burlington Rd.</streetAddressLine>
18
+ <city>Bedford</city>
19
+ <state>MA</state>
20
+ <postalCode>01730</postalCode>
21
+ </addr>
22
+ <telecom value="tel:+1-781-271-3000"/>
23
+ <patient>
24
+ <name>
25
+ <given><%= patient.first %></given>
26
+ <family><%= patient.last %></family>
27
+ </name>
28
+ <administrativeGenderCode code="<%= patient.gender %>" codeSystem="2.16.840.1.113883.5.1" codeSystemName="HL7 AdministrativeGender"/>
29
+ <birthTime value="<%= Time.at(patient.birthdate).utc.to_formatted_s(:number) %>"/>
30
+ <% if (patient.race) %>
31
+ <raceCode code="<%= patient.race['code'] %>" <% if patient.race['name']%>displayName="<%= patient.race['name'] %>"<% end %> codeSystemName="CDC Race and Ethnicity" codeSystem="2.16.840.1.113883.6.238"/>
32
+ <% end %>
33
+ <% if (patient.race) %>
34
+ <ethnicGroupCode code="<%= patient.ethnicity['code'] %>" <% if patient.ethnicity['name']%>displayName="<%= patient.ethnicity['name'] %>"<% end %> codeSystemName="CDC Race and Ethnicity" codeSystem="2.16.840.1.113883.6.238"/>
35
+ <% end %>
36
+ <%
37
+ languages = patient.languages
38
+ languages = ["en-US"] if languages.nil? or languages.empty?
39
+ languages.each do |language|%>
40
+ <languageCommunication>
41
+ <languageCode code="<%= language %>"/>
42
+ </languageCommunication>
43
+ <% end %>
44
+ </patient>
45
+ </patientRole>
46
+ </recordTarget>
47
+ <author>
48
+ <time value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
49
+ <assignedAuthor>
50
+ <id/>
51
+ <addr/>
52
+ <telecom value="tel:+1-781-271-3000"/>
53
+ <assignedPerson>
54
+ <name>Auto Generated</name>
55
+ </assignedPerson>
56
+ </assignedAuthor>
57
+ </author>
58
+ <custodian>
59
+ <assignedCustodian>
60
+ <representedCustodianOrganization>
61
+ <id/>
62
+ <name>Cypress</name>
63
+ <telecom value="tel:+1-781-271-3000"/>
64
+ <addr>
65
+ <streetAddressLine>202 Burlington Rd.</streetAddressLine>
66
+ <city>Bedford</city>
67
+ <state>MA</state>
68
+ <postalCode>01730</postalCode>
69
+ </addr>
70
+ </representedCustodianOrganization>
71
+ </assignedCustodian>
72
+ </custodian>
73
+ <component>
74
+ <structuredBody>
75
+ <% if patient.allergies.present? -%>
76
+ <%== render :partial => 'allergies', :locals => {:entries => patient.allergies} %>
77
+ <% else %>
78
+ <%== render :partial => 'allergies_no_current', :locals => {:entries => patient.allergies} %>
79
+ <% end -%>
80
+ <% if patient.medications.present? -%>
81
+ <%== render :partial => 'medications', :locals => {:entries => patient.medications} %>
82
+ <% else %>
83
+ <%== render :partial => 'medications_no_current', :locals => {:entries => patient.medications} %>
84
+ <% end -%>
85
+ <% if patient.results.present? -%>
86
+ <%== render :partial => 'results', :locals => {:entries => patient.results} %>
87
+ <% else -%>
88
+ <%== render :partial => 'results_no_current', :locals => {:entries => patient.medications} %>
89
+ <% end %>
90
+ <% if patient.conditions.present? -%>
91
+ <%== render :partial => 'conditions', :locals => {:entries => patient.conditions} %>
92
+ <% else %>
93
+ <%== render :partial => 'conditions_no_current', :locals => {:entries => patient.conditions} %>
94
+ <% end -%>
95
+ <% if patient.procedures.present? -%>
96
+ <%== render :partial => 'procedures', :locals => {:entries => patient.procedures} %>
97
+ <% else %>
98
+ <%== render :partial => 'procedures_no_current', :locals => {:entries => patient.conditions} %>
99
+ <% end -%>
100
+ <% if patient.encounters.present? -%>
101
+ <%== render :partial => 'encounters', :locals => {:entries => patient.encounters} %>
102
+ <% end -%>
103
+ <% if patient.vital_signs.present? -%>
104
+ <%== render :partial => 'vital_signs', :locals => {:entries => patient.vital_signs} %>
105
+ <% end -%>
106
+ <% if patient.immunizations.present? -%>
107
+ <%== render :partial => 'immunizations', :locals => {:entries => patient.immunizations} %>
108
+ <% end -%>
109
+ <% if patient.care_goals.present? -%>
110
+ <%== render :partial => 'care_goals', :locals => {:entries => patient.care_goals} %>
111
+ <% end -%>
112
+ <% if patient.social_history.present? -%>
113
+ <%== render :partial => 'social_history', :locals => {:entries => patient.social_history} %>
114
+ <% end -%>
115
+ <% if patient.medical_equipment.present? -%>
116
+ <%== render :partial => 'medical_equipment', :locals => {:entries => patient.medical_equipment} %>
117
+ <% end -%>
118
+ </structuredBody>
119
+ </component>
120
+ </ClinicalDocument>
@@ -0,0 +1,54 @@
1
+ <div id="table_by_encounter" style="display:none">
2
+
3
+ <%
4
+ patient.encounters.sort! { |left,right| left.as_point_in_time <=> right.as_point_in_time }
5
+
6
+ all_entries = []
7
+ entry_section = {}
8
+ Record::Sections.each do |section|
9
+ if section != :encounters
10
+ patient.send(section).each do |entry|
11
+ all_entries << entry
12
+ entry_section[entry.hash] = section
13
+ end if patient.respond_to? section
14
+ end
15
+ end
16
+ all_entries.sort! { |left,right| left.as_point_in_time <=> right.as_point_in_time }
17
+
18
+ entries_by_encounter = {}
19
+ if (patient.encounters.size > 0)
20
+ encounters_iterator = patient.encounters.each
21
+ current_encounter = encounters_iterator.next
22
+ all_entries.each do |entry|
23
+ next_encounter = encounters_iterator.peek rescue nil
24
+ while (next_encounter && entry.as_point_in_time >= next_encounter.as_point_in_time)
25
+ current_encounter = encounters_iterator.next
26
+ next_encounter = encounters_iterator.peek rescue nil
27
+ end
28
+ entries_by_encounter[current_encounter.hash] ||= []
29
+ entries_by_encounter[current_encounter.hash] << entry
30
+ end
31
+ end
32
+ %>
33
+
34
+ <% patient.encounters.each_with_index do |encounter, index| %>
35
+ <% if index > 0 %><br/><% end %>
36
+ <div style="background: #EEEEEE; width: 92%"><h3>Encounter <%= index+1 %></h3></div>
37
+ <div style="padding-left: 15px;">
38
+ <%
39
+ entries_by_section = {}
40
+ entries_by_encounter[encounter.hash].each do |entry|
41
+ decoded_section = decode_hqmf_section(entry_section[entry.hash], entry.oid)
42
+ entries_by_section[decoded_section] ||= []
43
+ entries_by_section[decoded_section] << entry
44
+ end if entries_by_encounter[encounter.hash]
45
+ %>
46
+ <%== render :partial => 'section', :locals => {entries: [encounter], section: :encounters, concept_map: concept_map} %>
47
+ <% entries_by_section.each do |section, entries| %>
48
+ <%== render :partial => 'section', :locals => {entries: entries, section: section, concept_map: concept_map} %>
49
+ <% end %>
50
+ </div>
51
+
52
+ <% end %>
53
+
54
+ </div>
@@ -0,0 +1,16 @@
1
+ <div id="patient_information_by_section" style="display:block">
2
+ <%
3
+ entries_by_section = {}
4
+ Record::Sections.each do |section|
5
+ patient.send(section).each do |entry|
6
+ decoded_section = decode_hqmf_section(section, entry.oid)
7
+ entries_by_section[decoded_section] ||= []
8
+ entries_by_section[decoded_section] << entry
9
+ end if patient.respond_to? section
10
+ end
11
+ %>
12
+ <% entries_by_section.each do |section, entries| %>
13
+ <%== render :partial => 'section', :locals => {entries: entries, section: section, concept_map: concept_map} %>
14
+ <% end %>
15
+
16
+ </div>
@@ -0,0 +1,67 @@
1
+ <tr class="narr_tr">
2
+
3
+ <td><%if entry.negationInd %><b>Not Done: </b><% end %><%= entry.description %></td>
4
+ <td>
5
+ <% entry.codes.each do |set, codes| %>
6
+ <b>
7
+ <% if concept_map %>
8
+ <span onmouseover="showConcepts(event,'<%=entry.id%>_<%=set%>')" onmouseout="hideConcepts(event,'<%=entry.id%>_<%=set%>')" style="cursor: pointer;"><%=set %>: <%= codes.join(',') %></span>
9
+ <% else %>
10
+ <%=set %>: <%= codes.join(',') %>
11
+ <% end %>
12
+ </b>
13
+ <br/>
14
+ <% if concept_map %>
15
+ <%
16
+ matches = []
17
+ codes.each do |code|
18
+ matches.concat(concept_map[set][code].values)
19
+ end
20
+ %>
21
+ <ul id="<%=entry.id%>_<%=set%>" style="display: none; position: absolute; background: #EEE; padding: 10px; padding-left: 30px; width: 600px; z-index: 3000;">
22
+ <% matches.each do |concept_match| %>
23
+ <li><%= concept_match[:concept].titleize %> (<%= concept_match[:oid]%>)</li>
24
+ <% end %>
25
+ </ul>
26
+ <% end %>
27
+ <% end %>
28
+ </td>
29
+ <td><%= entry.times_to_s %></td>
30
+ <td><%= decode_hqmf_status(entry.status, entry.oid) %></td>
31
+ <td>
32
+ <% entry.values.each do |value| %>
33
+ <% if value.respond_to? :scalar %>
34
+ <% units = value.try(:units) if(value.respond_to?(:units)) %>
35
+ <%= value.try(:scalar) %> <%= units %><br/>
36
+ <% elsif value.respond_to? :codes %>
37
+ <% value.codes.each do |system, vals| %>
38
+ <%= system %>: <%= vals.join(',') %>
39
+ <% end %>
40
+ <%= (value.description ? "(#{value.description})" : "(UNKNOWN CODED VALUE)")%>
41
+ <br/>
42
+ <% else %>
43
+ UNKNOWN VALUE
44
+ <% end %>
45
+ <% end %>
46
+ </td>
47
+ <td>
48
+ <%
49
+ (entry.attributes.keys.reject {|key| ['codes', 'time', 'description', 'mood_code', 'values', '_id', '_type', 'start_time', 'end_time', 'status_code', 'negationInd', 'negationReason', 'oid'].include? key}).each do |field|
50
+ field_value = ThingWithCodes.convert_codes_to_s(entry.attributes[field]) rescue entry.attributes[field].to_s
51
+ %>
52
+ <%= field %>: (<b><%= field_value %></b>)
53
+ <%
54
+ end
55
+ if entry.negationInd
56
+ negation_reason = ''
57
+ if entry.negationReason
58
+ negation_reason = ThingWithCodes.convert_codes_to_s(entry.negationReason) rescue entry.negationReason.to_s
59
+ end
60
+ %>
61
+ negation: <%= negation_reason %>
62
+ <%
63
+ end
64
+ %>
65
+ </td>
66
+
67
+ </tr>
@@ -0,0 +1,58 @@
1
+ <table class="header_table">
2
+ <tbody>
3
+ <tr>
4
+ <td width="20%" bgcolor="#3399ff"><span class="td_label">Patient</span></td>
5
+ <td colspan="3"><%= patient.first%> <%= patient.last%></td>
6
+ </tr>
7
+ <tr>
8
+ <td width="20%" bgcolor="#3399ff"><span class="td_label">Date of birth</span></td>
9
+ <td width="30%"><%= Time.at(patient.birthdate).utc.to_formatted_s(:long_ordinal)%></td>
10
+ <td width="15%" bgcolor="#3399ff"><span class="td_label">Sex</span></td>
11
+ <td><%= (patient.gender == 'M') ? "Male" : (patient.gender == 'F') ? 'Female' : 'Unknown'%></td>
12
+ </tr>
13
+ <tr>
14
+ <td bgcolor="#3399ff"><span class="td_label">Contact info</span></td>
15
+ <td> Pirmary Home:<br />202 Burlington Rd.<br />Bedford, MA 01730<br />Tel: +1-781-271-3000<br /></td>
16
+ <td bgcolor="#3399ff"><span class="td_label">Patient IDs</span></td>
17
+ <td><%= patient.id %> Cypress<br /></td>
18
+ </tr>
19
+ </tbody>
20
+ </table>
21
+ <table class="header_table">
22
+ <tbody>
23
+ <tr>
24
+ <td width="20%" bgcolor="#3399ff"><span class="td_label">Document Id</span></td>
25
+ <td width="80%"><%= patient.id %> 2.16.840.1.113883.3.72</td>
26
+ </tr>
27
+ <tr>
28
+ <td width="20%" bgcolor="#3399ff"><span class="td_label">Document Created:</span></td>
29
+ <td width="80%"><%= Time.now.utc.to_formatted_s(:long_ordinal)%></td>
30
+ </tr>
31
+ </tbody>
32
+ </table>
33
+ <table class="header_table">
34
+ <tbody>
35
+ <tr>
36
+ <td width="20%" bgcolor="#3399ff"><span class="td_label">Author</span></td>
37
+ <td width="80%">Auto Generated</td>
38
+ </tr>
39
+ <tr>
40
+ <td bgcolor="#3399ff"><span class="td_label">Contact info</span></td>
41
+ <td>
42
+ <br />Tel: +1-781-271-3000<br />
43
+ </td>
44
+ </tr>
45
+ </tbody>
46
+ </table>
47
+ <table class="header_table">
48
+ <tbody>
49
+ <tr>
50
+ <td width="20%" bgcolor="#3399ff"><span class="td_label">Document maintained by</span></td>
51
+ <td width="80%">Cypress</td>
52
+ </tr>
53
+ <tr>
54
+ <td bgcolor="#3399ff"><span class="td_label">Contact info</span></td>
55
+ <td width="80%">202 Burlington Rd.<br />Bedford, MA 01730<br />Tel: +1-781-271-3000<br /></td>
56
+ </tr>
57
+ </tbody>
58
+ </table>
@@ -0,0 +1,20 @@
1
+ <h3><a name="<%= "#{title}_link" %>" href="#toc"><%= section.to_s.titleize %></a></h3>
2
+ <div>
3
+ <table class="narr_table" border="1" width="100%">
4
+ <thead>
5
+ <tr class="narr_tr">
6
+ <th class="narr_th" width="30%">Description</th>
7
+ <th class="narr_th" width="15%">Codes</th>
8
+ <th class="narr_th" width="15%">Time</th>
9
+ <th class="narr_th" width="10%">Status</th>
10
+ <th class="narr_th" width="15%">Results</th>
11
+ <th class="narr_th" width="15%">Fields</th>
12
+ </tr>
13
+ </thead>
14
+ <tbody>
15
+ <% (entries.sort { |left,right| left.as_point_in_time <=> right.as_point_in_time }).each do |entry| %>
16
+ <%== render :partial => 'entry', :locals => {:entry => entry, concept_map: concept_map} %>
17
+ <% end %>
18
+ </tbody>
19
+ </table>
20
+ </div>
@@ -0,0 +1,124 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html xmlns:n1="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <title>Cypress Certification Patient Test Record: <%= patient.first%> <%= patient.last%></title>
6
+ <style type="text/css">
7
+ body {
8
+ color: #003366;
9
+ background-color: #FFFFFF;
10
+ font-family: Verdana, Tahoma, sans-serif;
11
+ font-size: 11px;
12
+ }
13
+ a {
14
+ color: #003366;
15
+ background-color: #FFFFFF;
16
+ }
17
+ h1 {
18
+ font-size: 12pt;
19
+ font-weight: bold;
20
+ }
21
+ h2 {
22
+ font-size: 11pt;
23
+ font-weight: bold;
24
+ }
25
+ h3 {
26
+ font-size: 10pt;
27
+ font-weight: bold;
28
+ }
29
+ h4 {
30
+ font-size: 8pt;
31
+ font-weight: bold;
32
+ }
33
+ div {
34
+ width: 95%;
35
+ }
36
+ table {
37
+ line-height: 10pt;
38
+ width: 90%;
39
+ }
40
+ tr {
41
+ background-color: #ccccff;
42
+ }
43
+ td {
44
+ padding: 0.1cm 0.2cm;
45
+ vertical-align: top;
46
+ }
47
+ .h1center {
48
+ font-size: 12pt;
49
+ font-weight: bold;
50
+ text-align: center;
51
+ width: 80%;
52
+ }
53
+ .header_table{
54
+ border: 1pt inset #00008b;
55
+ }
56
+ .narr_table {
57
+ width: 100%;
58
+ }
59
+ .narr_tr {
60
+ background-color: #ffffcc;
61
+ }
62
+ .narr_th {
63
+ background-color: #ffd700;
64
+ }
65
+ .td_label{
66
+ font-weight: bold;
67
+ color: white;
68
+ }
69
+ </style>
70
+ </head>
71
+ <body>
72
+ <h1 class="h1center">Cypress Certification Patient Test Record: <%= patient.first%> <%= patient.last%></h1>
73
+ <%== render :partial => 'header', :locals => {:patient => patient} %>
74
+ <!--h2><a name="toc">Table of Contents</a></h2>
75
+ <ul>
76
+ <li><a href="#idp190080">Allergies and Adverse Reactions</a></li>
77
+ <li><a href="#idp553808">Medications - Prescription and Non-Prescription</a></li>
78
+ <li><a href="#idp266352">Encounters</a></li>
79
+ <li><a href="#idp594640">Problems</a></li>
80
+ </ul-->
81
+ <script language="javascript">
82
+ var cur_view = "section";
83
+ function toggle(id) {
84
+ var e = document.getElementById(id);
85
+ if (cur_view=="section"){
86
+ document.getElementById("patient_information_by_section").style.display = 'none';
87
+ document.getElementById("table_by_encounter").style.display = 'block';
88
+ document.getElementById('toggle_button').innerHTML="View By Section";
89
+ cur_view = "encounter";
90
+ }else{
91
+ document.getElementById("patient_information_by_section").style.display = 'block';
92
+ document.getElementById("table_by_encounter").style.display = 'none';
93
+ document.getElementById('toggle_button').innerHTML="View By Encounter";
94
+ cur_view = "section";
95
+ }
96
+ }
97
+
98
+ function showConcepts(ev, id) {
99
+ var left = ev.clientX + document.documentElement.scrollLeft;
100
+ var top = ev.clientY + document.documentElement.scrollTop;
101
+
102
+ var concepts = document.getElementById(id);
103
+ concepts.style.display = 'block';
104
+ concepts.style.left = left + 'px';
105
+ concepts.style.top = top + 'px';
106
+ }
107
+ function hideConcepts(ev, id) {
108
+ var concepts = document.getElementById(id);
109
+ concepts.style.display = 'none';
110
+ }
111
+ </script>
112
+ <div>
113
+ <h3><a href="#" onclick="toggle('table_by_encounter');" id="toggle_button">View By Encounter</a></h3>
114
+ </div>
115
+
116
+ <%== render :partial => 'entries_by_section', :locals => {patient: patient, concept_map: concept_map} %>
117
+ <%== render :partial => 'entries_by_encounter', :locals => {patient: patient, concept_map: concept_map} %>
118
+
119
+ <br /><br />
120
+ <br /><br />
121
+ <br /><br />
122
+ <br /><br />
123
+ </body>
124
+ </html>
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.1
4
+ version: 2.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -260,6 +260,31 @@ files:
260
260
  - templates/_telecom.gc32.erb
261
261
  - templates/_vital_sign.gc32.erb
262
262
  - templates/_vital_signs.c32.erb
263
+ - templates/ccda/_allergies.ccda.erb
264
+ - templates/ccda/_allergies_no_current.ccda.erb
265
+ - templates/ccda/_care_goals.ccda.erb
266
+ - templates/ccda/_code_with_reference.ccda.erb
267
+ - templates/ccda/_conditions.ccda.erb
268
+ - templates/ccda/_conditions_no_current.ccda.erb
269
+ - templates/ccda/_encounters.ccda.erb
270
+ - templates/ccda/_immunizations.ccda.erb
271
+ - templates/ccda/_medical_equipment.ccda.erb
272
+ - templates/ccda/_medications.ccda.erb
273
+ - templates/ccda/_medications_no_current.ccda.erb
274
+ - templates/ccda/_narrative_block.ccda.erb
275
+ - templates/ccda/_procedures.ccda.erb
276
+ - templates/ccda/_procedures_no_current.ccda.erb
277
+ - templates/ccda/_results.ccda.erb
278
+ - templates/ccda/_results_no_current.ccda.erb
279
+ - templates/ccda/_social_history.ccda.erb
280
+ - templates/ccda/_vital_signs.ccda.erb
281
+ - templates/ccda/show.ccda.erb
282
+ - templates/html/_entries_by_encounter.html.erb
283
+ - templates/html/_entries_by_section.html.erb
284
+ - templates/html/_entry.html.erb
285
+ - templates/html/_header.html.erb
286
+ - templates/html/_section.html.erb
287
+ - templates/html/show.html.erb
263
288
  - templates/metadata.hdata.erb
264
289
  - templates/record.gc32.erb
265
290
  - templates/show.c32.erb