• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getPatientData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getPatientData函数的典型用法代码示例。如果您正苦于以下问题:PHP getPatientData函数的具体用法?PHP getPatientData怎么用?PHP getPatientData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getPatientData函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_DOB

 private function get_DOB($patient_id)
 {
     $dob = getPatientData($patient_id, "DOB as TS_DOB");
     $dob = $dob['TS_DOB'];
     $date = $dob . ' 00:00:00';
     // MYSQL Date Format
     return $date;
 }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:8,代码来源:RsPatient.php


示例2: report_header_2

/**
 * This prints a header for documents.  Keeps the brand uniform...
 *  @param string $pid patient_id
 *  @param string $direction, options "web" or anything else.  Web provides apache-friendly url links.
 *  @return outputs to be displayed however requested
 */
function report_header_2($stmt,$direction='',$providerID='1') {
  $titleres = getPatientData($stmt['pid'], "fname,lname,DOB");
  if ($_SESSION['pc_facility']) {
    $sql = "select * from facility where id=?";
    $facility = sqlQuery($sql,array($_SESSION['pc_facility']));
  } else {
    $sql = "SELECT * FROM facility ORDER BY billing_location DESC LIMIT 1";
    $facility = sqlQuery($sql);
  }
  $DOB = oeFormatShortDate($titleres['DOB']);
  /******************************************************************/
  ob_start();
  // Use logo if it exists as 'practice_logo.gif' in the site dir
  // old code used the global custom dir which is no longer a valid
  ?>
  <table style="width:7in;">
    <tr>
      <td style='width:100px;text-align:top;'>
        <?php
          $practice_logo = $GLOBALS['OE_SITE_DIR']."/images/practice_logo.gif";
          if (file_exists($practice_logo)) {
            echo "<img src='$practice_logo' align='left' style='width:125px;margin:0px;'><br />\n";
          }
        ?>
      </td>
      <td style='width:40%;'>
        <em style="font-weight:bold;font-size:1.4em;"><?php echo text($facility['name']); ?></em><br />
        <?php echo text($facility['street']); ?><br />
        <?php echo text($facility['city']); ?>, <?php echo text($facility['state']); ?> <?php echo text($facility['postal_code']); ?><br />
        <?php echo xlt('Phone').': ' .text($facility['phone']); ?><br />
        <?php echo xlt('Fax').': ' .text($facility['fax']); ?><br />
        <br clear='all' />
      </td>
      <td>
        <em style="font-weight:bold;font-size:1.4em;"><?php echo text($titleres['fname']) . " " . text($titleres['lname']); ?></em><br />
        <b style="font-weight:bold;"><?php echo xlt('Chart Number'); ?>:</b> <?php echo text($stmt['pid']); ?><br />
        <b style="font-weight:bold;"><?php echo xlt('Generated on'); ?>:</b> <?php echo oeFormatShortDate(); ?><br />
        <b><?php echo xlt('Provider') . ':</b>  '; ?><?php echo text(getProviderName($providerID)); ?> <br />
      </td>
    </tr>
  </table>
  <?php
  $output = ob_get_contents();
  ob_end_clean();
  return $output;
}
开发者ID:juggernautsei,项目名称:openemr,代码行数:52,代码来源:statement.inc.php


示例3: default_action

 function default_action()
 {
     $form_id = $this->form_id;
     if (is_numeric($form_id)) {
         $vitals = new FormVitals($form_id);
     } else {
         $vitals = new FormVitals();
     }
     $dbconn = $GLOBALS['adodb']['db'];
     //Combined query for retrieval of vital information which is not deleted
     $sql = "SELECT fv.*, fe.date AS encdate " . "FROM form_vitals AS fv, forms AS f, form_encounter AS fe WHERE " . "fv.id != {$form_id} and fv.pid = " . $GLOBALS['pid'] . " AND " . "f.formdir = 'vitals' AND f.deleted = 0 AND f.form_id = fv.id AND " . "fe.pid = f.pid AND fe.encounter = f.encounter " . "ORDER BY encdate DESC, fv.date DESC";
     $result = $dbconn->Execute($sql);
     // get the patient's current age
     $patient_data = getPatientData($GLOBALS['pid']);
     $patient_dob = $patient_data['DOB'];
     $patient_age = getPatientAge($patient_dob);
     $this->assign("patient_age", $patient_age);
     $this->assign("patient_dob", $patient_dob);
     $i = 1;
     while ($result && !$result->EOF) {
         $results[$i]['id'] = $result->fields['id'];
         $results[$i]['encdate'] = substr($result->fields['encdate'], 0, 10);
         $results[$i]['date'] = $result->fields['date'];
         $results[$i]['activity'] = $result->fields['activity'];
         $results[$i]['bps'] = $result->fields['bps'];
         $results[$i]['bpd'] = $result->fields['bpd'];
         $results[$i]['weight'] = $result->fields['weight'];
         $results[$i]['height'] = $result->fields['height'];
         $results[$i]['temperature'] = $result->fields['temperature'];
         $results[$i]['temp_method'] = $result->fields['temp_method'];
         $results[$i]['pulse'] = $result->fields['pulse'];
         $results[$i]['respiration'] = $result->fields['respiration'];
         $results[$i]['BMI'] = $result->fields['BMI'];
         $results[$i]['BMI_status'] = $result->fields['BMI_status'];
         $results[$i]['note'] = $result->fields['note'];
         $results[$i]['waist_circ'] = $result->fields['waist_circ'];
         $results[$i]['head_circ'] = $result->fields['head_circ'];
         $results[$i++]['oxygen_saturation'] = $result->fields['oxygen_saturation'];
         $result->MoveNext();
     }
     $this->assign("vitals", $vitals);
     $this->assign("results", $results);
     $this->assign("VIEW", true);
     return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:45,代码来源:C_FormVitals.class.php


示例4: default_action

 function default_action($form_id)
 {
     if (is_numeric($form_id)) {
         $vitals = new FormVitals($form_id);
     } else {
         $vitals = new FormVitals();
     }
     $dbconn = $GLOBALS['adodb']['db'];
     //Combined query for retrieval of vital information which is not deleted
     $sql = "SELECT form_vitals.* from form_vitals,forms where form_vitals.id != {$form_id} and form_vitals.pid =" . $GLOBALS['pid'];
     $sql .= " and forms.deleted!=1 and form_vitals.id=forms.form_id";
     $sql .= " ORDER BY form_vitals.date DESC";
     $result = $dbconn->Execute($sql);
     // get the patient's current age
     $patient_data = getPatientData($GLOBALS['pid']);
     $patient_age = getPatientAge($patient_data['DOB']);
     $this->assign("patient_age", $patient_age);
     $i = 1;
     while ($result && !$result->EOF) {
         $results[$i]['id'] = $result->fields['id'];
         $results[$i]['date'] = $result->fields['date'];
         $results[$i]['activity'] = $result->fields['activity'];
         $results[$i]['bps'] = $result->fields['bps'];
         $results[$i]['bpd'] = $result->fields['bpd'];
         $results[$i]['weight'] = $result->fields['weight'];
         $results[$i]['height'] = $result->fields['height'];
         $results[$i]['temperature'] = $result->fields['temperature'];
         $results[$i]['temp_method'] = $result->fields['temp_method'];
         $results[$i]['pulse'] = $result->fields['pulse'];
         $results[$i]['respiration'] = $result->fields['respiration'];
         $results[$i]['BMI'] = $result->fields['BMI'];
         $results[$i]['BMI_status'] = $result->fields['BMI_status'];
         $results[$i]['note'] = $result->fields['note'];
         $results[$i]['waist_circ'] = $result->fields['waist_circ'];
         $results[$i]['head_circ'] = $result->fields['head_circ'];
         $results[$i++]['oxygen_saturation'] = $result->fields['oxygen_saturation'];
         $result->MoveNext();
     }
     $this->assign("vitals", $vitals);
     $this->assign("results", $results);
     $this->assign("VIEW", true);
     return $this->fetch($this->template_dir . $this->template_mod . "_new.html");
 }
开发者ID:ranjanprasad,项目名称:openemr,代码行数:43,代码来源:C_FormVitals.class.php


示例5: updatePatientData

        updatePatientData($ptid, $newdata['patient_data']);
    }
    // Finally, delete the request from the portal.
    $result = cms_portal_call(array('action' => 'delpost', 'postid' => $postid));
    if ($result['errmsg']) {
        die(text($result['errmsg']));
    }
    echo "<html><body><script language='JavaScript'>\n";
    echo "if (top.restoreSession) top.restoreSession(); else opener.top.restoreSession();\n";
    echo "document.location.href = 'list_requests.php';\n";
    echo "</script></body></html>\n";
    exit;
}
$db_id = 0;
if ($ptid) {
    $ptrow = getPatientData($ptid, "*");
    $db_id = $ptrow['id'];
}
if ($postid) {
    $result = cms_portal_call(array('action' => 'getpost', 'postid' => $postid));
    if ($result['errmsg']) {
        die(text($result['errmsg']));
    }
}
?>
<html>
<head>
<?php 
html_header_show();
?>
<link rel=stylesheet href="<?php 
开发者ID:mi-squared,项目名称:openemr,代码行数:31,代码来源:patient_form.php


示例6: test_filter

/**
 * Test filter of a selected rule on a selected patient
 *
 * @param  integer        $patient_id  pid of selected patient.
 * @param  string         $rule        id(string) of selected rule
 * @param  string         $dateTarget  target date (format Y-m-d H:i:s). If blank then will test with current date as target.
 * @return boolean/string              if pass filter then TRUE; if excluded then 'EXCLUDED'; if not pass filter then FALSE
 */
function test_filter($patient_id, $rule, $dateTarget)
{
    // Set date to current if not set
    $dateTarget = $dateTarget ? $dateTarget : date('Y-m-d H:i:s');
    // Collect patient information
    $patientData = getPatientData($patient_id, "sex, DATE_FORMAT(DOB,'%Y %m %d') as DOB_TS");
    //
    // ----------------- INCLUSIONS -----------------
    //
    // -------- Age Filter (inclusion) ------------
    // Calculate patient age in years and months
    $patientAgeYears = convertDobtoAgeYearDecimal($patientData['DOB_TS'], $dateTarget);
    $patientAgeMonths = convertDobtoAgeMonthDecimal($patientData['DOB_TS'], $dateTarget);
    // Min age (year) Filter (assume that there in not more than one of each)
    $filter = resolve_filter_sql($rule, 'filt_age_min');
    if (!empty($filter)) {
        $row = $filter[0];
        if ($row['method_detail'] == "year") {
            if ($row['value'] && $row['value'] > $patientAgeYears) {
                return false;
            }
        }
        if ($row['method_detail'] == "month") {
            if ($row['value'] && $row['value'] > $patientAgeMonths) {
                return false;
            }
        }
    }
    // Max age (year) Filter (assume that there in not more than one of each)
    $filter = resolve_filter_sql($rule, 'filt_age_max');
    if (!empty($filter)) {
        $row = $filter[0];
        if ($row['method_detail'] == "year") {
            if ($row['value'] && $row['value'] < $patientAgeYears) {
                return false;
            }
        }
        if ($row['method_detail'] == "month") {
            if ($row['value'] && $row['value'] < $patientAgeMonths) {
                return false;
            }
        }
    }
    // -------- Gender Filter (inclusion) ---------
    // Gender Filter (assume that there in not more than one of each)
    $filter = resolve_filter_sql($rule, 'filt_sex');
    if (!empty($filter)) {
        $row = $filter[0];
        if ($row['value'] && $row['value'] != $patientData['sex']) {
            return false;
        }
    }
    // -------- Database Filter (inclusion) ------
    // Database Filter
    $filter = resolve_filter_sql($rule, 'filt_database');
    if (!empty($filter) && !database_check($patient_id, $filter, '', $dateTarget)) {
        return false;
    }
    // -------- Lists Filter (inclusion) ----
    // Set up lists filter, which is fully customizable and currently includes diagnoses, meds,
    //   surgeries and allergies.
    $filter = resolve_filter_sql($rule, 'filt_lists');
    if (!empty($filter) && !lists_check($patient_id, $filter, $dateTarget)) {
        return false;
    }
    // -------- Procedure (labs,imaging,test,procedures,etc) Filter (inlcusion) ----
    // Procedure Target (includes) (may need to include an interval in the future)
    $filter = resolve_filter_sql($rule, 'filt_proc');
    if (!empty($filter) && !procedure_check($patient_id, $filter, '', $dateTarget)) {
        return false;
    }
    //
    // ----------------- EXCLUSIONS -----------------
    //
    // -------- Lists Filter (EXCLUSION) ----
    // Set up lists EXCLUSION filter, which is fully customizable and currently includes diagnoses, meds,
    //   surgeries and allergies.
    $filter = resolve_filter_sql($rule, 'filt_lists', 0);
    if (!empty($filter) && lists_check($patient_id, $filter, $dateTarget)) {
        return "EXCLUDED";
    }
    // Passed all filters, so return true.
    return true;
}
开发者ID:nickolasnikolic,项目名称:openemr,代码行数:92,代码来源:clinical_rules.php


示例7: generate_receipt

function generate_receipt($patient_id, $encounter = 0)
{
    global $sl_err, $sl_cash_acc, $css_header, $details, $INTEGRATED_AR;
    // Get details for what we guess is the primary facility.
    $frow = sqlQuery("SELECT * FROM facility " . "ORDER BY billing_location DESC, accepts_assignment DESC, id LIMIT 1");
    $patdata = getPatientData($patient_id, 'fname,mname,lname,pubpid,street,city,state,postal_code,providerID');
    // Get the most recent invoice data or that for the specified encounter.
    //
    // Adding a provider check so that their info can be displayed on receipts
    if ($INTEGRATED_AR) {
        if ($encounter) {
            $ferow = sqlQuery("SELECT id, date, encounter, provider_id FROM form_encounter " . "WHERE pid = ? AND encounter = ?", array($patient_id, $encounter));
        } else {
            $ferow = sqlQuery("SELECT id, date, encounter, provider_id FROM form_encounter " . "WHERE pid = ? " . "ORDER BY id DESC LIMIT 1", array($patient_id));
        }
        if (empty($ferow)) {
            die(xlt("This patient has no activity."));
        }
        $trans_id = $ferow['id'];
        $encounter = $ferow['encounter'];
        $svcdate = substr($ferow['date'], 0, 10);
        if ($GLOBALS['receipts_by_provider']) {
            if (isset($ferow['provider_id'])) {
                $encprovider = $ferow['provider_id'];
            } else {
                if (isset($patdata['providerID'])) {
                    $encprovider = $patdata['providerID'];
                } else {
                    $encprovider = -1;
                }
            }
        }
        if ($encprovider) {
            $providerrow = sqlQuery("SELECT fname, mname, lname, title, street, streetb, " . "city, state, zip, phone, fax FROM users WHERE id = ?", array($encprovider));
        }
    } else {
        SLConnect();
        //
        $arres = SLQuery("SELECT * FROM ar WHERE " . "invnumber LIKE '{$patient_id}.%' " . "ORDER BY id DESC LIMIT 1");
        if ($sl_err) {
            die(text($sl_err));
        }
        if (!SLRowCount($arres)) {
            die(xlt("This patient has no activity."));
        }
        $arrow = SLGetRow($arres, 0);
        //
        $trans_id = $arrow['id'];
        //
        // Determine the date of service.  An 8-digit encounter number is
        // presumed to be a date of service imported during conversion or
        // associated with prescriptions only.  Otherwise look it up in the
        // form_encounter table.
        //
        $svcdate = "";
        list($trash, $encounter) = explode(".", $arrow['invnumber']);
        if (strlen($encounter) >= 8) {
            $svcdate = substr($encounter, 0, 4) . "-" . substr($encounter, 4, 2) . "-" . substr($encounter, 6, 2);
        } else {
            if ($encounter) {
                $tmp = sqlQuery("SELECT date FROM form_encounter WHERE " . "encounter = ?", array($encounter));
                $svcdate = substr($tmp['date'], 0, 10);
            }
        }
    }
    // end not $INTEGRATED_AR
    // Get invoice reference number.
    $encrow = sqlQuery("SELECT invoice_refno FROM form_encounter WHERE " . "pid = ? AND encounter = ? LIMIT 1", array($patient_id, $encounter));
    $invoice_refno = $encrow['invoice_refno'];
    ?>
<html>
<head>
<?php 
    html_header_show();
    ?>
<link rel='stylesheet' href='<?php 
    echo $css_header;
    ?>
' type='text/css'>
<title><?php 
    echo xlt('Receipt for Payment');
    ?>
</title>
<script type="text/javascript" src="../../library/dialog.js"></script>
<script language="JavaScript">

<?php 
    require $GLOBALS['srcdir'] . "/restoreSession.php";
    ?>

 // Process click on Print button.
 function printme() {
  var divstyle = document.getElementById('hideonprint').style;
  divstyle.display = 'none';
  window.print();
  return false;
 }

 // Process click on Delete button.
 function deleteme() {
//.........这里部分代码省略.........
开发者ID:nitinkunte,项目名称:openemr,代码行数:101,代码来源:pos_checkout.php


示例8: sqlQuery

$frow = sqlQuery("SELECT * FROM facility WHERE primary_business_entity = 1");
// If primary is not set try to old method of guessing...for backward compatibility
if (empty($frow)) {
    $frow = sqlQuery("SELECT * FROM facility " . "ORDER BY billing_location DESC, accepts_assignment DESC, id LIMIT 1");
}
// Still missing...
if (empty($frow)) {
    $alertmsg = xl("No Primary Business Entity selected in facility list");
}
// Loop on array of PIDS
$saved_pages = $pages;
//Save calculated page count of a single fee sheet
foreach ($pid_list as $pid) {
    if ($form_fill) {
        // Get the patient's name and chart number.
        $patdata = getPatientData($pid);
    }
    // This tracks our position in the $SBCODES array.
    $cindex = 0;
    while (--$pages >= 0) {
        $html .= genFacilityTitle(xl('Superbill/Fee Sheet'), -1);
        $html .= "\n<table class='bordertbl' cellspacing='0' cellpadding='0' width='100%'>\n<tr>\n<td valign='top'>\n<table border='0' cellspacing='0' cellpadding='0' width='100%'>\n<tr>\n<td class='toprow' style='width:10%'></td>\n<td class='toprow' style='width:10%'></td>\n<td class='toprow' style='width:25%'></td>\n<td class='toprow' style='width:55%'></td>\n</tr>";
        $cindex = genColumn($cindex);
        // Column 1
        if ($pages == 0) {
            // if this is the last page
            $html .= "<tr>\n<td colspan='3' valign='top' class='fshead' style='height:" . $lheight * 2 . "pt'>";
            $html .= xl('Patient', 'r');
            $html .= ":<br />";
            if ($form_fill) {
                $html .= $patdata['fname'] . ' ' . $patdata['mname'] . ' ' . $patdata['lname'] . "<br />\n";
开发者ID:minggLu,项目名称:openemr,代码行数:31,代码来源:printed_fee_sheet.php


示例9: getPatientData

         $us19_fee = $us19_fee + $iter['fee'];
         $us19_inspay = $us19_inspay + $iter['ins_code'];
         $us19_insadj = $us19_insadj + $iter['ins_adjust_dollar'];
         $us19_patadj = $us19_patadj + $iter['pat_adjust_dollar'];
         $us19_patpay = $us19_patpay + $iter['pat_code'];
         break;
 }
 if ($the_first_time == 1) {
     $user = $iter['user'];
     $first_user = $iter['user'];
     $the_first_time = 0;
 }
 if ($totals_only != 1) {
     if ($old_pid != $iter['pid'] and $iter['code_type'] != 'payment_info') {
         // $name has patient information
         $name = getPatientData($iter["pid"]);
         // formats the displayed text
         //
         if ($first_time) {
             print "<table border=0><tr>\n";
             // small table
             $first_time = 0;
         }
         // Displays name
         print "<tr><td colspan=50><hr><span class=bold>" . "     " . text($name["fname"]) . " " . text($name["lname"]) . "</span><br><br></td></tr><tr>\n";
         //==================================
         if ($iter['code_type'] === 'COPAY' || $iter['code_type'] === 'Patient Payment' || $iter['code_type'] === 'Insurance Payment') {
             print "<td width=40><span class=text><center><b>" . xlt("Units") . "</b></center>";
             print "</span></td><td width=100><span class=text><center><b>" . xlt("Fee") . "</b></center>";
             print "</span></td><td width=100><span class=text><center><b>" . xlt("Code") . "</b></center>";
             print "</span></td><td width=100><span class=text><b>";
开发者ID:juggernautsei,项目名称:openemr,代码行数:31,代码来源:print_daysheet_report_num2.php


示例10: sqlQuery

 $mmo_empty_mod = false;
 $mmo_num_charges = 0;
 // If there are ANY unauthorized items in this encounter and this is
 // the normal case of viewing only authorized billing, then skip the
 // entire encounter.
 //
 $skipping = FALSE;
 if ($my_authorized == '1') {
     $res = sqlQuery("select count(*) as count from billing where " . "encounter = ? and " . "pid=? and " . "activity = 1 and authorized = 0", array($iter['enc_encounter'], $iter['enc_pid']));
     if ($res['count'] > 0) {
         $skipping = TRUE;
         $last_encounter_id = $this_encounter_id;
         continue;
     }
 }
 $name = getPatientData($iter['enc_pid'], "fname, mname, lname, pubpid, billing_note, DATE_FORMAT(DOB,'%Y-%m-%d') as DOB_YMD");
 # Check if patient has primary insurance and a subscriber exists for it.
 # If not we will highlight their name in red.
 # TBD: more checking here.
 #
 $res = sqlQuery("select count(*) as count from insurance_data where " . "pid = ? and " . "type='primary' and " . "subscriber_lname is not null and " . "subscriber_lname != '' limit 1", array($iter['enc_pid']));
 $namecolor = $res['count'] > 0 ? "black" : "#ff7777";
 $bgcolor = "#" . ($encount & 1 ? "ddddff" : "ffdddd");
 echo "<tr bgcolor='{$bgcolor}'><td colspan='9' height='5'></td></tr>\n";
 $lcount = 1;
 $rcount = 0;
 $oldcode = "";
 $ptname = $name['fname'] . " " . $name['lname'];
 $raw_encounter_date = date("Y-m-d", strtotime($iter['enc_date']));
 $billing_note = $name['billing_note'];
 //  Add Encounter Date to display with "To Encounter" button 2/17/09  JCH
开发者ID:mi-squared,项目名称:openemr,代码行数:31,代码来源:billing_report.php


示例11: getPatientData

require_once $GLOBALS['srcdir'] . '/acl.inc';
require_once $GLOBALS['fileroot'] . '/custom/code_types.inc.php';
require_once $GLOBALS['srcdir'] . '/options.inc.php';
// Check authorization.
if (acl_check('patients', 'med')) {
    $tmp = getPatientData($pid, "squad");
    if ($tmp['squad'] && !acl_check('squads', $tmp['squad'])) {
        die(htmlspecialchars(xl('Not authorized'), ENT_NOQUOTES));
    }
} else {
    die(htmlspecialchars(xl('Not authorized'), ENT_NOQUOTES));
}
// Collect parameter(s)
$category = empty($_REQUEST['category']) ? '' : $_REQUEST['category'];
// Get patient's preferred language for the patient education URL.
$tmp = getPatientData($pid, 'language');
$language = $tmp['language'];
?>
<html>

<head>
<?php 
html_header_show();
?>

<link rel="stylesheet" href='<?php 
echo $css_header;
?>
' type='text/css'>

<title><?php 
开发者ID:katopenzz,项目名称:openemr,代码行数:31,代码来源:stats_full.php


示例12: foreach

            foreach ($result4 as $iter) {
                $authorize[$iter["pid"]]["forms"] .= "<span class=text>" . htmlspecialchars($iter["form_name"] . " " . date("n/j/Y", strtotime($iter["date"])), ENT_NOQUOTES) . "</span><br>\n";
            }
        }
    }
    ?>

<table border='0' cellpadding='0' cellspacing='2' width='100%'>
<tr>
<td valign='top'>

<?php 
    if ($authorize) {
        $count = 0;
        while (list($ppid, $patient) = each($authorize)) {
            $name = getPatientData($ppid);
            // If I want to see mine only and this patient is not mine, skip it.
            if ($see_auth == 2 && $_SESSION['authUserID'] != $name['id']) {
                continue;
            }
            if ($count >= $N) {
                print "<tr><td colspan='5' align='center'><a" . ($GLOBALS['concurrent_layout'] ? "" : " target='Main'") . " href='authorizations_full.php?active=1' class='alert'>" . htmlspecialchars(xl('Some authorizations were not displayed. Click here to view all'), ENT_NOQUOTES) . "</a></td></tr>\n";
                break;
            }
            echo "<tr><td valign='top'>";
            if ($GLOBALS['concurrent_layout']) {
                // Clicking the patient name will load both frames for that patient,
                // as demographics.php takes care of loading the bottom frame.
                echo "<a href='{$rootdir}/patient_file/summary/demographics.php?set_pid=" . htmlspecialchars($ppid, ENT_QUOTES) . "' target='RTop'>";
            } else {
                echo "<a href='{$rootdir}/patient_file/patient_file.php?set_pid=" . htmlspecialchars($ppid, ENT_QUOTES) . "' target='_top'>";
开发者ID:stephen-smith,项目名称:openemr,代码行数:31,代码来源:authorizations.php


示例13: note_action_process

 function note_action_process($patient_id)
 {
     // this function is a dual function that will set up a note associated with a document or send a document via email.
     if ($_POST['process'] != "true") {
         return;
     }
     $n = new Note();
     $n->set_owner($_SESSION['authUserID']);
     parent::populate_object($n);
     if ($_POST['identifier'] == "no") {
         // associate a note with a document
         $n->persist();
     } elseif ($_POST['identifier'] == "yes") {
         // send the document via email
         $d = new Document($_POST['foreign_id']);
         $url = $d->get_url();
         $storagemethod = $d->get_storagemethod();
         $couch_docid = $d->get_couch_docid();
         $couch_revid = $d->get_couch_revid();
         if ($couch_docid && $couch_revid) {
             $couch = new CouchDB();
             $data = array($GLOBALS['couchdb_dbase'], $couch_docid);
             $resp = $couch->retrieve_doc($data);
             $content = $resp->data;
             if ($content == '' && $GLOBALS['couchdb_log'] == 1) {
                 $log_content = date('Y-m-d H:i:s') . " ==> Retrieving document\r\n";
                 $log_content = date('Y-m-d H:i:s') . " ==> URL: " . $url . "\r\n";
                 $log_content .= date('Y-m-d H:i:s') . " ==> CouchDB Document Id: " . $couch_docid . "\r\n";
                 $log_content .= date('Y-m-d H:i:s') . " ==> CouchDB Revision Id: " . $couch_revid . "\r\n";
                 $log_content .= date('Y-m-d H:i:s') . " ==> Failed to fetch document content from CouchDB.\r\n";
                 //$log_content .= date('Y-m-d H:i:s')." ==> Will try to download file from HardDisk if exists.\r\n\r\n";
                 $this->document_upload_download_log($d->get_foreign_id(), $log_content);
                 die(xlt("File retrieval from CouchDB failed"));
             }
             // place it in a temporary file and will remove the file below after emailed
             $temp_couchdb_url = $GLOBALS['OE_SITE_DIR'] . '/documents/temp/couch_' . date("YmdHis") . $d->get_url_file();
             $fh = fopen($temp_couchdb_url, "w");
             fwrite($fh, base64_decode($content));
             fclose($fh);
             $temp_url = $temp_couchdb_url;
             // doing this ensure hard drive file never deleted in case something weird happens
         } else {
             $url = preg_replace("|^(.*)://|", "", $url);
             // Collect filename and path
             $from_all = explode("/", $url);
             $from_filename = array_pop($from_all);
             $from_pathname_array = array();
             for ($i = 0; $i < $d->get_path_depth(); $i++) {
                 $from_pathname_array[] = array_pop($from_all);
             }
             $from_pathname_array = array_reverse($from_pathname_array);
             $from_pathname = implode("/", $from_pathname_array);
             $temp_url = $GLOBALS['OE_SITE_DIR'] . '/documents/' . $from_pathname . '/' . $from_filename;
         }
         if (!file_exists($temp_url)) {
             echo xl('The requested document is not present at the expected location on the filesystem or there are not sufficient permissions to access it.', '', '', ' ') . $temp_url;
         }
         $url = $temp_url;
         $body_notes = attr($_POST['note']);
         $pdetails = getPatientData($patient_id);
         $pname = $pdetails['fname'] . " " . $pdetails['lname'];
         $this->document_send($_POST['provide_email'], $body_notes, $url, $pname);
         if ($couch_docid && $couch_revid) {
             // remove the temporary couchdb file
             unlink($temp_couchdb_url);
         }
     }
     $this->_state = false;
     $_POST['process'] = "";
     return $this->view_action($patient_id, $n->get_foreign_id());
 }
开发者ID:bootygal1,项目名称:openemr,代码行数:71,代码来源:C_Document.class.php


示例14: getPatientData

?>
<link rel=stylesheet href="<?php 
echo $css_header;
?>
" type="text/css">
</head>

<body bgcolor="#ffffff" topmargin=0 rightmargin=0 leftmargin=2 bottommargin=0 marginwidth=2 marginheight=0>
<p>
<?php 
if (sizeof($_GET) > 0) {
    $ar = $_GET;
} else {
    $ar = $_POST;
}
$titleres = getPatientData($pid, "fname,lname,providerID");
// $sql = "select * from facility where billing_location = 1";
$sql = "select f.* from facility f " . "LEFT JOIN form_encounter fe on fe.facility_id = f.id " . "where fe.encounter = " . $encounter;
$db = $GLOBALS['adodb']['db'];
$results = $db->Execute($sql);
$facility = array();
if (!$results->EOF) {
    $facility = $results->fields;
}
$practice_logo = "../../../custom/practice_logo.gif";
if (file_exists($practice_logo)) {
    echo "<img src='{$practice_logo}' align='left'>\n";
}
?>
<h2><?php 
echo $facility['name'];
开发者ID:robonology,项目名称:openemr,代码行数:31,代码来源:cash_receipt.php


示例15: postcalendar_userapi_buildSubmitForm

/**
 *    postcalendar_userapi_buildSubmitForm()
 *    create event submit form
 */
function postcalendar_userapi_buildSubmitForm($args, $admin = false)
{
    $_SESSION['category'] = "";
    if (!PC_ACCESS_ADD) {
        return _POSTCALENDARNOAUTH;
    }
    extract($args);
    unset($args);
    //since we seem to clobber category
    $cat = $category;
    $output = new pnHTML();
    $output->SetInputMode(_PNH_VERBATIMINPUT);
    // set up Smarty
    $tpl = new pcSmarty();
    $tpl->caching = false;
    $template_name = pnModGetVar(__POSTCALENDAR__, 'pcTemplate');
    if (!isset($template_name)) {
        $template_name = 'default';
    }
    //=================================================================
    //  Setup the correct config file path for the templates
    //=================================================================
    $modinfo = pnModGetInfo(pnModGetIDFromName(__POSTCALENDAR__));
    $modir = pnVarPrepForOS($modinfo['directory']);
    $modname = $modinfo['displayname'];
    $all_categories =& pnModAPIFunc(__POSTCALENDAR__, 'user', 'getCategories');
    //print_r($all_categories);
    unset($modinfo);
    $tpl->config_dir = "modules/{$modir}/pntemplates/{$template_name}/config/";
    //=================================================================
    //  PARSE MAIN
    //=================================================================
    $tpl->assign('webroot', $GLOBALS['web_root']);
    $tpl->assign_by_ref('TPL_NAME', $template_name);
    $tpl->assign('FUNCTION', pnVarCleanFromInput('func'));
    $tpl->assign_by_ref('ModuleName', $modname);
    $tpl->assign_by_ref('ModuleDirectory', $modir);
    $tpl->assign_by_ref('category', $all_categories);
    $tpl->assign('NewEventHeader', _PC_NEW_EVENT_HEADER);
    $tpl->assign('EventTitle', _PC_EVENT_TITLE);
    $tpl->assign('Required', _PC_REQUIRED);
    $tpl->assign('DateTimeTitle', _PC_DATE_TIME);
    $tpl->assign('AlldayEventTitle', _PC_ALLDAY_EVENT);
    $tpl->assign('TimedEventTitle', _PC_TIMED_EVENT);
    $tpl->assign('TimedDurationTitle', _PC_TIMED_DURATION);
    $tpl->assign('TimedDurationHoursTitle', _PC_TIMED_DURATION_HOURS);
    $tpl->assign('TimedDurationMinutesTitle', _PC_TIMED_DURATION_MINUTES);
    $tpl->assign('EventDescTitle', _PC_EVENT_DESC);
    //the double book variable comes from the eventdata array that is
    //passed here and extracted, injection is not an issue here
    if (is_numeric($double_book)) {
        $tpl->assign('double_book', $double_book);
    }
    //pennfirm begin patient info handling
    $ProviderID = pnVarCleanFromInput("provider_id");
    if (is_numeric($ProviderID)) {
        $tpl->assign('ProviderID', $ProviderID);
        $tpl->assign('provider_id', $ProviderID);
    } elseif (is_numeric($event_userid) && $event_userid != 0) {
        $tpl->assign('ProviderID', $event_userid);
        $tpl->assign('provider_id', $event_userid);
    } else {
        if ($_SESSION['userauthorized'] == 1) {
            $tpl->assign('ProviderID', $_SESSION['authUserID']);
        } else {
            $tpl->assign('ProviderID', "");
        }
    }
    $provinfo = getProviderInfo();
    $tpl->assign('providers', $provinfo);
    $PatientID = pnVarCleanFromInput("patient_id");
    // limit the number of results returned by getPatientPID
    // this helps to prevent the server from stalling on a request with
    // no PID and thousands of PIDs in the database -- JRM
    // the function getPatientPID($pid, $given, $orderby, $limit, $start) <-- defined in library/patient.inc
    $plistlimit = 500;
    if (is_numeric($PatientID)) {
        $tpl->assign('PatientList', getPatientPID(array('pid' => $PatientID, 'limit' => $plistlimit)));
    } elseif (is_numeric($event_pid)) {
        $tpl->assign('PatientList', getPatientPID(array('pid' => $event_pid, 'limit' => $plistlimit)));
    } else {
        $tpl->assign('PatientList', getPatientPID(array('limit' => $plistlimit)));
    }
    $tpl->assign('event_pid', $event_pid);
    $tpl->assign('event_aid', $event_aid);
    $tpl->assign('event_category', pnVarCleanFromInput("event_category"));
    if (empty($event_patient_name)) {
        $patient_data = getPatientData($event_pid, $given = "lname, fname");
        $event_patient_name = $patient_data['lname'] . ", " . $patient_data['fname'];
    }
    $tpl->assign('patient_value', $event_patient_name);
    //=================================================================
    //  PARSE INPUT_EVENT_TITLE
    //=================================================================
    $tpl->assign('InputEventTitle', 'event_subject');
    $tpl->assign('ValueEventTitle', pnVarPrepForDisplay($event_subject));
//.........这里部分代码省略.........
开发者ID:stephen-smith,项目名称:openemr,代码行数:101,代码来源:common.api.php


示例16: htmlspecialchars

<?php 
if ($result_sent_count == $M) {
    echo "   <a class='link' href='pnotes_full.php" . "?{$urlparms}" . "&s=1" . "&form_active=" . htmlspecialchars($form_active, ENT_QUOTES) . "&form_inactive=" . htmlspecialchars($form_inactive, ENT_QUOTES) . "&form_doc_only=" . htmlspecialchars($form_doc_only, ENT_QUOTES) . "&offset_sent=" . ($offset_sent + $M) . "&" . attr($activity_string_html) . "' onclick='top.restoreSession()'>[" . htmlspecialchars(xl('Next'), ENT_NOQUOTES) . "]</a>\n";
}
?>
  </td>
 </tr>
</table>

  </div>
</div>
<script language='JavaScript'>

<?php 
if ($_GET['set_pid']) {
    $ndata = getPatientData($patient_id, "fname, lname, pubpid");
    ?>
 parent.left_nav.setPatient(<?php 
    echo "'" . addslashes($ndata['fname'] . " " . $ndata['lname']) . "'," . addslashes($patient_id) . ",'" . addslashes($ndata['pubpid']) . "',window.name";
    ?>
);
<?php 
}
// If this note references a new patient document, pop up a display
// of that document.
//
if ($noteid) {
    $prow = getPnoteById($noteid, 'body');
    if (preg_match('/New scanned document (\\d+): [^\\n]+\\/([^\\n]+)/', $prow['body'], $matches)) {
        $docid = $matches[1];
        $docname = $matches[2];
开发者ID:juggernautsei,项目名称:openemr,代码行数:31,代码来源:pnotes_full.php


示例17: acl_check

// Check authorization.
$thisauth = acl_check('patients', 'med');
if (!$thisauth) {
    die(xl('Not authorized'));
}
// Check authorization for pending review.
$reviewauth = acl_check('patients', 'sign');
if ($form_review and !$reviewauth and !$thisauth) {
    die(xl('Not authorized'));
}
// Set pid for pending review.
if ($_GET['set_pid'] && $form_review) {
    require_once "{$srcdir}/pid.inc";
    require_once "{$srcdir}/patient.inc";
    setpid($_GET['set_pid']);
    $result = getPatientData($pid, "*, DATE_FORMAT(DOB,'%Y-%m-%d') as DOB_YMD");
    ?>
  <script language='JavaScript'>
    parent.left_nav.setPatient(<?php 
    echo "'" . addslashes($result['fname']) . " " . addslashes($result['lname']) . "',{$pid},'" . addslashes($result['pubpid']) . "','', ' " . xl('DOB') . ": " . oeFormatShortDate($result['DOB_YMD']) . " " . xl('Age') . ": " . getPatientAge($result['DOB_YMD']) . "'";
    ?>
);
    parent.left_nav.setRadio(window.name, 'orp');
  </script>
  <?php 
}
if (!$form_batch && !$pid && !$form_review) {
    die(xl('There is no current patient'));
}
function oresRawData($name, $index)
{
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:orders_results.php


示例18: getContent

}
?>

</div> <!-- end of report_custom DIV -->

<?php 
if ($PDF_OUTPUT) {
    $content = getContent();
    // $pdf->setDefaultFont('Arial');
    $pdf->writeHTML($content, false);
    if ($PDF_OUTPUT == 1) {
        $pdf->Output('report.pdf', $GLOBALS['pdf_output']);
        // D = Download, I = Inline
    } else {
        // This is the case of writing the PDF as a message to the CMS portal.
        $ptdata = getPatientData($pid, 'cmsportal_login');
        $contents = $pdf->Output('', true);
        echo "<html><head>\n";
        echo "<link rel='stylesheet' href='{$css_header}' type='text/css'>\n";
        echo "</head><body class='body_top'>\n";
        $result = cms_portal_call(array('action' => 'putmessage', 'user' => $ptdata['cmsportal_login'], 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getPatientName函数代码示例发布时间:2022-05-15
下一篇:
PHP getPatientBillingEncounter函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap