ruby-hl7-extensions 0.0.67 → 0.0.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/VERSION.yml +1 -1
- data/lib/core_ext/message.rb +14 -7
- data/lib/core_ext/segments/obr.rb +3 -2
- data/lib/core_ext/segments/orc.rb +3 -2
- data/ruby-hl7-extensions.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80780b36f304c818e8e2572103486dcbb4e5af7a
|
4
|
+
data.tar.gz: 61ffaac9fb6ff87b72050a39525366eaa2281de7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ed0012cdc06979f9c7a663b1793efa195a8ddde23e6149899eaa350318aba3406f7b9fe27f1434c246a79a036701df6373bb467438276800ee06a8ff48066d5
|
7
|
+
data.tar.gz: 416453d172242c98fbfc4cd2c40a10b88875137f10ac6a1dd6d8c7acb4c4af912566b58b78c095605abd02910b4b1801388d76987fd8c0a7f5283e18f1bf6acc
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.68
|
data/VERSION.yml
CHANGED
data/lib/core_ext/message.rb
CHANGED
@@ -66,15 +66,15 @@ module Extensions
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def obr_list
|
69
|
-
#
|
70
|
-
a
|
71
|
-
|
69
|
+
# a = hash["message"]["content"]["OBR"]["array"].collect {|obr| ::HL7::Message::Segment.from_hash("OBR", obr)}
|
70
|
+
# a.to_enum(:each)
|
71
|
+
hash["message"]["content"]["OBR"]["segment_array"].to_enum(:each)
|
72
72
|
end
|
73
73
|
|
74
74
|
def orc_list
|
75
|
-
#
|
76
|
-
a
|
77
|
-
|
75
|
+
# a = hash["message"]["content"]["ORC"]["array"].collect {|orc| ::HL7::Message::Segment.from_hash("ORC", orc)}
|
76
|
+
# a.to_enum(:each)
|
77
|
+
hash["message"]["content"]["ORC"]["segment_array"].to_enum(:each)
|
78
78
|
end
|
79
79
|
|
80
80
|
def message_type
|
@@ -114,12 +114,15 @@ module Extensions
|
|
114
114
|
@hash[:message][:content][segment_name.to_sym] ||= {}
|
115
115
|
@hash[:message][:content][segment_name.to_sym]["array"] ||= []
|
116
116
|
@hash[:message][:content][segment_name.to_sym]["array"] << segment.to_hash
|
117
|
+
@hash[:message][:content][segment_name.to_sym]["segment_array"] ||= []
|
118
|
+
@hash[:message][:content][segment_name.to_sym]["segment_array"] << segment
|
117
119
|
|
118
|
-
@hash[:message][:content][segment_name.to_sym]["array"]
|
119
120
|
if last_segment == "ORC"
|
120
121
|
@hash[:message][:content]["ORC"]["array"].last["OBR"] ||= {}
|
121
122
|
@hash[:message][:content]["ORC"]["array"].last["OBR"]["array"] ||= []
|
122
123
|
@hash[:message][:content]["ORC"]["array"].last["OBR"]["array"] << segment.to_hash
|
124
|
+
@hash[:message][:content]["ORC"]["array"].last["OBR"]["segment_array"] ||= []
|
125
|
+
@hash[:message][:content]["ORC"]["array"].last["OBR"]["segment_array"] << segment
|
123
126
|
else
|
124
127
|
last_segment = segment_name
|
125
128
|
end
|
@@ -128,11 +131,15 @@ module Extensions
|
|
128
131
|
@hash[:message][:content]["OBR"]["array"].last[segment_name] ||= {}
|
129
132
|
@hash[:message][:content]["OBR"]["array"].last[segment_name]["array"] ||= []
|
130
133
|
@hash[:message][:content]["OBR"]["array"].last[segment_name]["array"] << segment.to_hash
|
134
|
+
@hash[:message][:content]["OBR"]["array"].last[segment_name]["segment_array"] ||= []
|
135
|
+
@hash[:message][:content]["OBR"]["array"].last[segment_name]["segment_array"] << segment
|
131
136
|
end
|
132
137
|
elsif segment_name == "ORC"
|
133
138
|
@hash[:message][:content]["ORC"] ||= {}
|
134
139
|
@hash[:message][:content]["ORC"]["array"] ||= []
|
135
140
|
@hash[:message][:content]["ORC"]["array"] << segment.to_hash
|
141
|
+
@hash[:message][:content]["ORC"]["segment_array"] ||= []
|
142
|
+
@hash[:message][:content]["ORC"]["segment_array"] << segment
|
136
143
|
last_segment = segment_name
|
137
144
|
elsif segment_name == "NTE"
|
138
145
|
if last_segment == "OBR"
|
@@ -18,8 +18,9 @@ module Extensions
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def obx_list
|
21
|
-
a = @hash["OBX"]["array"].collect {|obr| ::HL7::Message::Segment.from_hash("OBX", obr)}
|
22
|
-
a.to_enum(:each)
|
21
|
+
# a = @hash["OBX"]["array"].collect {|obr| ::HL7::Message::Segment.from_hash("OBX", obr)}
|
22
|
+
# a.to_enum(:each)
|
23
|
+
@hash["OBX"]["segment_array"].to_enum(:each)
|
23
24
|
end
|
24
25
|
|
25
26
|
def to_hash
|
@@ -18,8 +18,9 @@ module Extensions
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def obr_list
|
21
|
-
a = to_hash["OBR"]["array"].collect {|obr| ::HL7::Message::Segment.from_hash("OBR", obr)}
|
22
|
-
a.to_enum(:each)
|
21
|
+
# a = to_hash["OBR"]["array"].collect {|obr| ::HL7::Message::Segment.from_hash("OBR", obr)}
|
22
|
+
# a.to_enum(:each)
|
23
|
+
to_hash["OBR"]["segment_array"].to_enum(:each)
|
23
24
|
end
|
24
25
|
|
25
26
|
def to_hash
|
data/ruby-hl7-extensions.gemspec
CHANGED