ruby-hl7-extensions 0.0.60 → 0.0.61

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,40 +14,46 @@ module Extensions
14
14
  end
15
15
 
16
16
  def to_hash
17
+ return @hash if @hash
18
+
19
+ @hash = super.to_hash
20
+
17
21
  identifier = self.observation_id.split("^") rescue Array.new(10) {|i|""}
18
22
  producer = self.producer_id.split("^") rescue Array.new(10) {|i|""}
19
23
  responsibleObserver = self.responsible_observer rescue Array.new(10) {|i|""}
20
- @hash = {"setId" => self.set_id,
21
- "valueType" => self.value_type,
22
- "identifier" => {
23
- "id" => identifier[0],
24
- "text" => identifier[1],
25
- "codingSystem" => identifier[2],
26
- "alternateId" => identifier[3],
27
- "alternateText" => identifier[4],
28
- "alternateCodingSystem" => identifier[5]
29
- },
30
- "subId" => self.observation_sub_id,
31
- "observationValue" => self.observation_value,
32
- "units" => self.units,
33
- "referenceRange" => self.references_range,
34
- "abnormalFlags" => self.abnormal_flags,
35
- "probability" => self.probability,
36
- "natureOfAbnormal" => self.nature_of_abnormal_test,
37
- "observeResultStatus" => self.observation_result_status,
38
- "effectiveDateLastNormalValue" => self.effective_date_of_reference_range,
39
- "definedAccessChecks" => self.user_defined_access_checks,
40
- "observationDate" => self.observation_date,
41
- "producerId" => {
42
- "identifier" => producer[0],
43
- "text" => producer[1]
44
- },
45
- "responsibleObserver" => {
46
- "id" => responsibleObserver[0],
47
- "lastName" => responsibleObserver[1],
48
- "firstName" => responsibleObserver[2]
49
- },
50
- "method" => self.observation_method}
24
+ @hash.merge!({"setId" => self.set_id,
25
+ "valueType" => self.value_type,
26
+ "identifier" => {
27
+ "id" => identifier[0],
28
+ "text" => identifier[1],
29
+ "codingSystem" => identifier[2],
30
+ "alternateId" => identifier[3],
31
+ "alternateText" => identifier[4],
32
+ "alternateCodingSystem" => identifier[5]
33
+ },
34
+ "subId" => self.observation_sub_id,
35
+ "observationValue" => self.observation_value,
36
+ "units" => self.units,
37
+ "referenceRange" => self.references_range,
38
+ "abnormalFlags" => self.abnormal_flags,
39
+ "probability" => self.probability,
40
+ "natureOfAbnormal" => self.nature_of_abnormal_test,
41
+ "observeResultStatus" => self.observation_result_status,
42
+ "effectiveDateLastNormalValue" => self.effective_date_of_reference_range,
43
+ "definedAccessChecks" => self.user_defined_access_checks,
44
+ "observationDate" => self.observation_date,
45
+ "producerId" => {
46
+ "identifier" => producer[0],
47
+ "text" => producer[1]
48
+ },
49
+ "responsibleObserver" => {
50
+ "id" => responsibleObserver[0],
51
+ "lastName" => responsibleObserver[1],
52
+ "firstName" => responsibleObserver[2]
53
+ },
54
+ "method" => self.observation_method})
55
+
56
+ @hash
51
57
  end
52
58
  end
53
59
 
@@ -21,6 +21,8 @@ module Extensions
21
21
  def to_hash
22
22
  return @hash if @hash
23
23
 
24
+ @hash = super.to_hash
25
+
24
26
  placer_order_number = self.placer_order_number.split("^") rescue Array.new(10) {|i|""}
25
27
  filler_order_number = self.filler_order_number.split("^") rescue Array.new(10) {|i|""}
26
28
  placer_group_number = self.placer_group_number.split("^") rescue Array.new(10) {|i|""}
@@ -28,63 +30,65 @@ module Extensions
28
30
  parent = self.parent..split("^") rescue Array.new(20) {|i|""}
29
31
  orderingProvider = self.ordering_provider.split("^") rescue Array.new(20) {|i|""}
30
32
 
31
- @hash = {"orderControl" => self.order_control,
32
- "placerOrderNumber" => {"entityIdentifier" => placer_order_number[0],
33
- "namespaceID" => placer_order_number[1],
34
- "universalID" => placer_order_number[2],
35
- "universalIDType" => placer_order_number[3]},
36
- "fillerOrderNumber" => {"entityIdentifier" => filler_order_number[0],
37
- "namespaceID" => filler_order_number[1],
38
- "universalID" => filler_order_number[2],
39
- "universalIDType" => filler_order_number[3]},
40
- "placerGroupNumber" => {"entityIdentifier" => placer_group_number[0],
41
- "namespaceID" => placer_group_number[1],
42
- "universalID" => placer_group_number[2],
43
- "universalIDType" => placer_group_number[3]},
44
- "orderStatus" => self.order_status,
45
- "responseFlag" => self.response_flag,
46
- "quantityTiming" => {"quantity" => quantity_timing[0], "interval" => quantity_timing[1], "duration" => quantity_timing[2],
47
- "startDateTime" => quantity_timing[3], "endDateTime" => quantity_timing[4], "priority" => quantity_timing[5],
48
- "condition" => quantity_timing[6], "text" => quantity_timing[7], "conjunction" => quantity_timing[8], "orderSequencing" => quantity_timing[9]},
49
- "parent" => self.parent,
50
- "dateTimeOfTransaction" => self.date_time_of_transaction,
51
- "enteredBy" => self.entered_by,
52
- "verifiedBy" => self.verified_by,
53
- "orderingProvider" => {"id" => orderingProvider[0],
54
- "lastName" => orderingProvider[1],
55
- "firstName" => orderingProvider[2],
56
- "middleInitOrName" => orderingProvider[3],
57
- "suffix" => orderingProvider[4],
58
- "prefix" => orderingProvider[5],
59
- "degree" => orderingProvider[6],
60
- "sourceTable" => orderingProvider[7],
61
- "assigningAuthority" => orderingProvider[8],
62
- "nameTypeCode" => orderingProvider[9],
63
- "identifierCheckDigit" => orderingProvider[10],
64
- "checkDigitScheme" => orderingProvider[11],
65
- "idTypeCode" => orderingProvider[12],
66
- "isTypeCode" => orderingProvider[13],
67
- "assigningFacility" => orderingProvider[14],
68
- "providerType" => "OP"},
69
- "enterersLocation" => self.enterers_location,
70
- "callBackPhoneNumber" => self.call_back_phone_number,
71
- "orderEffectiveDateTime" => self.order_effective_date_time,
72
- "orderControlCodeReason" => self.order_control_code_reason,
73
- "enteringOrganization" => self.entering_organization,
74
- "enteringDevice" => self.entering_device,
75
- "actionBy" => self.action_by,
76
- "advancedBeneficiaryNoticeCode" => self.advanced_beneficiary_notice_code,
77
- "orderingFacilityName" => self.ordering_facility_name,
78
- "orderingFacilityAddress" => self.ordering_facility_address,
79
- "orderingFacilityPhoneNumber" => self.ordering_facility_phone_number,
80
- "orderingProviderAddress" => self.ordering_provider_address,
81
- "orderStatusModifier" => self.order_status_modifier,
82
- "advancedBeneficiaryNoticeOverrideReason" => self.advanced_beneficiary_notice_override_reason,
83
- "fillersExpectedAvailabilityDateTime" => self.fillers_expected_availability_date_time,
84
- "confidentialityCode" => self.confidentiality_code,
85
- "orderType" => self.order_type,
86
- "entererAuthorizationMode" => self.enterer_authorization_mode,
87
- "parentUniversalServiceIdentifier" => self.parent_universal_service_identifier}
33
+ @hash.merge!({"orderControl" => self.order_control,
34
+ "placerOrderNumber" => {"entityIdentifier" => placer_order_number[0],
35
+ "namespaceID" => placer_order_number[1],
36
+ "universalID" => placer_order_number[2],
37
+ "universalIDType" => placer_order_number[3]},
38
+ "fillerOrderNumber" => {"entityIdentifier" => filler_order_number[0],
39
+ "namespaceID" => filler_order_number[1],
40
+ "universalID" => filler_order_number[2],
41
+ "universalIDType" => filler_order_number[3]},
42
+ "placerGroupNumber" => {"entityIdentifier" => placer_group_number[0],
43
+ "namespaceID" => placer_group_number[1],
44
+ "universalID" => placer_group_number[2],
45
+ "universalIDType" => placer_group_number[3]},
46
+ "orderStatus" => self.order_status,
47
+ "responseFlag" => self.response_flag,
48
+ "quantityTiming" => {"quantity" => quantity_timing[0], "interval" => quantity_timing[1], "duration" => quantity_timing[2],
49
+ "startDateTime" => quantity_timing[3], "endDateTime" => quantity_timing[4], "priority" => quantity_timing[5],
50
+ "condition" => quantity_timing[6], "text" => quantity_timing[7], "conjunction" => quantity_timing[8], "orderSequencing" => quantity_timing[9]},
51
+ "parent" => self.parent,
52
+ "dateTimeOfTransaction" => self.date_time_of_transaction,
53
+ "enteredBy" => self.entered_by,
54
+ "verifiedBy" => self.verified_by,
55
+ "orderingProvider" => {"id" => orderingProvider[0],
56
+ "lastName" => orderingProvider[1],
57
+ "firstName" => orderingProvider[2],
58
+ "middleInitOrName" => orderingProvider[3],
59
+ "suffix" => orderingProvider[4],
60
+ "prefix" => orderingProvider[5],
61
+ "degree" => orderingProvider[6],
62
+ "sourceTable" => orderingProvider[7],
63
+ "assigningAuthority" => orderingProvider[8],
64
+ "nameTypeCode" => orderingProvider[9],
65
+ "identifierCheckDigit" => orderingProvider[10],
66
+ "checkDigitScheme" => orderingProvider[11],
67
+ "idTypeCode" => orderingProvider[12],
68
+ "isTypeCode" => orderingProvider[13],
69
+ "assigningFacility" => orderingProvider[14],
70
+ "providerType" => "OP"},
71
+ "enterersLocation" => self.enterers_location,
72
+ "callBackPhoneNumber" => self.call_back_phone_number,
73
+ "orderEffectiveDateTime" => self.order_effective_date_time,
74
+ "orderControlCodeReason" => self.order_control_code_reason,
75
+ "enteringOrganization" => self.entering_organization,
76
+ "enteringDevice" => self.entering_device,
77
+ "actionBy" => self.action_by,
78
+ "advancedBeneficiaryNoticeCode" => self.advanced_beneficiary_notice_code,
79
+ "orderingFacilityName" => self.ordering_facility_name,
80
+ "orderingFacilityAddress" => self.ordering_facility_address,
81
+ "orderingFacilityPhoneNumber" => self.ordering_facility_phone_number,
82
+ "orderingProviderAddress" => self.ordering_provider_address,
83
+ "orderStatusModifier" => self.order_status_modifier,
84
+ "advancedBeneficiaryNoticeOverrideReason" => self.advanced_beneficiary_notice_override_reason,
85
+ "fillersExpectedAvailabilityDateTime" => self.fillers_expected_availability_date_time,
86
+ "confidentialityCode" => self.confidentiality_code,
87
+ "orderType" => self.order_type,
88
+ "entererAuthorizationMode" => self.enterer_authorization_mode,
89
+ "parentUniversalServiceIdentifier" => self.parent_universal_service_identifier})
90
+
91
+ @hash
88
92
  end
89
93
  end
90
94
 
@@ -14,14 +14,6 @@ module Extensions
14
14
  to_hash["visit"]["id"]
15
15
  end
16
16
 
17
- def provider_hash(provider_type, provider_code)
18
- if to_hash["#{provider_type}Provider"]
19
- to_hash["#{provider_type}Provider"].merge("providerType" => provider_code)
20
- else
21
- {}
22
- end
23
- end
24
-
25
17
  def to_hash
26
18
  return @hash if @hash
27
19
 
@@ -128,17 +120,17 @@ module Extensions
128
120
  end
129
121
 
130
122
  module ClassMethods
131
- def mappings
132
- {metadata: {segment_code: "pv1", display_name: "Patient Visit"},
133
- fields: [{field_name: "Patient Class", type: "String", field_code: "2"},
134
- {field_name: "Point of Care", type: "String", field_code: "3.1"},
135
- {field_name: "Facility", type: "String", field_code: "3.4"},
136
- {field_name: "Floor", type: "String", field_code: "3.8"},
137
- {field_name: "Admission Type", type: "String", field_code: "4"},
138
- {field_name: "Preadmit Number ID", type: "String", field_code: "5.1"},
139
- {field_name: "Visit Number ID", type: "String", field_code: "19.1"}]
140
- }
141
- end
123
+ # def mappings
124
+ # {metadata: {segment_code: "pv1", display_name: "Patient Visit"},
125
+ # fields: [{field_name: "Patient Class", type: "String", field_code: "2"},
126
+ # {field_name: "Point of Care", type: "String", field_code: "3.1"},
127
+ # {field_name: "Facility", type: "String", field_code: "3.4"},
128
+ # {field_name: "Floor", type: "String", field_code: "3.8"},
129
+ # {field_name: "Admission Type", type: "String", field_code: "4"},
130
+ # {field_name: "Preadmit Number ID", type: "String", field_code: "5.1"},
131
+ # {field_name: "Visit Number ID", type: "String", field_code: "19.1"}]
132
+ # }
133
+ # end
142
134
  end
143
135
 
144
136
  end
@@ -18,6 +18,12 @@ class HL7::Message::Segment::ROL < HL7::Message::Segment
18
18
  add_field :provider_info
19
19
  add_field :phone
20
20
 
21
+ def to_hash
22
+ return @hash if @hash
23
+ @hash = super.to_hash
24
+ @hash
25
+ end
26
+
21
27
  def person_hash
22
28
  person = self.role_person.split(self.item_delim) rescue Array.new(20) {|i|""}
23
29
 
@@ -17,7 +17,6 @@
17
17
  #
18
18
 
19
19
  require 'ruby-hl7'
20
- require 'core_ext/values/msh'
21
20
  require 'core_ext/message'
22
21
  require 'core_ext/segment'
23
22
  require 'core_ext/segments/segments'
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "ruby-hl7-extensions"
6
- s.version = "0.0.60"
6
+ s.version = "0.0.61"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.require_paths = ["lib"]
@@ -12,8 +12,7 @@ Gem::Specification.new do |s|
12
12
  s.description = "A simple library to parse and generate HL7 2.x json"
13
13
  s.email = "ruby-hl7-json@googlegroups.com"
14
14
  s.extra_rdoc_files = ["LICENSE", "README.md"]
15
- s.files = [".gitignore", "Gemfile", "Gemfile.lock", "LICENSE", "README.md", "Rakefile", "VERSION", "VERSION.yml",
16
- "lib/core_ext/values/msh.rb","lib/core_ext/segments/rol.rb",
15
+ s.files = [".gitignore", "Gemfile", "Gemfile.lock", "LICENSE", "README.md", "Rakefile", "VERSION", "VERSION.yml", "lib/core_ext/segments/rol.rb",
17
16
  "lib/core_ext/message.rb", "lib/core_ext/segment.rb",
18
17
  "lib/core_ext/segments/msh.rb", "lib/core_ext/segments/nk1.rb", "lib/core_ext/segments/orc.rb", "lib/core_ext/segments/nte.rb", "lib/core_ext/segments/obr.rb", "lib/core_ext/segments/obx.rb", "lib/core_ext/segments/pid.rb", "lib/core_ext/segments/pv1.rb", "lib/core_ext/segments/segments.rb",
19
18
  "lib/ruby-hl7-extensions.rb", "ruby-hl7-extensions.gemspec"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-hl7-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.60
4
+ version: 0.0.61
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Lega
@@ -66,7 +66,6 @@ files:
66
66
  - lib/core_ext/segments/pv1.rb
67
67
  - lib/core_ext/segments/rol.rb
68
68
  - lib/core_ext/segments/segments.rb
69
- - lib/core_ext/values/msh.rb
70
69
  - lib/ruby-hl7-extensions.rb
71
70
  - ruby-hl7-extensions.gemspec
72
71
  homepage: http://github.com/nmlynl/ruby-hl7-extensions
@@ -1,420 +0,0 @@
1
- module Values
2
- module MSH
3
- EVENT_TYPES = [
4
- ["A01","ADT/ACK - Admit/visit notification"],
5
- ["A02","ADT/ACK - Transfer a patient"],
6
- ["A03","ADT/ACK - Discharge/end visit"],
7
- ["A04","ADT/ACK - Register a patient"],
8
- ["A05","ADT/ACK - Pre-admit a patient"],
9
- ["A06","ADT/ACK - Change an outpatient to an inpatient"],
10
- ["A07","ADT/ACK - Change an inpatient to an outpatient"],
11
- ["A08","ADT/ACK - Update patient information"],
12
- ["A09","ADT/ACK - Patient departing - tracking"],
13
- ["A10","ADT/ACK - Patient arriving - tracking"],
14
- ["A11","ADT/ACK - Cancel admit/visit notification"],
15
- ["A12","ADT/ACK - Cancel transfer"],
16
- ["A13","ADT/ACK - Cancel discharge/end visit"],
17
- # ["A14","ADT/ACK - Pending admit"],
18
- # ["A15","ADT/ACK - Pending transfer"],
19
- # ["A16","ADT/ACK - Pending discharge"],
20
- # ["A17","ADT/ACK - Swap patients"],
21
- # ["A18","ADT/ACK - Merge patient information (for backward compatibility only)"],
22
- # ["A19","QRY/ADR - Patient query"],
23
- # ["A20","ADT/ACK - Bed status update"],
24
- # ["A21","ADT/ACK - Patient goes on a “leave of absence”"],
25
- # ["A22","ADT/ACK - Patient returns from a “leave of absence”"],
26
- # ["A23","ADT/ACK - Delete a patient record"],
27
- # ["A24","ADT/ACK - Link patient information"],
28
- # ["A25","ADT/ACK - Cancel pending discharge"],
29
- # ["A26","ADT/ACK - Cancel pending transfer"],
30
- # ["A27","ADT/ACK - Cancel pending admit"],
31
- # ["A28","ADT/ACK - Add person information"],
32
- # ["A29","ADT/ACK - Delete person information"],
33
- # ["A30","ADT/ACK - Merge person information"],
34
- # ["A31","ADT/ACK - Update person information"],
35
- # ["A32","ADT/ACK - Cancel patient arriving"],
36
- # ["A33","ADT/ACK - Cancel patient departing"],
37
- # ["A34","ADT/ACK - Merge patient information - patient ID only (for backward compatibility only)"],
38
- # ["A35","ADT/ACK - Merge patient information - account number only (for backward compatibility only)"],
39
- # ["A36","ADT/ACK - Merge patient information - patient ID and account number (for backward compatibility only)"],
40
- # ["A37","ADT/ACK - Unlink patient information"],
41
- # ["A38","ADT/ACK - Cancel pre-admit"],
42
- # ["A39","ADT/ACK - Merge person - patient ID (for backward compatibility only)"],
43
- # ["A40","ADT/ACK - Merge patient - patient identifier list"],
44
- # ["A41","ADT/ACK - Merge account - patient account number"],
45
- # ["A42","ADT/ACK - Merge visit - visit number"],
46
- # ["A43","ADT/ACK - Move patient information - patient identifier list"],
47
- # ["A44","ADT/ACK - Move account information - patient account number"],
48
- # ["A45","ADT/ACK - Move visit information - visit number"],
49
- # ["A46","ADT/ACK - Change patient ID (for backward compatibility only)"],
50
- # ["A47","ADT/ACK - Change patient identifier list"],
51
- # ["A48","ADT/ACK - Change alternate patient ID (for backward compatibility only)"],
52
- # ["A49","ADT/ACK - Change patient account number"],
53
- # ["A50","ADT/ACK - Change visit number"],
54
- # ["A51","ADT/ACK - Change alternate visit ID"],
55
- # ["A52","ADT/ACK - Cancel leave of absence for a patient"],
56
- # ["A53","ADT/ACK - Cancel patient returns from a leave of absence"],
57
- # ["A54","ADT/ACK - Change attending doctor"],
58
- # ["A55","ADT/ACK - Cancel change attending doctor"],
59
- # ["A60","ADT/ACK - Update allergy information"],
60
- # ["A61","ADT/ACK - Change consulting doctor"],
61
- # ["A62","ADT/ACK - Cancel change consulting doctor"],
62
- # ["B01","PMU/ACK - Add personnel record"],
63
- # ["B02","PMU/ACK - Update personnel record"],
64
- # ["B03","PMU/ACK - Delete personnel re cord"],
65
- # ["B04","PMU/ACK - Active practicing person"],
66
- # ["B05","PMU/ACK - Deactivate practicing person"],
67
- # ["B06","PMU/ACK - Terminate practicing person"],
68
- # ["B07","PMU/ACK - Grant Certificate/Permission"],
69
- # ["B08","PMU/ACK - Revoke Certificate/Permission"],
70
- # ["C01","CRM - Register a patient on a clinical trial"],
71
- # ["C02","CRM - Cancel a patient registration on clinical trial (for clerical mistakes only)"],
72
- # ["C03","CRM - Correct/update registration information"],
73
- # ["C04","CRM - Patient has gone off a clinical trial"],
74
- # ["C05","CRM - Patient enters phase of clinical trial"],
75
- # ["C06","CRM - Cancel patient entering a phase (clerical mistake)"],
76
- # ["C07","CRM - Correct/update phase information"],
77
- # ["C08","CRM - Patient has gone off phase of clinical trial"],
78
- # ["C09","CSU - Automated time intervals for reporting, like monthly"],
79
- # ["C10","CSU - Patient completes the clinical trial"],
80
- # ["C11","CSU - Patient completes a phase of the clinical trial"],
81
- # ["C12","CSU - Update/correction of patient order/result information"],
82
- # ["CNQ","Cancel Query"],
83
- # ["I01","RQI/RPI - Request for insurance information"],
84
- # ["I02","RQI/RPL - Request/receipt of patient selection display list"],
85
- # ["I03","RQI/RPR - Request/receipt of patient selection list"],
86
- # ["I04","RQD/RPI - Request for patient demographic data"],
87
- # ["I05","RQC/RCI - Request for patient clinical information"],
88
- # ["I06","RQC/RCL - Request/receipt of clinical data listing"],
89
- # ["I07","PIN/ACK - Unsolicited insurance information"],
90
- # ["I08","RQA/RPA - Request for treatment authorization information"],
91
- # ["I09","RQA/RPA - Request for modification to an authorization"],
92
- # ["I10","RQA/RPA - Request for resubmission of an authorization"],
93
- # ["I11","RQA/RPA - Request for cancellation of an authorization"],
94
- # ["I12","REF/RRI - Patient referral"],
95
- # ["I13","REF/RRI - Modify patient referral"],
96
- # ["I14","REF/RRI - Cancel patient referral"],
97
- # ["I15","REF/RRI - Request patient referral status"],
98
- # ["J01","QCN/ACK - Cancel query/acknowledge message"],
99
- # ["J02","QSX/ACK - Cancel subscription/acknowledge message"],
100
- # ["K11","RSP - Segment pattern response in response to QBP^Q11"],
101
- # ["K13","RTB - Tabular response in response to QBP^Q13"],
102
- # ["K15","RDY - Display response in response to QBP^Q15"],
103
- # ["K21","RSP - Get person demographics response"],
104
- # ["K22","RSP - Find candidates response"],
105
- # ["K23","RSP - Get corresponding identifiers response"],
106
- # ["K24","RSP - Allocate identifiers response"],
107
- # ["K25","RSP - Personnel Information by Segment Response"],
108
- # ["K31","RSP - Dispense History"],
109
- # ["M01","MFN/MFK - Master file not otherwise specified ( for backward compatibility only )"],
110
- # ["M02","MFN/MFK - Master file - staff practitioner"],
111
- # ["M03","MFN/MFK - Master file - test/observation ( for backward compatibility only )"],
112
- # ["M04","MFN/MFK - Master files charge description"],
113
- # ["M05","MFN/MFK - Patient location master file"],
114
- # ["M06","MFN/MFK - Clinical study with phases and schedules master file"],
115
- # ["M07","MFN/MFK - Clinical study without phases but with schedules master file"],
116
- # ["M08","MFN/MFK - Test/observation (numeric) master file"],
117
- # ["M09","MFN/MFK - Test/observation (categorical) master file"],
118
- # ["M10","MFN/MFK - Test /observation batteries master file"],
119
- # ["M11","MFN/MFK - Test/calculated observations master file"],
120
- # ["M12","MFN/MFK - Master file notification message"],
121
- # ["M13","MFN/MFK - Master file notification - general"],
122
- # ["M14","MFN/MFK - Master file notification - site defined"],
123
- # ["M15","MFN/MFK - Inventory item master file notification"],
124
- # ["N01","NMQ/NMR - Application management query message"],
125
- # ["N02","NMD/ACK - Application management data message (unsolicited)"],
126
- ["O01","ORM - Order message (also RDE, RDS, RGV, RAS)"],
127
- # ["O02","ORR - Order response (also RRE, RRD, RRG, RRA)"],
128
- # ["O03","OMD - Diet order"],
129
- # ["O04","ORD - Diet order acknowledgment"],
130
- # ["O05","OMS - Stock requisition order"],
131
- # ["O06","ORS - Stock requisition acknowledgment"],
132
- # ["O07","OMN - Non-stock requisition order"],
133
- # ["O08","ORN - Non-stock requisition acknowledgment"],
134
- # ["O09","OMP - Pharmacy/treatment order"],
135
- # ["O10","ORP - Pharmacy/treatment order acknowledgment"],
136
- # ["O11","RDE - Pharmacy/treatment encoded order"],
137
- # ["O12","RRE - Pharmacy/treatment encoded order acknowledgment"],
138
- # ["O13","RDS - Pharmacy/treatment dispense"],
139
- # ["O14","RRD - Pharmacy/treatment dispense acknowledgment"],
140
- # ["O15","RGV - Pharmacy/treatment give"],
141
- # ["O16","RRG - Pharmacy/treatment give acknowledgment"],
142
- # ["O17","RAS - Pharmacy/treatment administration"],
143
- # ["O18","RRA - Pharmacy/treatment administration acknowledgment"],
144
- # ["O19","OMG - General clinical order"],
145
- # ["O20","ORG/ORL - General clinical order response"],
146
- # ["O21","OML - Laboratory order"],
147
- # ["O22","ORL - General laboratory order response message to any OML"],
148
- # ["O23","OMI - Imaging order"],
149
- # ["O24","ORI - Imaging order response message to any OMI"],
150
- # ["O25","RDE - Pharmacy/treatment refill authorization request"],
151
- # ["O26","RRE - Pharmacy/Treatment Refill Authorization Acknowledgement"],
152
- # ["O27","OMB - Blood product order"],
153
- # ["O28","ORB - Blood product order acknowledgment"],
154
- # ["O29","BPS - Blood product dispense status"],
155
- # ["O30","BRP - Blood product dispense status acknowledgment"],
156
- # ["O31","BTS - Blood product transfusion/disposition"],
157
- # ["O32","BRT - Blood product transfusion/disposition acknowledgment"],
158
- # ["O33","OML - Laboratory order for multiple orders related to a single specimen"],
159
- # ["O34","ORL - Laboratory order response message to a multiple order related to single specimen OML"],
160
- # ["O35","OML - Laboratory order for multiple orders related to a single container of a specimen"],
161
- # ["O36","ORL - Laboratory order response message to a single container of a specimen OML"],
162
- # ["P01","BAR/ACK - Add patient accounts"],
163
- # ["P02","BAR/ACK - Purge patient accounts"],
164
- # ["P03","DFT/ACK - Post detail financial transaction"],
165
- # ["P04","QRY/DSP - Generate bill and A/R statements"],
166
- # ["P05","BAR/ACK - Update account"],
167
- # ["P06","BAR/ACK - End account"],
168
- # ["P07","PEX - Unsolicited initial individual product experience report"],
169
- # ["P08","PEX - Unsolicited update individual product experience report"],
170
- # ["P09","SUR - Summary product experience report"],
171
- # ["P10","BAR/ACK -Transmit Ambulatory Payment Classification(APC)"],
172
- # ["P11","DFT/ACK - Post Detail Financial Transactions - New"],
173
- # ["P12","BAR/ACK - Update Diagnosis/Procedure"],
174
- # ["PC1","PPR - PC/ problem add"],
175
- # ["PC2","PPR - PC/ problem update"],
176
- # ["PC3","PPR - PC/ problem delete"],
177
- # ["PC4","QRY - PC/ problem query"],
178
- # ["PC5","PRR - PC/ problem response"],
179
- # ["PC6","PGL - PC/ goal add"],
180
- # ["PC7","PGL - PC/ goal update"],
181
- # ["PC8","PGL - PC/ goal delete"],
182
- # ["PC9","QRY - PC/ goal query"],
183
- # ["PCA","PPV - PC/ goal response"],
184
- # ["PCB","PPP - PC/ pathway (problem-oriented) add"],
185
- # ["PCC","PPP - PC/ pathway (problem-oriented) update"],
186
- # ["PCD","PPP - PC/ pathway (problem-oriented) delete"],
187
- # ["PCE","QRY - PC/ pathway (problem-oriented) query"],
188
- # ["PCF","PTR - PC/ pathway (problem-oriented) query response"],
189
- # ["PCG","PPG - PC/ pathway (goal-oriented) add"],
190
- # ["PCH","PPG - PC/ pathway (goal-oriented) update"],
191
- # ["PCJ","PPG - PC/ pathway (goal-oriented) delete"],
192
- # ["PCK","QRY - PC/ pathway (goal-oriented) query"],
193
- # ["PCL","PPT - PC/ pathway (goal-oriented) query response"],
194
- # ["Q01","QRY/DSR - Query sent for immediate response"],
195
- # ["Q02","QRY/QCK - Query sent for deferred response"],
196
- # ["Q03","DSR/ACK - Deferred response to a query"],
197
- # ["Q04","EQQ - Embedded query language query"],
198
- # ["Q05","UDM/ACK - Unsolicited display update message"],
199
- # ["Q06","OSQ/OSR - Query for order status"],
200
- # ["Q07","VQQ - Virtual table query"],
201
- # ["Q08","SPQ - Stored procedure request"],
202
- # ["Q09","RQQ - event replay query"],
203
- # ["Q11","QBP - Query by parameter requesting an RSP segment pattern response"],
204
- # ["Q13","QBP - Query by parameter requesting an RTB - tabular response"],
205
- # ["Q15","QBP - Query by parameter requesting an RDY display response"],
206
- # ["Q16","QSB - Create subscription"],
207
- # ["Q17","QVR - Query for previous events"],
208
- # ["Q21","QBP - Get person demographics"],
209
- # ["Q22","QBP - Find candidates"],
210
- # ["Q23","QBP - Get corresponding identifiers"],
211
- # ["Q24","QBP - Allocate identifiers"],
212
- # ["Q25","QBP - Personnel Information by Segment Query"],
213
- # ["Q26","ROR - Pharmacy/treatment order response"],
214
- # ["Q27","RAR - Pharmacy/treatment administration information"],
215
- # ["Q28","RDR - Pharmacy/treatment dispense information"],
216
- # ["Q29","RER - Pharmacy/treatment encoded order information"],
217
- # ["Q30","RGR - Pharmacy/treatment dose information"],
218
- # ["Q31","QBP - Dispense History"],
219
- ["R01","ORU/ACK - Unsolicited transmission of an observation message"],
220
- # ["R02","QRY - Query for results of observation"],
221
- # ["R03","QRY/DSR Display-oriented results, query/unsol. update (for backward compatibility only) (Replaced by Q05)"],
222
- # ["R04","ORF - Response to query; transmission of requested observation"],
223
- # ["ROR","ROR - Pharmacy prescription order query response"],
224
- # ["R07","EDR - Enhanced Display Response"],
225
- # ["R08","TBR - Tabular Data Response"],
226
- # ["R09","ERP - Event Replay Response"],
227
- # ["R21","OUL - Unsolicited laboratory observation"],
228
- # ["R22","OUL - Unsolicited Specimen Oriented Observation Message"],
229
- # ["R23","OUL - Unsolicited Specimen Container Oriented Observation Message"],
230
- # ["R24","OUL - Unsolicited Order Oriented Observation Message"],
231
- # ["R30","ORU - Unsolicited Point-Of-Care Observation Message Without Existing Order - Place An Order"],
232
- # ["R31","ORU - Unsolicited New Point-Of-Care Observation Message - Search For An Order"],
233
- # ["R32","ORU - Unsolicited Pre-Ordered Point-Of-Care Observation"],
234
- # ["S01","SRM/SRR - Request new appointment booking"],
235
- # ["S02","SRM/SRR - Request appointment rescheduling"],
236
- # ["S03","SRM/SRR - Request appointment modification"],
237
- # ["S04","SRM/SRR - Request appointment cancellation"],
238
- # ["S05","SRM/SRR - Request appointment discontinuation"],
239
- # ["S06","SRM/SRR - Request appointment deletion"],
240
- # ["S07","SRM/SRR - Request addition of service/resource on appointment"],
241
- # ["S08","SRM/SRR - Request modification of service/resource on appointment"],
242
- # ["S09","SRM/SRR - Request cancellation of service/resource on appointment"],
243
- # ["S10","SRM/SRR - Request discontinuation of service/resource on appointment"],
244
- # ["S11","SRM/SRR - Request deletion of service/resource on appointment"],
245
- # ["S12","SIU/ACK - Notification of new appointment booking"],
246
- # ["S13","SIU/ACK - Notification of appointment rescheduling"],
247
- # ["S14","SIU/ACK - Notification of appointment modification"],
248
- # ["S15","SIU/ACK - Notification of appointment cancellation"],
249
- # ["S16","SIU/ACK - Notification of appointment discontinuation"],
250
- # ["S17","SIU/ACK - Notification of appointment deletion"],
251
- # ["S18","SIU/ACK - Notification of addition of service/resource on appointment"],
252
- # ["S19","SIU/ACK - Notification of modification of service/resource on appointment"],
253
- # ["S20","SIU/ACK - Notification of cancellation of service/resource on appointment"],
254
- # ["S21","SIU/ACK - Notification of discontinuation of service/resource on appointment"],
255
- # ["S22","SIU/ACK - Notification of deletion of service/resource on appointment"],
256
- # ["S23","SIU/ACK - Notification of blocked schedule time slot(s)"],
257
- # ["S24","SIU/ACK - Notification of opened (“unblocked”) schedule time slot(s)"],
258
- # ["S25","SQM/SQR - Schedule query message and response"],
259
- # ["S26","SIU/ACK Notification that patient did not show up for schedule appointment"],
260
- # ["T01","MDM/ACK - Original document notification"],
261
- # ["T02","MDM/ACK - Original document notification and content"],
262
- # ["T03","MDM/ACK - Document status change notification"],
263
- # ["T04","MDM/ACK - Document status change notification and content"],
264
- # ["T05","MDM/ACK - Document addendum notification"],
265
- # ["T06","MDM/ACK - Document addendum notification and content"],
266
- # ["T07","MDM/ACK - Document edit notification"],
267
- # ["T08","MDM/ACK - Document edit notification and content"],
268
- # ["T09","MDM/ACK - Document replacement notification"],
269
- # ["T10","MDM/ACK - Document replacement notification and content"],
270
- # ["T11","MDM/ACK - Document cancel notification"],
271
- # ["T12","QRY/DOC - Document query"],
272
- # ["U01","ESU/ACK - Automated equipment status update"],
273
- # ["U02","ESR/ACK - Automated equipment status request"],
274
- # ["U03","SSU/ACK - Specimen status update"],
275
- # ["U04","SSR/ACK - specimen status request"],
276
- # ["U05","INU/ACK - Automated equipment inventory update"],
277
- # ["U06","INR/ACK - Automated equipment inventory request"],
278
- # ["U07","EAC/ACK - Automated equipment command"],
279
- # ["U08","EAR/ACK - Automated equipment response"],
280
- # ["U09","EAN/ACK - Automated equipment notification"],
281
- # ["U10","TCU/ACK - Automated equipment test code settings update"],
282
- # ["U11","TCR/ACK - Automated equipment test code settings request"],
283
- # ["U12","LSU/ACK - Automated equipment log/service update"],
284
- # ["U13","LSR/ACK - Automated equipment log/service request"],
285
- # ["V01","VXQ - Query for vaccination record"],
286
- # ["V02","VXX - Response to vaccination query returning multiple PID matches"],
287
- # ["V03","VXR - Vaccination record response"],
288
- # ["V04","VXU - Unsolicited vaccination record update"],
289
- # ["W01","ORU - Waveform result, unsolicited transmission of requested information"],
290
- # ["W02","QRF - Waveform result, response to query"]
291
- ]
292
-
293
- MESSAGE_TYPES = [
294
- # ["ACK","General acknowledgment message"],
295
- # ["ADR","ADT response"],
296
- ["ADT","ADT message"],
297
- # ["BAR","Add/change billing account"],
298
- # ["CRM","Clinical study registration message"],
299
- # ["BPS","Blood product dispense status message"],
300
- # ["BRP","Blood product dispense status acknowledgement message"],
301
- # ["BRT","Blood product transfusion/disposition acknowledgement message"],
302
- # ["BTS","Blood product transfusion/disposition message"],
303
- # ["CSU","Unsolicited study data message"],
304
- # ["DFT","Detail financial transactions"],
305
- # ["DOC","Document response"],
306
- # ["DSR","Display response"],
307
- # ["EAC","Automated equipment command message"],
308
- # ["EAN","Automated equipment notification message"],
309
- # ["EAR","Automated equipment response message"],
310
- # ["EDR","Enhanced display response"],
311
- # ["EQQ","Embedded query language query"],
312
- # ["ERP","Event replay response"],
313
- # ["ESR","Automated equipment status update acknowledgment message"],
314
- # ["ESU","Automated equipment status update message"],
315
- # ["INR","Automated equipment inventory request message"],
316
- # ["INU","Automated equipment inventory update message"],
317
- # ["LSR","Automated equipment log/service request message"],
318
- # ["LSU","Automated equipment log/service update message"],
319
- # ["MCF","Delayed Acknowledgment (Retained for backward compatibility only)"],
320
- # ["MDM","Medical document management"],
321
- # ["MFD","Master files delayed application acknowledgment"],
322
- # ["MFK","Master files application acknowledgment"],
323
- # ["MFN","Master files notification"],
324
- # ["MFQ","Master files query"],
325
- # ["MFR","Master files response"],
326
- # ["NMD","Application management data message"],
327
- # ["NMQ","Application management query message"],
328
- # ["NMR","Application management response message"],
329
- # ["OMB","Blood product order message"],
330
- # ["OMD","Dietary order"],
331
- # ["OMG","General clinical order message"],
332
- # ["OMI","Imaging order"],
333
- # ["OML","Laboratory order message"],
334
- # ["OMN","Non-stock requisition order message"],
335
- # ["OMP","Pharmacy/treatment order message"],
336
- # ["OMS","Stock requisition order message"],
337
- # ["ORB","Blood product order acknowledgement message"],
338
- # ["ORD","Dietary order acknowledgment message"],
339
- # ["ORF","Query for results of observation"],
340
- # ["ORG","General clinical order acknowledgment message"],
341
- # ["ORI","Imaging order acknowledgement message"],
342
- # ["ORL","Laboratory acknowledgment message (unsolicited)"],
343
- ["ORM","Pharmacy/treatment order message"],
344
- # ["ORN","Non-stock requisition - General order acknowledgment message"],
345
- # ["ORP","Pharmacy/treatment order acknowledgment message"],
346
- # ["ORR","General order response message response to any ORM"],
347
- # ["ORS","Stock requisition - Order acknowledgment message"],
348
- ["ORU","Unsolicited transmission of an observation message"],
349
- # ["OSQ","Query response for order status"],
350
- # ["OSR","Query response for order status"],
351
- # ["OUL","Unsolicited laboratory observation message"],
352
- # ["PEX","Product experience message"],
353
- # ["PGL","Patient goal message"],
354
- # ["PIN","Patient insurance information"],
355
- # ["PMU","Add personnel record"],
356
- # ["PPG","Patient pathway message (goal-oriented)"],
357
- # ["PPP","Patient pathway message (problem-oriented)"],
358
- # ["PPR","Patient problem message"],
359
- # ["PPT","Patient pathway goal-oriented response"],
360
- # ["PPV","Patient goal response"],
361
- # ["PRR","Patient problem response"],
362
- # ["PTR","Patient pathway problem-oriented response"],
363
- # ["QBP","Query by parameter"],
364
- # ["QCK","Deferred query"],
365
- # ["QCN","Cancel query"],
366
- # ["QRY","Query, original mode"],
367
- # ["QSB","Create subscription"],
368
- # ["QSX","Cancel subscription/acknowledge message"],
369
- # ["QVR","Query for previous events"],
370
- # ["RAR","Pharmacy/treatment administration information"],
371
- # ["RAS","Pharmacy/treatment administration message"],
372
- # ["RCI","Return clinical information"],
373
- # ["RCL","Return clinical list"],
374
- # ["RDE","Pharmacy/treatment encoded order message"],
375
- # ["RDR","Pharmacy/treatment dispense information"],
376
- # ["RDS","Pharmacy/treatment dispense message"],
377
- # ["RDY","Display based response"],
378
- # ["REF","Patient referral"],
379
- # ["RER","Pharmacy/treatment encoded order information"],
380
- # ["RGR","Pharmacy/treatment dose information"],
381
- # ["RGV","Pharmacy/treatment give message"],
382
- # ["ROR","Pharmacy/treatment order response"],
383
- # ["RPA","Return patient authorization"],
384
- # ["RPI","Return patient information"],
385
- # ["RPL","Return patient display list"],
386
- # ["RPR","Return patient list"],
387
- # ["RQA","Request patient authorization"],
388
- # ["RQC","Request clinical information"],
389
- # ["RQI","Request patient information"],
390
- # ["RQP","Request patient demographics"],
391
- # ["RQQ","Event replay query"],
392
- # ["RRA","Pharmacy/treatment administration acknowledgment message"],
393
- # ["RRD","Pharmacy/treatment dispense acknowledgment message"],
394
- # ["RRE","Pharmacy/treatment encoded order acknowledgment message"],
395
- # ["RRG","Pharmacy/treatment give acknowledgment message"],
396
- # ["RRI","Return referral information"],
397
- # ["RSP","Segment pattern response"],
398
- # ["RTB","Tabular response"],
399
- # ["SIU","Schedule information unsolicited"],
400
- # ["SPQ","Stored procedure request"],
401
- # ["SQM","Schedule query message"],
402
- # ["SQR","Schedule query response"],
403
- # ["SRM","Schedule request message"],
404
- # ["SRR","Scheduled request response"],
405
- # ["SSR","Specimen status request message"],
406
- # ["SSU","Specimen status update message"],
407
- # ["SUR","Summary product experience report"],
408
- # ["TBR","Tabular data response"],
409
- # ["TCR","Automated equipment test code settings request message"],
410
- # ["TCU","Automated equipment test code settings update message"],
411
- # ["UDM","Unsolicited display update message"],
412
- # ["VQQ","Virtual table query"],
413
- # ["VXQ","Query for vaccination record"],
414
- # ["VXR","Vaccination record response"],
415
- # ["VXU","Unsolicited vaccination record update"],
416
- # ["VXX","Response for vaccination query with multiple PID matches"]
417
- ]
418
-
419
- end
420
- end