Exemplo n.º 1
0
}

</script>

</head>

<body class="body_top">
<form method='post' action='list_reports.php' enctype='multipart/form-data'
 onsubmit='return validate(this)'>

<?php 
if ($errmsg) {
    echo "<font color='red'>" . text($errmsg) . "</font><br />\n";
}
$messages = array();
$errmsg = poll_hl7_results($messages);
foreach ($messages as $message) {
    echo text($message) . "<br />\n";
}
if ($errmsg) {
    echo "<font color='red'>" . text($errmsg) . "</font><br />\n";
}
// Process uploaded file if there is one.
if (!empty($_FILES['userfile']['name'])) {
    // if upload was attempted
    if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
        $hl7 = file_get_contents($_FILES['userfile']['tmp_name']);
        $msg = receive_hl7_results($hl7);
        $message = xl('Upload processed successfully');
        if ($msg) {
            $message = xl('Error processing upload') . ": " . $msg;
Exemplo n.º 2
0
if (empty($_POST['form_external_refresh'])) {
    // Get patient matching selections from this form if there are any.
    if (is_array($_POST['select'])) {
        foreach ($_POST['select'] as $selkey => $selval) {
            $info['select'][$selkey] = $selval;
        }
    }
    // Get file delete requests from this form if there are any.
    if (is_array($_POST['delete'])) {
        foreach ($_POST['delete'] as $delkey => $dummy) {
            $info[$delkey] = array('delete' => true);
        }
    }
}
// Attempt to post any incoming results.
$errmsg = poll_hl7_results($info);
// echo "<!--\n";  // debugging
// print_r($info); // debugging
// echo "-->\n";   // debugging
// Display a row for each required patient matching decision or message.
$s = '';
$matchreqs = false;
$errors = false;
// Generate HTML to request patient matching.
if (is_array($info['match'])) {
    foreach ($info['match'] as $matchkey => $matchval) {
        $matchreqs = true;
        $s .= " <tr class='detail' bgcolor='#ccccff'>\n";
        $s .= "  <td>&nbsp;</td>\n";
        $s .= "  <td>&nbsp;</td>\n";
        $s .= "  <td><a href='javascript:openPtMatch(\"" . addslashes($matchkey) . "\")'>";