예제 #1
0
function credentials($doc, $r)
{
    global $msg;
    $cred = getErxCredentials();
    $msg = validation(xl('Partner Name'), $cred['0'], $msg);
    $b = $doc->createElement("Credentials");
    $partnerName = $doc->createElement("partnerName");
    $partnerName->appendChild($doc->createTextNode($cred['0']));
    $b->appendChild($partnerName);
    $msg = validation(xl('ERX Name'), $cred['1'], $msg);
    $name = $doc->createElement("name");
    $name->appendChild($doc->createTextNode($cred['1']));
    $b->appendChild($name);
    $msg = validation(xl('ERX Password'), $cred['2'], $msg);
    $password = $doc->createElement("password");
    $password->appendChild($doc->createTextNode($cred['2']));
    $b->appendChild($password);
    $productName = $doc->createElement("productName");
    $productName->appendChild($doc->createTextNode('OpenEMR'));
    $b->appendChild($productName);
    $productVersion = $doc->createElement("productVersion");
    $productVersion->appendChild($doc->createTextNode($GLOBALS['openemr_version']));
    $b->appendChild($productVersion);
    $r->appendChild($b);
}
require_once '../globals.php';
require_once '../eRx_xml.php';
require_once '../../library/xmltoarray_parser_htmlfix.php';
require_once $GLOBALS['fileroot'] . "/library/amc.php";
set_time_limit(0);
function number($str)
{
    return preg_replace('/[^0-9.]/', '', $str);
}
if (!$patientid) {
    $patientid = $pid;
}
if ($_REQUEST['patient']) {
    $patientid = $_REQUEST['patient'];
}
$cred = getErxCredentials();
$path = getErxSoapPath();
$path = explode(';', $path);
$client = new SoapClient($path[0]);
$xml1_0['credentials']['PartnerName'] = $cred['0'];
$xml1_0['credentials']['Name'] = $cred['1'];
$xml1_0['credentials']['Password'] = $cred['2'];
$erxSiteID = sqlQuery("SELECT federal_ein FROM facility WHERE primary_business_entity='1'");
$account = sqlQuery("SELECT * FROM users AS u LEFT JOIN facility AS f ON f.id=u.facility_id WHERE u.username=?", array($_SESSION['authUser']));
$xml1_0['accountRequest']['AccountId'] = '1';
$xml1_0['accountRequest']['SiteId'] = $erxSiteID['federal_ein'];
$xml1_0['patientRequest']['PatientId'] = $patientid;
$xml1_0['prescriptionHistoryRequest']['StartHistory'] = '2011-01-01T00:00:00.000';
$xml1_0['prescriptionHistoryRequest']['EndHistory'] = date('Y-m-d') . 'T23:59:59.000';
$xml1_0['prescriptionHistoryRequest']['PrescriptionStatus'] = 'C';
$xml1_0['prescriptionHistoryRequest']['PrescriptionSubStatus'] = '%';
예제 #3
0
 * @subpackage NewCrop
 * @author     Eldho Chacko <*****@*****.**>
 * @author     Vinish K <*****@*****.**>
 * @author     Sam Likins <*****@*****.**>
 * @link       http://www.open-emr.org
 */
$sanitize_all_escapes = true;
// SANITIZE ALL ESCAPES
$fake_register_globals = false;
// STOP FAKE REGISTER GLOBALS
require_once '../globals.php';
require_once $GLOBALS['fileroot'] . '/interface/eRx_xml.php';
require_once $GLOBALS['fileroot'] . '/interface/eRxSOAP.php';
set_time_limit(0);
$eRxSOAP = new eRxSOAP();
$eRxSOAP->setStore(new eRxStore())->setAuthUserId($_SESSION['authUserID'])->setSoapPath(explode(';', getErxSoapPath()))->setCredentials(getErxCredentials());
$accountStatus = $eRxSOAP->getAccountStatus()->GetAccountStatusResult->accountStatusDetail;
?>
<head>
<link rel="stylesheet" href="<?php 
echo $css_header;
?>
" type="text/css">
</head>
<body class='body_top'>
	<table class='text' align=center width='90%' height='80%' style='padding-top:6%'>
		<tr>
			<th colspan=2><?php 
echo xlt('eRx Account Status');
?>
</th>