Skip to content
Browse files

support for PR1 segment (Procedures)

  • Loading branch information...
1 parent 3a0ef12 commit 4d362ba6ae28c09fa97afafcc59e63045cb275fe @continuouslee continuouslee committed Jul 11, 2011
Showing with 23 additions and 0 deletions.
  1. +5 −0 lib/segments/data_types.rb
  2. +18 −0 lib/segments/pr1.rb
View
5 lib/segments/data_types.rb
@@ -6,6 +6,7 @@ module HL7::Message::DataTypes
attr_reader :MSG_TYPE #MSH Segment - Message Type (009)
attr_reader :CX #Extended Composite ID with Check Digit
attr_reader :PL #Place
+ attr_reader :CE #Coded Element
def self.XPN #for HL7 v2.3
["family_name", "given_name", "middle_name", "suffix", "prefix", "degree", "name_type_code", "name_representation_code"]
@@ -35,4 +36,8 @@ def self.PL
["point_of_care", "room", "bed", "facility", "location_status", "person_location_type", "building", "floor", "location_description"]
end
+ def self.CE
+ ["identifier", "text", "name_of_coding_system", "alternate_identifier", "alternate_text", "name_of_alternate_coding_system"]
+ end
+
end
View
18 lib/segments/pr1.rb
@@ -0,0 +1,18 @@
+class HL7::Message::Segment::PR1 < HL7::Message::Segment
+ add_field :set_id
+ add_field :procedure_coding_method
+ add_field :procedure_code, :format => HL7::Message::DataTypes.CE
+ add_field :procedure_description
+ add_field :procedure_date_time
+ add_field :procedure_functional_type
+ add_field :procedure_minutes
+ add_field :anesthesiologist, :format => HL7::Message::DataTypes.XCN
+ add_field :anesthesia_code
+ add_field :anesthesia_minutes
+ add_field :surgeon, :format => HL7::Message::DataTypes.XCN
+ add_field :procedure_practitioner, :format => HL7::Message::DataTypes.XCN
+ add_field :consent_code, :format => HL7::Message::DataTypes.CE
+ add_field :procedure_priority
+ add_field :associated_diagnosis_code, :format => HL7::Message::DataTypes.CE
+ add_field :procedure_code_modifier, :format => HL7::Message::DataTypes.CE
+end

0 comments on commit 4d362ba

Please sign in to comment.
Something went wrong with that request. Please try again.