示例#1
0
        sqlQuery("update patient_data set soap_import_status=1 where pid=?", array($pid));
    } elseif ($page == 'medentry') {
        sqlQuery("update patient_data set soap_import_status=3 where pid=?", array($pid));
    }
    $prescArr = explode(':', $prescIds);
    foreach ($prescArr as $prescid) {
        sqlQuery("update prescriptions set erx_uploaded='1', active='0' where patient_id=? and id=?", array($pid, $prescid));
    }
    ?>
    <script language='JavaScript'>
    <?php 
    require $GLOBALS['srcdir'] . "/restoreSession.php";
    ?>
    </script>
    <form name='info' method='post' action="<?php 
    echo getErxPath();
    ?>
" onsubmit='return top.restoreSession()'>
        <input type='submit' style='display:none'>
        <input type='hidden' id='RxInput' name='RxInput' value="<?php 
    echo $xml;
    ?>
">
    </form>
    <script type="text/javascript" src="../library/js/jquery.1.3.2.js"></script>
    <script type='text/javascript'>
    document.forms[0].submit();
    </script>
<?php 
} else {
    echo htmlspecialchars(xl('NewCrop call failed', ENT_NOQUOTES));
示例#2
0
function checkError($xml)
{
    $ch = curl_init($xml);
    $data = array('RxInput' => $xml);
    curl_setopt($ch, CURLOPT_URL, getErxPath());
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "RxInput=" . $xml);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
    //curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
    curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
    curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch) or die(curl_error($ch));
    preg_match('/<textarea.*>(.*)Original XML:/is', $result, $error_message);
    if (strpos($result, 'RxEntry.aspx')) {
        erx_error_log($xml);
        erx_error_log($result);
    }
    $arr = split('Error', $error_message[1]);
    //echo "Te: ".count($arr);
    //print_r($arr);
    if (count($arr) == 1) {
        echo nl2br($error_message[1]);
    } else {
        for ($i = 1; $i < count($arr); $i++) {
            echo $arr[$i] . "<br><br>";
        }
    }
    curl_close($ch);
    if (strpos($result, 'RxEntry.aspx')) {
        return '1';
    } else {
        return '0';
    }
}
示例#3
0
function checkError($xml)
{
    $ch = curl_init($xml);
    $data = array('RxInput' => $xml);
    curl_setopt($ch, CURLOPT_URL, getErxPath());
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "RxInput=" . $xml);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_COOKIESESSION, TRUE);
    //curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_COOKIEFILE, "cookiefile");
    curl_setopt($ch, CURLOPT_COOKIEJAR, "cookiefile");
    curl_setopt($ch, CURLOPT_COOKIE, session_name() . '=' . session_id());
    curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $result = curl_exec($ch) or die(curl_error($ch));
    curl_close($ch);
    if (strpos($result, 'RxEntry.aspx')) {
        return '1';
    } else {
        return '0';
    }
}