コード例 #1
1
ファイル: report.php プロジェクト: robonology/openemr
function procedure_order_report($pid, $encounter, $cols, $id)
{
    $cols = 1;
    // force always 1 column
    $count = 0;
    $data = sqlQuery("SELECT * " . "FROM procedure_order WHERE " . "procedure_order_id = '{$id}' AND activity = '1'");
    if ($data) {
        print "<table cellpadding='0' cellspacing='0'>\n<tr>\n";
        foreach ($data as $key => $value) {
            if ($key == "procedure_order_id" || $key == "pid" || $key == "user" || $key == "groupname" || $key == "authorized" || $key == "activity" || $key == "date" || $value == "" || $value == "0" || $value == "0.00") {
                continue;
            }
            $key = ucwords(str_replace("_", " ", $key));
            if ($key == "Order Priority") {
                print "<td valign='top'><span class='bold'>" . xl($key) . ": </span><span class='text'>" . generate_display_field(array('data_type' => '1', 'list_id' => 'ord_priority'), $value) . " &nbsp;</span></td>\n";
            } else {
                if ($key == "Order Status") {
                    print "<td valign='top'><span class='bold'>" . xl($key) . ": </span><span class='text'>" . generate_display_field(array('data_type' => '1', 'list_id' => 'ord_status'), $value) . " &nbsp;</span></td>\n";
                } else {
                    print "<td valign='top'><span class='bold'>" . xl($key) . ": </span><span class='text'>{$value} &nbsp;</span></td>\n";
                }
            }
            $count++;
            if ($count == $cols) {
                $count = 0;
                print "</tr>\n<tr>\n";
            }
        }
        print "</tr>\n</table>\n";
    }
}
コード例 #2
0
ファイル: server_side.php プロジェクト: jatin-52/erm
 /**  
 * To display the result/report names from lists
 */
 public function get_display_field($data)
 {
     if ($this->valid($data[0])) {
         $ret = generate_display_field(array('data_type' => $data['data_type'], 'list_id' => $data['list_id']), $data['value']);
         return $ret;
     }
 }
コード例 #3
0
ファイル: ui.php プロジェクト: katopenzz/openemr
function getLabel($value, $list_id)
{
    // get from list_options
    $result = generate_display_field(array('data_type' => '1', 'list_id' => $list_id), $value);
    if ($result != '') {
        return $result;
    }
    // if not found, default to the passed-in value
    return $value;
}
コード例 #4
0
ファイル: clinical_rules.php プロジェクト: robytj/openemr
function clinical_summary_widget($patient_id, $mode, $dateTarget = '', $organize_mode = 'default')
{
    // Set date to current if not set
    $dateTarget = $dateTarget ? $dateTarget : date('Y-m-d H:i:s');
    // Collect active actions
    $actions = test_rules_clinic('', 'passive_alert', $dateTarget, $mode, $patient_id, '', $organize_mode);
    // Display the actions
    foreach ($actions as $action) {
        // Deal with plan names first
        if ($action['is_plan']) {
            echo "<br><b>";
            echo htmlspecialchars(xl("Plan"), ENT_NOQUOTES) . ": ";
            echo generate_display_field(array('data_type' => '1', 'list_id' => 'clinical_plans'), $action['id']);
            echo "</b><br>";
            continue;
        }
        if ($action['custom_flag']) {
            // Start link for reminders that use the custom rules input screen
            echo "<a href='../rules/patient_data.php?category=" . htmlspecialchars($action['category'], ENT_QUOTES) . "&item=" . htmlspecialchars($action['item'], ENT_QUOTES) . "' class='iframe  medium_modal' onclick='top.restoreSession()'>";
        } else {
            if ($action['clin_rem_link']) {
                // Start link for reminders that use the custom rules input screen
                echo "<a href='../../../" . $action['reminder_message'] . "' class='iframe  medium_modal' onclick='top.restoreSession()'>";
            } else {
                // continue, since no link will be created
            }
        }
        // Display Reminder Details
        echo generate_display_field(array('data_type' => '1', 'list_id' => 'rule_action_category'), $action['category']) . ": " . generate_display_field(array('data_type' => '1', 'list_id' => 'rule_action'), $action['item']);
        if ($action['custom_flag'] || $action['clin_rem_link']) {
            // End link for reminders that use an html link
            echo "</a>";
        }
        // Display due status
        if ($action['due_status']) {
            // Color code the status (red for past due, purple for due, green for not due and black for soon due)
            if ($action['due_status'] == "past_due") {
                echo "&nbsp;&nbsp;(<span style='color:red'>";
            } else {
                if ($action['due_status'] == "due") {
                    echo "&nbsp;&nbsp;(<span style='color:purple'>";
                } else {
                    if ($action['due_status'] == "not_due") {
                        echo "&nbsp;&nbsp;(<span style='color:green'>";
                    } else {
                        echo "&nbsp;&nbsp;(<span>";
                    }
                }
            }
            echo generate_display_field(array('data_type' => '1', 'list_id' => 'rule_reminder_due_opt'), $action['due_status']) . "</span>)<br>";
        } else {
            echo "<br>";
        }
    }
}
コード例 #5
0
ファイル: shot_record.php プロジェクト: katopenzz/openemr
function convertToDataArray($data_array)
{
    $current = 0;
    while ($row = sqlFetchArray($data_array)) {
        //admin date
        $temp_date = new DateTime($row['administered_date']);
        $data[$current][xl('Date') . "\n" . xl('Admin')] = $temp_date->format('Y-m-d H:i');
        //->format('%Y-%m-%d %H:%i');
        //Vaccine
        // Figure out which name to use (ie. from cvx list or from the custom list)
        if ($GLOBALS['use_custom_immun_list']) {
            $vaccine_display = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $row['immunization_id']);
        } else {
            if (!empty($row['code_text_short'])) {
                $vaccine_display = htmlspecialchars(xl($row['code_text_short']), ENT_NOQUOTES);
            } else {
                $vaccine_display = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $row['immunization_id']);
            }
        }
        $data[$current][xl('Vaccine')] = $vaccine_display;
        //Amount
        if ($row['amount_administered'] > 0) {
            $data[$current][xl('Amount') . "\n" . xl('Admin')] = $row['amount_administered'] . " " . generate_display_field(array('data_type' => '1', 'list_id' => 'drug_units'), $row['amount_administered_unit']);
        } else {
            $data[$current][xl('Amount') . "\n" . xl('Admin')] = "";
        }
        //expiration date fixed by checking for empty value, smw 040214
        if (isset($row['expiration_date'])) {
            $temp_date = new DateTime($row['expiration_date']);
            $data[$current][xl('Expiration') . "\n" . xl('Date')] = $temp_date->format('Y-m-d');
        } else {
            $data[$current][xl('Expiration') . "\n" . xl('Date')] = '';
            //$temp_date->format('Y-m-d');
        }
        //Manufacturer
        $data[$current][xl('Manufacturer')] = $row['manufacturer'];
        //Lot Number
        $data[$current][xl('Lot') . "\n" . xl('Number')] = $row['lot_number'];
        //Admin By
        $data[$current][xl('Admin') . "\n" . xl('By')] = $row['administered_by'];
        //education date
        $temp_date = new DateTime($row['education_date']);
        $data[$current][xl('Patient') . "\n" . xl('Education') . "\n" . xl('Date')] = $temp_date->format('Y-m-d');
        //Route
        $data[$current][xl('Route')] = generate_display_field(array('data_type' => '1', 'list_id' => 'drug_route'), $row['route']);
        //Admin Site
        $data[$current][xl('Admin') . "\n" . xl('Site')] = generate_display_field(array('data_type' => '1', 'list_id' => 'proc_body_site'), $row['administration_site']);
        //Comments
        $data[$current][xl('Comments')] = $row['note'];
        $current++;
    }
    return $data;
}
コード例 #6
0
function printAmendment($amendmentID, $lastAmendment)
{
    $query = "SELECT lo.title AS 'amendmentFrom', lo1.title AS 'amendmentStatus',a.* FROM amendments a \n\t\tLEFT JOIN list_options lo ON a.amendment_by = lo.option_id AND lo.list_id = 'amendment_from' AND lo.activity = 1\n\t\tLEFT JOIN list_options lo1 ON a.amendment_status = lo1.option_id AND lo1.list_id = 'amendment_status' AND lo1.activity = 1\n\t\tWHERE a.amendment_id = ?";
    $resultSet = sqlQuery($query, array($amendmentID));
    echo "<table>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Requested Date") . ":" . "</td>";
    echo "<td>" . oeFormatShortDate($resultSet['amendment_date']) . "</td>";
    echo "</tr>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Requested By") . ":" . "</td>";
    echo "<td>" . generate_display_field(array('data_type' => '1', 'list_id' => 'amendment_from'), $resultSet['amendment_by']) . "</td>";
    echo "</tr>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Request Status") . ":" . "</td>";
    echo "<td>" . generate_display_field(array('data_type' => '1', 'list_id' => 'amendment_status'), $resultSet['amendment_status']) . "</td>";
    echo "</tr>";
    echo "<tr class=text>";
    echo "<td class=bold>" . xlt("Request Description") . ":" . "</td>";
    echo "<td>" . text($resultSet['amendment_desc']) . "</td>";
    echo "</tr>";
    echo "</table>";
    echo "<hr>";
    echo "<span class='bold'>" . xlt("History") . "</span><br>";
    $pageBreak = $lastAmendment ? "" : "page-break-after:always";
    echo "<table border='1' cellspacing=0 cellpadding=3 style='width:75%;margin-top:10px;margin-bottom:20px;" . $pageBreak . "'>";
    echo "<tr class='text bold'>";
    echo "<th align=left style='width:10%'>" . xlt("Date") . "</th>";
    echo "<th align=left style='width:20%'>" . xlt("By") . "</th>";
    echo "<th align=left >" . xlt("Comments") . "</th>";
    echo "</tr>";
    $query = "SELECT u.fname,u.lname,ah.* FROM amendments_history ah INNER JOIN users u ON ah.created_by = u.id WHERE ah.amendment_id = ?";
    $resultSet = sqlStatement($query, array($amendmentID));
    while ($row = sqlFetchArray($resultSet)) {
        echo "<tr class=text>";
        $created_date = date('Y-m-d', strtotime($row['created_time']));
        echo "<td>" . oeFormatShortDate($created_date) . "</td>";
        echo "<td>" . text($row['lname']) . ", " . text($row['fname']) . "</td>";
        echo "<td>" . text($row['amendment_note']) . "</td>";
        echo "</tr>";
    }
    echo "</table>";
}
コード例 #7
0
ファイル: immunizations.php プロジェクト: kgenaidy/openemr
}
$result = sqlStatement($sql, array($pid));
while ($row = sqlFetchArray($result)) {
    if ($row["id"] == $id) {
        echo "<tr class='immrow text selected' id='" . htmlspecialchars($row["id"], ENT_QUOTES) . "'>";
    } else {
        echo "<tr class='immrow text' id='" . htmlspecialchars($row["id"], ENT_QUOTES) . "'>";
    }
    // Figure out which name to use (ie. from cvx list or from the custom list)
    if ($GLOBALS['use_custom_immun_list']) {
        $vaccine_display = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $row['immunization_id']);
    } else {
        if (!empty($row['code_text_short'])) {
            $vaccine_display = htmlspecialchars(xl($row['code_text_short']), ENT_NOQUOTES);
        } else {
            $vaccine_display = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $row['immunization_id']);
        }
    }
    echo "<td>" . $vaccine_display . "</td>";
    echo "<td>" . htmlspecialchars($row["administered_date"], ENT_NOQUOTES) . "</td>";
    echo "<td>" . htmlspecialchars($row["manufacturer"], ENT_NOQUOTES) . "</td>";
    echo "<td>" . htmlspecialchars($row["lot_number"], ENT_NOQUOTES) . "</td>";
    echo "<td>" . htmlspecialchars($row["administered_by"], ENT_NOQUOTES) . "</td>";
    echo "<td>" . htmlspecialchars($row["education_date"], ENT_NOQUOTES) . "</td>";
    echo "<td>" . htmlspecialchars($row["note"], ENT_NOQUOTES) . "</td>";
    echo "<td><input type='button' class='delete' id='" . htmlspecialchars($row["id"], ENT_QUOTES) . "' value='" . htmlspecialchars(xl('Delete'), ENT_QUOTES) . "'></td>";
    echo "</tr>";
}
?>

    </table>
コード例 #8
0
ファイル: reminders.php プロジェクト: mindfeederllc/openemr
/**
 * Function to send reminders.
 *
 * Function that sends reminders and returns an array with a specific data structure.
 * <pre>The data structure of the return array includes the following elements
 *   'total_pre_unsent_reminders'  - Number of reminders before processing.
 *   'total_post_unsent_reminders' - Number of reminders after processing.
 *   'number_success_emails'       - Number of successfully sent email reminders.
 *   'number_failed_emails'        - Number of failed sent email reminders.
 *   'number_success_calls'        - Number of successfully call reminders.
 *   'number_failed_calls'         - Number of failed call reminders.
 * </pre>
 *
 * @return array                 see above for data structure of returned array
 */
function send_reminders()
{
    $logging = array();
    // Collect active reminders that have not yet been sent.
    $active_unsent_reminders = fetch_reminders('', 'unsent');
    $logging['total_pre_unsent_reminders'] = count($active_unsent_reminders);
    // Send the unsent reminders
    $logging['number_success_emails'] = 0;
    $logging['number_failed_emails'] = 0;
    $logging['number_success_calls'] = 0;
    $logging['number_failed_calls'] = 0;
    foreach ($active_unsent_reminders as $reminder) {
        // Collect patient information that reminder is going to.
        $sql = "SELECT `fname`, `lname`, `email`, `phone_home`, `hipaa_voice`, `hipaa_allowemail` from `patient_data` where `pid`=?";
        $result = sqlQueryCdrEngine($sql, array($reminder['pid']));
        $patientfname = $result['fname'];
        $patientlname = $result['lname'];
        $patientemail = $result['email'];
        $patientphone = $result['phone_home'];
        $hipaa_voice = $result['hipaa_voice'];
        $hipaa_allowemail = $result['hipaa_allowemail'];
        // Email to patient if Allow Email and set reminder sent flag.
        if ($hipaa_allowemail == "YES") {
            $mail = new MyMailer();
            $sender_name = $GLOBALS['patient_reminder_sender_name'];
            $email_address = $GLOBALS['patient_reminder_sender_email'];
            $mail->FromName = $sender_name;
            // required
            $mail->Sender = $email_address;
            // required
            $mail->From = $email_address;
            // required
            $mail->AddAddress($patientemail, $patientfname . ", " . $patientlname);
            // required
            $mail->AddReplyTo($email_address, $sender_name);
            // required
            $category_title = generate_display_field(array('data_type' => '1', 'list_id' => 'rule_action_category'), $reminder['category']);
            $item_title = generate_display_field(array('data_type' => '1', 'list_id' => 'rule_action'), $reminder['item']);
            $mail->Body = "Dear " . $patientfname . ", This is a message from your clinic to remind you of your " . $category_title . ": " . $item_title;
            $mail->Subject = "Clinic Reminder";
            if ($mail->Send()) {
                // deal with and keep track of this successful email
                sqlStatementCdrEngine("UPDATE `patient_reminders` SET `email_status`='1', `date_sent`=NOW() WHERE id=?", array($reminder['id']));
                $logging['number_success_emails']++;
            } else {
                // deal with and keep track of this unsuccesful email
                $logging['number_failed_emails']++;
            }
        }
        // Call to patient if Allow Voice Message and set reminder sent flag.
        if ($hipaa_voice == "YES") {
            /******************************************************************************
            *     // Maviq does not work, is not currently supported, and seems to break on windows servers, so this
            *     //  feature has been commented out for now.
            *     // Automated VOIP service provided by Maviq. Please visit http://signup.maviq.com for more information.
            *      $siteId = $GLOBALS['phone_gateway_username'];
            *      $token = $GLOBALS['phone_gateway_password'];
            *      $endpoint = $GLOBALS['phone_gateway_url'];
            *      $client = new MaviqClient($siteId, $token, $endpoint);
            *      //Set up params.
            *      $data = array(
            *        "firstName" => $patientfname,
            *        "lastName" => $patientlname,
            *        "phone" => $patientphone,
            *        //"apptDate" => "$scheduled_date[1]/$scheduled_date[2]/$scheduled_date[0]",
            *        "timeRange" => "10-18",
            *        "type" => "reminder",
            *        "timeZone" => date('P'),
            *        "greeting" => str_replace("[[sender]]", $sender_name, str_replace("[[patient_name]]", $patientfname, $myrow['reminder_content']))
            *      );
            *
            *      // Make the call.
            *      $response = $client->sendRequest("appointment", "POST", $data);
            *
            *      if ($response->IsError) {
            *        // deal with and keep track of this unsuccessful call
            *        $logging['number_failed_calls']++;
            *      }
            *      else {
            *        // deal with and keep track of this succesful call
            *        sqlStatementCdrEngine("UPDATE `patient_reminders` SET `voice_status`='1', `date_sent`=NOW() WHERE id=?", array($reminder['id']) );
            *        $logging['number_success_calls']++;
            *      }
            *******************************************************************************/
        }
    }
    // For logging purposes only:
    //  Collect active reminders that have not yet been sent.
    $logging['total_post_unsent_reminders'] = count(fetch_reminders('', 'unsent'));
    return $logging;
}
コード例 #9
0
ファイル: new.php プロジェクト: richsiy/openemr
        $cell_count += $datacols;
    }
    ++$item_count;
    // Skip current-value fields for the display-only case.
    if (empty($is_lbf)) {
        if ($frow['edit_options'] == 'H') {
            echo generate_display_field($frow, $currvalue);
        } else {
            generate_form_field($frow, $currvalue);
        }
    }
    // Append to historical data of other dates for this item.
    foreach ($historical_ids as $key => $dummy) {
        $hvrow = sqlQuery("SELECT field_value FROM lbf_data WHERE " . "form_id = '{$key}' AND field_id = '{$field_id}'");
        $value = empty($hvrow) ? '' : $hvrow['field_value'];
        $historical_ids[$key] .= generate_display_field($frow, $value);
    }
}
end_group();
?>

<p style='text-align:center'>
<?php 
if (empty($is_lbf)) {
    ?>
<input type='submit' name='bn_save' value='<?php 
    echo htmlspecialchars(xl('Save'));
    ?>
' />
&nbsp;
<input type='button' value='<?php 
コード例 #10
0
     } else {
         if (!empty($row['facility_id'])) {
             continue;
         }
     }
 }
 $patient_name = $row['lname'] . ', ' . $row['fname'] . ' ' . $row['mname'];
 //$patient_id      = $row['patient_id'];
 $patient_id = $row['pubpid'];
 $prescription_id = $row['id'];
 $drug_name = empty($row['name']) ? $row['drug'] : $row['name'];
 $ndc_number = $row['ndc_number'];
 $drug_units = $row['size'] . ' ' . generate_display_field(array('data_type' => '1', 'list_id' => 'drug_units'), $row['unit']);
 $refills = $row['refills'];
 $reactions = $row['reactions'];
 $instructed = $row['dosage'] . ' ' . generate_display_field(array('data_type' => '1', 'list_id' => 'drug_form'), $row['form']) . ' ' . generate_display_field(array('data_type' => '1', 'list_id' => 'drug_interval'), $row['interval']);
 //if ($row['patient_id'] == $last_patient_id) {
 if (strcmp($row['pubpid'], $last_patient_id) == 0) {
     $patient_name = '&nbsp;';
     $patient_id = '&nbsp;';
     if ($row['id'] == $last_prescription_id) {
         $prescription_id = '&nbsp;';
         $drug_name = '&nbsp;';
         $ndc_number = '&nbsp;';
         $drug_units = '&nbsp;';
         $refills = '&nbsp;';
         $reactions = '&nbsp;';
         $instructed = '&nbsp;';
     }
 }
 ?>
コード例 #11
0
ファイル: shot_record.php プロジェクト: kgenaidy/openemr
    $sqlstmt .= " i1.immunization_id, i1.administered_date DESC";
} else {
    $sqlstmt .= " i1.administered_date desc";
}
$res3 = sqlStatement($sqlstmt, array($pid));
while ($data[] = sqlFetchArray($res3)) {
}
for ($i = 0; $i < count($data); $i++) {
    // Figure out which name to use (ie. from cvx list or from the custom list)
    if ($GLOBALS['use_custom_immun_list']) {
        $data[$i][xl('Vaccine')] = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $data[$i][xl('Vaccine')]);
    } else {
        if (!empty($data[$i]['cvx_text'])) {
            $data[$i][xl('Vaccine')] = htmlspecialchars(xl($data[$i]['cvx_text']), ENT_NOQUOTES);
        } else {
            $data[$i][xl('Vaccine')] = generate_display_field(array('data_type' => '1', 'list_id' => 'immunizations'), $data[$i][xl('Vaccine')]);
        }
    }
    unset($data[$i]['cvx_text']);
}
$title = xl('Shot Record as of:', '', '', ' ') . date('m/d/Y h:i:s a');
if ($_GET['output'] == "html") {
    //print html css
    //convert end of line characters to html (escape for html output first)
    $patterns = array('/\\n/');
    $replace = array('<br>');
    $res['facility_address'] = htmlspecialchars($res['facility_address'], ENT_NOQUOTES);
    $res['facility_address'] = preg_replace($patterns, $replace, $res['facility_address']);
    $res2['patient_address'] = htmlspecialchars($res2['patient_address'], ENT_NOQUOTES);
    $res2['patient_address'] = preg_replace($patterns, $replace, $res2['patient_address']);
    //deal with bug (last array index is empty)
コード例 #12
0
ファイル: pnotes.php プロジェクト: katopenzz/openemr
            echo "href='pnotes_full.php?active=1&{$urlparms}" . "' class='alert' onclick='top.restoreSession()'>";
            echo htmlspecialchars(xl('Some notes were not displayed.', '', '', ' '), ENT_NOQUOTES) . htmlspecialchars(xl('Click here to view all.'), ENT_NOQUOTES) . "</a>\n";
            echo "  </td>\n";
            echo " </tr>\n";
            break;
        }
        $body = $iter['body'];
        if (preg_match('/^\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d\\:\\d\\d /', $body)) {
            $body = nl2br(htmlspecialchars($body, ENT_NOQUOTES));
        } else {
            $body = htmlspecialchars(date('Y-m-d H:i', strtotime($iter['date'])), ENT_NOQUOTES) . ' (' . htmlspecialchars($iter['user'], ENT_NOQUOTES) . ') ' . nl2br(htmlspecialchars($body, ENT_NOQUOTES));
        }
        echo " <tr class='text noterow' id='" . htmlspecialchars($iter['id'], ENT_QUOTES) . "'>\n";
        // Modified 6/2009 by BM to incorporate the patient notes into the list_options listings
        echo "  <td valign='top' class='bold'>";
        echo generate_display_field(array('data_type' => '1', 'list_id' => 'note_type'), $iter['title']);
        echo "</td>\n";
        echo "  <td valign='top'>{$body}</td>\n";
        echo " </tr>\n";
        $notes_count++;
    }
}
?>

</table>

</div> <!-- end pnotes -->

</body>

<script language="javascript">
コード例 #13
0
    $row = array();
    if (!empty($ptrow)) {
        $query = "SELECT ct.ct_when, ct.ct_userid, ct.ct_location, " . "u.username, u.fname, u.mname, u.lname " . "FROM chart_tracker AS ct " . "LEFT OUTER JOIN users AS u ON u.id = ct.ct_userid " . "WHERE ct.ct_pid = ? " . "ORDER BY ct.ct_when DESC";
        $res = sqlStatement($query, array($curr_pid));
        while ($row = sqlFetchArray($res)) {
            ?>
 <tr>
  <td>
   <?php 
            echo text(oeFormatShortDate(substr($row['ct_when'], 0, 10))) . text(substr($row['ct_when'], 10));
            ?>
  </td>
  <td>
<?php 
            if (!empty($row['ct_location'])) {
                echo generate_display_field(array('data_type' => '1', 'list_id' => 'chartloc'), $row['ct_location']);
            } else {
                if (!empty($row['ct_userid'])) {
                    echo text($row['lname']) . ', ' . text($row['fname']) . ' ' . text($row['mname']);
                }
            }
            ?>
  </td>
 </tr>
<?php 
        }
        // end while
    }
    // end if
    ?>
</tbody>
コード例 #14
0
            }
            // calculate count of encounters, regardless of billing
            $query = "select count(date) as encounter_count " . " from form_encounter where " . " pid = ?";
            $statement = sqlStatement($query, array($iter["pid"]));
            if ($results = sqlFetchArray($statement)) {
                $encounter_count = $results['encounter_count'];
            }
            echo "<td class='srNumEnc'>" . htmlspecialchars($encounter_count, ENT_NOQUOTES) . "</td>\n";
            echo "<td class='srNumDay'>" . htmlspecialchars($day_diff, ENT_NOQUOTES) . "</td>\n";
            echo "<td class='srDateLast'>" . htmlspecialchars($last_date_seen, ENT_NOQUOTES) . "</td>\n";
            echo "<td class='srDateNext'>" . htmlspecialchars($next_appt_date, ENT_NOQUOTES) . "</td>\n";
        } else {
            // alternate search results style
            foreach ($extracols as $field_id => $frow) {
                echo "<td class='srMisc'>";
                echo generate_display_field($frow, $iter[$field_id]);
                echo "</td>\n";
            }
        }
    }
}
?>
</table>
</div>  <!-- end searchResults DIV -->

<script language="javascript">

// jQuery stuff to make the page a little easier to use

$(document).ready(function(){
    // $("#searchparm").focus();
コード例 #15
0
        $dayname = date("l", strtotime($row['pc_eventDate']));
        $dispampm = "am";
        $disphour = substr($row['pc_startTime'], 0, 2) + 0;
        $dispmin = substr($row['pc_startTime'], 3, 2);
        if ($disphour >= 12) {
            $dispampm = "pm";
            if ($disphour > 12) {
                $disphour -= 12;
            }
        }
        if ($row['pc_hometext'] != "") {
            $etitle = xl('Comments') . ": " . $row['pc_hometext'] . "\r\n" . $etitle;
        }
        echo "<a href='javascript:oldEvt(" . htmlspecialchars($row['pc_eid'], ENT_QUOTES) . ")' title='" . htmlspecialchars($etitle, ENT_QUOTES) . "'>";
        echo "<b>" . htmlspecialchars(xl($dayname) . ", " . $row['pc_eventDate'], ENT_NOQUOTES) . "</b>" . xlt("Status") . "(";
        echo " " . generate_display_field(array('data_type' => '1', 'list_id' => 'apptstat'), $row['pc_apptstatus']) . ")<br>";
        // can't use special char parser on this
        echo htmlspecialchars("{$disphour}:{$dispmin} ") . xl($dispampm) . " ";
        echo htmlspecialchars($row['fname'] . " " . $row['lname'], ENT_NOQUOTES) . "</a><br>\n";
    }
    if (isset($pres) && $res != null) {
        if ($count < 1) {
            echo "&nbsp;&nbsp;" . htmlspecialchars(xl('None'), ENT_NOQUOTES);
        }
        echo "</div>";
    }
}
// END of past appointments
?>
		</div>
コード例 #16
0
xl('Refills', 'e');
?>
</b></td>
<?php 
// Show a heading for each price level.  Also create an array of prices
// for new template lines.
$emptyPrices = array();
$pres = sqlStatement("SELECT option_id, title FROM list_options " . "WHERE list_id = 'pricelevel' ORDER BY seq");
while ($prow = sqlFetchArray($pres)) {
    $emptyPrices[$prow['option_id']] = '';
    echo "     <td><b>" . generate_display_field(array('data_type' => '1', 'list_id' => 'pricelevel'), $prow['option_id']) . "</b></td>\n";
}
// Show a heading for each tax rate.
$pres = sqlStatement("SELECT option_id, title FROM list_options " . "WHERE list_id = 'taxrate' ORDER BY seq");
while ($prow = sqlFetchArray($pres)) {
    echo "     <td><b>" . generate_display_field(array('data_type' => '1', 'list_id' => 'taxrate'), $prow['option_id']) . "</b></td>\n";
}
?>
    </tr>
<?php 
$blank_lines = $GLOBALS['sell_non_drug_products'] == 2 ? 1 : 3;
if ($tres) {
    while ($trow = sqlFetchArray($tres)) {
        $blank_lines = $GLOBALS['sell_non_drug_products'] == 2 ? 0 : 1;
        $selector = $trow['selector'];
        // Get array of prices.
        $prices = array();
        $pres = sqlStatement("SELECT lo.option_id, p.pr_price " . "FROM list_options AS lo LEFT OUTER JOIN prices AS p ON " . "p.pr_id = '{$drug_id}' AND p.pr_selector = '{$selector}' AND " . "p.pr_level = lo.option_id " . "WHERE list_id = 'pricelevel' ORDER BY lo.seq");
        while ($prow = sqlFetchArray($pres)) {
            $prices[$prow['option_id']] = $prow['pr_price'];
        }
コード例 #17
0
                ?>
&nbsp;</td>
						<td>
					    <?php 
                if ($row["amount_administered"] > 0) {
                    echo htmlspecialchars($row["amount_administered"] . " " . generate_display_field(array('data_type' => '1', 'list_id' => 'drug_units'), $row['amount_administered_unit']), ENT_NOQUOTES);
                } else {
                    echo "&nbsp;";
                }
                ?>
							
					  </td>
					  
					  <td>
					   <?php 
                echo generate_display_field(array('data_type' => '1', 'list_id' => 'proc_body_site'), $row['administration_site']);
                ?>
					  </td>
					  
					  <td colspan="7">
					   <?php 
                echo htmlspecialchars($row['notes']);
                ?>
					  </td>
					</tr>
			<?php 
            }
            ?>
<!-- Immunization Report End-->
                       		 </table>
		 <?php 
コード例 #18
0
ファイル: stats_full.php プロジェクト: mindfeederllc/openemr
     $click_class = '';
 }
 // output the TD row of info
 if ($row['enddate'] == NULL) {
     echo " <tr class='{$bgclass} detail {$click_class}' style='color:red;font-weight:bold' id='{$rowid}'>\n";
 } else {
     echo " <tr class='{$bgclass} detail {$click_class}' id='{$rowid}'>\n";
 }
 echo "  <td style='text-align:left'>" . htmlspecialchars($disptitle, ENT_NOQUOTES) . "</td>\n";
 echo "  <td>" . htmlspecialchars($row['begdate'], ENT_NOQUOTES) . "&nbsp;</td>\n";
 echo "  <td>" . htmlspecialchars($row['enddate'], ENT_NOQUOTES) . "&nbsp;</td>\n";
 // both codetext and statusCompute have already been escaped above with htmlspecialchars)
 echo "  <td>" . $codetext . "</td>\n";
 echo "  <td>" . $statusCompute . "&nbsp;</td>\n";
 echo "  <td class='nowrap'>";
 echo generate_display_field(array('data_type' => '1', 'list_id' => 'occurrence'), $row['occurrence']);
 echo "</td>\n";
 if ($focustype == "allergy") {
     echo "  <td>" . htmlspecialchars($row['reaction'], ENT_NOQUOTES) . "&nbsp;</td>\n";
 }
 if ($GLOBALS['athletic_team']) {
     echo "  <td class='center'>" . $row['extrainfo'] . "</td>\n";
     // games missed
 } else {
     echo "  <td>" . htmlspecialchars($row['referredby'], ENT_NOQUOTES) . "</td>\n";
 }
 echo "  <td>" . htmlspecialchars($row['comments'], ENT_NOQUOTES) . "</td>\n";
 echo "  <td id='e_{$rowid}' class='noclick center' title='" . htmlspecialchars(xl('View related encounters'), ENT_QUOTES) . "'>";
 echo "  <input type='button' value='" . htmlspecialchars($ierow['count'], ENT_QUOTES) . "' class='editenc' id='" . htmlspecialchars($rowid, ENT_QUOTES) . "' />";
 echo "  </td>";
 echo " </tr>\n";
コード例 #19
0
ファイル: clinical_reports.php プロジェクト: richsiy/openemr
</b></td>
				<td><b><?php 
                echo htmlspecialchars(xl('Alcohol'), ENT_NOQUOTES);
                ?>
</b></td>
				<td colspan=8><b><?php 
                echo htmlspecialchars(xl('Recreational Drugs'), ENT_NOQUOTES);
                ?>
</b></td>
				</tr>
                        	<tr bgcolor="#FFFFFF">
				<?php 
                $tmp_t = explode('|', $row['history_data_tobacco']);
                $tmp_a = explode('|', $row['history_data_alcohol']);
                $tmp_d = explode('|', $row['history_data_recreational_drugs']);
                $his_tobac = generate_display_field(array('data_type' => '1', 'list_id' => 'smoking_status'), $tmp_t[3]);
                ?>
				<td> <?php 
                echo htmlspecialchars(oeFormatShortDate($row['history_data_date']), ENT_NOQUOTES);
                ?>
&nbsp;</td>
                                <td> <?php 
                echo htmlspecialchars($his_tobac, ENT_NOQUOTES);
                ?>
&nbsp;</td>
				<?php 
                if ($tmp_a[1] == "currentalcohol") {
                    $res = xl('Current Alcohol');
                }
                if ($tmp_a[1] == "quitalcohol") {
                    $res = xl('Quit Alcohol');
コード例 #20
0
ファイル: stats.php プロジェクト: ranjanprasad/openemr
<?php 
        if (sqlNumRows($res) == 0) {
            ?>
    <tr class=text>
	    <td><?php 
            echo htmlspecialchars(xl('None'), ENT_NOQUOTES);
            ?>
</td>
    </tr>
    <?php 
        }
        while ($row_currentMed = sqlFetchArray($res)) {
            $runit = generate_display_field(array('data_type' => '1', 'list_id' => 'drug_units'), $row_currentMed['unit']);
            $rin = generate_display_field(array('data_type' => '1', 'list_id' => 'drug_form'), $row_currentMed['form']);
            $rroute = generate_display_field(array('data_type' => '1', 'list_id' => 'drug_route'), $row_currentMed['route']);
            $rint = generate_display_field(array('data_type' => '1', 'list_id' => 'drug_interval'), $row_currentMed['interval']);
            ?>
    <tr class=text >
	    <td><?php 
            echo $row_currentMed['drug'];
            ?>
</td>
	    <td><?php 
            $unit = '';
            if ($row_currentMed['size'] > 0) {
                $unit = $row_currentMed['size'] . " " . $runit . " ";
            }
            echo htmlspecialchars($unit . " " . $row_currentMed['dosage'] . " " . $rin . " " . $rroute . " " . $rint, ENT_NOQUOTES);
            ?>
</td>
    </tr>
コード例 #21
0
ファイル: stats_full.php プロジェクト: katopenzz/openemr
     } elseif ($row['erx_uploaded'] == 1 && $focustype == 'medication') {
         $click_class = '';
     }
     echo " <tr class='{$bgclass} detail' {$colorstyle}>\n";
     echo "  <td style='text-align:left' class='{$click_class}' id='{$rowid}'>" . text($disptitle) . "</td>\n";
     echo "  <td>" . text($row['begdate']) . "&nbsp;</td>\n";
     echo "  <td>" . text($row['enddate']) . "&nbsp;</td>\n";
     // both codetext and statusCompute have already been escaped above with htmlspecialchars)
     echo "  <td>" . $codetext . "</td>\n";
     echo "  <td>" . $statusCompute . "&nbsp;</td>\n";
     echo "  <td class='nowrap'>";
     echo generate_display_field(array('data_type' => '1', 'list_id' => 'occurrence'), $row['occurrence']);
     echo "</td>\n";
     if ($focustype == "allergy") {
         echo "  <td>";
         echo generate_display_field(array('data_type' => '1', 'list_id' => 'reaction'), $row['reaction']);
         echo "</td>\n";
     }
     if ($GLOBALS['athletic_team']) {
         echo "  <td class='center'>" . $row['extrainfo'] . "</td>\n";
         // games missed
     } else {
         echo "  <td>" . text($row['referredby']) . "</td>\n";
     }
     echo "  <td>" . text($row['modifydate']) . "</td>\n";
     echo "  <td>" . text($row['comments']) . "</td>\n";
     echo "  <td id='e_{$rowid}' class='noclick center' title='" . xla('View related encounters') . "'>";
     echo "  <input type='button' value='" . attr($ierow['count']) . "' class='editenc' id='" . attr($rowid) . "' />";
     echo "  </td>";
     echo " </tr>\n";
 }
コード例 #22
0
    }
    // Translate $newvalue for certain field types including lists.
    if ($newvalue !== '') {
        if ($list_id) {
            $tmp = sqlQuery("SELECT option_id FROM list_options WHERE " . "list_id = ? AND title = ? AND activity = 1 ORDER BY option_id LIMIT 1", array($list_id, $newvalue));
            if (isset($tmp['option_id'])) {
                $newvalue = $tmp['option_id'];
            }
        }
        // Some data types like insurance provider are pretty hopeless, so let the display
        // logic generate a "Fix me" message and the user can translate it.
    }
    echo " <tr class='detail'>\n";
    echo "  <td class='bold'>" . text($field_title) . "</td>\n";
    echo "  <td>";
    echo generate_display_field($lorow, $currvalue);
    echo "</td>\n";
    echo "  <td>";
    generate_form_field($lorow, $newvalue);
    echo "</td>\n";
    echo " </tr>\n";
}
?>

</table>

<p>
<input type='submit' name='bn_save' value='<?php 
echo xla('Save and Delete Request');
?>
' />
コード例 #23
0
ファイル: inventory_list.php プロジェクト: katopenzz/openemr
            }
            if (!empty($irow['expiration'])) {
                $expdays = (int) ((strtotime($irow['expiration']) - time()) / (60 * 60 * 24));
                if ($expdays <= 0) {
                    addWarning(htmlspecialchars(xl('Lot') . " '{$lotno}' " . xl('has expired')));
                } else {
                    if ($expdays <= 30) {
                        addWarning(htmlspecialchars(xl('Lot') . " '{$lotno}' " . xl('expires in') . " {$expdays} " . xl('days')));
                    }
                }
            }
        }
        echo " <tr class='detail' bgcolor='{$bgcolor}'>\n";
        echo "  <td>" . htmlentities($row['name']) . "</td>\n";
        echo "  <td>" . htmlentities($row['ndc_number']) . "</td>\n";
        echo "  <td>" . generate_display_field(array('data_type' => '1', 'list_id' => 'drug_form'), $row['form']) . "</td>\n";
        echo "  <td align='right'>" . $row['on_hand'] . "</td>\n";
        echo "  <td align='right'>" . $row['reorder_point'] . "</td>\n";
        echo "  <td align='right'>{$monthly}</td>\n";
        echo "  <td align='right'>{$stock_months}</td>\n";
        echo "  <td style='color:red'>{$warnings}</td>\n";
        echo " </tr>\n";
    }
    ?>
 </tbody>
</table>

<?php 
}
// end if submit
?>
コード例 #24
0
ファイル: front_payment.php プロジェクト: nitinkunte/openemr
  <td><?php 
    echo xlt('Patient');
    ?>
:</td>
  <td><?php 
    echo text($patdata['fname']) . " " . text($patdata['mname']) . " " . text($patdata['lname']) . " (" . text($patdata['pubpid']) . ")";
    ?>
</td>
 </tr>
 <tr>
  <td><?php 
    echo xlt('Paid Via');
    ?>
:</td>
  <td><?php 
    echo generate_display_field(array('data_type' => '1', 'list_id' => 'payment_method'), $payrow['method']);
    ?>
</td>
 </tr>
 <tr>
  <td><?php 
    echo xlt('Check/Ref Number');
    ?>
:</td>
  <td><?php 
    echo text($payrow['source']);
    ?>
</td>
 </tr>
 <tr>
  <td><?php 
コード例 #25
0
        ?>
"></td>
				<td class=text><?php 
        echo $amendmentLink;
        ?>
 </td>
				<td class=text><?php 
        echo text($row['amendment_desc']);
        ?>
 </td>
				<td class=text><?php 
        echo generate_display_field(array('data_type' => '1', 'list_id' => 'amendment_from'), $row['amendment_by']);
        ?>
 </td>
				<td class=text><?php 
        echo generate_display_field(array('data_type' => '1', 'list_id' => 'amendment_status'), $row['amendment_status']);
        ?>
 </td>
			</tr>
		<?php 
    }
    ?>
		</table>
		</div>
	<?php 
} else {
    ?>
		<span style="color:red">
			<br>
			<?php 
    echo xlt("No amendment requests available");
コード例 #26
0
ファイル: pnotes_print.php プロジェクト: bharathi26/openemr
?>
<html>
<head>
<?php 
html_header_show();
?>
<link rel='stylesheet' href="<?php 
echo $css_header;
?>
" type="text/css">
</head>

<body class="body_top">

<p><?php 
echo "<b>" . generate_display_field(array('data_type' => '1', 'list_id' => 'note_type'), $title) . "</b>" . htmlspecialchars(xl('for', '', ' ', ' '), ENT_NOQUOTES) . "<b>" . htmlspecialchars($ptname, ENT_NOQUOTES) . "</b>";
?>
</p>

<p><?php 
echo htmlspecialchars(xl('Assigned To'), ENT_NOQUOTES);
?>
: <?php 
echo htmlspecialchars($assigned_to, ENT_NOQUOTES);
?>
</p>

<p><?php 
echo htmlspecialchars(xl('Active'), ENT_NOQUOTES);
?>
: <?php 
コード例 #27
0
/**
 * Display the active screen reminder.
 *
 * @param  integer  $patient_id     pid of selected patient
 * @param  string   $mode           choose either 'reminders-all' or 'reminders-due' (required)
 * @param  string   $dateTarget     target date (format Y-m-d H:i:s). If blank then will test with current date as target.
 * @param  string   $organize_mode  Way to organize the results (default or plans)
 * @return string                   html display output.
 */
function active_alert_summary($patient_id, $mode, $dateTarget = '', $organize_mode = 'default')
{
    // Set date to current if not set
    $dateTarget = $dateTarget ? $dateTarget : date('Y-m-d H:i:s');
    // Collect active actions
    $actions = test_rules_clinic('', 'active_alert', $dateTarget, $mode, $patient_id, '', $organize_mode);
    if (empty($actions)) {
        return false;
    }
    $returnOutput = "";
    // Display the actions
    foreach ($actions as $action) {
        // Deal with plan names first
        if ($action['is_plan']) {
            $returnOutput .= "<br><b>";
            $returnOutput .= htmlspecialchars(xl("Plan"), ENT_NOQUOTES) . ": ";
            $returnOutput .= generate_display_field(array('data_type' => '1', 'list_id' => 'clinical_plans'), $action['id']);
            $returnOutput .= "</b><br>";
            continue;
        }
        // Display Reminder Details
        $returnOutput .= generate_display_field(array('data_type' => '1', 'list_id' => 'rule_action_category'), $action['category']) . ": " . generate_display_field(array('data_type' => '1', 'list_id' => 'rule_action'), $action['item']);
        // Display due status
        if ($action['due_status']) {
            // Color code the status (red for past due, purple for due, green for not due and black for soon due)
            if ($action['due_status'] == "past_due") {
                $returnOutput .= "&nbsp;&nbsp;(<span style='color:red'>";
            } else {
                if ($action['due_status'] == "due") {
                    $returnOutput .= "&nbsp;&nbsp;(<span style='color:purple'>";
                } else {
                    if ($action['due_status'] == "not_due") {
                        $returnOutput .= "&nbsp;&nbsp;(<span style='color:green'>";
                    } else {
                        $returnOutput .= "&nbsp;&nbsp;(<span>";
                    }
                }
            }
            $returnOutput .= generate_display_field(array('data_type' => '1', 'list_id' => 'rule_reminder_due_opt'), $action['due_status']) . "</span>)<br>";
        } else {
            $returnOutput .= "<br>";
        }
    }
    return $returnOutput;
}
コード例 #28
0
ファイル: options.inc.php プロジェクト: johnnytang24/openemr
function display_layout_tabs_data($formtype, $result1, $result2 = '')
{
    global $item_count, $cell_count, $last_group, $CPR;
    $fres = sqlStatement("SELECT distinct group_name FROM layout_options " . "WHERE form_id = ? AND uor > 0 " . "ORDER BY group_name, seq", array($formtype));
    $first = true;
    while ($frow = sqlFetchArray($fres)) {
        $this_group = $frow['group_name'];
        $titlecols = $frow['titlecols'];
        $datacols = $frow['datacols'];
        $data_type = $frow['data_type'];
        $field_id = $frow['field_id'];
        $list_id = $frow['list_id'];
        $currvalue = '';
        $group_fields_query = sqlStatement("SELECT * FROM layout_options " . "WHERE form_id = ? AND uor > 0 AND group_name = ? " . "ORDER BY seq", array($formtype, $this_group));
        ?>

		<div class="tab <?php 
        echo $first ? 'current' : '';
        ?>
">
			<table border='0' cellpadding='0'>

			<?php 
        while ($group_fields = sqlFetchArray($group_fields_query)) {
            $titlecols = $group_fields['titlecols'];
            $datacols = $group_fields['datacols'];
            $data_type = $group_fields['data_type'];
            $field_id = $group_fields['field_id'];
            $list_id = $group_fields['list_id'];
            $currvalue = '';
            if ($formtype == 'DEM') {
                if ($GLOBALS['athletic_team']) {
                    // Skip fitness level and return-to-play date because those appear
                    // in a special display/update form on this page.
                    if ($field_id === 'fitness' || $field_id === 'userdate1') {
                        continue;
                    }
                }
                if (strpos($field_id, 'em_') === 0) {
                    // Skip employer related fields, if it's disabled.
                    if ($GLOBALS['omit_employers']) {
                        continue;
                    }
                    $tmp = substr($field_id, 3);
                    if (isset($result2[$tmp])) {
                        $currvalue = $result2[$tmp];
                    }
                } else {
                    if (isset($result1[$field_id])) {
                        $currvalue = $result1[$field_id];
                    }
                }
            } else {
                if (isset($result1[$field_id])) {
                    $currvalue = $result1[$field_id];
                }
            }
            // Handle a data category (group) change.
            if (strcmp($this_group, $last_group) != 0) {
                $group_name = substr($this_group, 1);
                // totally skip generating the employer category, if it's disabled.
                if ($group_name === 'Employer' && $GLOBALS['omit_employers']) {
                    continue;
                }
                $last_group = $this_group;
            }
            // Handle starting of a new row.
            if ($titlecols > 0 && $cell_count >= $CPR || $cell_count == 0) {
                disp_end_row();
                echo "<tr>";
            }
            if ($item_count == 0 && $titlecols == 0) {
                $titlecols = 1;
            }
            // Handle starting of a new label cell.
            if ($titlecols > 0) {
                disp_end_cell();
                $titlecols_esc = htmlspecialchars($titlecols, ENT_QUOTES);
                echo "<td class='label' colspan='{$titlecols_esc}' ";
                echo ">";
                $cell_count += $titlecols;
            }
            ++$item_count;
            // Added 5-09 by BM - Translate label if applicable
            if ($group_fields['title']) {
                echo htmlspecialchars(xl_layout_label($group_fields['title']) . ":", ENT_NOQUOTES);
            } else {
                echo "&nbsp;";
            }
            // Handle starting of a new data cell.
            if ($datacols > 0) {
                disp_end_cell();
                $datacols_esc = htmlspecialchars($datacols, ENT_QUOTES);
                echo "<td class='text data' colspan='{$datacols_esc}'";
                echo ">";
                $cell_count += $datacols;
            }
            ++$item_count;
            echo generate_display_field($group_fields, $currvalue);
        }
        ?>

			</table>
		</div>

 	 <?php 
        $first = false;
    }
}
コード例 #29
0
ファイル: patient_form.php プロジェクト: mi-squared/openemr
        $currvalue = '';
        if (isset($ptrow[$field_id])) {
            $currvalue = $ptrow[$field_id];
        }
        /*****************************************************************
           $newvalue = '';
           if (isset($result['fields'][$reskey])) $newvalue = $result['fields'][$reskey];
           //// Zero-length input means nothing will change.
           // if ($newvalue === '') $newvalue = $currvalue;
           // $newvalue = trim($newvalue);
           $newvalue = cms_field_to_lbf($newvalue, $data_type, $field_id);
           *****************************************************************/
        $newvalue = cms_field_to_lbf($data_type, $reskey, $result['fields']);
        echo " <tr class='detail'>\n";
        echo "  <td class='bold'>" . text($field_title) . "</td>\n";
        echo "  <td>" . generate_display_field($lorow, $currvalue) . "</td>\n";
        echo "  <td>";
        generate_form_field($lorow, $newvalue);
        echo "</td>\n";
        echo " </tr>\n";
    }
}
$field_id = 'cmsportal_login';
if (empty($ptrow[$field_id])) {
    if ($result['post']['user'] !== '') {
        // Registered in portal but still need to record that in openemr.
        echo "</table>\n";
        echo "<input type='hidden' name='form_{$field_id}' value='" . attr($result['post']['user']) . "' />\n";
    } else {
        // Portal registration is needed.
        $newvalue = isset($result['fields']['email']) ? trim($result['fields']['email']) : '';
コード例 #30
0
ファイル: chart_tracker.php プロジェクト: katopenzz/openemr
}
?>

<table>

<?php 
if (!empty($row)) {
    $ct_userid = $row['ct_userid'];
    $ct_location = $row['ct_location'];
    $current_location = xlt('Unassigned');
    if ($ct_userid) {
        $urow = sqlQuery("SELECT fname, mname, lname FROM users WHERE id = ?", array($ct_userid));
        $current_location = text($urow['lname'] . ", " . $urow['fname'] . " " . $urow['mname'] . " " . $row['ct_when']);
    } else {
        if ($ct_location) {
            $current_location = generate_display_field(array('data_type' => '1', 'list_id' => 'chartloc'), $ct_location);
        }
    }
    echo " <tr>\n";
    echo "  <td class='bold'>" . xlt('Patient ID') . ":</td>\n";
    echo "  <td class='text'>" . text($row['pubpid']) . "<input type='hidden' name='form_curpid' value='" . attr($row['pid']) . "' />" . "<input type='hidden' name='form_curid' value='" . attr($row['pubpid']) . "' /></td>\n";
    echo " </tr>\n";
    echo " <tr>\n";
    echo "  <td class='bold'>" . xlt('Name') . ":</td>\n";
    echo "  <td class='text'>" . text($row['lname'] . ", " . $row['fname'] . " " . $row['mname']) . "</td>\n";
    echo " </tr>\n";
    echo " <tr>\n";
    echo "  <td class='bold'>" . xlt('DOB') . ":</td>\n";
    echo "  <td class='text'>" . text($row['DOB']) . "</td>\n";
    echo " </tr>\n";
    echo " <tr>\n";