Class: LIS::Message::Order

Inherits:
Base
  • Object
show all
Defined in:
lib/lis/messages/order.rb

Overview

Order Message

Defines which test, such as TSH or HCG, should be performed on the sample for a particular accession number.

Message Examples

3O|1|1550623||^^^LH|R|19931011091233|19931011091233

6O|1|130000724||^^^E2|||19950118122000

6O|1|66412558||^^^HCG|||200011081530||||||Normal|||||||||||E0872

1O|1|09861081||^^^TSH|R|||||||||||||||||||E0872

Message Structure

  1. Record Type (O)

  2. Sequence#

  3. Specimen ID (Accession#)

  4. Instrument Specimen ID

  5. Universal Test ID

  6. Priority

  7. Order Date/Time

  8. Collection Date/Time

  9. Collection End Time

  10. Collection Volume

  11. Collector ID

  12. Action Code

  13. Danger Code

  14. Relevant Clinical Info

  15. Date/Time Specimen Received

  16. Specimen Descriptor,Specimen Type,Specimen Source

  17. Ordering Physician

  18. Physician's Telephone Number

  19. User Field No.1

  20. User Field No.2

  21. Lab Field No.1

  22. Lab Field No.2

  23. Date/Time results reported or last modified

  24. Instrument Charge to Computer System

  25. Instrument Section ID

  26. Report Types

  27. Reserved Field

  28. Location or ward of Specimen Collection

  29. Nosocomial Infection Flag

  30. Specimen Service

  31. Specimen Institution

Constant Summary

Constants included from ClassMethods

ClassMethods::CONVERSION_WRITER

Instance Method Summary collapse

Methods inherited from Base

from_string, #to_message, #type_id

Methods included from ClassMethods

#default_fields, #field_count, #get_field_attributes, #get_index_for, #has_field, #set_field_attributes, #set_index_for, #type_id

Constructor Details

#initialize(sequence_number, specimen_id, universal_test_id) ⇒ Order



74
75
76
77
78
# File 'lib/lis/messages/order.rb', line 74

def initialize(sequence_number, specimen_id, universal_test_id)
  self.sequence_number = sequence_number
  self.specimen_id = specimen_id
  self.universal_test_id = universal_test_id
end

Instance Method Details

#universal_test_idObject



80
81
82
# File 'lib/lis/messages/order.rb', line 80

def universal_test_id
  self.universal_test_id_internal.gsub(/\^/,"")
end

#universal_test_id=(val) ⇒ Object



83
84
85
# File 'lib/lis/messages/order.rb', line 83

def universal_test_id=(val)
  self.universal_test_id_internal = "^^^#{val}"
end