ez7gen 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/ez7gen +6 -0
- data/lib/ez7gen.rb +23 -0
- data/lib/ez7gen/config/schema/2.4/2.4.HL7.xml +13904 -0
- data/lib/ez7gen/config/schema/2.4/VAZ2.4.HL7.xml +3085 -0
- data/lib/ez7gen/config/schema/2.4/added/coded-tables.xml +730 -0
- data/lib/ez7gen/config/schema/2.4/rules/2.4.HL7.yml +4 -0
- data/lib/ez7gen/config/schema/2.4/rules/VAZ2.4.HL7.yml +6 -0
- data/lib/ez7gen/config/schema/2.5/2.5.HL7.xml +10008 -0
- data/lib/ez7gen/config/schema/2.5/VAZ2.5.HL7.xml +7 -0
- data/lib/ez7gen/config/schema/2.5/added/coded-tables.xml +549 -0
- data/lib/ez7gen/config/schema/readme.txt +0 -0
- data/lib/ez7gen/config/templates/2.4/eiv table update-mfn_m01 20151201.xml +416 -0
- data/lib/ez7gen/config/templates/2.4/eiv table update-mfn_y01.xml +416 -0
- data/lib/ez7gen/config/templates/2.4/eiv-ec-MFN_X01_reg request 20160126.xml +659 -0
- data/lib/ez7gen/config/templates/2.4/examples/ADT_A60.txt +69 -0
- data/lib/ez7gen/config/templates/2.4/examples/eiv table update-mfn_m01 20151201.txt +21 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_dss_units-query_qbp_q13-qbp_q13.txt +26 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_ecs_procedures_query_qbp_q13-qbp_q13.txt +26 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_patient eligibility_response-rsp_k11-080714.txt +44 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_diagnosis_query_qbp_q11-qbp_q11.txt +21 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_diagnosis_response_rsp_k11-rsp_k11.txt +42 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_dss_units_response_rtb_k13-rtb_k13.txt +49 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_ecs_filer_request_dft_p03-dft_p03-080714.txt +31 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_ecs_filer_response_ack_p03-ack_p03.txt +21 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_esc_procedures_response_rtb_k13-rtb_k13.txt +40 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_patient_eclass_query_qbp_q11-qbp_q11.txt +21 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_patient_problems_query_qbp_q11-qbp_q11.txt +21 -0
- data/lib/ez7gen/config/templates/2.4/examples/mhvsm_standardhl7lib_patinet_problems_response_rsp_k11-rsp_k11.txt +33 -0
- data/lib/ez7gen/config/templates/2.4/examples/orur01rvbecv2.txt +31 -0
- data/lib/ez7gen/config/templates/2.4/examples/sqwm vitals-oru_ro1.txt +52 -0
- data/lib/ez7gen/config/templates/2.4/examples/vista sqwm-adt_a60.txt +40 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_dss_units_query_qbp_q13-qbp_q13.xml +312 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_ecs_procedures_query_qbp_q13-qbp_q13.xml +314 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_patient eligibility_response-rsp_k11-080714.xml +640 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_diagnosis_query_qbp_q11-qbp_q11.xml +284 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_diagnosis_response_rsp_k11-rsp_k11-rsp_k11.xml +563 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_dss_units_response_rtb_k13-rtb_k13-rtb_k13.xml +365 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_ecs_filer_request_dft_p03-dft_p03-080714.xml +2172 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_ecs_filer_response_ack_p03-ack_p03.xml +269 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_ecs_procedures_response_rtb_k13-rtb_k13-rtb_k13.xml +354 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_patient_eclass_query_qbp_q11-qbp_q11.xml +284 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_patient_problems_query_qbp_q11-qbp_q11.xml +282 -0
- data/lib/ez7gen/config/templates/2.4/mhvsm_standardhl7lib_patient_problems_response_rsp_k11-rsp_k11-rsp_k11.xml +565 -0
- data/lib/ez7gen/config/templates/2.4/orur01rvbecv2.xml +1529 -0
- data/lib/ez7gen/config/templates/2.4/sqwm vitals-oru_r01.xml +2975 -0
- data/lib/ez7gen/config/templates/2.4/vista sqwm-adt_a60.xml +1360 -0
- data/lib/ez7gen/message_factory.rb +142 -0
- data/lib/ez7gen/msg_error_handler.rb +33 -0
- data/lib/ez7gen/profile_parser.rb +321 -0
- data/lib/ez7gen/resources/properties-with-comments.yml +51 -0
- data/lib/ez7gen/resources/properties.yml +325 -0
- data/lib/ez7gen/service/2.4/dynamic_field_generator.rb +45 -0
- data/lib/ez7gen/service/2.4/field_generator.rb +1586 -0
- data/lib/ez7gen/service/2.5/field_generator.rb +75 -0
- data/lib/ez7gen/service/base_field_generator.rb +451 -0
- data/lib/ez7gen/service/segment_generator.rb +218 -0
- data/lib/ez7gen/service/segment_picker.rb +147 -0
- data/lib/ez7gen/service/template_generator.rb +213 -0
- data/lib/ez7gen/service/type_aware_field_generator.rb +1583 -0
- data/lib/ez7gen/service/utils.rb +75 -0
- data/lib/ez7gen/structure_parser.rb +331 -0
- data/lib/ez7gen/version.rb +38 -0
- data/test/Additional Tables with values_v1.1.txt +1653 -0
- data/test/added_shema_test.rb +143 -0
- data/test/app-tmp.rb +225 -0
- data/test/at.txt +1 -0
- data/test/backburner.zip +0 -0
- data/test/codes.txt +262 -0
- data/test/codes1.txt +1240 -0
- data/test/data_types_exploration_test.rb +213 -0
- data/test/dynamic_field_generated_test.rb +292 -0
- data/test/message_factory_24_custom_test.rb +648 -0
- data/test/message_factory_25_test.rb +50 -0
- data/test/message_factory_adm_test.rb +558 -0
- data/test/message_factory_gen_test.rb +63 -0
- data/test/message_factory_lab_test.rb +107 -0
- data/test/message_factory_pharm_test.rb +121 -0
- data/test/message_factory_template_24_test.rb +730 -0
- data/test/message_factory_test.rb +220 -0
- data/test/msg_error_handler_test.rb +59 -0
- data/test/profile_parser_test.rb +542 -0
- data/test/quick_run.rb +880 -0
- data/test/segment_generator_test.rb +656 -0
- data/test/segment_picker_test.rb +279 -0
- data/test/structrure_parser_test.rb +355 -0
- data/test/template_generator_test.rb +164 -0
- data/test/type_aware_field_generator_test.rb +582 -0
- data/test/utils_test.rb +97 -0
- metadata +215 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'logger'
|
2
|
+
module Utils
|
3
|
+
|
4
|
+
$log = Logger.new STDOUT
|
5
|
+
$log.datetime_format = '%Y-%m-%d %H:%M:%S%z '
|
6
|
+
begin
|
7
|
+
$log.level = (YAML.load_file File.expand_path('../../resources/properties.yml', __FILE__))['logger.level']
|
8
|
+
rescue => e
|
9
|
+
$log.level = Logger::DEBUG
|
10
|
+
end
|
11
|
+
|
12
|
+
@@random = Random.new
|
13
|
+
|
14
|
+
BASE_INDICATOR = 'base:'
|
15
|
+
BASE = 'base'
|
16
|
+
PRIMARY = 'primary'
|
17
|
+
DATA_LOOKUP_MIS = {:position => '1', :value => '...', :description => 'No suggested values defined'}
|
18
|
+
|
19
|
+
#special = "?<>',?[]}{=-)(*&^%$#`~{}"
|
20
|
+
#@@special = "?<>[]}{)(&^%$#`~{}" # subset to use for now
|
21
|
+
@@special = "&" # it looks like only html encoded characters are problem, ex: Pathology (gross & histopath, not surgical) tbl 74
|
22
|
+
@@html_encoded_regex = /[#{@@special.gsub(/./){|char| "\\#{char}"}}]/
|
23
|
+
|
24
|
+
def get_segment_name(segment)
|
25
|
+
return segment.gsub(/~|\[|\]|\{|\}/,"")
|
26
|
+
end
|
27
|
+
|
28
|
+
def blank?(obj)
|
29
|
+
return obj.nil? || obj.empty? #|| obj.strip.empty?
|
30
|
+
end
|
31
|
+
|
32
|
+
# safely pick an index with collection
|
33
|
+
def sample_index (len)
|
34
|
+
# ... excludes the top of the range
|
35
|
+
@@random.rand(0...len)
|
36
|
+
end
|
37
|
+
|
38
|
+
# check if string is a number
|
39
|
+
def is_number?(str)
|
40
|
+
true if Float(str) rescue false
|
41
|
+
end
|
42
|
+
|
43
|
+
# if name starts with base use base type otherwise primary
|
44
|
+
# works for generators and parsers
|
45
|
+
def get_type_by_name(name)
|
46
|
+
(blank?(name)?nil:(name.include?(BASE_INDICATOR))? BASE: PRIMARY)
|
47
|
+
end
|
48
|
+
|
49
|
+
def get_name_without_base(name)
|
50
|
+
(!blank?(name))?name.delete(BASE_INDICATOR):nil
|
51
|
+
end
|
52
|
+
|
53
|
+
# helper method to convert a string to nil if it's a number
|
54
|
+
def num_to_nil(string)
|
55
|
+
Integer(string || '')
|
56
|
+
return nil
|
57
|
+
rescue ArgumentError
|
58
|
+
return string
|
59
|
+
end
|
60
|
+
|
61
|
+
# helper method to safely handle max length when schema len adn requirements contradict.
|
62
|
+
# lesser wins
|
63
|
+
def safe_len(maxLen, reqLen)
|
64
|
+
#handle stings and garbage
|
65
|
+
maxLen = (maxLen||reqLen).to_i
|
66
|
+
[maxLen, reqLen].min
|
67
|
+
end
|
68
|
+
|
69
|
+
# check if string has special characters
|
70
|
+
def has_html_encoded_ch?(str)
|
71
|
+
(str =~ @@html_encoded_regex)?true:false
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
|
@@ -0,0 +1,331 @@
|
|
1
|
+
require_relative 'service/utils'
|
2
|
+
class StructureParser
|
3
|
+
include Utils
|
4
|
+
|
5
|
+
attr_accessor :encodedSegments, :idx
|
6
|
+
# attr_reader :regExOp, :regExRep
|
7
|
+
|
8
|
+
REGEX_OP =/(?=\[((?:[^\[\]]*|\[\g<1>\])*)\])/
|
9
|
+
PRNTHS_OP = '[]'
|
10
|
+
REGEX_REP =/(?=\{((?:[^{}]*|\{\g<1>\})*)\})/
|
11
|
+
PRNTHS_REP = '{}'
|
12
|
+
|
13
|
+
# @encodedSegments =[]
|
14
|
+
# idx = 0
|
15
|
+
def initialize
|
16
|
+
@encodedSegments = []
|
17
|
+
@idx = 0
|
18
|
+
end
|
19
|
+
|
20
|
+
# takes a message structure and converts it into array of processed segments, ready for building hl7
|
21
|
+
def process_segments(struct)
|
22
|
+
process_struct(struct)
|
23
|
+
handle_groups(@encodedSegments)
|
24
|
+
end
|
25
|
+
|
26
|
+
def process_struct(struct)
|
27
|
+
#process original segments and build encoded segmets
|
28
|
+
process_opt_groups(struct)
|
29
|
+
process_rep_groups(struct)
|
30
|
+
|
31
|
+
#check encoded segments to find and process segments which have subgroups
|
32
|
+
@encodedSegments.map!{|seg|
|
33
|
+
#has more subgroups
|
34
|
+
if(has_subgroups?(seg))
|
35
|
+
groupMarker = Marker.whatGroup?(seg)
|
36
|
+
|
37
|
+
#unwrap for recursive processing
|
38
|
+
process_struct(groupMarker.unwrap(seg))
|
39
|
+
|
40
|
+
# wrap group back to restore the original segment
|
41
|
+
groupMarker.mark(seg)
|
42
|
+
# (groupMarker)?groupMarker.mark(seg):seg
|
43
|
+
|
44
|
+
else
|
45
|
+
seg
|
46
|
+
end
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# handle groups in the array of ecnoded segments
|
51
|
+
# groups and subgroups organized as Arrays with specific Markers
|
52
|
+
def handle_groups(segments)
|
53
|
+
#find groups and decode the group elements and put them in array
|
54
|
+
segments.map!{ |seg|
|
55
|
+
if(is_complex_group?(seg))
|
56
|
+
|
57
|
+
# Generate marker for the segment to preserve specifics of type of the group - opt. vs repeating.
|
58
|
+
if(!seg.kind_of? Array )
|
59
|
+
seg = Marker.gen(seg)
|
60
|
+
end
|
61
|
+
|
62
|
+
if(seg.kind_of? Array)# TODO: Refactor, check not needed?
|
63
|
+
seg.resolve(@encodedSegments)
|
64
|
+
else
|
65
|
+
is_number?(seg)? @encodedSegments[it.to_i] : seg
|
66
|
+
end
|
67
|
+
handle_groups(seg)
|
68
|
+
# seg = handle_groups(seg)
|
69
|
+
else
|
70
|
+
seg
|
71
|
+
end
|
72
|
+
}
|
73
|
+
return segments
|
74
|
+
end
|
75
|
+
|
76
|
+
# checks a segment for subgroups
|
77
|
+
def has_subgroups?(seg)
|
78
|
+
inner = remove_outer_parenthesis(seg)
|
79
|
+
# inner segment should have no groups identified by {} or []
|
80
|
+
inner =~ /[\[{]/
|
81
|
+
end
|
82
|
+
|
83
|
+
def remove_outer_parenthesis(seg)
|
84
|
+
regexOptOuter = /^\[~(.*?)~\]$/
|
85
|
+
regExRepOuter = /^{~(.*?)~}$/
|
86
|
+
# (seg.scan(REGEX_OP).size()>1 || seg.scan(REGEX_REP).size()>1)
|
87
|
+
# look for the outer parenthesis [] - opt
|
88
|
+
# innerSeg = seg.scan(/\[~{~(.*)~}~\]|\[~(.*)~\]|{~(.*)~}/)
|
89
|
+
# innerOpt= seg.scan(/^\[~(.*?)~\]/)
|
90
|
+
innerOpt= seg.scan(regexOptOuter)
|
91
|
+
innerOpt = (innerOpt.empty?) ? nil : innerOpt.flatten.first
|
92
|
+
|
93
|
+
# look for outer {} - rep
|
94
|
+
innerRep = (innerOpt) ? innerOpt.scan(regExRepOuter) : seg.scan(regExRepOuter)
|
95
|
+
innerRep = (innerRep.empty?) ? nil : innerRep.flatten.first
|
96
|
+
|
97
|
+
|
98
|
+
inner = innerRep || innerOpt || seg
|
99
|
+
end
|
100
|
+
|
101
|
+
# process groups with optional markers - []
|
102
|
+
def process_opt_groups(struct)
|
103
|
+
process(struct, REGEX_OP, PRNTHS_OP)
|
104
|
+
end
|
105
|
+
|
106
|
+
# process groups with repeating markers - {}
|
107
|
+
def process_rep_groups(struct)
|
108
|
+
process(struct, REGEX_REP, PRNTHS_REP)
|
109
|
+
end
|
110
|
+
|
111
|
+
#process group using regular expression and specific pharenthesis as markers
|
112
|
+
def process(structure, regEx, prnths)
|
113
|
+
groups = []
|
114
|
+
|
115
|
+
# brake up the structure into array of subgroups
|
116
|
+
# using recursive regEx
|
117
|
+
subGroups = structure.scan(regEx)
|
118
|
+
|
119
|
+
subGroups.each {|subGroup|
|
120
|
+
|
121
|
+
# m = parenthesis_wrap(a.first())
|
122
|
+
# group boundaries - parenthesis, stripped by regEx
|
123
|
+
# put the parenthesis back for processing
|
124
|
+
groupElement = Marker.mark(subGroup.first(), prnths)
|
125
|
+
|
126
|
+
# process an array of matches and substitute subgroups
|
127
|
+
if(groups.empty?)
|
128
|
+
replace(structure, groupElement)
|
129
|
+
else
|
130
|
+
if(groups.last().include?(groupElement))
|
131
|
+
replace(groups.last, groupElement)
|
132
|
+
if(!is_group?(groups.last, prnths)) #done resolving a group
|
133
|
+
groups.pop()
|
134
|
+
end
|
135
|
+
else
|
136
|
+
replace(structure, groupElement)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
if (is_group?(groupElement, prnths))
|
141
|
+
groups << groupElement
|
142
|
+
end
|
143
|
+
|
144
|
+
# resolved group added to encoded segments
|
145
|
+
@encodedSegments << groupElement
|
146
|
+
@idx +=1
|
147
|
+
}
|
148
|
+
end
|
149
|
+
|
150
|
+
# check if there are inside elements of sub-groups defined by the same parenthesis
|
151
|
+
def is_group?(str, prnths)
|
152
|
+
# prnth_mtch = @prnths[0]
|
153
|
+
# prnth_mtch = prnths[0]
|
154
|
+
(str.scan(prnths[0]).size > 1)# outside paranthesis expected
|
155
|
+
end
|
156
|
+
|
157
|
+
def replace(str, m)
|
158
|
+
str.sub!(m, @idx.to_s)
|
159
|
+
end
|
160
|
+
|
161
|
+
# wrap a match in parantesis used to brake structure into sub structures
|
162
|
+
def parenthesis_wrap(m)
|
163
|
+
@prnths.clone.insert(1, m)
|
164
|
+
end
|
165
|
+
|
166
|
+
# check if encoded segment is a group
|
167
|
+
def is_complex_group?(encoded)
|
168
|
+
|
169
|
+
# most of arrays have already been resolved
|
170
|
+
# look inside if any of complex group left unresolved
|
171
|
+
# return false if(encoded.kind_of?(Array))
|
172
|
+
if(encoded.kind_of?(Array))
|
173
|
+
is_complex = false
|
174
|
+
encoded.each{|it|
|
175
|
+
is_complex = is_complex_group?(it) ||is_complex
|
176
|
+
}
|
177
|
+
return is_complex
|
178
|
+
end
|
179
|
+
|
180
|
+
# group has an index of encoded optional element
|
181
|
+
# isGroupWithEncodedElements = ((encoded =~ /\~\d+\~/) || is_number?(encoded)) ? true: false
|
182
|
+
isGroupWithEncodedElements = (encoded =~ /\~\d+\~/) ? true: false
|
183
|
+
return isGroupWithEncodedElements if(isGroupWithEncodedElements)
|
184
|
+
|
185
|
+
inner = remove_outer_parenthesis(encoded)
|
186
|
+
subGroups = inner.split('~')
|
187
|
+
(subGroups.size > 1)? true: false
|
188
|
+
|
189
|
+
# # group consists of all required elements {~MRG~PV1~}, so look ahead for that
|
190
|
+
# subGroups = encoded.split(/[~\{\[\}\]]/).delete_if{|it| blank?(it)}
|
191
|
+
# isGroupOfRequiredElements = (subGroups.size > 1)? true: false
|
192
|
+
#
|
193
|
+
# return (isGroupWithEncodedElements || isGroupOfRequiredElements), subGroups
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
class Group < Array
|
198
|
+
include Utils
|
199
|
+
def initialize(*several_variants)
|
200
|
+
if(several_variants!= nil && several_variants[0].instance_of?(String))
|
201
|
+
several_variants = several_variants[0].split('~').delete_if{|it| it.empty?}
|
202
|
+
end
|
203
|
+
super(several_variants)
|
204
|
+
end
|
205
|
+
|
206
|
+
def resolve(encodedSegments)
|
207
|
+
# p self
|
208
|
+
self.map!{|sub|
|
209
|
+
if(sub.kind_of?(Array))
|
210
|
+
sub.map!{|it|is_number?(it)? encodedSegments[it.to_i]: it}.flatten
|
211
|
+
else
|
212
|
+
is_number?(sub)? encodedSegments[sub.to_i]: sub
|
213
|
+
end
|
214
|
+
}.flatten
|
215
|
+
# p self
|
216
|
+
end
|
217
|
+
|
218
|
+
#unwrap outer parenthesis.
|
219
|
+
# this works vs. seg = seg[1...-1] TODO: Refactor?
|
220
|
+
def unwrap(seg)
|
221
|
+
seg[0] = ''
|
222
|
+
seg[-1] = ''
|
223
|
+
return seg
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
class OptionalGroup < Group
|
228
|
+
|
229
|
+
def mark(group, prnths=StructureParser::PRNTHS_OP)
|
230
|
+
if (group.kind_of?(String))
|
231
|
+
group = Marker.mark(group, prnths)
|
232
|
+
elsif(group.kind_of?(Array))
|
233
|
+
group = OptionalGroup.new(group)
|
234
|
+
end
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
class RepeatingGroup < Group
|
239
|
+
# include Marker
|
240
|
+
def mark(group, prnths=StructureParser::PRNTHS_REP)
|
241
|
+
if (group.kind_of?(String))
|
242
|
+
group = Marker.mark(group, prnths)
|
243
|
+
elsif(group.kind_of?(Array))
|
244
|
+
group = RepeatingGroup.new(group)
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
248
|
+
|
249
|
+
# class Marker
|
250
|
+
class Marker
|
251
|
+
# include Utils
|
252
|
+
|
253
|
+
@@opt = /\[~([^\[\]]*)~\]/
|
254
|
+
@@rpt= /\{~([^\[\]]*)~}/
|
255
|
+
@@match_regex = Regexp.union(@@opt, @@rpt)
|
256
|
+
OPT = 1
|
257
|
+
RPT = 2
|
258
|
+
|
259
|
+
# decided that segment has subgroups
|
260
|
+
def self.gen1(segment)
|
261
|
+
marker = nil
|
262
|
+
|
263
|
+
# 1 no match - just to cover bases
|
264
|
+
marker = whatGroup?(segment)
|
265
|
+
return nil if(!marker)# done if nothing to match
|
266
|
+
|
267
|
+
# if(mtch[Marker::OPT])# 2 optional
|
268
|
+
# marker = OptionalGroup.new(mtch[Marker::OPT])
|
269
|
+
# # # check for optional repeating
|
270
|
+
# elsif(mtch[Marker::RPT])# 3 repeating
|
271
|
+
# marker = RepeatingGroup.new(mtch[Marker::RPT])
|
272
|
+
# end
|
273
|
+
|
274
|
+
# 3 repeating
|
275
|
+
|
276
|
+
# 4 if optional check for optional-repeating
|
277
|
+
|
278
|
+
# if(mtch[Marker::OPT])
|
279
|
+
# marker = OptionalGroup.new(mtch[Marker::OPT])
|
280
|
+
# # # check for optional repeating
|
281
|
+
# if(repeatingSubMarker = Marker.gen(mtch[Marker::OPT]))
|
282
|
+
# marker= marker.clear.push(repeatingSubMarker)
|
283
|
+
# end
|
284
|
+
# elsif(mtch[Marker::RPT])
|
285
|
+
# marker = RepeatingGroup.new(mtch[Marker::RPT])
|
286
|
+
# end
|
287
|
+
return marker
|
288
|
+
|
289
|
+
end
|
290
|
+
|
291
|
+
def self.gen(segment)
|
292
|
+
marker = nil
|
293
|
+
|
294
|
+
mtch = segment.match(@@match_regex)
|
295
|
+
return nil if(!mtch)# done if nothing to match
|
296
|
+
|
297
|
+
# seg = (mtch[Marker:OPT])?mtch[Marker:OPT]:mtch[Marker:RPT]
|
298
|
+
if(mtch[Marker::OPT])
|
299
|
+
marker = OptionalGroup.new(mtch[Marker::OPT])
|
300
|
+
# # check for optional repeating
|
301
|
+
if(repeatingSubMarker = Marker.gen(mtch[Marker::OPT]))
|
302
|
+
marker= marker.clear.push(repeatingSubMarker)
|
303
|
+
end
|
304
|
+
elsif(mtch[Marker::RPT])
|
305
|
+
marker = RepeatingGroup.new(mtch[Marker::RPT])
|
306
|
+
end
|
307
|
+
return marker
|
308
|
+
end
|
309
|
+
|
310
|
+
# def self.match_for_complex_group(segment)
|
311
|
+
# mtch = segment.match(@@match_regex)
|
312
|
+
# end
|
313
|
+
|
314
|
+
def self.mark(group, prnths)
|
315
|
+
group = prnths.clone().insert(1,group)
|
316
|
+
end
|
317
|
+
|
318
|
+
def self.whatGroup?(segment)
|
319
|
+
group = nil
|
320
|
+
mtch = segment.match(@@match_regex)
|
321
|
+
return group if(!mtch)# done if nothing to match
|
322
|
+
|
323
|
+
if(mtch[Marker::OPT])
|
324
|
+
OptionalGroup.new()
|
325
|
+
elsif(mtch[Marker::RPT])
|
326
|
+
RepeatingGroup.new()
|
327
|
+
end
|
328
|
+
|
329
|
+
end
|
330
|
+
|
331
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module Ez7gen
|
4
|
+
|
5
|
+
#VERSION = "0.5.2"
|
6
|
+
VERSION = "1.0.1" # transformation
|
7
|
+
|
8
|
+
# Move the Configurator into main module
|
9
|
+
class Configurator
|
10
|
+
|
11
|
+
# This works with some corks, will be needed for external location of schema files
|
12
|
+
def configure()
|
13
|
+
|
14
|
+
properties_file = File.expand_path('../resources/properties.yml', __FILE__)
|
15
|
+
yml = YAML.load_file properties_file
|
16
|
+
puts 'Before update schema location:' + ((yml['web.install.dir']) ? yml['web.install.dir'] : 'schema location not set')
|
17
|
+
|
18
|
+
#This will remove all comments
|
19
|
+
if(ARGV[0])
|
20
|
+
yml['web.install.dir'] = ARGV[0].gsub("\\", '/') # convert windows path to linux, ruby defaults to that
|
21
|
+
File.open(properties_file, 'w') { |f| YAML.dump(yml, f) }
|
22
|
+
end
|
23
|
+
|
24
|
+
# This will add multiple properties
|
25
|
+
# if(ARGV[0])
|
26
|
+
# file = File.open(propertiesFile, 'a')
|
27
|
+
# file.puts 'schema.dir.location: ' + ARGV[0]
|
28
|
+
# file.flush
|
29
|
+
# end
|
30
|
+
|
31
|
+
|
32
|
+
properties_file = File.expand_path('../resources/properties.yml', __FILE__)
|
33
|
+
yml = YAML.load_file properties_file
|
34
|
+
puts 'After update schema location:' + ((yml['web.install.dir']!=nil)?yml['web.install.dir']:'schema location not set')
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,1653 @@
|
|
1
|
+
Table 10
|
2
|
+
Physician ID
|
3
|
+
Code
|
4
|
+
Description
|
5
|
+
PH1Surg
|
6
|
+
Surgeon
|
7
|
+
PH2Med
|
8
|
+
General Medicine
|
9
|
+
PH3HNS
|
10
|
+
Home Nursing Service
|
11
|
+
PH4
|
12
|
+
Psychiatric Contract
|
13
|
+
PH5
|
14
|
+
Psychiatric
|
15
|
+
|
16
|
+
|
17
|
+
Table 18
|
18
|
+
Patient Type
|
19
|
+
Code
|
20
|
+
Description
|
21
|
+
00
|
22
|
+
Surgical
|
23
|
+
10
|
24
|
+
Medical
|
25
|
+
60
|
26
|
+
Home Nursing Service
|
27
|
+
85
|
28
|
+
Psychiatric Contract
|
29
|
+
86
|
30
|
+
Psychiatric
|
31
|
+
95
|
32
|
+
Neurological Contract
|
33
|
+
96
|
34
|
+
Neurological
|
35
|
+
|
36
|
+
|
37
|
+
Table 19
|
38
|
+
Anesthesia code
|
39
|
+
Code
|
40
|
+
Description
|
41
|
+
1
|
42
|
+
Anesthesia 1
|
43
|
+
2
|
44
|
+
Anesthesia 2
|
45
|
+
3
|
46
|
+
Anesthesia 3
|
47
|
+
4
|
48
|
+
Anesthesia 4
|
49
|
+
5
|
50
|
+
Anesthesia 5
|
51
|
+
|
52
|
+
|
53
|
+
Table 21
|
54
|
+
Bad debt agency code
|
55
|
+
Code
|
56
|
+
Description
|
57
|
+
1
|
58
|
+
Bad debt agency 1
|
59
|
+
2
|
60
|
+
Bad debt agency 2
|
61
|
+
3
|
62
|
+
Bad debt agency 3
|
63
|
+
4
|
64
|
+
Bad debt agency 4
|
65
|
+
5
|
66
|
+
Bad debt agency 5
|
67
|
+
|
68
|
+
|
69
|
+
Table 22
|
70
|
+
Billing Status
|
71
|
+
Code
|
72
|
+
Description
|
73
|
+
1
|
74
|
+
Billing Status 1
|
75
|
+
2
|
76
|
+
Billing Status 2
|
77
|
+
3
|
78
|
+
Billing Status 3
|
79
|
+
4
|
80
|
+
Billing Status 4
|
81
|
+
5
|
82
|
+
Billing Status 5
|
83
|
+
|
84
|
+
|
85
|
+
Table 24
|
86
|
+
Fee Schedule
|
87
|
+
Code
|
88
|
+
Description
|
89
|
+
1
|
90
|
+
Charge exceeds maximum payable
|
91
|
+
2
|
92
|
+
Math error, 3-Not entitled to treatment
|
93
|
+
4
|
94
|
+
Other, 5-Previously Paid
|
95
|
+
6
|
96
|
+
Exceeds monthly dollar limitation
|
97
|
+
7
|
98
|
+
Physician’s signature missing
|
99
|
+
8
|
100
|
+
Patient’s signature missing
|
101
|
+
9
|
102
|
+
Medication not emergent
|
103
|
+
A
|
104
|
+
Pharmacist’s certification missing
|
105
|
+
B
|
106
|
+
Pharmacist’s signature missing
|
107
|
+
C
|
108
|
+
Required drug information missing
|
109
|
+
D
|
110
|
+
Item not on payable list
|
111
|
+
E
|
112
|
+
Veteran information missing
|
113
|
+
F
|
114
|
+
Personal items/Private Room
|
115
|
+
G
|
116
|
+
Vet refused transfer
|
117
|
+
H
|
118
|
+
For recurring or refill medication
|
119
|
+
I
|
120
|
+
Payment made for Generic drug
|
121
|
+
J
|
122
|
+
Mill Bill Authority
|
123
|
+
|
124
|
+
|
125
|
+
Table 32
|
126
|
+
Charge/price indicator
|
127
|
+
Code
|
128
|
+
Description
|
129
|
+
11
|
130
|
+
Charge 1
|
131
|
+
21
|
132
|
+
Charge 2
|
133
|
+
31
|
134
|
+
Charge 3
|
135
|
+
41
|
136
|
+
Charge 4
|
137
|
+
51
|
138
|
+
Charge 5
|
139
|
+
|
140
|
+
|
141
|
+
Table 42
|
142
|
+
Company plan code
|
143
|
+
Code
|
144
|
+
Description
|
145
|
+
12
|
146
|
+
Plan 1
|
147
|
+
22
|
148
|
+
Plan 2
|
149
|
+
32
|
150
|
+
Plan 3
|
151
|
+
42
|
152
|
+
Plan 4
|
153
|
+
52
|
154
|
+
Plan 5
|
155
|
+
|
156
|
+
|
157
|
+
Table 45
|
158
|
+
Courtesy Code
|
159
|
+
Code
|
160
|
+
Description
|
161
|
+
14
|
162
|
+
Courtesy 1
|
163
|
+
24
|
164
|
+
Courtesy 2
|
165
|
+
34
|
166
|
+
Courtesy 3
|
167
|
+
44
|
168
|
+
Courtesy 4
|
169
|
+
54
|
170
|
+
Courtesy 5
|
171
|
+
|
172
|
+
|
173
|
+
Table 46
|
174
|
+
Credit rating
|
175
|
+
Code
|
176
|
+
Description
|
177
|
+
B
|
178
|
+
Bad
|
179
|
+
F
|
180
|
+
Fair
|
181
|
+
G
|
182
|
+
Good
|
183
|
+
E
|
184
|
+
Excellent
|
185
|
+
|
186
|
+
|
187
|
+
Table 49
|
188
|
+
Department Code
|
189
|
+
Code
|
190
|
+
Description
|
191
|
+
A
|
192
|
+
Department A
|
193
|
+
B
|
194
|
+
Department B
|
195
|
+
C
|
196
|
+
Department C
|
197
|
+
D
|
198
|
+
Department D
|
199
|
+
0
|
200
|
+
NET 30
|
201
|
+
1
|
202
|
+
Subject to Interest
|
203
|
+
|
204
|
+
|
205
|
+
Table 50
|
206
|
+
Accident Code
|
207
|
+
Code
|
208
|
+
Description
|
209
|
+
V89.2XXA
|
210
|
+
Person injured in unspecified motor-vehicle accident, traffic, initial encounter
|
211
|
+
Y92.9
|
212
|
+
Unspecified place or not applicable
|
213
|
+
W74.XXXA
|
214
|
+
Unspecified cause of accidental drowning and submersion, initial encounter
|
215
|
+
W20.8XXA
|
216
|
+
Other cause of strike by thrown, projected or falling object, initial encounter
|
217
|
+
|
218
|
+
|
219
|
+
Table 51
|
220
|
+
Diagnosis Code
|
221
|
+
Code
|
222
|
+
Description
|
223
|
+
E23.0
|
224
|
+
Panhypopituitarism
|
225
|
+
E23.6
|
226
|
+
Other disorders of pituitary gland
|
227
|
+
E23.2
|
228
|
+
Diabetes insipidus
|
229
|
+
E23.3
|
230
|
+
Hypothalamic dysfunction, not elsewhere classified
|
231
|
+
E23.1
|
232
|
+
Drug-induced hypopituitarism
|
233
|
+
E32.8
|
234
|
+
Other diseases of thymus
|
235
|
+
E23.7
|
236
|
+
Disorder of pituitary gland, unspecified
|
237
|
+
E32.1
|
238
|
+
Abscess of thymus
|
239
|
+
E32.9
|
240
|
+
Disease of thymus, unspecified
|
241
|
+
|
242
|
+
|
243
|
+
Table 53
|
244
|
+
Diagnosis Code Method
|
245
|
+
Code
|
246
|
+
Description
|
247
|
+
I10
|
248
|
+
ICD 10 Cosing System
|
249
|
+
|
250
|
+
|
251
|
+
Table 55
|
252
|
+
Diagnosis Related Group
|
253
|
+
Code
|
254
|
+
Description
|
255
|
+
001
|
256
|
+
LIVER TRANSPLANT
|
257
|
+
003
|
258
|
+
BONE MARROW TRANSPLANT
|
259
|
+
113
|
260
|
+
INFECTIONS OF UPPER RESPIRATORY TRACT
|
261
|
+
160
|
262
|
+
MAJOR CARDIOTHORACIC REPAIR OF HEART ANOMALY
|
263
|
+
199
|
264
|
+
HYPERTENSION
|
265
|
+
203
|
266
|
+
CHEST PAIN
|
267
|
+
247
|
268
|
+
INTESTINAL OBSTRUCTION
|
269
|
+
283
|
270
|
+
OTHER DISORDERS OF THE LIVER
|
271
|
+
346
|
272
|
+
CONNECTIVE TISSUE DISORDERS
|
273
|
+
381
|
274
|
+
MAJOR SKIN DISORDERS
|
275
|
+
424
|
276
|
+
OTHER ENDOCRINE DISORDERS
|
277
|
+
|
278
|
+
|
279
|
+
Table 56
|
280
|
+
DRG grouper review code
|
281
|
+
Code
|
282
|
+
Description
|
283
|
+
10
|
284
|
+
Review 1
|
285
|
+
20
|
286
|
+
Review 2
|
287
|
+
30
|
288
|
+
Review 3
|
289
|
+
40
|
290
|
+
Review 4
|
291
|
+
50
|
292
|
+
Review 5
|
293
|
+
|
294
|
+
|
295
|
+
Table 59
|
296
|
+
Consent Code
|
297
|
+
Code
|
298
|
+
Description
|
299
|
+
01
|
300
|
+
Informed consent
|
301
|
+
02
|
302
|
+
Waiver of the consent requirement
|
303
|
+
03
|
304
|
+
Health care proxy
|
305
|
+
|
306
|
+
|
307
|
+
Table 64
|
308
|
+
Financial Class
|
309
|
+
Code
|
310
|
+
Description
|
311
|
+
FC1
|
312
|
+
Financial Class 1
|
313
|
+
FC2
|
314
|
+
Financial Class 2
|
315
|
+
FC3
|
316
|
+
Financial Class 3
|
317
|
+
FC4
|
318
|
+
Financial Class 4
|
319
|
+
FC5
|
320
|
+
Financial Class 5
|
321
|
+
|
322
|
+
|
323
|
+
Table 68
|
324
|
+
Guarantor Type
|
325
|
+
Code
|
326
|
+
Description
|
327
|
+
G1
|
328
|
+
Guarantor Type 1
|
329
|
+
G2
|
330
|
+
Guarantor Type 2
|
331
|
+
G3
|
332
|
+
Guarantor Type 3
|
333
|
+
G4
|
334
|
+
Guarantor Type 4
|
335
|
+
G5
|
336
|
+
Guarantor Type 5
|
337
|
+
|
338
|
+
|
339
|
+
Table 72
|
340
|
+
Insurance Plan ID
|
341
|
+
Code
|
342
|
+
Description
|
343
|
+
1234 5678A
|
344
|
+
Insurance Plan A
|
345
|
+
2345 6789B
|
346
|
+
Insurance Plan B
|
347
|
+
3456 7890C
|
348
|
+
Insurance Plan C
|
349
|
+
4567 8901D
|
350
|
+
Insurance Plan D
|
351
|
+
|
352
|
+
|
353
|
+
Table 73
|
354
|
+
Interest rate code
|
355
|
+
Code
|
356
|
+
Description
|
357
|
+
31
|
358
|
+
Interest rate code 1
|
359
|
+
32
|
360
|
+
Interest rate code 2
|
361
|
+
33
|
362
|
+
Interest rate code 3
|
363
|
+
34
|
364
|
+
Interest rate code 4
|
365
|
+
35
|
366
|
+
Interest rate code 5
|
367
|
+
|
368
|
+
|
369
|
+
Table 84
|
370
|
+
Performed by
|
371
|
+
Code
|
372
|
+
Description
|
373
|
+
A
|
374
|
+
Group A
|
375
|
+
B
|
376
|
+
Group B
|
377
|
+
C
|
378
|
+
Group C
|
379
|
+
D
|
380
|
+
Group D
|
381
|
+
E
|
382
|
+
Group E
|
383
|
+
|
384
|
+
|
385
|
+
Table 86
|
386
|
+
Plan ID
|
387
|
+
Code
|
388
|
+
Description
|
389
|
+
234
|
390
|
+
Plan 1
|
391
|
+
345
|
392
|
+
Plan 2
|
393
|
+
456
|
394
|
+
Plan 3
|
395
|
+
567
|
396
|
+
Plan 4
|
397
|
+
678
|
398
|
+
Plan 5
|
399
|
+
|
400
|
+
|
401
|
+
Table 87
|
402
|
+
Pre-admit test indicator
|
403
|
+
Code
|
404
|
+
Description
|
405
|
+
Y
|
406
|
+
Yes
|
407
|
+
N
|
408
|
+
No
|
409
|
+
|
410
|
+
|
411
|
+
Table 88
|
412
|
+
Procedure Code
|
413
|
+
Code
|
414
|
+
Description
|
415
|
+
00W000Z
|
416
|
+
Revision of Drainage Device in Brain, Open Approach
|
417
|
+
02110Z3
|
418
|
+
Bypass Coronary Artery, Two Sites from Coronary Artery, Open Approach
|
419
|
+
05500ZZ
|
420
|
+
Destruction of Azygos Vein, Open Approach
|
421
|
+
4A0004Z
|
422
|
+
Measurement of Central Nervous Electrical Activity, Open Approach
|
423
|
+
4A0204Z
|
424
|
+
Measurement of Cardiac Electrical Activity, Open Approach
|
425
|
+
4A060BZ
|
426
|
+
Measurement of Lymphatic Pressure, Open Approach
|
427
|
+
5A02110
|
428
|
+
Assistance with Cardiac Output using Balloon Pump, Intermittent
|
429
|
+
6A150ZZ
|
430
|
+
Decompression, Circulatory, Single
|
431
|
+
6A750Z4
|
432
|
+
Ultrasound Therapy of Head and Neck Vessels, Single
|
433
|
+
6A800ZZ
|
434
|
+
Ultraviolet Light Therapy of Skin, Single
|
435
|
+
|
436
|
+
|
437
|
+
Table 89
|
438
|
+
Procedure Coding Method
|
439
|
+
Code
|
440
|
+
Description
|
441
|
+
I10
|
442
|
+
ICD 10
|
443
|
+
Table 99
|
444
|
+
VIP indicator
|
445
|
+
Code
|
446
|
+
Description
|
447
|
+
Y
|
448
|
+
VIP
|
449
|
+
N
|
450
|
+
Non VIP
|
451
|
+
|
452
|
+
|
453
|
+
Table 110
|
454
|
+
Transfer to bad debt indicator
|
455
|
+
Code
|
456
|
+
Description
|
457
|
+
Y
|
458
|
+
Yes, transfer to bad debt
|
459
|
+
N
|
460
|
+
No, do not transfer to bad debt
|
461
|
+
|
462
|
+
|
463
|
+
Table 111
|
464
|
+
Delete account code
|
465
|
+
Code
|
466
|
+
Description
|
467
|
+
1
|
468
|
+
Code 1
|
469
|
+
2
|
470
|
+
Code 2
|
471
|
+
3
|
472
|
+
Code 3
|
473
|
+
4
|
474
|
+
Code 4
|
475
|
+
5
|
476
|
+
Code 5
|
477
|
+
|
478
|
+
|
479
|
+
Table 113
|
480
|
+
Discharged to Location
|
481
|
+
Code
|
482
|
+
Description
|
483
|
+
1
|
484
|
+
Location 1
|
485
|
+
2
|
486
|
+
Location 2
|
487
|
+
3
|
488
|
+
Location 3
|
489
|
+
4
|
490
|
+
Location 4
|
491
|
+
5
|
492
|
+
Location 5
|
493
|
+
|
494
|
+
|
495
|
+
Table 114
|
496
|
+
Diet type
|
497
|
+
Code
|
498
|
+
Description
|
499
|
+
100
|
500
|
+
Tube feeding
|
501
|
+
110
|
502
|
+
Clear liquid diet
|
503
|
+
120
|
504
|
+
Full liquid diet
|
505
|
+
200
|
506
|
+
Diabetic or calorie controlled diet
|
507
|
+
300
|
508
|
+
No Added Salt diet
|
509
|
+
400
|
510
|
+
High fiber diet
|
511
|
+
|
512
|
+
|
513
|
+
Table 115
|
514
|
+
Servicing facility
|
515
|
+
Code
|
516
|
+
Description
|
517
|
+
327
|
518
|
+
LOUISVILLE-RO
|
519
|
+
358
|
520
|
+
MANILA-RO
|
521
|
+
402
|
522
|
+
TOGUS VAMROC
|
523
|
+
405
|
524
|
+
WHITE RIVER JCT VAMROC
|
525
|
+
436
|
526
|
+
MONTANA HCS
|
527
|
+
437
|
528
|
+
FARGO VAMROC
|
529
|
+
438
|
530
|
+
SIOUX FALLS VAMROC
|
531
|
+
452
|
532
|
+
WICHITA-RO
|
533
|
+
442
|
534
|
+
CHEYENNE VAMROC
|
535
|
+
|
536
|
+
|
537
|
+
Table 117
|
538
|
+
Account status
|
539
|
+
Code
|
540
|
+
Description
|
541
|
+
12
|
542
|
+
Account status 1
|
543
|
+
23
|
544
|
+
Account status 2
|
545
|
+
34
|
546
|
+
Account status 3
|
547
|
+
45
|
548
|
+
Account status 4
|
549
|
+
56
|
550
|
+
Account status 5
|
551
|
+
|
552
|
+
|
553
|
+
Table 118
|
554
|
+
Major Diagnoctis Category
|
555
|
+
Code
|
556
|
+
Description
|
557
|
+
MDC 01
|
558
|
+
Diseases & Disorders of the Nervous System
|
559
|
+
MDC 03
|
560
|
+
Diseases & Disorders of the Ear, Nose, Mouth & Throat
|
561
|
+
MDC 05
|
562
|
+
Diseases & Disorders of the Circulatory System
|
563
|
+
MDC 10
|
564
|
+
Endocrine, Nutritional & Metabolic Diseases & Disorders
|
565
|
+
MDC 16
|
566
|
+
Diseases & Disorders of Blood, Blood Forming Organs, Immunologic Disorders
|
567
|
+
|
568
|
+
|
569
|
+
Table 129
|
570
|
+
Accommodation code
|
571
|
+
Code
|
572
|
+
Description
|
573
|
+
1
|
574
|
+
ALLERGY
|
575
|
+
10
|
576
|
+
NEUROLOGY
|
577
|
+
2
|
578
|
+
CARDIOLOGY
|
579
|
+
20
|
580
|
+
REHABILITATION MEDICINE
|
581
|
+
24
|
582
|
+
MEDICAL OBSERVATION
|
583
|
+
25
|
584
|
+
PSYCH RESID REHAB TRMT PROG
|
585
|
+
40
|
586
|
+
INTERMEDIATE MEDICINE
|
587
|
+
50
|
588
|
+
GENERAL SURGERY
|
589
|
+
|
590
|
+
|
591
|
+
Table 132
|
592
|
+
Transaction code
|
593
|
+
Code
|
594
|
+
Description
|
595
|
+
C
|
596
|
+
First and final payment
|
597
|
+
F
|
598
|
+
Full and final payment
|
599
|
+
P
|
600
|
+
Partial payment
|
601
|
+
R
|
602
|
+
Reimbursement
|
603
|
+
|
604
|
+
|
605
|
+
Table 139
|
606
|
+
Employer information data
|
607
|
+
Code
|
608
|
+
Description
|
609
|
+
1
|
610
|
+
Employer 1
|
611
|
+
3
|
612
|
+
Employer 2
|
613
|
+
5
|
614
|
+
Employer 3
|
615
|
+
7
|
616
|
+
Employer 4
|
617
|
+
9
|
618
|
+
Employer 5
|
619
|
+
|
620
|
+
|
621
|
+
Table 143
|
622
|
+
Non-covered insurance code
|
623
|
+
Code
|
624
|
+
Description
|
625
|
+
99201
|
626
|
+
Code 1
|
627
|
+
99202
|
628
|
+
Code 2
|
629
|
+
99203
|
630
|
+
Code 3
|
631
|
+
99204
|
632
|
+
Code 4
|
633
|
+
99205
|
634
|
+
Code 5
|
635
|
+
|
636
|
+
|
637
|
+
Table 151
|
638
|
+
Second opinion status
|
639
|
+
Code
|
640
|
+
Description
|
641
|
+
P
|
642
|
+
Second opinion requested by patient
|
643
|
+
M
|
644
|
+
Second opinion requested by doctor
|
645
|
+
S
|
646
|
+
Second opinion consultation scheduled
|
647
|
+
|
648
|
+
|
649
|
+
Table 152
|
650
|
+
Second opinion documentation received
|
651
|
+
Code
|
652
|
+
Description
|
653
|
+
Y
|
654
|
+
Documentation received
|
655
|
+
N
|
656
|
+
Documentation not received
|
657
|
+
|
658
|
+
|
659
|
+
Table 171
|
660
|
+
Citizenship
|
661
|
+
Code
|
662
|
+
Description
|
663
|
+
USA
|
664
|
+
United States
|
665
|
+
|
666
|
+
|
667
|
+
Table 172
|
668
|
+
Veteran military status
|
669
|
+
Code
|
670
|
+
Description
|
671
|
+
Y
|
672
|
+
Veteran
|
673
|
+
N
|
674
|
+
Non Veteran
|
675
|
+
|
676
|
+
|
677
|
+
Table 182
|
678
|
+
Staff Type
|
679
|
+
Code
|
680
|
+
Description
|
681
|
+
IT
|
682
|
+
Information Technology
|
683
|
+
NP
|
684
|
+
New Person
|
685
|
+
P
|
686
|
+
Practitioner
|
687
|
+
PE
|
688
|
+
Paid Employee
|
689
|
+
|
690
|
+
|
691
|
+
Table 184
|
692
|
+
Department
|
693
|
+
Code
|
694
|
+
Description
|
695
|
+
IT
|
696
|
+
Information Technology
|
697
|
+
MN
|
698
|
+
Management
|
699
|
+
FI
|
700
|
+
Finance
|
701
|
+
OP
|
702
|
+
Operations
|
703
|
+
|
704
|
+
|
705
|
+
Table 186
|
706
|
+
Practitioner Category
|
707
|
+
Code
|
708
|
+
Description
|
709
|
+
C
|
710
|
+
Clerk
|
711
|
+
R
|
712
|
+
Resident
|
713
|
+
S
|
714
|
+
Staff
|
715
|
+
T
|
716
|
+
Technologist
|
717
|
+
|
718
|
+
|
719
|
+
Table 188
|
720
|
+
Operator ID
|
721
|
+
Code
|
722
|
+
Description
|
723
|
+
OP1
|
724
|
+
Operator A
|
725
|
+
OP2
|
726
|
+
Operator B
|
727
|
+
OP3
|
728
|
+
Operator C
|
729
|
+
OP4
|
730
|
+
Operator D
|
731
|
+
OP5
|
732
|
+
Operator E
|
733
|
+
|
734
|
+
|
735
|
+
Table 212
|
736
|
+
Nationality
|
737
|
+
Code
|
738
|
+
Description
|
739
|
+
DEU
|
740
|
+
Germany
|
741
|
+
ESP
|
742
|
+
Spain
|
743
|
+
FRA
|
744
|
+
France
|
745
|
+
GBR
|
746
|
+
United Kingdom
|
747
|
+
ITA
|
748
|
+
Italy
|
749
|
+
USA
|
750
|
+
United States
|
751
|
+
|
752
|
+
|
753
|
+
Table 218
|
754
|
+
Patient charge adjustment
|
755
|
+
Code
|
756
|
+
Description
|
757
|
+
1
|
758
|
+
Deductible Amount
|
759
|
+
2
|
760
|
+
Coinsurance Amount
|
761
|
+
3
|
762
|
+
Co-payment Amount
|
763
|
+
9
|
764
|
+
Diagnosis inconsistent with patient's age
|
765
|
+
10
|
766
|
+
Diagnosis inconsistent with patient's gender
|
767
|
+
11
|
768
|
+
Diagnosis inconsistent with procedure
|
769
|
+
|
770
|
+
|
771
|
+
Table 219
|
772
|
+
Recurring service
|
773
|
+
Code
|
774
|
+
Description
|
775
|
+
1
|
776
|
+
Service 1
|
777
|
+
2
|
778
|
+
Service 2
|
779
|
+
3
|
780
|
+
Service 3
|
781
|
+
4
|
782
|
+
Service 4
|
783
|
+
5
|
784
|
+
Service 5
|
785
|
+
|
786
|
+
|
787
|
+
Table 222
|
788
|
+
Contact reason
|
789
|
+
Code
|
790
|
+
Description
|
791
|
+
10
|
792
|
+
Contact reason 1
|
793
|
+
20
|
794
|
+
Contact reason 2
|
795
|
+
30
|
796
|
+
Contact reason 3
|
797
|
+
40
|
798
|
+
Contact reason 4
|
799
|
+
50
|
800
|
+
Contact reason 5
|
801
|
+
|
802
|
+
|
803
|
+
Table 233
|
804
|
+
Non-concur code/description
|
805
|
+
Code
|
806
|
+
Description
|
807
|
+
725
|
808
|
+
Not medically necessary
|
809
|
+
726
|
810
|
+
Experimental
|
811
|
+
728
|
812
|
+
Out of network
|
813
|
+
727
|
814
|
+
Policy cancelled for lack of payment
|
815
|
+
721
|
816
|
+
Health care setting
|
817
|
+
|
818
|
+
|
819
|
+
Table 244
|
820
|
+
Single Use Device
|
821
|
+
Code
|
822
|
+
Description
|
823
|
+
1
|
824
|
+
Catheter
|
825
|
+
2
|
826
|
+
Syringe
|
827
|
+
3
|
828
|
+
Bone Saw
|
829
|
+
4
|
830
|
+
Drill
|
831
|
+
5
|
832
|
+
Needle Set
|
833
|
+
|
834
|
+
|
835
|
+
Table 245
|
836
|
+
Product Problem
|
837
|
+
Code
|
838
|
+
Description
|
839
|
+
1
|
840
|
+
Outer package removed
|
841
|
+
2
|
842
|
+
Package opened
|
843
|
+
3
|
844
|
+
Package damaged
|
845
|
+
4
|
846
|
+
Device damaged
|
847
|
+
|
848
|
+
|
849
|
+
Table 246
|
850
|
+
Product Available for Inspection
|
851
|
+
Code
|
852
|
+
Description
|
853
|
+
1
|
854
|
+
Yes, available for inspection
|
855
|
+
0
|
856
|
+
No, not available for inspection
|
857
|
+
|
858
|
+
|
859
|
+
Table 249
|
860
|
+
Genetic Product
|
861
|
+
Code
|
862
|
+
Description
|
863
|
+
6
|
864
|
+
Catheter
|
865
|
+
7
|
866
|
+
Syringe
|
867
|
+
8
|
868
|
+
Bone Saw
|
869
|
+
9
|
870
|
+
Drill
|
871
|
+
0
|
872
|
+
Needle Set
|
873
|
+
|
874
|
+
|
875
|
+
Table 264
|
876
|
+
Location Department
|
877
|
+
Code
|
878
|
+
Description
|
879
|
+
LD1
|
880
|
+
Location Dep 1
|
881
|
+
LD2
|
882
|
+
Location Dep 2
|
883
|
+
LD3
|
884
|
+
Location Dep 3
|
885
|
+
LD4
|
886
|
+
Location Dep 4
|
887
|
+
LD5
|
888
|
+
Location Dep 5
|
889
|
+
|
890
|
+
|
891
|
+
Table 285
|
892
|
+
Insurance Company ID Codes
|
893
|
+
Code
|
894
|
+
Description
|
895
|
+
1111
|
896
|
+
Insurance Company 1
|
897
|
+
2222
|
898
|
+
Insurance Company 2
|
899
|
+
3333
|
900
|
+
Insurance Company 3
|
901
|
+
4444
|
902
|
+
Insurance Company 4
|
903
|
+
5555
|
904
|
+
Insurance Company 5
|
905
|
+
|
906
|
+
|
907
|
+
Table 293
|
908
|
+
Billing Category
|
909
|
+
Code
|
910
|
+
Description
|
911
|
+
G0001
|
912
|
+
Drawing Blood for Specimen
|
913
|
+
Q0081
|
914
|
+
Infusion Other Than Chemotherapy
|
915
|
+
Q0084
|
916
|
+
Chemotherapy by Infusion
|
917
|
+
G0239
|
918
|
+
Therapeutic Procedures
|
919
|
+
Q0136
|
920
|
+
Injection
|
921
|
+
|
922
|
+
|
923
|
+
Table 295
|
924
|
+
Handicap
|
925
|
+
Code
|
926
|
+
Description
|
927
|
+
Y
|
928
|
+
Yes
|
929
|
+
N
|
930
|
+
No
|
931
|
+
|
932
|
+
|
933
|
+
Table 296
|
934
|
+
Primary Language
|
935
|
+
Code
|
936
|
+
Description
|
937
|
+
EN
|
938
|
+
English
|
939
|
+
FR
|
940
|
+
French
|
941
|
+
ES
|
942
|
+
Spanish
|
943
|
+
DE
|
944
|
+
German
|
945
|
+
IT
|
946
|
+
Italian
|
947
|
+
|
948
|
+
|
949
|
+
Table 300
|
950
|
+
Namespace ID
|
951
|
+
Code
|
952
|
+
Description
|
953
|
+
101
|
954
|
+
Namespace ID 1
|
955
|
+
202
|
956
|
+
Namespace ID 2
|
957
|
+
303
|
958
|
+
Namespace ID 3
|
959
|
+
404
|
960
|
+
Namespace ID 4
|
961
|
+
200
|
962
|
+
HCP to IFCAP dataflow
|
963
|
+
500
|
964
|
+
IFCAP to HCP dataflow
|
965
|
+
PRCHCPR
|
966
|
+
PRC HCP RECEIVE
|
967
|
+
PRCHCPS
|
968
|
+
PRC HCP SEND
|
969
|
+
|
970
|
+
|
971
|
+
Table 302
|
972
|
+
Point of Care
|
973
|
+
Code
|
974
|
+
Description
|
975
|
+
PC1
|
976
|
+
Point of Care 1
|
977
|
+
PC2
|
978
|
+
Point of Care 2
|
979
|
+
PC3
|
980
|
+
Point of Care 3
|
981
|
+
PC4
|
982
|
+
Point of Care 4
|
983
|
+
PC5
|
984
|
+
Point of Care 5
|
985
|
+
|
986
|
+
|
987
|
+
Table 303
|
988
|
+
Room
|
989
|
+
Code
|
990
|
+
Description
|
991
|
+
RA
|
992
|
+
Room A
|
993
|
+
RB
|
994
|
+
Room B
|
995
|
+
RC
|
996
|
+
Room C
|
997
|
+
RD
|
998
|
+
Room D
|
999
|
+
RE
|
1000
|
+
Room E
|
1001
|
+
|
1002
|
+
|
1003
|
+
Table 304
|
1004
|
+
Bed
|
1005
|
+
Code
|
1006
|
+
Description
|
1007
|
+
B1
|
1008
|
+
Bed 1
|
1009
|
+
B2
|
1010
|
+
Bed 2
|
1011
|
+
B3
|
1012
|
+
Bed 3
|
1013
|
+
B4
|
1014
|
+
Bed 4
|
1015
|
+
B5
|
1016
|
+
Bed 5
|
1017
|
+
|
1018
|
+
|
1019
|
+
Table 306
|
1020
|
+
Location Status
|
1021
|
+
Code
|
1022
|
+
Description
|
1023
|
+
O
|
1024
|
+
Open
|
1025
|
+
C
|
1026
|
+
Closed
|
1027
|
+
A
|
1028
|
+
Available
|
1029
|
+
N
|
1030
|
+
Non Available
|
1031
|
+
|
1032
|
+
|
1033
|
+
Table 307
|
1034
|
+
Building
|
1035
|
+
Code
|
1036
|
+
Description
|
1037
|
+
BLD1
|
1038
|
+
Building 1
|
1039
|
+
BLD2
|
1040
|
+
Building 2
|
1041
|
+
BLD3
|
1042
|
+
Building 3
|
1043
|
+
BLD4
|
1044
|
+
Building 4
|
1045
|
+
BLD5
|
1046
|
+
Building 5
|
1047
|
+
|
1048
|
+
|
1049
|
+
Table 308
|
1050
|
+
Floor
|
1051
|
+
Code
|
1052
|
+
Description
|
1053
|
+
F1
|
1054
|
+
Floor 1
|
1055
|
+
F2
|
1056
|
+
Floor 2
|
1057
|
+
F3
|
1058
|
+
Floor 3
|
1059
|
+
F4
|
1060
|
+
Floor 4
|
1061
|
+
F5
|
1062
|
+
Floor 5
|
1063
|
+
|
1064
|
+
|
1065
|
+
Table 312
|
1066
|
+
Policy Scope
|
1067
|
+
Code
|
1068
|
+
Description
|
1069
|
+
11
|
1070
|
+
Policy Scope 1
|
1071
|
+
12
|
1072
|
+
Policy Scope 2
|
1073
|
+
13
|
1074
|
+
Policy Scope 3
|
1075
|
+
14
|
1076
|
+
Policy Scope 4
|
1077
|
+
15
|
1078
|
+
Policy Scope 5
|
1079
|
+
|
1080
|
+
|
1081
|
+
Table 313
|
1082
|
+
Policy Source
|
1083
|
+
Code
|
1084
|
+
Description
|
1085
|
+
21
|
1086
|
+
Policy Source 1
|
1087
|
+
22
|
1088
|
+
Policy Source 2
|
1089
|
+
23
|
1090
|
+
Policy Source 3
|
1091
|
+
24
|
1092
|
+
Policy Source 4
|
1093
|
+
25
|
1094
|
+
Policy Source 5
|
1095
|
+
|
1096
|
+
|
1097
|
+
Table 319
|
1098
|
+
Department Cost Center
|
1099
|
+
Code
|
1100
|
+
Description
|
1101
|
+
1
|
1102
|
+
Cost Center 1
|
1103
|
+
2
|
1104
|
+
Cost Center 2
|
1105
|
+
3
|
1106
|
+
Cost Center 3
|
1107
|
+
4
|
1108
|
+
Cost Center 4
|
1109
|
+
5
|
1110
|
+
Cost Center 5
|
1111
|
+
|
1112
|
+
|
1113
|
+
Table 320
|
1114
|
+
Item Natural Account Code
|
1115
|
+
Code
|
1116
|
+
Description
|
1117
|
+
1010
|
1118
|
+
Account Code 1
|
1119
|
+
2020
|
1120
|
+
Account Code 2
|
1121
|
+
3030
|
1122
|
+
Account Code 3
|
1123
|
+
4040
|
1124
|
+
Account Code 4
|
1125
|
+
5050
|
1126
|
+
Account Code 5
|
1127
|
+
|
1128
|
+
|
1129
|
+
Table 327
|
1130
|
+
Job code/class
|
1131
|
+
Code
|
1132
|
+
Description
|
1133
|
+
13-2011
|
1134
|
+
Accountant
|
1135
|
+
15-1132
|
1136
|
+
Application Developer
|
1137
|
+
23-1011
|
1138
|
+
Attorney
|
1139
|
+
29-1020
|
1140
|
+
Dentist
|
1141
|
+
29-1170
|
1142
|
+
Nurse Practitioner
|
1143
|
+
29-2041
|
1144
|
+
Paramedic
|
1145
|
+
29-1050
|
1146
|
+
Pharmacist
|
1147
|
+
29-1060
|
1148
|
+
Physician
|
1149
|
+
|
1150
|
+
|
1151
|
+
Table 333
|
1152
|
+
Driver's license issuing authority
|
1153
|
+
Code
|
1154
|
+
Description
|
1155
|
+
AK
|
1156
|
+
Alaska
|
1157
|
+
CO
|
1158
|
+
Colorado
|
1159
|
+
FL
|
1160
|
+
Florida
|
1161
|
+
KS
|
1162
|
+
Kansas
|
1163
|
+
MD
|
1164
|
+
Maryland
|
1165
|
+
|
1166
|
+
|
1167
|
+
Table 340
|
1168
|
+
Procedure Code modifier
|
1169
|
+
Code
|
1170
|
+
Description
|
1171
|
+
57
|
1172
|
+
Decision for surgery
|
1173
|
+
23
|
1174
|
+
Unusual Anesthesia
|
1175
|
+
50
|
1176
|
+
Bilateral Procedure
|
1177
|
+
33
|
1178
|
+
Preventive Service
|
1179
|
+
51
|
1180
|
+
Multiple Procedures
|
1181
|
+
52
|
1182
|
+
Reduced Services
|
1183
|
+
|
1184
|
+
|
1185
|
+
Table 341
|
1186
|
+
Guarantor credit rating code
|
1187
|
+
Code
|
1188
|
+
Description
|
1189
|
+
B
|
1190
|
+
Bad
|
1191
|
+
F
|
1192
|
+
Fair
|
1193
|
+
G
|
1194
|
+
Good
|
1195
|
+
E
|
1196
|
+
Excellent
|
1197
|
+
|
1198
|
+
|
1199
|
+
Table 342
|
1200
|
+
Military recipient
|
1201
|
+
Code
|
1202
|
+
Description
|
1203
|
+
Y
|
1204
|
+
Dependent
|
1205
|
+
N
|
1206
|
+
Non Dependent
|
1207
|
+
|
1208
|
+
|
1209
|
+
Table 343
|
1210
|
+
Military handicapped program code
|
1211
|
+
Code
|
1212
|
+
Description
|
1213
|
+
7118
|
1214
|
+
Angioneurotic edema
|
1215
|
+
7005
|
1216
|
+
Arteriosclerotic heart disease
|
1217
|
+
9433
|
1218
|
+
Persistent depressive disorder
|
1219
|
+
6205
|
1220
|
+
Endolymphatic hydrops
|
1221
|
+
5003
|
1222
|
+
Hypertrophic arthritis
|
1223
|
+
|
1224
|
+
|
1225
|
+
Table 345
|
1226
|
+
Appeal reason
|
1227
|
+
Code
|
1228
|
+
Description
|
1229
|
+
51
|
1230
|
+
Medically necessary
|
1231
|
+
52
|
1232
|
+
Procedure is covered
|
1233
|
+
53
|
1234
|
+
Unreasonably long wait for in-network provider
|
1235
|
+
54
|
1236
|
+
In-home care
|
1237
|
+
55
|
1238
|
+
Nonpayment error
|
1239
|
+
|
1240
|
+
|
1241
|
+
Table 346
|
1242
|
+
Certification agency
|
1243
|
+
Code
|
1244
|
+
Description
|
1245
|
+
ADPH
|
1246
|
+
Alabama Department of Public Health
|
1247
|
+
AZDHS
|
1248
|
+
Arizona Department of Health Services
|
1249
|
+
CDPH
|
1250
|
+
California Department of Public Health
|
1251
|
+
AHCA
|
1252
|
+
Agency for Health Care Administration
|
1253
|
+
DADS
|
1254
|
+
TX Dept of Aging & Disability Services
|
1255
|
+
|
1256
|
+
|
1257
|
+
Table 358
|
1258
|
+
Practitioner Group
|
1259
|
+
Code
|
1260
|
+
Description
|
1261
|
+
1
|
1262
|
+
SW Chief
|
1263
|
+
10
|
1264
|
+
Volunteer
|
1265
|
+
11
|
1266
|
+
WOC
|
1267
|
+
2
|
1268
|
+
Asst. Chief
|
1269
|
+
3
|
1270
|
+
Supervisor
|
1271
|
+
4
|
1272
|
+
SW Coordinator
|
1273
|
+
5
|
1274
|
+
Social Worker
|
1275
|
+
6
|
1276
|
+
SW Associate
|
1277
|
+
7
|
1278
|
+
Secretary
|
1279
|
+
8
|
1280
|
+
SW Clerk
|
1281
|
+
9
|
1282
|
+
Student
|
1283
|
+
|
1284
|
+
|
1285
|
+
Table 361
|
1286
|
+
Sending/receiving application
|
1287
|
+
Code
|
1288
|
+
Description
|
1289
|
+
101
|
1290
|
+
Application A
|
1291
|
+
202
|
1292
|
+
Application B
|
1293
|
+
303
|
1294
|
+
Application C
|
1295
|
+
404
|
1296
|
+
Application D
|
1297
|
+
PRCHCPR
|
1298
|
+
PRC HCP RECEIVE
|
1299
|
+
PRCHCPS
|
1300
|
+
PRC HCP SEND
|
1301
|
+
|
1302
|
+
|
1303
|
+
Table 362
|
1304
|
+
Sending/receiving facility
|
1305
|
+
Code
|
1306
|
+
Description
|
1307
|
+
505
|
1308
|
+
Facility A
|
1309
|
+
606
|
1310
|
+
Facility B
|
1311
|
+
707
|
1312
|
+
Facility C
|
1313
|
+
808
|
1314
|
+
Facility D
|
1315
|
+
909
|
1316
|
+
Facility E
|
1317
|
+
200
|
1318
|
+
HCP to IFCAP dataflow
|
1319
|
+
500
|
1320
|
+
IFCAP to HCP dataflow
|
1321
|
+
|
1322
|
+
|
1323
|
+
Table 378
|
1324
|
+
Carrier Type
|
1325
|
+
Code
|
1326
|
+
Description
|
1327
|
+
R01
|
1328
|
+
One position carrier
|
1329
|
+
R02
|
1330
|
+
Two position carrier
|
1331
|
+
R03
|
1332
|
+
Three position carrier
|
1333
|
+
R04
|
1334
|
+
Four position carrier
|
1335
|
+
R05
|
1336
|
+
Five position carrier
|
1337
|
+
|
1338
|
+
|
1339
|
+
Table 379
|
1340
|
+
Tray Type
|
1341
|
+
Code
|
1342
|
+
Description
|
1343
|
+
T01
|
1344
|
+
One position tray
|
1345
|
+
T02
|
1346
|
+
Two position tray
|
1347
|
+
T03
|
1348
|
+
Three position tray
|
1349
|
+
T04
|
1350
|
+
Four position tray
|
1351
|
+
T05
|
1352
|
+
Five position tray
|
1353
|
+
|
1354
|
+
|
1355
|
+
Table 380
|
1356
|
+
Separator Type
|
1357
|
+
Code
|
1358
|
+
Description
|
1359
|
+
NO
|
1360
|
+
No Separator
|
1361
|
+
GEL
|
1362
|
+
Gel Separator
|
1363
|
+
M01
|
1364
|
+
Manufacturer Specific Separator
|
1365
|
+
|
1366
|
+
|
1367
|
+
Table 381
|
1368
|
+
Cap Type
|
1369
|
+
Code
|
1370
|
+
Description
|
1371
|
+
SCR
|
1372
|
+
Screw Cap
|
1373
|
+
PSH
|
1374
|
+
Push Cap
|
1375
|
+
FOIL
|
1376
|
+
Foil
|
1377
|
+
|
1378
|
+
|
1379
|
+
Table 382
|
1380
|
+
Drug Interference
|
1381
|
+
Code
|
1382
|
+
Description
|
1383
|
+
PHCL
|
1384
|
+
Pharmacological
|
1385
|
+
CHML
|
1386
|
+
Chemical
|
1387
|
+
|
1388
|
+
|
1389
|
+
Table 385
|
1390
|
+
Manufacturer Identifier
|
1391
|
+
Code
|
1392
|
+
Description
|
1393
|
+
851
|
1394
|
+
Manufacturer A
|
1395
|
+
852
|
1396
|
+
Manufacturer B
|
1397
|
+
853
|
1398
|
+
Manufacturer C
|
1399
|
+
854
|
1400
|
+
Manufacturer D
|
1401
|
+
855
|
1402
|
+
Manufacturer E
|
1403
|
+
|
1404
|
+
|
1405
|
+
Table 386
|
1406
|
+
Supplier Identifier
|
1407
|
+
Code
|
1408
|
+
Description
|
1409
|
+
951
|
1410
|
+
Supplier A
|
1411
|
+
952
|
1412
|
+
Supplier B
|
1413
|
+
953
|
1414
|
+
Supplier C
|
1415
|
+
954
|
1416
|
+
Supplier D
|
1417
|
+
955
|
1418
|
+
Supplier E
|
1419
|
+
|
1420
|
+
|
1421
|
+
Table 405
|
1422
|
+
Organization Unit
|
1423
|
+
Code
|
1424
|
+
Description
|
1425
|
+
A
|
1426
|
+
Unit A
|
1427
|
+
B
|
1428
|
+
Unit B
|
1429
|
+
C
|
1430
|
+
Unit C
|
1431
|
+
D
|
1432
|
+
Unit D
|
1433
|
+
E
|
1434
|
+
Unit E
|
1435
|
+
|
1436
|
+
|
1437
|
+
Table 412
|
1438
|
+
Category Identifier
|
1439
|
+
Code
|
1440
|
+
Description
|
1441
|
+
10
|
1442
|
+
Category 1
|
1443
|
+
20
|
1444
|
+
Category 2
|
1445
|
+
30
|
1446
|
+
Category 3
|
1447
|
+
40
|
1448
|
+
Category 4
|
1449
|
+
50
|
1450
|
+
Category 5
|
1451
|
+
|
1452
|
+
|
1453
|
+
Table 413
|
1454
|
+
Consent Identifier
|
1455
|
+
Code
|
1456
|
+
Description
|
1457
|
+
1
|
1458
|
+
Yes
|
1459
|
+
0
|
1460
|
+
No
|
1461
|
+
|
1462
|
+
|
1463
|
+
Table 449
|
1464
|
+
Conformance Statements
|
1465
|
+
Code
|
1466
|
+
Description
|
1467
|
+
10
|
1468
|
+
Conformance statement 1
|
1469
|
+
20
|
1470
|
+
Conformance statement 2
|
1471
|
+
30
|
1472
|
+
Conformance statement 3
|
1473
|
+
40
|
1474
|
+
Conformance statement 4
|
1475
|
+
50
|
1476
|
+
Conformance statement 5
|
1477
|
+
|
1478
|
+
|
1479
|
+
Table 461
|
1480
|
+
License Number
|
1481
|
+
Code
|
1482
|
+
Description
|
1483
|
+
LN1
|
1484
|
+
License 1
|
1485
|
+
LN2
|
1486
|
+
License 2
|
1487
|
+
LN3
|
1488
|
+
License 3
|
1489
|
+
LN4
|
1490
|
+
License 4
|
1491
|
+
LN5
|
1492
|
+
License 5
|
1493
|
+
|
1494
|
+
|
1495
|
+
Table 462
|
1496
|
+
Location Cost Center
|
1497
|
+
Code
|
1498
|
+
Description
|
1499
|
+
LCC1
|
1500
|
+
Cost Center 1
|
1501
|
+
LCC2
|
1502
|
+
Cost Center 2
|
1503
|
+
LCC3
|
1504
|
+
Cost Center 3
|
1505
|
+
LCC4
|
1506
|
+
Cost Center 4
|
1507
|
+
LCC5
|
1508
|
+
Cost Center 5
|
1509
|
+
|
1510
|
+
|
1511
|
+
Table 463
|
1512
|
+
Inventory Number
|
1513
|
+
Code
|
1514
|
+
Description
|
1515
|
+
INV1
|
1516
|
+
Item 1
|
1517
|
+
INV2
|
1518
|
+
Item 2
|
1519
|
+
INV3
|
1520
|
+
Item 3
|
1521
|
+
INV4
|
1522
|
+
Item 4
|
1523
|
+
INV5
|
1524
|
+
Item 5
|
1525
|
+
|
1526
|
+
|
1527
|
+
Table 464
|
1528
|
+
Facility ID
|
1529
|
+
Code
|
1530
|
+
Description
|
1531
|
+
FAC1
|
1532
|
+
Facility 1
|
1533
|
+
FAC2
|
1534
|
+
Facility 2
|
1535
|
+
FAC3
|
1536
|
+
Facility 3
|
1537
|
+
FAC4
|
1538
|
+
Facility 4
|
1539
|
+
FAC5
|
1540
|
+
Facility 5
|
1541
|
+
|
1542
|
+
|
1543
|
+
Table 471
|
1544
|
+
Query Name
|
1545
|
+
Code
|
1546
|
+
Description
|
1547
|
+
ZA
|
1548
|
+
Query A
|
1549
|
+
ZB
|
1550
|
+
Query B
|
1551
|
+
ZC
|
1552
|
+
Query C
|
1553
|
+
ZD
|
1554
|
+
Query D
|
1555
|
+
K11
|
1556
|
+
Allergies
|
1557
|
+
|
1558
|
+
|
1559
|
+
Table 476
|
1560
|
+
Medically Necessary Duplicate Procedure Reason
|
1561
|
+
Code
|
1562
|
+
Description
|
1563
|
+
1
|
1564
|
+
Reason 1
|
1565
|
+
2
|
1566
|
+
Reason 2
|
1567
|
+
3
|
1568
|
+
Reason 3
|
1569
|
+
4
|
1570
|
+
Reason 4
|
1571
|
+
5
|
1572
|
+
Reason 5
|
1573
|
+
|
1574
|
+
|
1575
|
+
Table 479
|
1576
|
+
Pharmaceutical Substances
|
1577
|
+
Code
|
1578
|
+
Description
|
1579
|
+
AS
|
1580
|
+
AMIKACIN SULFATE
|
1581
|
+
BZ
|
1582
|
+
BACITRACIN ZINC
|
1583
|
+
CP
|
1584
|
+
CAPTOPRIL
|
1585
|
+
DH
|
1586
|
+
DOXORUBICIN HYDROCHLORIDE
|
1587
|
+
FD
|
1588
|
+
FLUPHENAZINE DECANOATE
|
1589
|
+
|
1590
|
+
|
1591
|
+
Table 521
|
1592
|
+
Override Code
|
1593
|
+
Code
|
1594
|
+
Description
|
1595
|
+
1
|
1596
|
+
Code 1
|
1597
|
+
2
|
1598
|
+
Code 2
|
1599
|
+
3
|
1600
|
+
Code 3
|
1601
|
+
4
|
1602
|
+
Code 4
|
1603
|
+
5
|
1604
|
+
Code 5
|
1605
|
+
|
1606
|
+
|
1607
|
+
Table 525
|
1608
|
+
Privilege
|
1609
|
+
Code
|
1610
|
+
Description
|
1611
|
+
TF
|
1612
|
+
Treatment Facility Privileges
|
1613
|
+
SM
|
1614
|
+
Stuff Membership Privileges
|
1615
|
+
IN
|
1616
|
+
Institutional Privileges
|
1617
|
+
|
1618
|
+
|
1619
|
+
Table 526
|
1620
|
+
Privilege Class
|
1621
|
+
Code
|
1622
|
+
Description
|
1623
|
+
PHY
|
1624
|
+
Physician
|
1625
|
+
PSY
|
1626
|
+
Psychiatrist
|
1627
|
+
NP
|
1628
|
+
Nurse Practitioner
|
1629
|
+
|
1630
|
+
|
1631
|
+
Table 531
|
1632
|
+
Institution
|
1633
|
+
Code
|
1634
|
+
Description
|
1635
|
+
1
|
1636
|
+
Hospital
|
1637
|
+
2
|
1638
|
+
Clinic
|
1639
|
+
3
|
1640
|
+
Medical Research
|
1641
|
+
|
1642
|
+
|
1643
|
+
Table 549
|
1644
|
+
NDC Codes
|
1645
|
+
Code
|
1646
|
+
Description
|
1647
|
+
3541812312
|
1648
|
+
Loperamide Hydrochloride
|
1649
|
+
0924012301
|
1650
|
+
Acetaminophen
|
1651
|
+
2500012303
|
1652
|
+
Ibuprofen
|
1653
|
+
|