ruby_astm 1.2.9 → 1.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c73b81bdfca318caa0bb348e67c8fd87f01c3c1838a359ccde6c01fbb8d28ffa
4
- data.tar.gz: 7f8a5e1e5aa5993a9d355e4dc10d6bf0c13ffee76c6cd1866ca2693ab6a26f7f
3
+ metadata.gz: a276eabf353e3d09a9b132f167cca51b1d0bb0c85da34b5cf4474ae70b3412ae
4
+ data.tar.gz: 6ba7b3e47712630c7276ec3d25bf66bc2b40cbc8a7c512bd015aa8ea9d2c39f3
5
5
  SHA512:
6
- metadata.gz: acedba95a9ed8ee9da0ad7ae2a74b86148c3a274c6c91b1e32b514347d5071f2e52ef24e6b2bdf790e5bd13335639a40b335bf51b07740ea203842ccfcd65f26
7
- data.tar.gz: ccd09a01fb4f99a7bbe974da0c989d0d99045c7695c69388e448821a8cee8f18fb3dce9f050a567fe87968318c20383f4cfe133ce51e4a05663a5bb9a9f344e7
6
+ metadata.gz: cece9db47a72baf428e6e3db8c47c7f253f4a4428e1ce9671cc1012f80b59166a50c4388192a85e9a9b4aecc61ac559105cdb46c164bc077ef840d81a1f3b572
7
+ data.tar.gz: 90afe5cdfbea386175f45044e17b7455cf11fd628d961054327781813e48280325fcedcfc40cf77d609b0c4e1d4417867545e6fdc8a40d5604c704bc99b4bf79
@@ -303,10 +303,12 @@ module LabInterface
303
303
  self.headers ||= []
304
304
  self.headers << hl7_header
305
305
  when "Hl7_Observation"
306
- unless self.headers[-1].patients.blank?
307
- unless self.headers[-1].patients[-1].orders[-1].blank?
308
- hl7_observation = Hl7Observation.new({:line => line})
309
- self.headers[-1].patients[-1].orders[-1].results[hl7_observation.name] ||= hl7_observation
306
+ unless self.headers.blank?
307
+ unless self.headers[-1].patients.blank?
308
+ unless self.headers[-1].patients[-1].orders[-1].blank?
309
+ hl7_observation = Hl7Observation.new({:line => line})
310
+ self.headers[-1].patients[-1].orders[-1].results[hl7_observation.name] ||= hl7_observation
311
+ end
310
312
  end
311
313
  end
312
314
  when "Hl7_Patient"
@@ -325,21 +327,37 @@ module LabInterface
325
327
  when "Query"
326
328
  puts "got query"
327
329
  query = Query.new({:line => line})
328
- self.headers[-1].queries << query
330
+ unless self.headers.blank?
331
+ self.headers[-1].queries << query
332
+ end
329
333
  when "Patient"
330
334
  puts "got patient."
331
335
  patient = Patient.new({:line => line})
332
- self.headers[-1].patients << patient
336
+ unless self.headers.blank?
337
+ self.headers[-1].patients << patient
338
+ end
333
339
  when "Order"
334
340
  order = Order.new({:line => line})
335
- self.headers[-1].patients[-1].orders << order
341
+ unless self.headers.blank?
342
+ unless self.headers[-1].patients.blank?
343
+ self.headers[-1].patients[-1].orders << order
344
+ end
345
+ end
336
346
  when "Result"
337
347
  result = Result.new({:line => line})
338
- self.headers[-1].patients[-1].orders[-1].results[result.name] ||= result
348
+ unless self.headers.blank?
349
+ unless self.headers[-1].patients.blank?
350
+ unless self.headers[-1].patients[-1].orders[-1].blank?
351
+ self.headers[-1].patients[-1].orders[-1].results[result.name] ||= result
352
+ end
353
+ end
354
+ end
339
355
  when "Terminator"
340
356
  ## it didn't terminate so there was no commit being called.
341
- puts "got terminator."
342
- self.headers[-1].commit
357
+ unless self.headers.blank?
358
+ puts "got terminator."
359
+ self.headers[-1].commit
360
+ end
343
361
  end
344
362
  end
345
363
 
@@ -89,6 +89,8 @@ class Query
89
89
  puts "sample ids are:"
90
90
  puts self.sample_ids
91
91
 
92
+ return responses unless sample_ids
93
+
92
94
  self.sample_ids.each_with_index {|sid,key|
93
95
  puts "doing sample id: #{sid}"
94
96
  ## tests are got from the requisitions hash.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_astm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.9
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bhargav Raut