Code type module improvements:
[openemr.git] / library / freeb / ActionKeys.class.php
blob3b4323456d984d4cbd7470f186f94bd71b432ba9
1 <?php
2 require_once("DataObjectBase.class.php");
3 require_once("xmlrpc.inc");
5 class ActionKeys Extends DataObjectBase {
7 function ActionKeys() {
8 $this->_addFunc("procarray", array( "name" => "FreeB.FBProcedure.ProcArray",
9 "sig" => array(XMLRPCSTRING,XMLRPCINT),
10 "doc" => ""));
11 $this->_addFunc("diagarray", array( "name" => "FreeB.FBProcedure.DiagArray",
12 "sig" => array(XMLRPCSTRING,XMLRPCINT),
13 "doc" => ""));
14 $this->_addFunc("patientkey", array( "name" => "FreeB.FBProcedure.PatientKey",
15 "sig" => array(XMLRPCSTRING),
16 "doc" => ""));
17 $this->_addFunc("practicekey", array( "name" => "FreeB.FBProcedure.PracticeKey",
18 "sig" => array(XMLRPCSTRING),
19 "doc" => ""));
20 $this->_addFunc("providerkey", array( "name" => "FreeB.FBProcedure.ProviderKey",
21 "sig" => array(XMLRPCSTRING),
22 "doc" => ""));
23 $this->_addFunc("insuredkey", array( "name" => "FreeB.FBProcedure.InsuredKey",
24 "sig" => array(XMLRPCSTRING),
25 "doc" => ""));
26 $this->_addFunc("otherinsuredkey", array( "name" => "FreeB.FBProcedure.OtherInsuredKey",
27 "sig" => array(XMLRPCSTRING),
28 "doc" => ""));
29 $this->_addFunc("payerkey", array( "name" => "FreeB.FBProcedure.PayerKey",
30 "sig" => array(XMLRPCSTRING,XMLRPCINT),
31 "doc" => ""));
32 $this->_addFunc("secondpayerkey", array( "name" => "FreeB.FBProcedure.SecondPayerKey",
33 "sig" => array(XMLRPCSTRING),
34 "doc" => ""));
35 $this->_addFunc("facilitykey", array( "name" => "FreeB.FBProcedure.FacilityKey",
36 "sig" => array(XMLRPCSTRING),
37 "doc" => ""));
38 $this->_addFunc("billingcontactkey",array( "name" => "FreeB.FBProcedure.BillingContactKey",
39 "sig" => array(XMLRPCSTRING),
40 "doc" => ""));
41 $this->_addFunc("billingservicekey",array( "name" => "FreeB.FBProcedure.BillingServiceKey",
42 "sig" => array(XMLRPCSTRING),
43 "doc" => ""));
44 $this->_addFunc("isusingbillingservice",array( "name" => "FreeB.FBProcedure.IsUsingBillingService",
45 "sig" => array(XMLRPCSTRING),
46 "doc" => ""));
47 $this->_addFunc("clearinghousekey", array( "name" => "FreeB.FBProcedure.ClearingHouseKey",
48 "sig" => array(XMLRPCSTRING),
49 "doc" => ""));
53 function procarray($m) {
55 $err="";
57 $procs = array(new xmlrpcval(144,"i4"),new xmlrpcval(233,"i4"));
59 // if we generated an error, create an error return response
60 if ($err) {
61 return $this->_handleError($err);
63 else {
64 // otherwise, we create the right response
65 // with the state name
66 return new xmlrpcresp(new xmlrpcval($procs,"array"));
70 function diagarray($m) {
72 $err="";
74 $diags = array(new xmlrpcval(104,"i4"),new xmlrpcval(101,"i4"));
76 // if we generated an error, create an error return response
77 if ($err) {
78 return $this->_handleError($err);
80 else {
81 // otherwise, we create the right response
82 // with the state name
83 return new xmlrpcresp(new xmlrpcval($diags,"array"));
89 function patientkey($m) {
91 $err="";
93 $pkey = 555111555;
95 // if we generated an error, create an error return response
96 if ($err) {
97 return $this->_handleError($err);
99 else {
100 // otherwise, we create the right response
101 // with the state name
102 return new xmlrpcresp(new xmlrpcval($pkey));
106 function practicekey($m) {
108 $err="";
110 $pkey = 111555111;
112 // if we generated an error, create an error return response
113 if ($err) {
114 return $this->_handleError($err);
116 else {
117 // otherwise, we create the right response
118 // with the state name
119 return new xmlrpcresp(new xmlrpcval($pkey));
123 function providerkey($m) {
125 $err="";
127 $pkey = 111555111;
129 // if we generated an error, create an error return response
130 if ($err) {
131 return $this->_handleError($err);
133 else {
134 // otherwise, we create the right response
135 // with the state name
136 return new xmlrpcresp(new xmlrpcval($pkey));
140 function insuredkey($m) {
142 $err="";
144 $pkey = 111555111;
146 // if we generated an error, create an error return response
147 if ($err) {
148 return $this->_handleError($err);
150 else {
151 // otherwise, we create the right response
152 // with the state name
153 return new xmlrpcresp(new xmlrpcval($pkey));
157 function otherinsuredkey($m) {
159 $err="";
161 $pkey = 111555111;
163 // if we generated an error, create an error return response
164 if ($err) {
165 return $this->_handleError($err);
167 else {
168 // otherwise, we create the right response
169 // with the state name
170 return new xmlrpcresp(new xmlrpcval($pkey));
174 function payerkey($m) {
175 $err="";
177 $pkey = 111555111;
179 // if we generated an error, create an error return response
180 if ($err) {
181 return $this->_handleError($err);
183 else {
184 // otherwise, we create the right response
185 // with the state name
186 return new xmlrpcresp(new xmlrpcval($pkey));
190 function secondpayerkey($m) {
192 $err="";
194 $pkey = 111555111;
196 // if we generated an error, create an error return response
197 if ($err) {
198 return $this->_handleError($err);
200 else {
201 // otherwise, we create the right response
202 // with the state name
203 return new xmlrpcresp(new xmlrpcval($pkey));
207 function facilitykey($m) {
209 $err="";
211 $pkey = 111555111;
213 // if we generated an error, create an error return response
214 if ($err) {
215 return $this->_handleError($err);
217 else {
218 // otherwise, we create the right response
219 // with the state name
220 return new xmlrpcresp(new xmlrpcval($pkey));
224 function billingcontactkey($m) {
226 $err="";
228 $pkey = 111555111;
230 // if we generated an error, create an error return response
231 if ($err) {
232 return $this->_handleError($err);
234 else {
235 // otherwise, we create the right response
236 // with the state name
237 return new xmlrpcresp(new xmlrpcval($pkey));
240 function billingservicekey($m) {
242 $err="";
244 $pkey = 111555111;
246 // if we generated an error, create an error return response
247 if ($err) {
248 return $this->_handleError($err);
250 else {
251 // otherwise, we create the right response
252 // with the state name
253 return new xmlrpcresp(new xmlrpcval($pkey));
258 function isusingbillingservice($m) {
260 $err="";
262 $pkey = false;
264 // if we generated an error, create an error return response
265 if ($err) {
266 return $this->_handleError($err);
268 else {
269 // otherwise, we create the right response
270 // with the state name
271 return new xmlrpcresp(new xmlrpcval($pkey));
275 function clearinghousekey($m) {
277 $err="";
279 $pkey = 44;
281 // if we generated an error, create an error return response
282 if ($err) {
283 return $this->_handleError($err);
285 else {
286 // otherwise, we create the right response
287 // with the state name
288 return new xmlrpcresp(new xmlrpcval($pkey));
293 //'FreeB.FBProcedure.ProcArray' => \&FreeB_FBProcedure_ProcArray,
294 //'FreeB.FBProcedure.DiagArray' => \&FreeB_FBProcedure_DiagArray,
295 //'FreeB.FBProcedure.PatientKey' => \&FreeB_FBProcedure_PatientKey,
296 //'FreeB.FBProcedure.PracticeKey' => \&FreeB_FBProcedure_PracticeKey,
297 //'FreeB.FBProcedure.ProviderKey' => \&FreeB_FBProcedure_ProviderKey,
298 //'FreeB.FBProcedure.InsuredKey' => \&FreeB_FBProcedure_InsuredKey,
299 //'FreeB.FBProcedure.OtherInsuredKey' => \&FreeB_FBProcedure_OtherInsuredKey,
300 //'FreeB.FBProcedure.PayerKey' => \&FreeB_FBProcedure_PayerKey,
301 //'FreeB.FBProcedure.SecondPayerKey' => \&FreeB_FBProcedure_SecondPayerKey,
302 //'FreeB.FBProcedure.FacilityKey' => \&FreeB_FBProcedure_FacilityKey,
303 //'FreeB.FBProcedure.BillingContactKey' => \&FreeB_FBProcedure_BillingContactKey,
304 //'FreeB.FBProcedure.BillingServiceKey' => \&FreeB_FBProcedure_BillingServiceKey,
305 //'FreeB.FBProcedure.isUsingBillingService' => \&FreeB_FBProcedure_isUsingBillingService,
306 //'FreeB.FBProcedure.ClearingHouseKey' => \&FreeB_FBProcedure_ClearingHouseKey,