health-data-standards 3.5.3 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -3
- data/README.md +10 -2
- data/lib/health-data-standards.rb +5 -28
- data/lib/health-data-standards/export/cat_1.rb +3 -2
- data/lib/health-data-standards/export/cat_1_r2.rb +11 -0
- data/lib/health-data-standards/ext/node.rb +1 -2
- data/lib/health-data-standards/import/bulk_record_importer.rb +4 -4
- data/lib/health-data-standards/import/bundle/importer.rb +62 -0
- data/lib/health-data-standards/import/c32/insurance_provider_importer.rb +10 -8
- data/lib/health-data-standards/import/cat1/patient_importer.rb +3 -3
- data/lib/health-data-standards/import/cat1/procedure_importer.rb +42 -0
- data/lib/health-data-standards/import/cda/medication_importer.rb +11 -11
- data/lib/health-data-standards/import/cda/section_importer.rb +13 -7
- data/lib/health-data-standards/models/cqm/aggregate_objects.rb +5 -1
- data/lib/health-data-standards/models/cqm/bundle.rb +5 -3
- data/lib/health-data-standards/models/cqm/measure.rb +1 -1
- data/lib/health-data-standards/models/entry.rb +5 -1
- data/lib/health-data-standards/models/record.rb +10 -0
- data/lib/health-data-standards/models/reference.rb +23 -0
- data/lib/health-data-standards/models/svs/value_set.rb +4 -3
- data/lib/health-data-standards/railtie.rb +1 -1
- data/lib/health-data-standards/tasks.rb +1 -0
- data/lib/health-data-standards/tasks/bundle.rake +84 -2
- data/lib/health-data-standards/util/vs_api.rb +40 -7
- data/lib/health-data-standards/validate/base_validator.rb +23 -0
- data/lib/health-data-standards/validate/data_validator.rb +85 -0
- data/lib/health-data-standards/validate/measure_validator.rb +127 -0
- data/lib/health-data-standards/validate/performance_rate_validator.rb +94 -0
- data/lib/health-data-standards/validate/reported_result_extractor.rb +170 -0
- data/lib/health-data-standards/validate/schema_validator.rb +24 -0
- data/lib/health-data-standards/validate/schematron/c_processor.rb +28 -0
- data/lib/health-data-standards/validate/schematron/java_processor.rb +93 -0
- data/lib/health-data-standards/validate/schematron_validator.rb +34 -0
- data/lib/health-data-standards/validate/validation_error.rb +10 -0
- data/lib/health-data-standards/validate/validators.rb +80 -0
- data/lib/hqmf-generator/fulfills.xml.erb +7 -0
- data/lib/hqmf-generator/hqmf-generator.rb +8 -3
- data/lib/hqmf-model/data_criteria.rb +3 -0
- data/lib/hqmf-model/types.rb +29 -0
- data/lib/hqmf-parser/2.0/data_criteria.rb +7 -0
- data/lib/hqmf-parser/2.0/types.rb +24 -0
- data/resources/schema/infrastructure/cda/CDA_SDTC.xsd +44 -0
- data/resources/schema/infrastructure/cda/POCD_MT000040_SDTC.xsd +1500 -0
- data/resources/schema/infrastructure/cda/SDTC.xsd +210 -0
- data/resources/schema/processable/coreschemas/NarrativeBlock.xsd +557 -0
- data/resources/schema/processable/coreschemas/datatypes-base_SDTC.xsd +1850 -0
- data/resources/schema/processable/coreschemas/datatypes.xsd +1375 -0
- data/resources/schema/processable/coreschemas/infrastructureRoot.xsd +27 -0
- data/resources/schema/processable/coreschemas/voc.xsd +2124 -0
- data/resources/schematron/iso-schematron-xslt1/ExtractSchFromRNG.xsl +75 -0
- data/resources/schematron/iso-schematron-xslt1/ExtractSchFromXSD.xsl +77 -0
- data/resources/schematron/iso-schematron-xslt1/iso_abstract_expand.xsl +297 -0
- data/resources/schematron/iso-schematron-xslt1/iso_dsdl_include.xsl +1509 -0
- data/resources/schematron/iso-schematron-xslt1/iso_schematron_message.xsl +55 -0
- data/resources/schematron/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl +1844 -0
- data/resources/schematron/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl +605 -0
- data/resources/schematron/iso-schematron-xslt1/readme.txt +101 -0
- data/resources/schematron/iso-schematron-xslt1/schematron-skeleton-api.htm +723 -0
- data/resources/schematron/iso-schematron-xslt2/ExtractSchFromRNG-2.xsl +75 -0
- data/resources/schematron/iso-schematron-xslt2/ExtractSchFromXSD-2.xsl +77 -0
- data/resources/schematron/iso-schematron-xslt2/iso_abstract_expand.xsl +297 -0
- data/resources/schematron/iso-schematron-xslt2/iso_dsdl_include.xsl +1508 -0
- data/resources/schematron/iso-schematron-xslt2/iso_schematron_message_xslt2.xsl +55 -0
- data/resources/schematron/iso-schematron-xslt2/iso_schematron_skeleton_for_saxon.xsl +2299 -0
- data/resources/schematron/iso-schematron-xslt2/iso_svrl_for_xslt2.xsl +684 -0
- data/resources/schematron/iso-schematron-xslt2/readme.txt +100 -0
- data/resources/schematron/iso-schematron-xslt2/sch-messages-cs.xhtml +56 -0
- data/resources/schematron/iso-schematron-xslt2/sch-messages-de.xhtml +57 -0
- data/resources/schematron/iso-schematron-xslt2/sch-messages-en.xhtml +57 -0
- data/resources/schematron/iso-schematron-xslt2/sch-messages-fr.xhtml +54 -0
- data/resources/schematron/iso-schematron-xslt2/sch-messages-nl.xhtml +58 -0
- data/resources/schematron/iso-schematron-xslt2/schematron-skeleton-api.htm +723 -0
- data/resources/schematron/qrda/cat_1/CDAR2_QRDA_I_R1_D3_2015MAY_Schematron.sch +4676 -0
- data/resources/schematron/qrda/cat_1/voc.xml +1177 -0
- data/resources/schematron/qrda/cat_1_r2/QRDA Category I Release 2.sch +4069 -0
- data/resources/schematron/qrda/cat_1_r2/voc.xml +1065 -0
- data/resources/schematron/qrda/cat_3/QRDA Category III.sch +675 -0
- data/resources/schematron/qrda/cat_3/voc.xml +21 -0
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.26.cat1.erb +18 -0
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.32.cat1.erb +4 -0
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.38.cat1.erb +5 -1
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.4.cat1.erb +1 -0
- data/templates/cat1/_2.16.840.1.113883.10.20.24.3.64.cat1.erb +20 -0
- data/templates/cat1/_fulfills.cat1.erb +14 -0
- data/templates/cat1/_organization.cat1.erb +2 -1
- data/templates/cat1/_patient_data.cat1.erb +1 -1
- data/templates/cat1/show.cat1.erb +5 -4
- data/templates/cat3/_performance_rate.cat3.erb +5 -1
- data/templates/cat3/show.cat3.erb +1 -1
- metadata +128 -109
- data/lib/health-data-standards/export/ccr.rb +0 -417
- data/lib/health-data-standards/export/green_c32/entry.rb +0 -18
- data/lib/health-data-standards/export/green_c32/export_generator.rb +0 -23
- data/lib/health-data-standards/export/green_c32/record.rb +0 -18
- data/lib/health-data-standards/export/helper/gc32_view_helper.rb +0 -39
- data/lib/health-data-standards/import/ccr/patient_importer.rb +0 -238
- data/lib/health-data-standards/import/ccr/product_importer.rb +0 -60
- data/lib/health-data-standards/import/ccr/provider_importer.rb +0 -49
- data/lib/health-data-standards/import/ccr/result_importer.rb +0 -49
- data/lib/health-data-standards/import/ccr/section_importer.rb +0 -135
- data/lib/health-data-standards/import/ccr/simple_importer.rb +0 -30
- data/lib/health-data-standards/import/green_c32/advance_directive_importer.rb +0 -14
- data/lib/health-data-standards/import/green_c32/allergy_importer.rb +0 -20
- data/lib/health-data-standards/import/green_c32/care_goal_importer.rb +0 -26
- data/lib/health-data-standards/import/green_c32/condition_importer.rb +0 -38
- data/lib/health-data-standards/import/green_c32/encounter_importer.rb +0 -33
- data/lib/health-data-standards/import/green_c32/immunization_importer.rb +0 -23
- data/lib/health-data-standards/import/green_c32/medical_equipment_importer.rb +0 -24
- data/lib/health-data-standards/import/green_c32/medication_importer.rb +0 -68
- data/lib/health-data-standards/import/green_c32/patient_importer.rb +0 -14
- data/lib/health-data-standards/import/green_c32/procedure_importer.rb +0 -27
- data/lib/health-data-standards/import/green_c32/result_importer.rb +0 -43
- data/lib/health-data-standards/import/green_c32/section_importer.rb +0 -186
- data/lib/health-data-standards/import/green_c32/social_history_importer.rb +0 -13
- data/lib/health-data-standards/import/green_c32/support_importer.rb +0 -22
- data/lib/health-data-standards/import/green_c32/vital_sign_importer.rb +0 -21
- data/templates/gc32/_address.gc32.erb +0 -9
- data/templates/gc32/_advance_directive.gc32.erb +0 -5
- data/templates/gc32/_allergy.gc32.erb +0 -12
- data/templates/gc32/_care_goal.gc32.erb +0 -8
- data/templates/gc32/_condition.gc32.erb +0 -10
- data/templates/gc32/_encounter.gc32.erb +0 -28
- data/templates/gc32/_entry.gc32.erb +0 -3
- data/templates/gc32/_entry_attributes.gc32.erb +0 -10
- data/templates/gc32/_immunization.gc32.erb +0 -9
- data/templates/gc32/_insurance_provider.gc32.erb +0 -28
- data/templates/gc32/_medical_equipment.gc32.erb +0 -6
- data/templates/gc32/_medication.gc32.erb +0 -91
- data/templates/gc32/_name.gc32.erb +0 -11
- data/templates/gc32/_organization.gc32.erb +0 -10
- data/templates/gc32/_person_attributes.gc32.erb +0 -7
- data/templates/gc32/_procedure.gc32.erb +0 -9
- data/templates/gc32/_provider.gc32.erb +0 -9
- data/templates/gc32/_result.gc32.erb +0 -12
- data/templates/gc32/_social_history.gc32.erb +0 -6
- data/templates/gc32/_support.gc32.erb +0 -15
- data/templates/gc32/_telecom.gc32.erb +0 -1
- data/templates/gc32/_vital_sign.gc32.erb +0 -4
- data/templates/gc32/record.gc32.erb +0 -97
@@ -1,11 +0,0 @@
|
|
1
|
-
<name>
|
2
|
-
<% if person.title %>
|
3
|
-
<title><% person.title %></title>
|
4
|
-
<% end %>
|
5
|
-
<% if person.given_name %>
|
6
|
-
<givenName><%= person.given_name%></givenName>
|
7
|
-
<% end %>
|
8
|
-
<% if person.family_name %>
|
9
|
-
<familyName><%= person.family_name%></familyName>
|
10
|
-
<% end %>
|
11
|
-
</name>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
<% tag_name ||= "organization"%>
|
2
|
-
<<%=tag_name%> id="<%=organization.id%>">
|
3
|
-
<name><%= organization.name%></name>
|
4
|
-
<% organization.addresses.each do |addr| %>
|
5
|
-
<%== render :partial => "address", locals: {address: addr} %>
|
6
|
-
<% end %>
|
7
|
-
<% organization.telecoms.each do |tele| %>
|
8
|
-
<%== render :partial => "telecom", locals: {telecom: tele} %>
|
9
|
-
<% end %>
|
10
|
-
</organization>
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<%== render partial: 'name', locals: {person: person} %>
|
2
|
-
<% person.addresses.each do |addr| %>
|
3
|
-
<%== render :partial => "address", locals: {address: addr} %>
|
4
|
-
<% end %>
|
5
|
-
<% person.telecoms.each do |tele| %>
|
6
|
-
<%== render :partial => "telecom", locals: {telecom: tele} %>
|
7
|
-
<% end %>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<procedure xmlns="urn:hl7-org:greencda:c32" id="<%=procedure.id%>">
|
2
|
-
<%== render partial: "entry_attributes", locals: {entry: procedure, code_sets: ['CPT', 'ICD-9-CM', 'ICD-10-CM', 'HCPCS', 'SNOMED-CT']}%>
|
3
|
-
<% if procedure.site %>
|
4
|
-
<%== gc32_code_display procedure, "tag_name" => "site", "attribute" => "site", "preferred_code_sets" => ["SNOMED-CT"] %>
|
5
|
-
<% end %>
|
6
|
-
<% if procedure.performer %>
|
7
|
-
<%== render partial: 'provider', locals: {provider: procedure.performer} %>
|
8
|
-
<% end %>
|
9
|
-
</procedure>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<% tag_name ||= "provider" %>
|
2
|
-
<<%=tag_name%> id="<%= provider.id%>">
|
3
|
-
<%== render :partial => 'person_attributes', locals: {person: provider} %>
|
4
|
-
<npi>1234567890</npi>
|
5
|
-
<specialty></specialty>
|
6
|
-
<% if provider.organization %>
|
7
|
-
<%== render :partial => "organization", locals: { organization: provider.organization } %>
|
8
|
-
<% end %>
|
9
|
-
</<%=tag_name%>>
|
@@ -1,12 +0,0 @@
|
|
1
|
-
<result xmlns="urn:hl7-org:greencda:c32" id="<%= result.id %>">
|
2
|
-
<%== render partial: "entry_attributes", locals: {entry: result, code_sets: ["SNOMED-CT", "LOINC"]}%>
|
3
|
-
<% if result.values.first %>
|
4
|
-
<%== quantity_display result.values.first %>
|
5
|
-
<% end %>
|
6
|
-
<% if result.interpretation%>
|
7
|
-
<%= gc32_code_display(result, "tag_name" => "interpretation", "attribute" => "interpretation", 'preferred_code_sets' => ["HL7 Observation Interpretation"]) %>
|
8
|
-
<% end %>
|
9
|
-
<% if result.reference_range %>
|
10
|
-
<referenceRange><%= result.reference_range %></referenceRange>
|
11
|
-
<% end %>
|
12
|
-
</result>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<socialHistory xmlns="urn:hl7-org:greencda:c32" id="<%= social_history.id%>">
|
2
|
-
<%== render partial: "entry_attributes", locals: {entry: social_history, code_sets: ["SNOMED-CT"]}%>
|
3
|
-
<% if social_history.values.first %>
|
4
|
-
<%== quantity_display social_history.values.first %>
|
5
|
-
<% end %>
|
6
|
-
</socialHistory>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<support xmlns="urn:hl7-org:greencda:c32">
|
2
|
-
<%== render partial: 'name', locals: {person: support}%>
|
3
|
-
<%== render partial: 'address', locals: {address: support.address} %>
|
4
|
-
<%== render partial: 'telecom', locals: {telecom: support.telecom} %>
|
5
|
-
<% if support.mothers_maiden_name%>
|
6
|
-
<mothersMaidenName><%= support.mothers_maiden_name %></mothersMaidenName>
|
7
|
-
<% end %>
|
8
|
-
<% if support.type %>
|
9
|
-
<type><%= support.type %></type>
|
10
|
-
<% end %>
|
11
|
-
<% if support.relationship %>
|
12
|
-
<relationship><%= support.relationship %></relationship>
|
13
|
-
<% end %>
|
14
|
-
|
15
|
-
</support>
|
@@ -1 +0,0 @@
|
|
1
|
-
<telecom <% if telecom.use %>use="<%= telecom.use%>"<% end %> <% if telecom.value %>value="<%= telecom.value %>"<% end %> <% if telecom.preferred %>preferred="<%= telecom.preferred %>"<% end %> />
|
@@ -1,97 +0,0 @@
|
|
1
|
-
<record xmlns="urn:hl7-org:greencda:c32">
|
2
|
-
<patientInformation id="<%=record.medical_record_number%>">
|
3
|
-
<name>
|
4
|
-
<title><%= record.title %></title>
|
5
|
-
<givenName><%= record.first %></givenName>
|
6
|
-
<familyName><%= record.last %></familyName>
|
7
|
-
</name>
|
8
|
-
<% record.addresses.each do |address| %>
|
9
|
-
<%== render partial: "address", locals: {address: address} %>
|
10
|
-
<% end %>
|
11
|
-
<% record.telecoms.each do |tele| %>
|
12
|
-
<%== render partial: "telecom", locals: {telecom: tele} %>
|
13
|
-
<% end %>
|
14
|
-
<gender code="<%= record.gender %>" codeSystem="2.16.840.1.113883.5.1" />
|
15
|
-
<dateOfBirth><%= time_if_not_nil(record.birthdate) %></dateOfBirth>
|
16
|
-
<% if record.deathdate %>
|
17
|
-
<dateOfDeath><%= time_if_not_nil(record.deathdate) %></dateOfDeath>
|
18
|
-
<% end %>
|
19
|
-
<% if record.marital_status && record.marital_status[:code] %>
|
20
|
-
<maritalStatus code="<%=record.marital_status[:code] %>" codeSystem="2.16.840.1.113883.5.2" />
|
21
|
-
<% end %>
|
22
|
-
<% if record.religious_affiliation && record.religious_affiliation[:code] %>
|
23
|
-
<religiousAffiliation code="<%= record.religious_affiliation[:code] %>" codeSystem="2.16.840.1.113883.5.1076" />
|
24
|
-
<% end %>
|
25
|
-
<% if record.race && record.race[:code] %>
|
26
|
-
<race code="<%=record.race[:code]%>" codeSystem="2.16.840.1.113883.6.238" />
|
27
|
-
<% end %>
|
28
|
-
<% if record.ethnicity && record.race[:code] %>
|
29
|
-
<ethnicity code="<%=record.ethnicity[:code]%>" codeSystem="2.16.840.1.113883.6.238" />
|
30
|
-
<% end %>
|
31
|
-
<languagesSpoken>
|
32
|
-
<% record.languages.each do |l| %>
|
33
|
-
<language><%=l%></language>
|
34
|
-
<% end%>
|
35
|
-
</languagesSpoken>
|
36
|
-
</patientInformation>
|
37
|
-
<allergies>
|
38
|
-
<% record.allergies.each do |a| %>
|
39
|
-
<%== render partial: "allergy", locals: {allergy: a} %>
|
40
|
-
<% end %>
|
41
|
-
</allergies>
|
42
|
-
<conditions>
|
43
|
-
<% record.conditions.each do |c| %>
|
44
|
-
<%== render partial: "condition", locals: {condition: c} %>
|
45
|
-
<% end %>
|
46
|
-
</conditions>
|
47
|
-
<encounters>
|
48
|
-
<% record.encounters.each do |e| %>
|
49
|
-
<%== render partial: 'encounter', locals: {encounter: e} %>
|
50
|
-
<% end %>
|
51
|
-
</encounters>
|
52
|
-
<immunizations>
|
53
|
-
<% record.immunizations.each do |i| %>
|
54
|
-
<%== render partial: "immunization", locals: {immunization: i} %>
|
55
|
-
<% end %>
|
56
|
-
</immunizations>
|
57
|
-
<insuranceProviders>
|
58
|
-
<% record.insurance_providers.each do |ip| %>
|
59
|
-
<%== render partial: "insurance_provider", locals: {insurance_provider: ip} %>
|
60
|
-
<% end %>
|
61
|
-
</insuranceProviders>
|
62
|
-
<medicalEquipment>
|
63
|
-
<% record.medical_equipment.each do |me| %>
|
64
|
-
<%== render partial: "medical_equipment", locals: {medical_equipment: me} %>
|
65
|
-
<% end %>
|
66
|
-
</medicalEquipment>
|
67
|
-
<medications>
|
68
|
-
<% record.medications.each do |m| %>
|
69
|
-
<%== render partial: "medication", locals: {medication: m} %>
|
70
|
-
<% end %>
|
71
|
-
</medications>
|
72
|
-
<procedures>
|
73
|
-
<% record.procedures.each do |pr| %>
|
74
|
-
<%== render partial: "procedure", locals: {procedure: pr} %>
|
75
|
-
<% end %>
|
76
|
-
</procedures>
|
77
|
-
<results>
|
78
|
-
<% record.results.each do |r| %>
|
79
|
-
<%== render partial: "result", locals: {result: r} %>
|
80
|
-
<% end %>
|
81
|
-
</results>
|
82
|
-
<socialHistory>
|
83
|
-
<% record.social_history.each do |sh| %>
|
84
|
-
<%== render partial: "social_history", locals: {social_history: sh} %>
|
85
|
-
<% end %>
|
86
|
-
</socialHistory>
|
87
|
-
<support>
|
88
|
-
<% record.support.each do |s| %>
|
89
|
-
<%== render partial: "support", locals: {support: s}%>
|
90
|
-
<% end %>
|
91
|
-
</support>
|
92
|
-
<vitalSigns>
|
93
|
-
<% record.vital_signs.each do |vs| %>
|
94
|
-
<%== render partial: "vital_sign", locals: {vital_sign: vs} %>
|
95
|
-
<% end %>
|
96
|
-
</vitalSigns>
|
97
|
-
</record>
|