ruby_astm 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_astm/order.rb +2 -2
- data/lib/ruby_astm/result.rb +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: 72ade802a6dc078a0d52242e6e76d6f3a2eb1be6
|
4
|
+
data.tar.gz: 58909cfdb8d0ab54b9bf363030f8025827ae314d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e188721bcbe685dbbc312f7d7dff054c571b27993a8f022866464657e1a01e54bc2469ae5e47105491c5a2eaff057713adb159a7951e0edb2ed19030c657588
|
7
|
+
data.tar.gz: 9383ecbdb2f21986b2642881871601ab0fd46848bb338a4e7ffc603b8acdbf15994cb596a710b88ec1792bdf0fac2549bd8047ab9cf4822e7e317364844b792a
|
data/lib/ruby_astm/order.rb
CHANGED
@@ -37,11 +37,11 @@ class Order
|
|
37
37
|
def initialize(args)
|
38
38
|
if args[:line]
|
39
39
|
line = args[:line]
|
40
|
-
if line.fields[2]
|
40
|
+
if !line.fields[2].strip.blank?
|
41
41
|
line.fields[2].strip.scan(/(?<specimen_id>[^\^]+)/) { |specimen_id|
|
42
42
|
self.id ||= specimen_id
|
43
43
|
}
|
44
|
-
elsif line.fields[3]
|
44
|
+
elsif !line.fields[3].strip.blank?
|
45
45
|
## for the sysmex xn-550 this is the regex.
|
46
46
|
line.fields[3].strip.scan(/(?<tube_rack>\d+\^)+(?<patient_id>.+)\^/) { |tube_rack,patient_id| self.id = patient_id.strip}
|
47
47
|
end
|
data/lib/ruby_astm/result.rb
CHANGED
@@ -11,7 +11,7 @@ class Result
|
|
11
11
|
def initialize(args)
|
12
12
|
if args[:line]
|
13
13
|
line = args[:line]
|
14
|
-
line.fields[2].scan(/\^+(?<name>[A-Za-z0-9
|
14
|
+
line.fields[2].scan(/\^+(?<name>[A-Za-z0-9\%\#-]+)\^?(?<dilution>\d+)?/) { |name,dilution|
|
15
15
|
self.name = lookup_mapping(name)
|
16
16
|
self.dilution = dilution
|
17
17
|
}
|