<?php

if (strtoupper($_SERVER['REQUEST_METHOD']) == 'GET') {





if (isset($_GET['FIRSTNAME'])) {

	# code...

	$FIRSTNAME=$_GET['FIRSTNAME'];

}else{

	$FIRSTNAME="";

}



if (isset($_GET['SURNAME'])) {

	# code...

	$SURNAME=$_GET['SURNAME'];

}else{

	$SURNAME="";

}



if (isset($_GET['ROLE'])) {

	# code...

	$ROLE=$_GET['ROLE'];

}else{

	$ROLE="";

}



if (isset($_GET['FIRSTNAME'])) {

	# code...

	$FIRSTNAME=$_GET['FIRSTNAME'];

}else{

	$FIRSTNAME="";

}





if (isset($_GET['METHOD'])) {

	# code...

	$METHOD=$_GET['METHOD'];

}else{

	$METHOD="";

}



if (isset($_GET['APIKEY'])) {

	# code...

	$APIKEY=$_GET['APIKEY'];

}else{

	$APIKEY="";

}





if (isset($_GET['USERNAME'])) {

	# code...

	$USERNAME=$_GET['USERNAME'];

}else{

	$USERNAME="";

}





if (isset($_GET['PASSWORD'])) {

	# code...

	$PASSWORD=$_GET['PASSWORD'];

}else{

	$PASSWORD="";

}



if (isset($_GET['PROVIDERID'])) {

	# code...

	$PROVIDERID=$_GET['PROVIDERID'];

}else{

	$PROVIDERID="";

}



if (isset($_GET['INSCOMPANYCODE'])) {

	# code...

	$INSCOMPANYCODE=$_GET['INSCOMPANYCODE'];

}else{

	$INSCOMPANYCODE="";

}



if (isset($_GET['MEMBERSHIPID'])) {

	# code...

	$MEMBERSHIPID=$_GET['MEMBERSHIPID'];

}else{

	$MEMBERSHIPID="";

}





if (isset($_GET['USERID'])) {

	# code...

	$USERID=urldecode($_GET['USERID']);

}else{

	$USERID="";

}



if (isset($_GET['RESPONSETYPE'])) {

	# code...

	$RESPONSETYPE=$_GET['RESPONSETYPE'];

}else{

	$RESPONSETYPE="";

}





if (isset($_GET['CLAIMNUMBER'])) {

	# code...

	$CLAIMNUMBER=$_GET['CLAIMNUMBER'];

}else{

	$CLAIMNUMBER="";

}



if (isset($_GET['PROVIDERREFNO'])) {

	# code...

	$PROVIDERREFNO=$_GET['PROVIDERREFNO'];

}else{

	$PROVIDERREFNO="";

}



if (isset($_GET['ATTENDINGOFFICER'])) {

	# code...

	$ATTENDINGOFFICER=urldecode($_GET['ATTENDINGOFFICER']);

}else{

	$ATTENDINGOFFICER="";

}



if (isset($_GET['DIAGNOSIS'])) {

	# code...

	$DIAGNOSIS=urldecode($_GET['DIAGNOSIS']);

}else{

	$DIAGNOSIS="";

}



if (isset($_GET['ICDCODE'])) {

	# code...

	$ICDCODE=urldecode($_GET['ICDCODE']);

}else{

	$ICDCODE="";

}





if (isset($_GET['TYPEOFVISIT'])) {

	# code...

	$TYPEOFVISIT=$_GET['TYPEOFVISIT'];

}else{

	$TYPEOFVISIT="";

}



if (isset($_GET['DATEOFCONSULTATION'])) {

	# code...

	$DATEOFCONSULTATION=$_GET['DATEOFCONSULTATION'];

}else{

	$DATEOFCONSULTATION="";

}



if (isset($_GET['DATEOFADMISSION'])) {

	# code...

	$DATEOFADMISSION=$_GET['DATEOFADMISSION'];

}else{

	$DATEOFADMISSION="";

}



if (isset($_GET['DATEOFDISCHARGE'])) {

	# code...

	$DATEOFDISCHARGE=$_GET['DATEOFDISCHARGE'];

}else{

	$DATEOFDISCHARGE="";

}



if (isset($_GET['PROVIDERITEMID'])) {

	# code...

	$PROVIDERITEMID=$_GET['PROVIDERITEMID'];

}else{

	$PROVIDERITEMID="";

}



if (isset($_GET['PROVIDERITEMNAME'])) {

	# code...

	$PROVIDERITEMNAME=$_GET['PROVIDERITEMNAME'];

}else{

	$PROVIDERITEMNAME="";

}



if (isset($_GET['NOOFDAYS'])) {

	# code...

	$NOOFDAYS=urldecode($_GET['NOOFDAYS']);

}else{

	$NOOFDAYS="";

}



if (isset($_GET['DOSAGE'])) {

	# code...

	$DOSAGE=urldecode($_GET['DOSAGE']);

}else{

	$DOSAGE="";

}



if (isset($_GET['DOSAGEUNIT'])) {

	# code...

	$DOSAGEUNIT=urldecode($_GET['DOSAGEUNIT']);

}else{

	$DOSAGEUNIT="";

}



if (isset($_GET['FREQUENCY'])) {

	# code...

	$FREQUENCY=urldecode($_GET['FREQUENCY']);

}else{

	$FREQUENCY="";

}



if (isset($_GET['ITEMNAME'])) {

	# code...

	$ITEMNAME=urldecode($_GET['ITEMNAME']);

}else{

	$ITEMNAME="";

}



if (isset($_GET['ITEMTYPE'])) {

	# code...

	$ITEMTYPE=urldecode($_GET['ITEMTYPE']);

}else{

	$ITEMTYPE="";

}



if (isset($_GET['QTY'])) {

	# code...

	$QTY=$_GET['QTY'];

}else{

	$QTY="";

}



if (isset($_GET['UNITPRICE'])) {

	# code...

	$UNITPRICE=$_GET['UNITPRICE'];

}else{

	$UNITPRICE="";

}





if (isset($_GET['TOTALPRICE'])) {

	# code...

	$TOTALPRICE=$_GET['TOTALPRICE'];

}else{

	$TOTALPRICE="";

}



if (isset($_GET['UPDATETYPE'])) {

	# code...

	$UPDATETYPE=$_GET['UPDATETYPE'];

}else{

	$UPDATETYPE="";

}



if (isset($_GET['AMOUNT'])) {

	# code...

	$AMOUNT=$_GET['AMOUNT'];

}else{

	$AMOUNT="";

}







}



if (strtoupper($_SERVER['REQUEST_METHOD']) == 'POST') {



if (isset($_POST['FIRSTNAME'])) {

	# code...

	$FIRSTNAME=$_POST['FIRSTNAME'];

}else{

	$FIRSTNAME="";

}



if (isset($_POST['SURNAME'])) {

	# code...

	$SURNAME=$_POST['SURNAME'];

}else{

	$SURNAME="";

}



if (isset($_POST['ROLE'])) {

	# code...

	$ROLE=$_POST['ROLE'];

}else{

	$ROLE="";

}







if (isset($_POST['METHOD'])) {

	# code...

	$METHOD=$_POST['METHOD'];

}else{

	$METHOD="";

}



if (isset($_POST['APIKEY'])) {

	# code...

	$APIKEY=$_POST['APIKEY'];

}else{

	$APIKEY="";

}





if (isset($_POST['USERNAME'])) {

	# code...

	$USERNAME=$_POST['USERNAME'];

}else{

	$USERNAME="";

}





if (isset($_POST['PASSWORD'])) {

	# code...

	$PASSWORD=$_POST['PASSWORD'];

}else{

	$PASSWORD="";

}



if (isset($_POST['PROVIDERID'])) {

	# code...

	$PROVIDERID=$_POST['PROVIDERID'];

}else{

	$PROVIDERID="";

}



if (isset($_POST['INSCOMPANYCODE'])) {

	# code...

	$INSCOMPANYCODE=$_POST['INSCOMPANYCODE'];

}else{

	$INSCOMPANYCODE="";

}



if (isset($_POST['MEMBERSHIPID'])) {

	# code...

	$MEMBERSHIPID=$_POST['MEMBERSHIPID'];

}else{

	$MEMBERSHIPID="";

}





if (isset($_POST['USERID'])) {

	# code...

	$USERID=urldecode($_POST['USERID']);

}else{

	$USERID="";

}



if (isset($_POST['RESPONSETYPE'])) {

	# code...

	$RESPONSETYPE=$_POST['RESPONSETYPE'];

}else{

	$RESPONSETYPE="";

}





if (isset($_POST['CLAIMNUMBER'])) {

	# code...

	$CLAIMNUMBER=$_POST['CLAIMNUMBER'];

}else{

	$CLAIMNUMBER="";

}



if (isset($_POST['PROVIDERREFNO'])) {

	# code...

	$PROVIDERREFNO=$_POST['PROVIDERREFNO'];

}else{

	$PROVIDERREFNO="";

}



if (isset($_POST['ATTENDINGOFFICER'])) {

	# code...

	$ATTENDINGOFFICER=urldecode($_POST['ATTENDINGOFFICER']);

}else{

	$ATTENDINGOFFICER="";

}



if (isset($_POST['DIAGNOSIS'])) {

	# code...

	$DIAGNOSIS=urldecode($_POST['DIAGNOSIS']);

}else{

	$DIAGNOSIS="";

}



if (isset($_POST['ICDCODE'])) {

	# code...

	$ICDCODE=urldecode($_POST['ICDCODE']);

}else{

	$ICDCODE="";

}





if (isset($_POST['TYPEOFVISIT'])) {

	# code...

	$TYPEOFVISIT=$_POST['TYPEOFVISIT'];

}else{

	$TYPEOFVISIT="";

}



if (isset($_POST['DATEOFCONSULTATION'])) {

	# code...

	$DATEOFCONSULTATION=$_POST['DATEOFCONSULTATION'];

}else{

	$DATEOFCONSULTATION="";

}



if (isset($_POST['DATEOFADMISSION'])) {

	# code...

	$DATEOFADMISSION=$_POST['DATEOFADMISSION'];

}else{

	$DATEOFADMISSION="";

}



if (isset($_POST['DATEOFDISCHARGE'])) {

	# code...

	$DATEOFDISCHARGE=$_POST['DATEOFDISCHARGE'];

}else{

	$DATEOFDISCHARGE="";

}



if (isset($_POST['PROVIDERITEMID'])) {

	# code...

	$PROVIDERITEMID=$_POST['PROVIDERITEMID'];

}else{

	$PROVIDERITEMID="";

}



if (isset($_POST['PROVIDERITEMNAME'])) {

	# code...

	$PROVIDERITEMNAME=$_POST['PROVIDERITEMNAME'];

}else{

	$PROVIDERITEMNAME="";

}



if (isset($_POST['NOOFDAYS'])) {

	# code...

	$NOOFDAYS=urldecode($_POST['NOOFDAYS']);

}else{

	$NOOFDAYS="";

}



if (isset($_POST['DOSAGE'])) {

	# code...

	$DOSAGE=urldecode($_POST['DOSAGE']);

}else{

	$DOSAGE="";

}



if (isset($_POST['DOSAGEUNIT'])) {

	# code...

	$DOSAGEUNIT=urldecode($_POST['DOSAGEUNIT']);

}else{

	$DOSAGEUNIT="";

}



if (isset($_POST['FREQUENCY'])) {

	# code...

	$FREQUENCY=urldecode($_POST['FREQUENCY']);

}else{

	$FREQUENCY="";

}



if (isset($_POST['ITEMNAME'])) {

	# code...

	$ITEMNAME=urldecode($_POST['ITEMNAME']);

}else{

	$ITEMNAME="";

}



if (isset($_POST['ITEMTYPE'])) {

	# code...

	$ITEMTYPE=urldecode($_POST['ITEMTYPE']);

}else{

	$ITEMTYPE="";

}



if (isset($_POST['QTY'])) {

	# code...

	$QTY=$_POST['QTY'];

}else{

	$QTY="";

}



if (isset($_POST['UNITPRICE'])) {

	# code...

	$UNITPRICE=$_POST['UNITPRICE'];

}else{

	$UNITPRICE="";

}





if (isset($_POST['TOTALPRICE'])) {

	# code...

	$TOTALPRICE=$_POST['TOTALPRICE'];

}else{

	$TOTALPRICE="";

}



if (isset($_POST['UPDATETYPE'])) {

	# code...

	$UPDATETYPE=$_POST['UPDATETYPE'];

}else{

	$UPDATETYPE="";

}



if (isset($_POST['AMOUNT'])) {

	# code...

	$AMOUNT=$_POST['AMOUNT'];

}else{

	$AMOUNT="";

}



}











$recieved = json_decode(file_get_contents('php://input'), true);

if (isset($recieved['FIRSTNAME'])) {

	# code...

	$FIRSTNAME=$recieved['FIRSTNAME'];

}

if (isset($recieved['SURNAME'])) {

	# code...

	$SURNAME=$recieved['SURNAME'];

}



if (isset($recieved['ROLE'])) {

	# code...

	$ROLE=$recieved['ROLE'];

}

if (isset($recieved['METHOD'])) {

	# code...

	$METHOD=$recieved['METHOD'];

}



if (isset($recieved['APIKEY'])) {

	# code...

	$APIKEY=$recieved['APIKEY'];

}





if (isset($recieved['USERNAME'])) {

	# code...

	$USERNAME=$recieved['USERNAME'];

}





if (isset($recieved['PASSWORD'])) {

	# code...

	$PASSWORD=$recieved['PASSWORD'];

}



if (isset($recieved['PROVIDERID'])) {

	# code...

	$PROVIDERID=$recieved['PROVIDERID'];

}



if (isset($recieved['INSCOMPANYCODE'])) {

	# code...

	$INSCOMPANYCODE=$recieved['INSCOMPANYCODE'];

}



if (isset($recieved['MEMBERSHIPID'])) {

	# code...

	$MEMBERSHIPID=$recieved['MEMBERSHIPID'];

}





if (isset($recieved['USERID'])) {

	# code...

	$USERID=urldecode($recieved['USERID']);

}



if (isset($recieved['RESPONSETYPE'])) {

	# code...

	$RESPONSETYPE=$recieved['RESPONSETYPE'];

}





if (isset($recieved['CLAIMNUMBER'])) {

	# code...

	$CLAIMNUMBER=$recieved['CLAIMNUMBER'];

}



if (isset($recieved['PROVIDERREFNO'])) {

	# code...

	$PROVIDERREFNO=$recieved['PROVIDERREFNO'];

}



if (isset($recieved['ATTENDINGOFFICER'])) {

	# code...

	$ATTENDINGOFFICER=urldecode($recieved['ATTENDINGOFFICER']);

}



if (isset($recieved['DIAGNOSIS'])) {

	# code...

	$DIAGNOSIS=urldecode($recieved['DIAGNOSIS']);

}



if (isset($recieved['ICDCODE'])) {

	# code...

	$ICDCODE=urldecode($recieved['ICDCODE']);

}





if (isset($recieved['TYPEOFVISIT'])) {

	# code...

	$TYPEOFVISIT=$recieved['TYPEOFVISIT'];

}



if (isset($recieved['DATEOFCONSULTATION'])) {

	# code...

	$DATEOFCONSULTATION=$recieved['DATEOFCONSULTATION'];

}



if (isset($recieved['DATEOFADMISSION'])) {

	# code...

	$DATEOFADMISSION=$recieved['DATEOFADMISSION'];

}



if (isset($recieved['DATEOFDISCHARGE'])) {

	# code...

	$DATEOFDISCHARGE=$recieved['DATEOFDISCHARGE'];

}



if (isset($recieved['PROVIDERITEMID'])) {

	# code...

	$PROVIDERITEMID=$recieved['PROVIDERITEMID'];

}



if (isset($recieved['PROVIDERITEMNAME'])) {

	# code...

	$PROVIDERITEMNAME=$recieved['PROVIDERITEMNAME'];

}



if (isset($recieved['NOOFDAYS'])) {

	# code...

	$NOOFDAYS=urldecode($recieved['NOOFDAYS']);

}



if (isset($recieved['DOSAGE'])) {

	# code...

	$DOSAGE=urldecode($recieved['DOSAGE']);

}



if (isset($recieved['DOSAGEUNIT'])) {

	# code...

	$DOSAGEUNIT=urldecode($recieved['DOSAGEUNIT']);

}



if (isset($recieved['FREQUENCY'])) {

	# code...

	$FREQUENCY=urldecode($recieved['FREQUENCY']);

}



if (isset($recieved['ITEMNAME'])) {

	# code...

	$ITEMNAME=urldecode($recieved['ITEMNAME']);

}



if (isset($recieved['ITEMTYPE'])) {

	# code...

	$ITEMTYPE=urldecode($recieved['ITEMTYPE']);

}



if (isset($recieved['QTY'])) {

	# code...

	$QTY=$recieved['QTY'];

}



if (isset($recieved['UNITPRICE'])) {

	# code...

	$UNITPRICE=$recieved['UNITPRICE'];

}





if (isset($recieved['TOTALPRICE'])) {

	# code...

	$TOTALPRICE=$recieved['TOTALPRICE'];

}



if (isset($recieved['UPDATETYPE'])) {

	# code...

	$UPDATETYPE=$recieved['UPDATETYPE'];

}



if (isset($recieved['AMOUNT'])) {

	# code...

	$AMOUNT=$recieved['AMOUNT'];

}







?>