ruby-hl7 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +2 -1
- data/lib/message.rb +5 -0
- data/lib/ruby-hl7.rb +1 -1
- data/lib/segment.rb +6 -0
- data/lib/segments/mfe.rb +10 -0
- data/lib/segments/mfi.rb +13 -0
- data/lib/segments/obx.rb +4 -1
- data/lib/segments/sft.rb +0 -6
- data/lib/test/hl7_messages.rb +30 -24
- metadata +11 -46
- data/.gitignore +0 -6
- data/.travis.yml +0 -15
- data/Gemfile +0 -11
- data/Gemfile.lock +0 -37
- data/NOTES.md +0 -53
- data/Rakefile +0 -149
- data/VERSION +0 -1
- data/VERSION.yml +0 -4
- data/examples/proxy_server.rb +0 -26
- data/ruby-hl7.gemspec +0 -44
- data/spec/basic_parsing_spec.rb +0 -320
- data/spec/batch_parsing_spec.rb +0 -52
- data/spec/child_segment_spec.rb +0 -66
- data/spec/core_ext/date_time_spec.rb +0 -43
- data/spec/default_segment_spec.rb +0 -31
- data/spec/dynamic_segment_def_spec.rb +0 -37
- data/spec/err_segment_spec.rb +0 -26
- data/spec/evn_segment_spec.rb +0 -23
- data/spec/msa_segment_spec.rb +0 -27
- data/spec/msh_segment_spec.rb +0 -28
- data/spec/nk1_segment_spec.rb +0 -26
- data/spec/obr_segment_spec.rb +0 -45
- data/spec/obx_segment_spec.rb +0 -46
- data/spec/orc_segment_spec.rb +0 -27
- data/spec/pid_segment_spec.rb +0 -70
- data/spec/prd_segment_spec.rb +0 -29
- data/spec/pv1_segment_spec.rb +0 -23
- data/spec/rf1_segment_spec.rb +0 -29
- data/spec/segment_field_spec.rb +0 -92
- data/spec/segment_generator_spec.rb +0 -32
- data/spec/segment_list_storage_spec.rb +0 -47
- data/spec/segment_spec.rb +0 -27
- data/spec/sft_segment_spec.rb +0 -26
- data/spec/spec_helper.rb +0 -12
- data/spec/speed_parsing_spec.rb +0 -19
- data/spec/spm_segment_spec.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3f68acdaf125738bd9d594e05165507e4b80a58
|
4
|
+
data.tar.gz: a21baf96ce948bb1157db16a27fe19a3f38ed058
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 212b413382550143b6bd88db4c2613feb5e4fd77da4df4f30c5681667f0229506b07e15d2b37ca54481db74da5a90dab89b70087b9e3de62e688a2b95968c901
|
7
|
+
data.tar.gz: 6219350799dc68714d10f869dca2f1365fd8b746d97a5c42b0562a0355e15f39b666fb294118eda691118ff359587da71bf2dfbba36e74202598d82cc13c4280
|
data/README.rdoc
CHANGED
@@ -19,11 +19,12 @@ Lists
|
|
19
19
|
|
20
20
|
Copyright (C) 2006-2014 Mark Guzman
|
21
21
|
|
22
|
-
Maintained by
|
22
|
+
Maintained by:
|
23
23
|
|
24
24
|
* http://csinitiative.com
|
25
25
|
* http://trisano.org
|
26
26
|
* http://github.com/csinitiative/trisano
|
27
|
+
* http://onemedical.com
|
27
28
|
|
28
29
|
== Download and Installation
|
29
30
|
|
data/lib/message.rb
CHANGED
@@ -196,6 +196,11 @@ class HL7::Message
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
+
# Checks if any of the results is a correction
|
200
|
+
def correction?
|
201
|
+
Array(self[:OBX]).any?(&:correction?)
|
202
|
+
end
|
203
|
+
|
199
204
|
private
|
200
205
|
def generate_segments( ary )
|
201
206
|
raise HL7::ParseError.new( "no array to generate segments" ) unless ary.length > 0
|
data/lib/ruby-hl7.rb
CHANGED
data/lib/segment.rb
CHANGED
@@ -144,6 +144,12 @@ class HL7::Message::Segment
|
|
144
144
|
@is_child_segment = val
|
145
145
|
end
|
146
146
|
|
147
|
+
# yield each element in the segment
|
148
|
+
def each # :yields: element
|
149
|
+
return unless @elements
|
150
|
+
@elements.each { |e| yield e }
|
151
|
+
end
|
152
|
+
|
147
153
|
# get the length of the segment (number of fields it contains)
|
148
154
|
def length
|
149
155
|
0 unless @elements
|
data/lib/segments/mfe.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
class HL7::Message::Segment::MFE < HL7::Message::Segment
|
2
|
+
weight 0
|
3
|
+
add_field :record_level_event_code
|
4
|
+
add_field :mfn_control_id
|
5
|
+
add_field :effective_date_time do |value|
|
6
|
+
convert_to_ts(value)
|
7
|
+
end
|
8
|
+
add_field :primary_key_value
|
9
|
+
add_field :primary_key_value_type
|
10
|
+
end
|
data/lib/segments/mfi.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
class HL7::Message::Segment::MFI < HL7::Message::Segment
|
2
|
+
weight 0
|
3
|
+
add_field :master_file_identifier
|
4
|
+
add_field :master_file_application_identifier
|
5
|
+
add_field :file_level_event_code
|
6
|
+
add_field :entered_date_time do |value|
|
7
|
+
convert_to_ts(value)
|
8
|
+
end
|
9
|
+
add_field :effective_date_time do |value|
|
10
|
+
convert_to_ts(value)
|
11
|
+
end
|
12
|
+
add_field :response_level_code
|
13
|
+
end
|
data/lib/segments/obx.rb
CHANGED
@@ -34,5 +34,8 @@ class HL7::Message::Segment::OBX < HL7::Message::Segment
|
|
34
34
|
add_field :performing_organization_name
|
35
35
|
add_field :performing_organization_address
|
36
36
|
add_field :performing_organization_medical_director
|
37
|
-
end
|
38
37
|
|
38
|
+
def correction?
|
39
|
+
observation_result_status == "C"
|
40
|
+
end
|
41
|
+
end
|
data/lib/segments/sft.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
class HL7::Message::Segment::SFT < HL7::Message::Segment
|
2
2
|
weight 0
|
3
|
-
# The sample SFT segments seem to have Set ID before SFT-1, software
|
4
|
-
# vendor organization. This is sensible, since each software
|
5
|
-
# component that retransmits a message is supposed to add its own SFT
|
6
|
-
# segment. A Set ID is required to distinguish among multiple SFT
|
7
|
-
# segments.
|
8
|
-
add_field :set_id
|
9
3
|
add_field :software_vendor_organization
|
10
4
|
add_field :software_certified_version_or_release_number # NEW longest method name ever.
|
11
5
|
add_field :software_product_name
|
data/lib/test/hl7_messages.rb
CHANGED
@@ -80,30 +80,30 @@ HL7MESSAGES[:arup_simple_pid] = <<ARUP_SIMPLE_PID
|
|
80
80
|
MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005||||||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Repeatedly Reactive||Negative||||F|||200903210007\r
|
81
81
|
ARUP_SIMPLE_PID
|
82
82
|
|
83
|
-
HL7MESSAGES[:arup_replace_name] = Proc.new do |patient_name|
|
84
|
-
|
85
|
-
<<ARUP
|
86
|
-
MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||#{last_name}^#{first_name}^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
87
|
-
ARUP
|
88
|
-
end
|
89
|
-
|
90
|
-
HL7MESSAGES[:arup_replace_lab] = Proc.new do |lab_name|
|
91
|
-
<<ARUP
|
92
|
-
MSH|^~\&|ARUP|#{lab_name}^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
93
|
-
ARUP
|
94
|
-
end
|
95
|
-
|
96
|
-
HL7MESSAGES[:arup_replace_collection_date] = Proc.new do |collection_date|
|
97
|
-
<<ARUP
|
98
|
-
MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||#{collection_date}|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
99
|
-
ARUP
|
100
|
-
end
|
101
|
-
|
102
|
-
HL7MESSAGES[:arup_replace_test_type] = Proc.new do |test_type|
|
103
|
-
<<ARUP
|
104
|
-
MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^#{test_type}^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
105
|
-
ARUP
|
106
|
-
end
|
83
|
+
# HL7MESSAGES[:arup_replace_name] = Proc.new do |patient_name|
|
84
|
+
# first_name, last_name = patient_name.split
|
85
|
+
# <<ARUP
|
86
|
+
# MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||#{last_name}^#{first_name}^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
87
|
+
# ARUP
|
88
|
+
# end
|
89
|
+
#
|
90
|
+
# HL7MESSAGES[:arup_replace_lab] = Proc.new do |lab_name|
|
91
|
+
# <<ARUP
|
92
|
+
# MSH|^~\&|ARUP|#{lab_name}^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
93
|
+
# ARUP
|
94
|
+
# end
|
95
|
+
#
|
96
|
+
# HL7MESSAGES[:arup_replace_collection_date] = Proc.new do |collection_date|
|
97
|
+
# <<ARUP
|
98
|
+
# MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||#{collection_date}|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^Hepatitis Be Antigen^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
99
|
+
# ARUP
|
100
|
+
# end
|
101
|
+
#
|
102
|
+
# HL7MESSAGES[:arup_replace_test_type] = Proc.new do |test_type|
|
103
|
+
# <<ARUP
|
104
|
+
# MSH|^~\&|ARUP|ARUP LABORATORIES^46D0523979^CLIA|UTDOH|UT|200903261645||ORU^R01|200903261645128667|P|2.3.1|1\rPID|1||17744418^^^^MR||ZHANG^GEORGE^^^^^L||19830922|M||U^Unknown^HL70005|42 HAPPY LN^^SALT LAKE CITY^UT^84444^^M||^^PH^^^801^5552346|||||||||U^Unknown^HL70189\rORC||||||||||||^FARNSWORTH^MABEL^W|||||||||University Hospital UT|50 North Medical Drive^^Salt Lake City^UT^84132^USA^B||^^^^^USA^B\rOBR|1||09078102377|13954-3^Hepatitis Be Antigen^LN|||200903191011|||||||200903191011|BLOOD|^FARNSWORTH^MABEL^W||||||200903191011|||F||||||9^Unknown\rOBX|1|ST|13954-3^#{test_type}^LN|1|Positive|Metric Ton|Negative||||F|||200903210007\r
|
105
|
+
# ARUP
|
106
|
+
# end
|
107
107
|
|
108
108
|
# The following messages are taken from the HL7 2.5.1 ELR to Public
|
109
109
|
# Health US Realm document.
|
@@ -292,3 +292,9 @@ REALM_CJ_INPATIENT
|
|
292
292
|
HL7MESSAGES[:realm_cj_en] = <<REALM_CAMPYLOBACTER_EN
|
293
293
|
MSH|^~\&|Lab1^1234^CLIA|^1234^CLIA|ELR^2.16.840.1.113883.19.3.2^ISO|SPH^2.16.840.1.113883.19.3.2^ISO|20080818183002.1-0700||ORU^R01^ORU_R01|1234567890|P^T|2.5.1|||NE|NE|USA||||USELR1.0^^2.16.840.1.114222.4.10.3^ISO\rSFT|1|Level Seven Healthcare Software, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|1.2|An Lab System|56734||20080817\rPID|1||36363636^^^MPI&2.16.840.1.113883.19.3.2.1&ISO^MR^A&2.16.840.1.113883.19.3.2.1&ISO~444333333^^^&2.16.840.1.113883.4.1^ISO^SS||Everyman^Adam^A^^^^L^^^^^^^BS|Mum^Martha^M^^^^M|19800602|M||2106-3^White^CDCREC^^^^04/24/2007|2222 Home Street^^Ann Arbor^MI^99999^USA^H||^PRN^PH^^1^555^5552004|^WPN^PH^^1^955^5551009|en^English^ISO6391^^^^3/29/2007|M^Married^HL70002^^^^2.5.1||||||N^Not Hispanic or Latino^HL70189^^^^2.5.1||||||||N|||200808151000-0700|Reliable^2.16.840.1.113883.19.3.1^ISO\rPV1|1|O|4E^234^A^Good Health Hospital&2.16.840.1.113883.19.3.2.3&ISO^N^N^Building 1^4^Nursing unit 4 East^1234&&2.16.840.1.113883.19.3.2.3&ISO^&2.16.840.1.113883.19.3.2.3&ISO|R||||||||||||||||||||||||||||||||||||||||200808151000-0700|200808151200-0700\rPV2|||1^Sick^99AdmitReason|||||||||||||N||||||||Level Seven Healthcare, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|||20010603|||19990603\rORC|RE|23456^EHR^2.16.840.1.113883.19.3.2.3^ISO|9700123^Lab^2.16.840.1.113883.19.3.1.6^ISO|||||||||1234^Admit^Alan^A^III^Dr^^^&2.16.840.1.113883.19.4.6^ISO^L^^^EI^&2.16.840.1.113883.19.4.6^ISO^^^^^^^^MD||^WPN^PH^^1^555^5551005|||||||Level Seven Healthcare, Inc.^L^^^^&2.16.840.1.113883.19.4.6^ISO^XX^^^1234|1005 Healthcare Drive^^Ann Arbor^MI^99999^USA^B|^WPN^PH^^1^555^5553001|4444 Healthcare Drive^Suite 123^Ann Arbor^MI^99999^USA^B\rOBR|1|23456^EHR^2.16.840.1.113883.19.3.2.3^ISO|9700123^Lab^2.16.840.1.113883.19.3.1.6^ISO|625-4^Bacteria identified^LN^3456543^ CULTURE, STOOL^99USI^2.26|||200808151030-0700||||||diarrhea|||1234^Admit^Alan^A^III^Dr^^^&2.16.840.1.113883.19.4.6^ISO^L^^^EI^&2.16.840.1.113883.19.4.6^ISO^^^^^^^^MD|^WPN^PH^^1^555^5551005|||||2008081830-0700|||F||||||787.91^DIARRHEA^I9CDX^^^^07/09/2008|1235&Slide&Stan&S&&Dr&MD&&DOC&2.16.840.1.113883.19.4.6&ISO\rOBX|1|CWE|625-4^Bacteria identified:Prid:Pt:Stool:Nom:Culture^LN^^^^2.26|1|66543000^Campylobacter jejuni^SCT^^^^January 2007||||||P|||200906041458|||0086^Bacterial identification^OBSMETHOD^^^^501-20080815||200906051700||||GHH Lab^L^^^^CLIA&2.16.840.1.113883.19.4.6&ISO^XX^^^1236|3434 Industrial Loop^^Ann Arbor^MI^99999^USA^B|9876543^Slide^Stan^S^^^^^NPPES&2.16.840.1.113883.19.4.6&ISO^L^^^NPI\rSPM|1|23456&EHR&2.16.840.1.113883.19.3.2.3&ISO^9700122&Lab&2.16.840.1.113883.19.3.1.6&ISO||119339001^Stool specimen^SCT^^^^20080131|||||||P^Patient^HL60369^^^^2.5.1|10^g&gram&UCUM&&&&1.6|||||200808151030-0700|200808151100-0700
|
294
294
|
REALM_CAMPYLOBACTER_EN
|
295
|
+
|
296
|
+
#Sample messages for MFN messages
|
297
|
+
HL7MESSAGES[:mfn_m13] = <<MFN_M13
|
298
|
+
MSH|^~\&|HL7REG|UH|HL7LAB|CH|200106290544||MFN^M13^MFN_M01|MSGID004|P|2.5||AL|AL\rMFI|HL70006^RELIGION^HL70175||UPD|||AL\rMFE|MAD|6772333|200106290500|BUD^Buddhist^HL70006|CE\rMFE|MAD|6772334|200106290500|BOT^Buddhist: Other^HL70006|CE
|
299
|
+
MFN_M13
|
300
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-hl7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Guzman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 10.
|
19
|
+
version: 10.5.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 10.
|
26
|
+
version: 10.5.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rubyforge
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,20 +43,11 @@ email: ruby-hl7@googlegroups.com
|
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files:
|
46
|
-
- LICENSE
|
47
46
|
- README.rdoc
|
47
|
+
- LICENSE
|
48
48
|
files:
|
49
|
-
- ".gitignore"
|
50
|
-
- ".travis.yml"
|
51
|
-
- Gemfile
|
52
|
-
- Gemfile.lock
|
53
49
|
- LICENSE
|
54
|
-
- NOTES.md
|
55
50
|
- README.rdoc
|
56
|
-
- Rakefile
|
57
|
-
- VERSION
|
58
|
-
- VERSION.yml
|
59
|
-
- examples/proxy_server.rb
|
60
51
|
- lib/core_ext/date_time.rb
|
61
52
|
- lib/core_ext/string.rb
|
62
53
|
- lib/message.rb
|
@@ -70,6 +61,8 @@ files:
|
|
70
61
|
- lib/segments/err.rb
|
71
62
|
- lib/segments/evn.rb
|
72
63
|
- lib/segments/in1.rb
|
64
|
+
- lib/segments/mfe.rb
|
65
|
+
- lib/segments/mfi.rb
|
73
66
|
- lib/segments/msa.rb
|
74
67
|
- lib/segments/msh.rb
|
75
68
|
- lib/segments/nk1.rb
|
@@ -89,33 +82,6 @@ files:
|
|
89
82
|
- lib/segments/spm.rb
|
90
83
|
- lib/segments/zcf.rb
|
91
84
|
- lib/test/hl7_messages.rb
|
92
|
-
- ruby-hl7.gemspec
|
93
|
-
- spec/basic_parsing_spec.rb
|
94
|
-
- spec/batch_parsing_spec.rb
|
95
|
-
- spec/child_segment_spec.rb
|
96
|
-
- spec/core_ext/date_time_spec.rb
|
97
|
-
- spec/default_segment_spec.rb
|
98
|
-
- spec/dynamic_segment_def_spec.rb
|
99
|
-
- spec/err_segment_spec.rb
|
100
|
-
- spec/evn_segment_spec.rb
|
101
|
-
- spec/msa_segment_spec.rb
|
102
|
-
- spec/msh_segment_spec.rb
|
103
|
-
- spec/nk1_segment_spec.rb
|
104
|
-
- spec/obr_segment_spec.rb
|
105
|
-
- spec/obx_segment_spec.rb
|
106
|
-
- spec/orc_segment_spec.rb
|
107
|
-
- spec/pid_segment_spec.rb
|
108
|
-
- spec/prd_segment_spec.rb
|
109
|
-
- spec/pv1_segment_spec.rb
|
110
|
-
- spec/rf1_segment_spec.rb
|
111
|
-
- spec/segment_field_spec.rb
|
112
|
-
- spec/segment_generator_spec.rb
|
113
|
-
- spec/segment_list_storage_spec.rb
|
114
|
-
- spec/segment_spec.rb
|
115
|
-
- spec/sft_segment_spec.rb
|
116
|
-
- spec/spec_helper.rb
|
117
|
-
- spec/speed_parsing_spec.rb
|
118
|
-
- spec/spm_segment_spec.rb
|
119
85
|
- test_data/adt_a01.hl7
|
120
86
|
- test_data/cerner/cerner_bordetella.hl7
|
121
87
|
- test_data/cerner/cerner_en.hl7
|
@@ -146,12 +112,11 @@ files:
|
|
146
112
|
- test_data/rqi_r04.hl7
|
147
113
|
- test_data/test.hl7
|
148
114
|
- test_data/test2.hl7
|
149
|
-
homepage:
|
115
|
+
homepage: https://github.com/ruby-hl7/ruby-hl7
|
150
116
|
licenses: []
|
151
117
|
metadata: {}
|
152
118
|
post_install_message:
|
153
|
-
rdoc_options:
|
154
|
-
- "--charset=UTF-8"
|
119
|
+
rdoc_options: []
|
155
120
|
require_paths:
|
156
121
|
- lib
|
157
122
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -166,8 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
131
|
version: '0'
|
167
132
|
requirements: []
|
168
133
|
rubyforge_project: ruby-hl7
|
169
|
-
rubygems_version: 2.
|
134
|
+
rubygems_version: 2.6.3
|
170
135
|
signing_key:
|
171
|
-
specification_version:
|
136
|
+
specification_version: 4
|
172
137
|
summary: Ruby HL7 Library
|
173
138
|
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
diff-lcs (1.2.5)
|
5
|
-
git (1.2.5)
|
6
|
-
json_pure (1.5.0)
|
7
|
-
multi_json (1.5.0)
|
8
|
-
rake (10.0.3)
|
9
|
-
rdoc (3.9.4)
|
10
|
-
rspec (2.99.0)
|
11
|
-
rspec-core (~> 2.99.0)
|
12
|
-
rspec-expectations (~> 2.99.0)
|
13
|
-
rspec-mocks (~> 2.99.0)
|
14
|
-
rspec-core (2.99.2)
|
15
|
-
rspec-expectations (2.99.2)
|
16
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
17
|
-
rspec-mocks (2.99.2)
|
18
|
-
rubyforge (2.0.4)
|
19
|
-
json_pure (>= 1.1.7)
|
20
|
-
simplecov (0.7.1)
|
21
|
-
multi_json (~> 1.0)
|
22
|
-
simplecov-html (~> 0.7.1)
|
23
|
-
simplecov-html (0.7.1)
|
24
|
-
technicalpickles-jeweler (1.2.1)
|
25
|
-
git (>= 1.2.1)
|
26
|
-
rubyforge
|
27
|
-
|
28
|
-
PLATFORMS
|
29
|
-
ruby
|
30
|
-
|
31
|
-
DEPENDENCIES
|
32
|
-
rake (~> 10.0.3)
|
33
|
-
rdoc
|
34
|
-
rspec (~> 2.99.0)
|
35
|
-
rubyforge
|
36
|
-
simplecov
|
37
|
-
technicalpickles-jeweler
|
data/NOTES.md
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
## Overview
|
2
|
-
|
3
|
-
**Version 1.1.1**
|
4
|
-
Included in this release:
|
5
|
-
|
6
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/48
|
7
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/44
|
8
|
-
|
9
|
-
**Version 1.1.0**
|
10
|
-
Included in this release:
|
11
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/7
|
12
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/9
|
13
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/10
|
14
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/13
|
15
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/17
|
16
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/18
|
17
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/19
|
18
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/20
|
19
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/21
|
20
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/22
|
21
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/23
|
22
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/24
|
23
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/25
|
24
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/27
|
25
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/28
|
26
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/33
|
27
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/34
|
28
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/35
|
29
|
-
- https://github.com/ruby-hl7/ruby-hl7/pull/41
|
30
|
-
|
31
|
-
Thanks to:
|
32
|
-
@untoldone, @tomsabin, @patricksrobertson, @rojotek, @calebwoods and @jdee
|
33
|
-
|
34
|
-
|
35
|
-
**Version 1.0.3**
|
36
|
-
The ruby-hl7 gem removes some sample messages.
|
37
|
-
|
38
|
-
## Release Date
|
39
|
-
|
40
|
-
January 25, 2011
|
41
|
-
|
42
|
-
## In this release
|
43
|
-
|
44
|
-
* Sample messages from Cerner were removed.
|
45
|
-
* Some gem dependencies were updated.
|
46
|
-
|
47
|
-
### Bug fixes
|
48
|
-
|
49
|
-
There are no bug fixes in this release.
|
50
|
-
|
51
|
-
## Known Issues
|
52
|
-
|
53
|
-
There are currently no known open issues with the ruby-hl7 gem.
|
data/Rakefile
DELETED
@@ -1,149 +0,0 @@
|
|
1
|
-
# $Id$
|
2
|
-
require 'rubygems'
|
3
|
-
require 'rake'
|
4
|
-
require 'rdoc/task'
|
5
|
-
require 'rubygems/package_task'
|
6
|
-
require 'rake/contrib/sshpublisher'
|
7
|
-
require 'rbconfig'
|
8
|
-
require 'rubyforge'
|
9
|
-
require 'rspec'
|
10
|
-
require 'rspec/core/rake_task'
|
11
|
-
require 'simplecov'
|
12
|
-
|
13
|
-
$: << './lib'
|
14
|
-
require 'ruby-hl7'
|
15
|
-
require 'message_parser'
|
16
|
-
require 'message'
|
17
|
-
require 'segment_list_storage'
|
18
|
-
require 'segment_generator'
|
19
|
-
require 'segment'
|
20
|
-
|
21
|
-
full_name = "Ruby-HL7"
|
22
|
-
short_name = full_name.downcase
|
23
|
-
|
24
|
-
# Many of these tasks were garnered from zenspider's Hoe
|
25
|
-
# just forced to work my way
|
26
|
-
|
27
|
-
desc 'Default: Run all examples'
|
28
|
-
task :default => :spec
|
29
|
-
|
30
|
-
if RUBY_VERSION < '1.9.1'
|
31
|
-
begin
|
32
|
-
require 'jeweler'
|
33
|
-
Jeweler::Tasks.new do |s|
|
34
|
-
s.name = short_name
|
35
|
-
s.full_name
|
36
|
-
s.summary = "Ruby HL7 Library"
|
37
|
-
s.authors = ["Mark Guzman"]
|
38
|
-
s.email = "ruby-hl7@googlegroups.com"
|
39
|
-
s.homepage = "http://github.com/ruby-hl7/ruby-hl7"
|
40
|
-
s.description = "A simple library to parse and generate HL7 2.x messages"
|
41
|
-
s.require_path = "lib"
|
42
|
-
s.has_rdoc = true
|
43
|
-
s.rubyforge_project = short_name
|
44
|
-
s.required_ruby_version = '>= 1.8.6'
|
45
|
-
s.extra_rdoc_files = %w[README.rdoc LICENSE]
|
46
|
-
s.files = FileList["{bin,lib,test_data}/**/*"].to_a
|
47
|
-
s.test_files = FileList["{test}/**/test*.rb"].to_a
|
48
|
-
s.add_dependency("rake", ">= #{RAKEVERSION}")
|
49
|
-
s.add_dependency("rubyforge", ">= #{::RubyForge::VERSION}")
|
50
|
-
end
|
51
|
-
rescue LoadError
|
52
|
-
puts "Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install jeweler"
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
|
57
|
-
spec = Gem::Specification.new do |s|
|
58
|
-
s.name = short_name
|
59
|
-
s.full_name
|
60
|
-
s.version = HL7::VERSION
|
61
|
-
s.author = "Mark Guzman"
|
62
|
-
s.email = "ruby-hl7@googlegroups.com"
|
63
|
-
s.homepage = "https://github.com/ruby-hl7/ruby-hl7"
|
64
|
-
s.platform = Gem::Platform::RUBY
|
65
|
-
s.summary = "Ruby HL7 Library"
|
66
|
-
s.rubyforge_project = short_name
|
67
|
-
s.description = "A simple library to parse and generate HL7 2.x messages"
|
68
|
-
s.files = FileList["{bin,lib,test_data}/**/*"].to_a
|
69
|
-
s.require_path = "lib"
|
70
|
-
s.test_files = FileList["{test}/**/test*.rb"].to_a
|
71
|
-
s.has_rdoc = true
|
72
|
-
s.required_ruby_version = '>= 1.8.6'
|
73
|
-
s.extra_rdoc_files = %w[README.rdoc LICENSE]
|
74
|
-
s.add_dependency("rake", ">= #{RAKEVERSION}")
|
75
|
-
s.add_dependency("rubyforge", ">= #{::RubyForge::VERSION}")
|
76
|
-
end
|
77
|
-
|
78
|
-
desc "Run all examples"
|
79
|
-
RSpec::Core::RakeTask.new(:spec) do |spec|
|
80
|
-
spec.pattern = 'spec/**/*.rb'
|
81
|
-
end
|
82
|
-
|
83
|
-
desc "Run all examples with SimpleCov"
|
84
|
-
RSpec::Core::RakeTask.new(:spec_with_simplecov) do |spec|
|
85
|
-
ENV['COVERAGE'] = 'true'
|
86
|
-
spec.pattern = 'spec/**/*.rb'
|
87
|
-
end
|
88
|
-
|
89
|
-
RDoc::Task.new do |rd|
|
90
|
-
rd.main = "README.rdoc"
|
91
|
-
rd.rdoc_files.include("README.rdoc", "LICENSE", "lib/**/*.rb")
|
92
|
-
rd.title = "%s (%s) Documentation" % [ full_name, spec.version ]
|
93
|
-
rd.rdoc_dir = 'doc'
|
94
|
-
end
|
95
|
-
|
96
|
-
Gem::PackageTask.new(spec) do |pkg|
|
97
|
-
pkg.need_tar = true
|
98
|
-
end
|
99
|
-
|
100
|
-
desc 'Clean up all the extras'
|
101
|
-
task :clean => [ :clobber_rdoc, :clobber_package ] do
|
102
|
-
%w[*.gem ri coverage*].each do |pattern|
|
103
|
-
files = Dir[pattern]
|
104
|
-
rm_rf files unless files.empty?
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
namespace :forge do
|
109
|
-
desc 'Publish RDoc to RubyForge'
|
110
|
-
task :publish_docs => [:clean, :rdoc] do
|
111
|
-
config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
|
112
|
-
host = "#{config["username"]}@rubyforge.org"
|
113
|
-
remote_dir = "/var/www/gforge-projects/#{spec.rubyforge_project}"
|
114
|
-
local_dir = 'doc'
|
115
|
-
sh %{rsync -av --delete #{local_dir}/ #{host}:#{remote_dir}}
|
116
|
-
end
|
117
|
-
|
118
|
-
desc 'Package and upload the release to rubyforge.'
|
119
|
-
task :release => [:clean, :package] do |t|
|
120
|
-
v = ENV["VERSION"] or abort "Must supply VERSION=x.y.z"
|
121
|
-
abort "Versions don't match '#{v}' vs '#{spec.version}'" if v != spec.version.to_s
|
122
|
-
pkg = "pkg/#{spec.name}-#{spec.version}"
|
123
|
-
|
124
|
-
if $DEBUG then
|
125
|
-
puts "release_id = rf.add_release #{spec.rubyforge_project.inspect}, #{spec.name.inspect}, #{version.inspect}, \"#{pkg}.tgz\""
|
126
|
-
puts "rf.add_file #{spec.rubyforge_project.inspect}, #{spec.name.inspect}, release_id, \"#{pkg}.gem\""
|
127
|
-
end
|
128
|
-
|
129
|
-
rf = RubyForge.new
|
130
|
-
puts "Logging in"
|
131
|
-
rf.login
|
132
|
-
|
133
|
-
changes = open("NOTES.md").readlines.join("") if File.exists?("NOTES.md")
|
134
|
-
c = rf.userconfig
|
135
|
-
c["release_notes"] = spec.description if spec.description
|
136
|
-
c["release_changes"] = changes if changes
|
137
|
-
c["preformatted"] = true
|
138
|
-
|
139
|
-
files = ["#{pkg}.tgz", "#{pkg}.gem"].compact
|
140
|
-
|
141
|
-
puts "Releasing #{spec.name} v. #{spec.version}"
|
142
|
-
rf.add_release spec.rubyforge_project, spec.name, spec.version.to_s, *files
|
143
|
-
end
|
144
|
-
end
|
145
|
-
|
146
|
-
desc 'Install the package as a gem'
|
147
|
-
task :install_gem => [:clean, :package] do
|
148
|
-
sh "sudo gem install pkg/*.gem"
|
149
|
-
end
|