ruby_astm 1.1.8 → 1.1.9

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
  SHA256:
3
- metadata.gz: 844c22badb98d4a33e8ee9397925921f10749c164889671d7e9015ef12080425
4
- data.tar.gz: 25ad8a5f3235eaa4a4c02266424bb35674a1f773f574c32c539f4abb41b6c0bc
3
+ metadata.gz: 0317b5cc1b25b47af7d15db62ee7f7f6ccf6e40587ffb16643da7c9845a75d85
4
+ data.tar.gz: d5214042d72a4f3c498bca1d4565f40488374568e2fd1da917f837e51c08c5c6
5
5
  SHA512:
6
- metadata.gz: 2a20199e04e200252ba7f56e82981dce7b6b93576146cc7d582bbc4f42a14ed6fe9e1c4311feca8b428c0ecb46fb9916f7f081184626e1959ad651b1be51d27d
7
- data.tar.gz: facd490b2c2de348e6e0a8ea72d9b08e4713deda5107ccb391e311f64cfdc94077a44d67e96a5a982875524d40c11631c8a252b847b5d029a5d356dda33f0641
6
+ metadata.gz: 32b5da6d8f483aa2b4402d6c0b3a03b7f3a4b54c4006f0352bfc98fdc794e82cf5f45523a1178a63d6226a20d25e80e2d979176f1d65f34217486356a2b6bc4e
7
+ data.tar.gz: b75c3fcc0aa7b46c504d1e9b27eb40813d711ce4c85b7623e0f5aaa5b83e9f3712deaecf19c62b403af1aa0adf692740059aaef501eb86fefe133a6977b82c77
data/lib/mappings.json CHANGED
@@ -141,7 +141,7 @@
141
141
  "TUBE" : "SERUM",
142
142
  "REPORT_NAME" : "VLDL"
143
143
  },
144
- "CRE" : {
144
+ "CREAT" : {
145
145
  "LIS_CODE" : "CRE",
146
146
  "TUBE" : "SERUM",
147
147
  "REPORT_NAME" : "Creatinine"
@@ -181,12 +181,12 @@
181
181
  "TUBE" : "SERUM",
182
182
  "REPORT_NAME" : "Alkaline Phosphatase"
183
183
  },
184
- "GOTHL" : {
184
+ "GOT" : {
185
185
  "LIS_CODE" : "GOTHL",
186
186
  "TUBE" : "SERUM",
187
187
  "REPORT_NAME" : "SGOT"
188
188
  },
189
- "GPTHL" : {
189
+ "GPT" : {
190
190
  "LIS_CODE" : "GPTHL",
191
191
  "TUBE" : "SERUM",
192
192
  "REPORT_NAME" : "SGPT"
@@ -4,6 +4,7 @@ class Hl7Observation < Result
4
4
  def set_name(args)
5
5
  if line = args[:line]
6
6
  self.name = lookup_mapping(line.fields[3].strip)
7
+ self.report_name = lookup_report_name(line.fields[3].strip)
7
8
  end
8
9
  end
9
10
 
@@ -118,18 +118,31 @@ class Order
118
118
  end
119
119
 
120
120
  if (options[:machine_name] && (options[:machine_name] == "cobas-e411"))
121
+
122
+
123
+ ## remove all the non number tests, as these are not to be run on the roche system, and cause the roche machine to clam up totally if non recognized/alphabetic tests are sent to it in the response.
124
+
125
+
126
+ self.tests = self.tests.select{|c| c =~ /[0-9]+/}
127
+
121
128
  self.tests = self.tests.map{|c| c = "^^^" + c + "^1"}
122
129
  # ^^0000000387^587^0^2^^S1^SC
123
130
  id_string = options[:sequence_number] + "^" + options[:carrier_number] + "^" + options[:position_number] + "^^" + options[:sample_type] + "^" + options[:container_type]
124
131
 
125
- "O|1|#{self.id.to_s}|#{id_string}|#{self.tests.join('\\')}|#{self.priority}||#{Time.now.strftime("%Y%m%d%H%M%S")}||||A||||1||||||||||O\r"
132
+
133
+ "O|1|#{self.id.to_s}|#{id_string}|#{tests.join('\\')}|#{self.priority}||#{Time.now.strftime("%Y%m%d%H%M%S")}||||A||||1||||||||||O\r"
126
134
 
127
135
  else
128
136
 
129
- "O|#{self.sequence_number}|#{self.id}|#{Time.now.to_i.to_s}|^^^#{self.tests.join('`^^^')}|#{self.priority}||#{Time.now.strftime("%Y%m%d%H%M%S")}||||N||||#{self.specimen_type || 'SERUM'}\r"
137
+ tests = self.tests.select{|c| c =~ /[A-Z]+/}
138
+
139
+ "O|#{self.sequence_number}|#{self.id}|#{Time.now.to_i.to_s}|^^^#{tests.join('`^^^')}|#{self.priority}||#{Time.now.strftime("%Y%m%d%H%M%S")}||||N||||#{self.specimen_type || 'SERUM'}\r"
130
140
 
131
141
  end
132
142
 
143
+ ## for urine it does not get the report name.
144
+ ## so let me do one entry for urine and hemogram.
145
+
133
146
  end
134
147
 
135
148
  end
@@ -12,6 +12,7 @@ class Result
12
12
  if line = args[:line]
13
13
 
14
14
  line.fields[2].scan(/\^+(?<name>[A-Za-z0-9\%\#\-\_\?\/]+)\^?(?<dilution>\d+)?/) { |name,dilution|
15
+
15
16
  self.name = lookup_mapping(name)
16
17
 
17
18
  self.report_name = lookup_report_name(name)
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.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bhargav Raut