ruby-hl7-extensions 0.0.67 → 0.0.68

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dae209c451eec627537a3f3230d3659d6fad922a
4
- data.tar.gz: 24c40e32cff1e0fdb5519ff53cf6cab8c768b4f3
3
+ metadata.gz: 80780b36f304c818e8e2572103486dcbb4e5af7a
4
+ data.tar.gz: 61ffaac9fb6ff87b72050a39525366eaa2281de7
5
5
  SHA512:
6
- metadata.gz: da4dfa5c9b76626708fa773a2079d8a0c045d1985bb434338966ddb1a91523a343503f855d5ea579625f179de13f94b19ef471f05c39d15fc81730cc331b41ac
7
- data.tar.gz: 2f4522e1c5b7ba49539ab328865aa565d212cda2a87736d60173de15032eccfb3965d8c6468a8547e243ed5453fa55b08c55e0143f55325cea4093baaa991e81
6
+ metadata.gz: 1ed0012cdc06979f9c7a663b1793efa195a8ddde23e6149899eaa350318aba3406f7b9fe27f1434c246a79a036701df6373bb467438276800ee06a8ff48066d5
7
+ data.tar.gz: 416453d172242c98fbfc4cd2c40a10b88875137f10ac6a1dd6d8c7acb4c4af912566b58b78c095605abd02910b4b1801388d76987fd8c0a7f5283e18f1bf6acc
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.67
1
+ 0.0.68
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 0
4
- :patch: 67
4
+ :patch: 68
@@ -66,15 +66,15 @@ module Extensions
66
66
  end
67
67
 
68
68
  def obr_list
69
- # segments_for(:OBR).to_enum(:each)
70
- a = hash["message"]["content"]["OBR"]["array"].collect {|obr| ::HL7::Message::Segment.from_hash("OBR", obr)}
71
- a.to_enum(:each)
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
- # segments_for(:OBR).to_enum(:each)
76
- a = hash["message"]["content"]["ORC"]["array"].collect {|orc| ::HL7::Message::Segment.from_hash("ORC", orc)}
77
- a.to_enum(:each)
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
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby-hl7-extensions"
6
- s.version = "0.0.67"
6
+ s.version = "0.0.68"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-hl7-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.67
4
+ version: 0.0.68
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Lega