8 class X12Partner
extends ORDataObject
18 var $x12_isa05; // Sender Interchange ID Qualifier. ZZ = mutually defined, 01 = Duns, etc.
19 var $x12_sender_id; // ISA06
20 var $x12_isa07; // Receiver Interchange ID Qualifier.
21 var $x12_receiver_id; // ISA08
22 var $x12_isa14; // Acknowledgment Requested. 0 = No, 1 = Yes.
23 var $x12_isa15; // Usage Indicator. T = testing, P = production.
24 var $x12_gs02; // Application Sender's Code. Default to ISA06.
25 var $x12_per06; // The submitter's EDI Access Number, if any.
27 var $processing_format;
28 var $processing_format_array;
29 var $x12_gs03; // Application Sender's Code. If this isn't set then we will use the $x12_receiver_id(ISA08).
32 * Constructor sets all Insurance attributes to their default value
35 function __construct($id = "", $prefix = "")
37 parent
::__construct();
39 $this->_table
= "x12_partners";
40 $this->processing_format_array
= $this->_load_enum("processing_format", false);
41 $this->processing_format
= $this->processing_format_array
[0];
42 //most recent x12 version mandated by HIPAA and CMS
43 // $this->x12_version = "004010X098A1";
44 $this->x12_version
= "005010X222A1";
45 $this->x12_isa05
= "ZZ";
46 $this->x12_isa07
= "ZZ";
47 $this->x12_isa14
= "0";
53 function x12_partner_factory()
56 $x = new X12Partner();
57 $sql = "SELECT id FROM " . $x->_table
. " order by name";
58 $result = $x->_db
->Execute($sql);
59 while ($result && !$result->EOF
) {
60 $partners[] = new X12Partner($result->fields
['id']);
74 if (is_numeric($id)) {
84 function set_name($string)
86 $this->name
= $string;
89 function get_id_number()
91 return $this->id_number
;
94 function set_id_number($string)
96 $this->id_number
= $string;
99 function get_x12_sender_id()
101 return $this->x12_sender_id
;
104 function set_x12_sender_id($string)
106 $this->x12_sender_id
= $string;
109 function get_x12_receiver_id()
111 return $this->x12_receiver_id
;
114 function set_x12_receiver_id($string)
116 $this->x12_receiver_id
= $string;
119 function get_x12_version()
121 return $this->x12_version
;
124 function set_x12_version($string)
126 $this->x12_version
= $string;
129 function get_x12_isa01()
131 return $this->x12_isa01
;
134 function set_x12_isa01($string)
136 $this->x12_isa01
= $string;
139 function get_x12_isa02()
141 return $this->x12_isa02
;
144 function set_x12_isa02($string)
146 $this->x12_isa02
= $string;
149 function get_x12_isa03()
151 return $this->x12_isa03
;
154 function set_x12_isa03($string)
156 $this->x12_isa03
= $string;
159 function get_x12_isa04()
161 return $this->x12_isa04
;
164 function set_x12_isa04($string)
166 $this->x12_isa04
= $string;
169 function get_x12_isa05()
171 return $this->x12_isa05
;
174 function set_x12_isa05($string)
176 $this->x12_isa05
= $string;
179 function get_x12_isa07()
181 return $this->x12_isa07
;
184 function set_x12_isa07($string)
186 $this->x12_isa07
= $string;
189 function get_x12_isa14()
191 return $this->x12_isa14
;
194 function set_x12_isa14($string)
196 $this->x12_isa14
= $string;
199 function get_x12_isa15()
201 return $this->x12_isa15
;
204 function set_x12_isa15($string)
206 $this->x12_isa15
= $string;
209 function get_x12_gs02()
211 return $this->x12_gs02
;
214 function set_x12_gs02($string)
216 $this->x12_gs02
= $string;
219 function get_x12_per06()
221 return $this->x12_per06
;
224 function set_x12_per06($string)
226 $this->x12_per06
= $string;
229 function get_processing_format()
231 //this is enum so it can be string or int
232 if (!is_numeric($this->processing_format
)) {
233 $ta = $this->processing_format_array
;
234 return $ta[$this->processing_format
];
237 return $this->processing_format
;
240 function get_processing_format_array()
242 //flip it because normally it is an id to name lookup, for templates it needs to be a name to id lookup
243 return array_flip($this->processing_format_array
);
246 function set_processing_format($string)
248 $this->processing_format
= $string;
251 function get_x12_gs03()
253 return $this->x12_gs03
;
256 function set_x12_gs03($string)
258 $this->x12_gs03
= $string;
261 function get_x12_isa14_array()
269 function get_x12_isa15_array()
277 function get_idqual_array()
280 '01' => 'Duns (Dun & Bradstreet)',
281 '14' => 'Duns Plus Suffix',
282 '20' => 'Health Industry Number (HIN)',
283 '27' => 'Carrier ID from HCFA',
284 '28' => 'Fiscal Intermediary ID from HCFA',
285 '29' => 'Medicare ID from HCFA',
286 '30' => 'U.S. Federal Tax ID Number',
287 '33' => 'NAIC Company Code',
288 'ZZ' => 'Mutually Defined',
292 function get_x12_version_array()
295 '005010X222A1' => '005010X222A1',
296 '004010X098A1' => '004010X098A1',