health-data-standards 3.2.11 → 3.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +9 -9
- data/lib/health-data-standards/export/cat_3.rb +3 -2
- data/lib/health-data-standards/export/rendering_context.rb +24 -12
- data/lib/health-data-standards/import/cat1/diagnosis_active_importer.rb +14 -0
- data/lib/health-data-standards/import/cat1/procedure_performed_importer.rb +9 -0
- data/lib/health-data-standards/import/cda/medical_equipment_importer.rb +9 -0
- data/lib/health-data-standards/models/qrda/author.rb +16 -0
- data/lib/health-data-standards/models/qrda/custodian.rb +11 -0
- data/lib/health-data-standards/models/qrda/device.rb +12 -0
- data/lib/health-data-standards/models/qrda/header.rb +14 -0
- data/lib/health-data-standards/models/qrda/id.rb +16 -0
- data/lib/health-data-standards/models/qrda/legal_authenticator.rb +16 -0
- data/lib/health-data-standards/models/qrda/organization.rb +9 -0
- data/lib/health-data-standards/models/qrda/person.rb +11 -0
- data/lib/health-data-standards.rb +11 -0
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.11.cat1.erb +15 -1
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.20.cat1.erb +6 -2
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.28.cat1.erb +6 -2
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.40.cat1.erb +6 -2
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.57.cat1.erb +6 -2
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.59.cat1.erb +5 -1
- 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 +6 -16
- data/templates/cat1/_result_value.cat1.erb +1 -1
- data/templates/cat3/_address.cat3.erb +9 -0
- data/templates/cat3/_author.cat3.erb +28 -0
- data/templates/cat3/_id.cat3.erb +1 -0
- data/templates/cat3/_organization.cat3.erb +7 -0
- data/templates/cat3/_telecom.cat3.erb +1 -0
- data/templates/cat3/show.cat3.erb +18 -31
- metadata +16 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTU3MzQ3NTYyZDJmYjk2NDc4ZWFhNWExNzkyZWJkYjZmYWE1MzIwNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
7
|
-
|
6
|
+
NzhlZWM4ZTA4MWVmYjRjMDE1ZjBiNDg2YTAyNmE2Mzg3MDZhZDFjYg==
|
7
|
+
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjJlODQ5M2Q1YjM1YjZmNGJhOWIwOTczMzMyNGVhYTUzZTIzMWQwNzE2ZWI4
|
10
|
+
ZGVlODI3OTIzMmU2MmFjMmUxMjMwM2U2ZjVhODhhMzMyYWYyYzQ3NGIyZDlk
|
11
|
+
MjVkYjA3NWI5MDlkMzdlYmIxZWQxYWJhMzUzZTdjZWM0MmM3MDg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDE1MGVkOTM1YTVjYmFjZGViZDE0NWQxZTM5ZDNhODIyZWY2MWQ3MDhiYzJl
|
14
|
+
M2RjM2RiODBhMGY1MWQ4NjJlM2Q1MDgxYzYxOWIzNzYyN2UxZjIyODk5NWQ0
|
15
|
+
NGZiNGMwYWQ2ZGZiYzU5ZWQ1YWM0YmNkYTkxMTQ4MmU0Nzg3YTA=
|
@@ -9,7 +9,7 @@ module HealthDataStandards
|
|
9
9
|
@cat1_renderer.template_helper = HealthDataStandards::Export::TemplateHelper.new('cat1', 'cat1')
|
10
10
|
end
|
11
11
|
|
12
|
-
def export(measures, effective_date, start_date, end_date, test_id=nil)
|
12
|
+
def export(measures, header, effective_date, start_date, end_date, test_id=nil)
|
13
13
|
results = {}
|
14
14
|
measures.each do |measure|
|
15
15
|
results[measure['hqmf_id']] = HealthDataStandards::CQM::QueryCache.aggregate_measure(measure['hqmf_id'], effective_date, test_id)
|
@@ -17,7 +17,8 @@ module HealthDataStandards
|
|
17
17
|
@rendering_context.render(:template => 'show',
|
18
18
|
:locals => {:measures => measures, :start_date => start_date,
|
19
19
|
:end_date => end_date, :cat1_renderer => @cat1_renderer,
|
20
|
-
:results => results
|
20
|
+
:results => results,
|
21
|
+
:header=>header})
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
@@ -22,26 +22,38 @@ module HealthDataStandards
|
|
22
22
|
binding
|
23
23
|
end
|
24
24
|
|
25
|
+
|
26
|
+
|
25
27
|
def render(params)
|
26
28
|
erb = nil
|
29
|
+
ident = nil
|
27
30
|
if params[:template]
|
28
31
|
erb = @template_helper.template(params[:template])
|
29
32
|
elsif params[:partial]
|
30
33
|
erb = @template_helper.partial(params[:partial])
|
31
|
-
|
32
|
-
|
33
|
-
locals = params[:locals]
|
34
|
-
locals ||= {}
|
35
|
-
rendering_context = RenderingContext.new(locals)
|
36
|
-
rendering_context.template_helper = @template_helper
|
37
|
-
if @extensions.present?
|
38
|
-
rendering_context.extensions = @extensions
|
39
|
-
@extensions.each do |extension|
|
40
|
-
rendering_context.extend(extension)
|
34
|
+
if params[:collection]
|
35
|
+
ident = params[:id] || params[:partial]
|
41
36
|
end
|
42
37
|
end
|
43
|
-
|
44
|
-
|
38
|
+
|
39
|
+
collection = params[:collection] || [true]
|
40
|
+
collection.map do |item|
|
41
|
+
locals = params[:locals]
|
42
|
+
locals ||= {}
|
43
|
+
if ident
|
44
|
+
locals[ident] = item
|
45
|
+
end
|
46
|
+
rendering_context = RenderingContext.new(locals)
|
47
|
+
rendering_context.template_helper = @template_helper
|
48
|
+
if @extensions.present?
|
49
|
+
rendering_context.extensions = @extensions
|
50
|
+
@extensions.each do |extension|
|
51
|
+
rendering_context.extend(extension)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
eruby = Erubis::EscapedEruby.new(erb) # TODO: cache these
|
55
|
+
eruby.result(rendering_context.my_binding)
|
56
|
+
end.join
|
45
57
|
end
|
46
58
|
end
|
47
59
|
end
|
@@ -7,6 +7,20 @@ module HealthDataStandards
|
|
7
7
|
super(CDA::EntryFinder.new("//cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.24.3.11']"))
|
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
|
+
@severity_xpath = "./cda:entryRelationship/cda:observation[cda:templateId/@root='2.16.840.1.113883.10.20.22.4.8']/cda:value"
|
11
|
+
end
|
12
|
+
|
13
|
+
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
14
|
+
condition = super(entry_element,nrh)
|
15
|
+
extract_severity(entry_element,condition)
|
16
|
+
condition
|
17
|
+
end
|
18
|
+
|
19
|
+
def extract_severity(entry_element,condition)
|
20
|
+
severity = entry_element.at_xpath(@severity_xpath)
|
21
|
+
if(severity)
|
22
|
+
condition.severity = {CodeSystemHelper.code_system_for(severity['codeSystem']) => [severity['code']]}
|
23
|
+
end
|
10
24
|
end
|
11
25
|
end
|
12
26
|
end
|
@@ -6,11 +6,13 @@ module HealthDataStandards
|
|
6
6
|
super(entry_finder)
|
7
7
|
@entry_class = Procedure
|
8
8
|
@ordinality_xpath = "./cda:priorityCode"
|
9
|
+
@incision_xpath ="./cda:entryRelationship/cda:procedure[./cda:templateId[@root='2.16.840.1.113883.10.20.24.3.89']]/cda:effectiveTime"
|
9
10
|
end
|
10
11
|
|
11
12
|
def create_entry(entry_element, nrh = CDA::NarrativeReferenceHandler.new)
|
12
13
|
procedure = super
|
13
14
|
extract_ordinality(entry_element, procedure)
|
15
|
+
extract_incision_date_time(entry_element,procedure)
|
14
16
|
procedure
|
15
17
|
end
|
16
18
|
|
@@ -22,6 +24,13 @@ module HealthDataStandards
|
|
22
24
|
procedure.ordinality = {CodeSystemHelper.code_system_for(ordinality_element['codeSystem']) => [ordinality_element['code']]}
|
23
25
|
end
|
24
26
|
end
|
27
|
+
|
28
|
+
def extract_incision_date_time(parent_element, procedure)
|
29
|
+
incision_time = parent_element.at_xpath(@incision_xpath)
|
30
|
+
if incision_time
|
31
|
+
procedure.incision_time = HL7Helper.timestamp_to_integer(incision_time['value'])
|
32
|
+
end
|
33
|
+
end
|
25
34
|
end
|
26
35
|
end
|
27
36
|
end
|
@@ -5,12 +5,14 @@ module HealthDataStandards
|
|
5
5
|
def initialize(entry_finder=EntryFinder.new("//cda:section[cda:templateId/@root='2.16.840.1.113883.3.88.11.83.128']/cda:entry/cda:supply"))
|
6
6
|
super(entry_finder)
|
7
7
|
@code_xpath = "./cda:participant/cda:participantRole/cda:playingDevice/cda:code"
|
8
|
+
@anatomical_xpath = "./cda:targetSiteCode"
|
8
9
|
@entry_class = MedicalEquipment
|
9
10
|
end
|
10
11
|
|
11
12
|
def create_entry(entry_element, nrh = NarrativeReferenceHandler.new)
|
12
13
|
medical_equipment = super
|
13
14
|
extract_manufacturer(entry_element, medical_equipment)
|
15
|
+
extract_anatomical_structure(entry_element, medical_equipment)
|
14
16
|
medical_equipment
|
15
17
|
end
|
16
18
|
|
@@ -18,6 +20,13 @@ module HealthDataStandards
|
|
18
20
|
manufacturer = entry_element.at_xpath("./cda:participant/cda:participantRole/cda:scopingEntity/cda:desc").try(:inner_text)
|
19
21
|
entry.manufacturer = manufacturer.strip if manufacturer
|
20
22
|
end
|
23
|
+
|
24
|
+
def extract_anatomical_structure(entry_element, entry)
|
25
|
+
site = entry_element.at_xpath(@anatomical_xpath)
|
26
|
+
if site
|
27
|
+
entry.anatomical_structure = {CodeSystemHelper.code_system_for(site['codeSystem']) => [site['code']]}
|
28
|
+
end
|
29
|
+
end
|
21
30
|
end
|
22
31
|
end
|
23
32
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Qrda
|
2
|
+
|
3
|
+
class Author
|
4
|
+
|
5
|
+
include Mongoid::Document
|
6
|
+
field :time, type: DateTime, default: Time.now
|
7
|
+
embeds_many :ids
|
8
|
+
embeds_many :addresses
|
9
|
+
embeds_many :telecoms
|
10
|
+
embeds_one :person, class_name: "Qrda::Person"
|
11
|
+
embeds_one :device
|
12
|
+
embeds_one :organization, class_name: "Qrda::Organization"
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Qrda
|
2
|
+
|
3
|
+
class Header
|
4
|
+
include Mongoid::Document
|
5
|
+
embeds_one :identifier, class_name: "Qrda::Id"
|
6
|
+
embeds_many :authors
|
7
|
+
embeds_one :custodian
|
8
|
+
embeds_one :legal_authenticator
|
9
|
+
embeds_many :performers
|
10
|
+
|
11
|
+
field :time , type: DateTime, default: Time.now
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Qrda
|
2
|
+
|
3
|
+
class Id
|
4
|
+
include Mongoid::Document
|
5
|
+
field :extension, type: String
|
6
|
+
field :root, type: String
|
7
|
+
|
8
|
+
def self.generate(root=nil, extension=nil)
|
9
|
+
root ||= ""
|
10
|
+
extension ||= ""
|
11
|
+
return self.new(root: root, extension: extension)
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Qrda
|
2
|
+
|
3
|
+
class LegalAuthenticator
|
4
|
+
include Mongoid::Document
|
5
|
+
|
6
|
+
field :time, type: DateTime, default: Time.now
|
7
|
+
|
8
|
+
embeds_many :ids
|
9
|
+
embeds_many :addresses
|
10
|
+
embeds_one :person, class_name: "Qrda::Person"
|
11
|
+
embeds_one :organization, class_name: "Qrda::Organization"
|
12
|
+
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -74,6 +74,17 @@ require_relative 'health-data-standards/models/metadata/change_info'
|
|
74
74
|
require_relative 'health-data-standards/models/metadata/link_info'
|
75
75
|
require_relative 'health-data-standards/models/metadata/pedigree'
|
76
76
|
|
77
|
+
require_relative 'health-data-standards/models/qrda/id'
|
78
|
+
require_relative 'health-data-standards/models/qrda/device'
|
79
|
+
require_relative 'health-data-standards/models/qrda/person'
|
80
|
+
require_relative 'health-data-standards/models/qrda/organization'
|
81
|
+
require_relative 'health-data-standards/models/qrda/custodian'
|
82
|
+
require_relative 'health-data-standards/models/qrda/legal_authenticator'
|
83
|
+
require_relative 'health-data-standards/models/qrda/author'
|
84
|
+
require_relative 'health-data-standards/models/qrda/header'
|
85
|
+
|
86
|
+
|
87
|
+
|
77
88
|
require_relative 'health-data-standards/export/qrda/entry_template_resolver'
|
78
89
|
require_relative 'health-data-standards/export/helper/scooped_view_helper'
|
79
90
|
require_relative 'health-data-standards/export/helper/html_view_helper'
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<!-- Attribute: discharge datetime -->
|
15
15
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
16
16
|
</effectiveTime>
|
17
|
-
<%== render(:partial => 'ordinality', :locals => {:entry => entry, :
|
17
|
+
<%== render(:partial => 'ordinality', :locals => {:entry => entry, :ordinality_oids=>field_oids["ORDINAL"]}) %>
|
18
18
|
|
19
19
|
<%== code_display(entry, {'tag_name' => 'value', 'value_set_map' => value_set_map,'preferred_code_sets' => ['LOINC', 'SNOMED-CT', 'ICD-9-CM', 'ICD-10-CM'],
|
20
20
|
'extra_content' => "xsi:type=\"CD\" sdtc:valueSet=\"#{value_set_oid}\""}) %>
|
@@ -37,5 +37,19 @@
|
|
37
37
|
codeSystemName="SNOMED CT"/>
|
38
38
|
</observation>
|
39
39
|
</entryRelationship>
|
40
|
+
<% if entry.severity
|
41
|
+
|
42
|
+
%>
|
43
|
+
<entryRelationship typeCode="REFR">
|
44
|
+
<observation classCode="OBS" moodCode="EVN">
|
45
|
+
<templateId root="2.16.840.1.113883.10.20.22.4.8"/>
|
46
|
+
<code code="SEV"
|
47
|
+
codeSystem="2.16.840.1.113883.5.4"/>
|
48
|
+
<statusCode code="completed"/>
|
49
|
+
<%== render(:partial => 'result_value', :locals => {:values => [entry.severity], :result_oids=>field_oids["SEVERITY"]} ) %>
|
50
|
+
</observation>
|
51
|
+
|
52
|
+
</entryRelationship>
|
53
|
+
<% end %>
|
40
54
|
</observation>
|
41
55
|
</entry>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
1
4
|
<entry>
|
2
5
|
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
6
|
<!-- Consolidated Result Observation templateId (Implied Template) -->
|
@@ -14,7 +17,8 @@
|
|
14
17
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
15
18
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
16
19
|
</effectiveTime>
|
17
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
20
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
18
21
|
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
19
22
|
</observation>
|
20
|
-
</entry>
|
23
|
+
</entry>
|
24
|
+
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
1
4
|
<entry>
|
2
5
|
<observation classCode="OBS" moodCode="EVN">
|
3
6
|
<!-- Functional Status Result Observation (consolidation) template -->
|
@@ -15,6 +18,7 @@
|
|
15
18
|
</effectiveTime>
|
16
19
|
|
17
20
|
<!-- Result -->
|
18
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
21
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
19
22
|
</observation>
|
20
|
-
</entry>
|
23
|
+
</entry>
|
24
|
+
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
1
4
|
<entry>
|
2
5
|
<!--Laboratory test, result -->
|
3
6
|
<observation classCode="OBS" moodCode="EVN">
|
@@ -13,6 +16,7 @@
|
|
13
16
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
14
17
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
15
18
|
</effectiveTime>
|
16
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
19
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
17
20
|
</observation>
|
18
|
-
</entry>
|
21
|
+
</entry>
|
22
|
+
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
1
4
|
<entry>
|
2
5
|
<!-- Physical Exam Finding -->
|
3
6
|
<observation classCode="OBS" moodCode="EVN">
|
@@ -13,6 +16,7 @@
|
|
13
16
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
14
17
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
15
18
|
</effectiveTime>
|
16
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
19
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
17
20
|
</observation>
|
18
|
-
</entry>
|
21
|
+
</entry>
|
22
|
+
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
1
4
|
<entry>
|
2
5
|
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
6
|
<!-- Procedure Activity Procedure (Consolidation) template -->
|
@@ -12,6 +15,7 @@
|
|
12
15
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
13
16
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
14
17
|
</effectiveTime>
|
15
|
-
<%== render(:partial => 'result_value', :locals => {:values => [
|
18
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids}) %>
|
16
19
|
</observation>
|
17
20
|
</entry>
|
21
|
+
<% end %>
|
@@ -1,3 +1,6 @@
|
|
1
|
+
<% vals = entry.values.empty? ? [nil] : entry.values
|
2
|
+
vals.each do |value|
|
3
|
+
%>
|
1
4
|
<entry>
|
2
5
|
<observation classCode="OBS" moodCode="EVN" <%== negation_indicator(entry) %>>
|
3
6
|
<!-- Consolidation Assessment Scale Observation templateId -->
|
@@ -12,21 +15,8 @@
|
|
12
15
|
<low <%= value_or_null_flavor(entry.start_time) %>/>
|
13
16
|
<high <%= value_or_null_flavor(entry.end_time) %>/>
|
14
17
|
</effectiveTime>
|
15
|
-
|
16
|
-
<% ev = entry.values.first
|
17
|
-
if ev.present?
|
18
|
-
if ev.respond_to?(:scalar)
|
19
|
-
if is_num?(ev.scalar) -%>
|
20
|
-
<value xsi:type="INT" value="<%= ev.scalar %>"/>
|
21
|
-
<% else -%>
|
22
|
-
<value xsi:type="ST"><%= ev.scalar%></value>
|
23
|
-
<% end %>
|
24
|
-
<% else %>
|
25
|
-
<%== code_display(entry, 'tag_name'=>'value', 'value_set_map' => value_set_map,'preferred_code_sets' => ['LOINC', 'SNOMED-CT'],'extra_content' =>'xsi:type="CD"') %>
|
26
|
-
<% end %>
|
27
|
-
<% else -%>
|
28
|
-
<value xsi:type="CD" nullFlavor="UNK"/>
|
29
|
-
<% end -%>
|
18
|
+
<%== render(:partial => 'result_value', :locals => {:values => [value], :result_oids=>result_oids} ) %>
|
30
19
|
<%== render(:partial => 'reason', :locals => {:entry => entry, :reason_oids=>field_oids["REASON"]}) %>
|
31
20
|
</observation>
|
32
|
-
</entry>
|
21
|
+
</entry>
|
22
|
+
<% end %>
|
@@ -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 %>" <% if ev.units && (ev.units != "") -%>unit="<%= ev.units %>"<% end -%>/>
|
17
|
+
<value xsi:type="PQ" value="<%= ev.scalar.to_s.strip %>" <% 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 -%>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<addr use="<%= address.use %>">
|
2
|
+
<% address.street.each do |street| %>
|
3
|
+
<streetAddressLine><%= street %></streetAddressLine>
|
4
|
+
<% end %>
|
5
|
+
<city><%= address.city %></city>
|
6
|
+
<state><%= address.state %></state>
|
7
|
+
<postalCode><%= address.zip %></postalCode>
|
8
|
+
<country><%= address.country %></country>
|
9
|
+
</addr>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<!-- SHALL have 1..* author. MAY be device or person.
|
2
|
+
The author of the CDA document in this example is a device at a data submission vendor/registry. -->
|
3
|
+
<author>
|
4
|
+
<time value="<%= author.time.to_formatted_s(:number) %>"/>
|
5
|
+
<assignedAuthor>
|
6
|
+
<!-- Registry author ID -->
|
7
|
+
<%== render :partial=>"id", :collection=>author.ids, :id=>"identifier" %>
|
8
|
+
<%== render :partial=>"address" , :collection=>author.addresses %>
|
9
|
+
<%== render :partial=>"telecom" , :collection=>author.telecoms %>
|
10
|
+
|
11
|
+
<% if author.person %>
|
12
|
+
<assignedPerson>
|
13
|
+
<name>
|
14
|
+
<given><%= author.person.given %></given>
|
15
|
+
<family><%= author.person.family %></family>
|
16
|
+
</name>
|
17
|
+
</assignedPerson>
|
18
|
+
<% elsif author.device %>
|
19
|
+
<assignedAuthoringDevice>
|
20
|
+
<softwareName><%= author.device.name %></softwareName>
|
21
|
+
<manufacturerModelName><%= author.device.model %></manufacturerModelName>
|
22
|
+
</assignedAuthoringDevice>
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
<%== render :partial=>"organization", :locals=>{organization: author.organization} %>
|
26
|
+
|
27
|
+
</assignedAuthor>
|
28
|
+
</author>
|
@@ -0,0 +1 @@
|
|
1
|
+
<id <%== identifier.root.nil? ? "" : "root='#{identifier.root}'" -%> extension="<%= identifier.extension %>"/>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<representedOrganization>
|
2
|
+
<!-- Represents unique registry organization TIN -->
|
3
|
+
|
4
|
+
<%== render :partial=>"id", :collection=>organization.ids, :id=> "identifier" %>
|
5
|
+
<!-- Contains name - specific registry not required-->
|
6
|
+
<name><%= organization.name %></name>
|
7
|
+
</representedOrganization>
|
@@ -0,0 +1 @@
|
|
1
|
+
<telecom use="<%=telecom.use%>" value="tel:+<%=telecom.value%>" />
|
@@ -12,7 +12,8 @@
|
|
12
12
|
<typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
|
13
13
|
<!-- QRDA Category III Release 1 template ID (this template ID differs from QRDA III comment only template ID). -->
|
14
14
|
<templateId root="2.16.840.1.113883.10.20.27.1.1"/>
|
15
|
-
|
15
|
+
<%== render :partial=>"id", :locals=>{identifier: header.identifier} %>
|
16
|
+
|
16
17
|
<!-- SHALL QRDA III document type code -->
|
17
18
|
<code code="55184-6" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC"
|
18
19
|
displayName="Quality Reporting Document Architecture Calculated Summary Report"/>
|
@@ -30,35 +31,18 @@
|
|
30
31
|
<id nullFlavor="NA"/>
|
31
32
|
</patientRole>
|
32
33
|
</recordTarget>
|
34
|
+
|
35
|
+
<%== render :partial=>"author", :collection=>header.authors %>
|
33
36
|
<!-- SHALL have 1..* author. MAY be device or person.
|
34
37
|
The author of the CDA document in this example is a device at a data submission vendor/registry. -->
|
35
|
-
|
36
|
-
<time value="<%= Time.now.utc.to_formatted_s(:number) %>"/>
|
37
|
-
<assignedAuthor>
|
38
|
-
<!-- Registry author ID -->
|
39
|
-
<id extension="Cypress" root="MITRE"/>
|
40
|
-
<assignedAuthoringDevice>
|
41
|
-
<softwareName></softwareName>
|
42
|
-
</assignedAuthoringDevice>
|
43
|
-
<representedOrganization>
|
44
|
-
<!-- Represents unique registry organization TIN -->
|
45
|
-
<id root="root" extension="ext"/>
|
46
|
-
<!-- Contains name - specific registry not required-->
|
47
|
-
<name></name>
|
48
|
-
</representedOrganization>
|
49
|
-
</assignedAuthor>
|
50
|
-
</author>
|
38
|
+
|
51
39
|
<!-- The custodian of the CDA document is the same as the legal authenticator in this
|
52
40
|
example and represents the reporting organization. -->
|
53
41
|
<!-- SHALL -->
|
54
42
|
<custodian>
|
55
43
|
<assignedCustodian>
|
56
|
-
|
57
|
-
|
58
|
-
<id root="root"/>
|
59
|
-
<!-- SHOULD Name not required -->
|
60
|
-
<name>Cypress</name>
|
61
|
-
</representedCustodianOrganization>
|
44
|
+
<%== render :partial=>"id", :collection=>header.custodian.organization.ids, :id=>"identifier" %>
|
45
|
+
<%== render :partial=>"organization", :locals=>{organization: header.custodian.organization} %>
|
62
46
|
</assignedCustodian>
|
63
47
|
</custodian>
|
64
48
|
<!-- The legal authenticator of the CDA document is a single person who is at the
|
@@ -66,18 +50,21 @@
|
|
66
50
|
<!-- SHALL -->
|
67
51
|
<legalAuthenticator>
|
68
52
|
<!-- SHALL -->
|
69
|
-
<time value="<%=
|
53
|
+
<time value="<%= header.legal_authenticator.time.utc.to_formatted_s(:number) %>"/>
|
70
54
|
<!-- SHALL -->
|
71
55
|
<signatureCode code="S"/>
|
72
56
|
<assignedEntity>
|
73
57
|
<!-- SHALL ID -->
|
74
|
-
|
75
|
-
|
76
|
-
<
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
58
|
+
<%== render :partial=>"id", :collection=>header.legal_authenticator.ids, :id=>"identifier" %>
|
59
|
+
<%== render :partial=>"address" , :collection=>header.legal_authenticator.addresses %>
|
60
|
+
<assignedPerson>
|
61
|
+
<name>
|
62
|
+
<given><%= header.legal_authenticator.person.given %></given>
|
63
|
+
<family><%= header.legal_authenticator.person.family %></family>
|
64
|
+
</name>
|
65
|
+
</assignedPerson>
|
66
|
+
|
67
|
+
<%== render :partial=>"organization", :locals=>{organization: header.legal_authenticator.organization} %>
|
81
68
|
</assignedEntity>
|
82
69
|
</legalAuthenticator>
|
83
70
|
|
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.
|
4
|
+
version: 3.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Gregorowicz
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-09
|
15
|
+
date: 2013-12-09 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rest-client
|
@@ -290,6 +290,14 @@ files:
|
|
290
290
|
- lib/health-data-standards/models/procedure.rb
|
291
291
|
- lib/health-data-standards/models/provider.rb
|
292
292
|
- lib/health-data-standards/models/provider_performance.rb
|
293
|
+
- lib/health-data-standards/models/qrda/author.rb
|
294
|
+
- lib/health-data-standards/models/qrda/custodian.rb
|
295
|
+
- lib/health-data-standards/models/qrda/device.rb
|
296
|
+
- lib/health-data-standards/models/qrda/header.rb
|
297
|
+
- lib/health-data-standards/models/qrda/id.rb
|
298
|
+
- lib/health-data-standards/models/qrda/legal_authenticator.rb
|
299
|
+
- lib/health-data-standards/models/qrda/organization.rb
|
300
|
+
- lib/health-data-standards/models/qrda/person.rb
|
293
301
|
- lib/health-data-standards/models/record.rb
|
294
302
|
- lib/health-data-standards/models/result_value.rb
|
295
303
|
- lib/health-data-standards/models/support.rb
|
@@ -416,11 +424,16 @@ files:
|
|
416
424
|
- templates/cat1/_reporting_parameters.cat1.erb
|
417
425
|
- templates/cat1/_result_value.cat1.erb
|
418
426
|
- templates/cat1/show.cat1.erb
|
427
|
+
- templates/cat3/_address.cat3.erb
|
428
|
+
- templates/cat3/_author.cat3.erb
|
419
429
|
- templates/cat3/_continuous_variable_value.cat3.erb
|
430
|
+
- templates/cat3/_id.cat3.erb
|
420
431
|
- templates/cat3/_measure_data.cat3.erb
|
432
|
+
- templates/cat3/_organization.cat3.erb
|
421
433
|
- templates/cat3/_performance_rate.cat3.erb
|
422
434
|
- templates/cat3/_reporting_parameters.cat3.erb
|
423
435
|
- templates/cat3/_supplemental_data.cat3.erb
|
436
|
+
- templates/cat3/_telecom.cat3.erb
|
424
437
|
- templates/cat3/show.cat3.erb
|
425
438
|
- templates/ccda/_allergies.ccda.erb
|
426
439
|
- templates/ccda/_allergies_no_current.ccda.erb
|
@@ -525,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
525
538
|
version: '0'
|
526
539
|
requirements: []
|
527
540
|
rubyforge_project:
|
528
|
-
rubygems_version: 2.
|
541
|
+
rubygems_version: 2.1.3
|
529
542
|
signing_key:
|
530
543
|
specification_version: 4
|
531
544
|
summary: A library for generating and consuming various healthcare related formats.
|