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

PHP fixDate函数代码示例

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

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



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

示例1: loadTemplate

function loadTemplate($file, $rec = null)
{
    global $scart;
    $file = PATHTOTEMPLATESEDIT . "/" . $file;
    $lines = file($file);
    foreach ($lines as $line_num => $line_value) {
        if ($line_num > 0) {
            $working .= $line_value;
        }
    }
    $read = $working;
    preg_match_all('([[a-z|_]+])', $read, $matches);
    if (is_array($matches)) {
        foreach ($matches[0] as $key => $value) {
            $findme = $value;
            $rec_value = substr(trim($value, "]"), 1);
            $replacewith = $rec[$rec_value];
            if ($value == "[date]") {
                $replacewith = fixDate($rec[$rec_value]);
            }
            if ($value == "[phone]") {
                $replacewith = fixPhone($rec[$rec_value]);
            }
            if ($value == "[buyers_name]") {
                $replacewith = stripslashes($_SESSION[SHOPPING_SESSION_ID]["field"]["fname"]) . " " . stripslashes($_SESSION[SHOPPING_SESSION_ID]["field"]["lname"]);
            }
            if ($value == "[company_name]") {
                $replacewith = COMPANYNAME;
            }
            if ($value == "[company_phone]") {
                $replacewith = fixPhone(CONTACTPHONE);
            }
            if ($value == "[company_email]") {
                $replacewith = COMPANYEMAIL;
            }
            if ($value == "[admin_email]") {
                $replacewith = SEND_SMTP_TO;
            }
            if ($value == "[invoice_amount]") {
                $replacewith = "\$" . number_format($rec["amount"], 2);
            }
            if ($value == "[invoice_number]") {
                $replacewith = $rec["inv_numb"];
            }
            if ($value == "[approval_code]") {
                $replacewith = $rec["trans_numb"];
            }
            if ($value == "[last_four]") {
                $replacewith = $rec["last_four"];
            }
            if ($value == "[giftcard_program]") {
                $replacewith = GIFTCARD_PROGRAM;
            }
            $read = str_replace($findme, stripslashes($replacewith), $read);
        }
    }
    return $read;
}
开发者ID:jboydston,项目名称:shop.getlocal.net,代码行数:58,代码来源:functions.inc.php


示例2: setInsurance

function setInsurance($pid, $ainsurance, $asubscriber, $seq)
{
    $iwhich = $seq == '2' ? "secondary" : ($seq == '3' ? "tertiary" : "primary");
    newInsuranceData($pid, $iwhich, $ainsurance["provider{$seq}"], $ainsurance["policy{$seq}"], $ainsurance["group{$seq}"], $ainsurance["name{$seq}"], $asubscriber["lname{$seq}"], $asubscriber["mname{$seq}"], $asubscriber["fname{$seq}"], $asubscriber["relationship{$seq}"], $asubscriber["ss{$seq}"], fixDate($asubscriber["dob{$seq}"]), $asubscriber["street{$seq}"], $asubscriber["zip{$seq}"], $asubscriber["city{$seq}"], $asubscriber["state{$seq}"], $asubscriber["country{$seq}"], $asubscriber["phone{$seq}"], $asubscriber["employer{$seq}"], $asubscriber["employer_street{$seq}"], $asubscriber["employer_city{$seq}"], $asubscriber["employer_zip{$seq}"], $asubscriber["employer_state{$seq}"], $asubscriber["employer_country{$seq}"], $ainsurance["copay{$seq}"], $asubscriber["sex{$seq}"]);
}
开发者ID:stephen-smith,项目名称:openemr,代码行数:5,代码来源:import_xml.php


示例3: isset

    echo "    \n";
    echo "  </td>\n";
    echo " </tr>\n";
    $grand_total_charges += $docrow['charges'];
    $grand_total_copays += $docrow['copays'];
    $grand_total_encounters += $docrow['encounters'];
    $docrow['charges'] = 0;
    $docrow['copays'] = 0;
    $docrow['encounters'] = 0;
}
$form_facility = isset($_POST['form_facility']) ? $_POST['form_facility'] : '';
$form_from_date = fixDate($_POST['form_from_date'], date('Y-m-d'));
$form_to_date = fixDate($_POST['form_to_date'], date('Y-m-d'));
if ($_POST['form_refresh']) {
    $form_from_date = fixDate($_POST['form_from_date'], date('Y-m-d'));
    $form_to_date = fixDate($_POST['form_to_date'], "");
    // MySQL doesn't grok full outer joins so we do it the hard way.
    //
    $query = "( " . "SELECT " . "e.pc_eventDate, e.pc_startTime, " . "fe.encounter, fe.date AS encdate, " . "f.authorized, " . "p.fname, p.lname, p.pid, p.pubpid, " . "CONCAT( u.lname, ', ', u.fname ) AS docname " . "FROM openemr_postcalendar_events AS e " . "LEFT OUTER JOIN form_encounter AS fe " . "ON fe.date = e.pc_eventDate AND fe.pid = e.pc_pid " . "LEFT OUTER JOIN forms AS f ON f.pid = fe.pid AND f.encounter = fe.encounter AND f.formdir = 'newpatient' " . "LEFT OUTER JOIN patient_data AS p ON p.pid = e.pc_pid " . "LEFT OUTER JOIN users AS u ON u.id = fe.provider_id WHERE ";
    if ($form_to_date) {
        $query .= "e.pc_eventDate >= '{$form_from_date}' AND e.pc_eventDate <= '{$form_to_date}' ";
    } else {
        $query .= "e.pc_eventDate = '{$form_from_date}' ";
    }
    if ($form_facility !== '') {
        $query .= "AND e.pc_facility = '{$form_facility}' ";
    }
    // $query .= "AND ( e.pc_catid = 5 OR e.pc_catid = 9 OR e.pc_catid = 10 ) " .
    $query .= "AND e.pc_pid != '' AND e.pc_apptstatus != '?' " . ") UNION ( " . "SELECT " . "e.pc_eventDate, e.pc_startTime, " . "fe.encounter, fe.date AS encdate, " . "f.authorized, " . "p.fname, p.lname, p.pid, p.pubpid, " . "CONCAT( u.lname, ', ', u.fname ) AS docname " . "FROM form_encounter AS fe " . "LEFT OUTER JOIN openemr_postcalendar_events AS e " . "ON fe.date = e.pc_eventDate AND fe.pid = e.pc_pid AND " . "e.pc_pid != '' AND e.pc_apptstatus != '?' " . "LEFT OUTER JOIN forms AS f ON f.pid = fe.pid AND f.encounter = fe.encounter AND f.formdir = 'newpatient' " . "LEFT OUTER JOIN patient_data AS p ON p.pid = fe.pid " . "LEFT OUTER JOIN users AS u ON u.id = fe.provider_id WHERE ";
    if ($form_to_date) {
        // $query .= "LEFT(fe.date, 10) >= '$form_from_date' AND LEFT(fe.date, 10) <= '$form_to_date' ";
开发者ID:ekuiperemr,项目名称:openemr,代码行数:31,代码来源:appt_encounter_report.php


示例4: fixDate

// Copyright (C) 2008 Rod Roark <[email protected]>
// Copyright (C) 2010 Tomasz Wyderka <[email protected]>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This report lists non reported patient diagnoses for a given date range.
require_once "../globals.php";
require_once "{$srcdir}/patient.inc";
require_once "../../custom/code_types.inc.php";
if (isset($_POST['form_from_date'])) {
    $from_date = $_POST['form_from_date'] !== "" ? fixDate($_POST['form_from_date'], date('Y-m-d')) : 0;
}
if (isset($_POST['form_to_date'])) {
    $to_date = $_POST['form_to_date'] !== "" ? fixDate($_POST['form_to_date'], date('Y-m-d')) : 0;
}
//
$form_code = isset($_POST['form_code']) ? $_POST['form_code'] : array();
//
if (empty($form_code)) {
    $query_codes = '';
} else {
    $query_codes = 'c.id in (';
    foreach ($form_code as $code) {
        $query_codes .= $code . ",";
    }
    $query_codes = substr($query_codes, 0, -1);
    $query_codes .= ') and ';
}
//
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:non_reported.php


示例5: add_date

$fake_register_globals = false;
require_once "../globals.php";
require_once "{$srcdir}/patient.inc";
require_once "{$srcdir}/options.inc.php";
require_once "../drugs/drugs.inc.php";
require_once "{$srcdir}/formatting.inc.php";
function add_date($givendate, $day = 0, $mth = 0, $yr = 0)
{
    $cd = strtotime($givendate);
    $newdate = date('Y-m-d', mktime(date('h', $cd), date('i', $cd), date('s', $cd), date('m', $cd) + $mth, date('d', $cd) + $day, date('Y', $cd) + $yr));
    return $newdate;
}
$type = $_POST["type"];
$facility = isset($_POST['facility']) ? $_POST['facility'] : '';
$sql_date_from = fixDate($_POST['date_from'], date('Y-01-01'));
$sql_date_to = fixDate($_POST['date_to'], add_date(date('Y-m-d')));
$patient_id = trim($_POST["patient_id"]);
$age_from = $_POST["age_from"];
$age_to = $_POST["age_to"];
$sql_gender = $_POST["gender"];
$sql_ethnicity = $_POST["ethnicity"];
$sql_race = $_POST["race"];
$form_drug_name = trim($_POST["form_drug_name"]);
$form_diagnosis = trim($_POST["form_diagnosis"]);
$form_lab_results = trim($_POST["form_lab_results"]);
$form_service_codes = trim($_POST["form_service_codes"]);
?>
<html>
<head>
<?php 
html_header_show();
开发者ID:richsiy,项目名称:openemr,代码行数:31,代码来源:clinical_reports.php


示例6: foreach

        ++$i;
    }
    return $i;
}
// If we are saving, then save and close the window.
//
if ($_POST['form_save']) {
    $i = 0;
    $text_type = "unknown";
    foreach ($ISSUE_TYPES as $key => $value) {
        if ($i++ == $_POST['form_type']) {
            $text_type = $key;
        }
    }
    $form_begin = fixDate($_POST['form_begin'], '');
    $form_end = fixDate($_POST['form_end'], '');
    if ($text_type == 'football_injury') {
        $form_injury_part = $_POST['form_injury_part'];
        $form_injury_type = $_POST['form_injury_type'];
    } else {
        $form_injury_part = $_POST['form_medical_system'];
        $form_injury_type = $_POST['form_medical_type'];
    }
    if ($issue) {
        $query = "UPDATE lists SET " . "type = '" . $text_type . "', " . "title = '" . $_POST['form_title'] . "', " . "comments = '" . $_POST['form_comments'] . "', " . "begdate = " . QuotedOrNull($form_begin) . ", " . "enddate = " . QuotedOrNull($form_end) . ", " . "returndate = " . QuotedOrNull($form_return) . ", " . "diagnosis = '" . $_POST['form_diagnosis'] . "', " . "occurrence = '" . $_POST['form_occur'] . "', " . "classification = '" . $_POST['form_classification'] . "', " . "reinjury_id = '" . $_POST['form_reinjury_id'] . "', " . "referredby = '" . $_POST['form_referredby'] . "', " . "injury_grade = '" . $_POST['form_injury_grade'] . "', " . "injury_part = '" . $form_injury_part . "', " . "injury_type = '" . $form_injury_type . "', " . "outcome = '" . $_POST['form_outcome'] . "', " . "destination = '" . $_POST['form_destination'] . "', " . "reaction ='" . $_POST['form_reaction'] . "' " . "WHERE id = '{$issue}'";
        sqlStatement($query);
        if ($text_type == "medication" && enddate != '') {
            sqlStatement('UPDATE prescriptions SET ' . 'medication = 0 where patient_id = ' . $thispid . " and upper(trim(drug)) = '" . strtoupper($_POST['form_title']) . "' " . ' and medication = 1');
        }
    } else {
        $issue = sqlInsert("INSERT INTO lists ( " . "date, pid, type, title, activity, comments, begdate, enddate, returndate, " . "diagnosis, occurrence, classification, referredby, user, groupname, " . "outcome, destination, reinjury_id, injury_grade, injury_part, injury_type, " . "reaction " . ") VALUES ( " . "NOW(), " . "'{$thispid}', " . "'" . $text_type . "', " . "'" . $_POST['form_title'] . "', " . "1, " . "'" . $_POST['form_comments'] . "', " . QuotedOrNull($form_begin) . ", " . QuotedOrNull($form_end) . ", " . QuotedOrNull($form_return) . ", " . "'" . $_POST['form_diagnosis'] . "', " . "'" . $_POST['form_occur'] . "', " . "'" . $_POST['form_classification'] . "', " . "'" . $_POST['form_referredby'] . "', " . "'" . ${$_SESSION}['authUser'] . "', " . "'" . ${$_SESSION}['authProvider'] . "', " . "'" . $_POST['form_outcome'] . "', " . "'" . $_POST['form_destination'] . "', " . "'" . $_POST['form_reinjury_id'] . "', " . "'" . $_POST['form_injury_grade'] . "', " . "'" . $form_injury_part . "', " . "'" . $form_injury_type . "', " . "'" . $_POST['form_reaction'] . "' " . ")");
开发者ID:stephen-smith,项目名称:openemr,代码行数:31,代码来源:add_edit_issue.php


示例7: batch_despatch

 public static function batch_despatch($var, $func, $data_credentials)
 {
     global $pid;
     if (UserService::valid($data_credentials)) {
         require_once "../../library/invoice_summary.inc.php";
         require_once "../../library/options.inc.php";
         require_once "../../library/acl.inc";
         require_once "../../library/patient.inc";
         if ($func == 'ar_responsible_party') {
             $patient_id = $pid;
             $encounter_id = $var['encounter'];
             $x['ar_responsible_party'] = ar_responsible_party($patient_id, $encounter_id);
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'getInsuranceData') {
             $type = $var['type'];
             $given = $var['given'];
             $x = getInsuranceData($pid, $type, $given);
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'generate_select_list') {
             $tag_name = $var['tag_name'];
             $list_id = $var['list_id'];
             $currvalue = $var['currvalue'];
             $title = $var['title'];
             $empty_name = $var['empty_name'];
             $class = $var['class'];
             $onchange = $var['onchange'];
             $x['generate_select_list'] = generate_select_list($tag_name, $list_id, $currvalue, $title, $empty_name, $class, $onchange);
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'xl_layout_label') {
             $constant = $var['constant'];
             $x['xl_layout_label'] = xl_layout_label($constant);
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'generate_form_field') {
             $frow = $var['frow'];
             $currvalue = $var['currvalue'];
             ob_start();
             generate_form_field($frow, $currvalue);
             $x['generate_form_field'] = ob_get_contents();
             ob_end_clean();
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'getInsuranceProviders') {
             $i = $var['i'];
             $provider = $var['provider'];
             $insurancei = getInsuranceProviders();
             $x = $insurancei;
             return $x;
         } elseif ($func == 'get_layout_form_value') {
             $frow = $var['frow'];
             $_POST = $var['post_array'];
             $x['get_layout_form_value'] = get_layout_form_value($frow);
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'updatePatientData') {
             $patient_data = $var['patient_data'];
             $create = $var['create'];
             updatePatientData($pid, $patient_data, $create);
             $x['ok'] = 'ok';
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'updateEmployerData') {
             $employer_data = $var['employer_data'];
             $create = $var['create'];
             updateEmployerData($pid, $employer_data, $create);
             $x['ok'] = 'ok';
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'newHistoryData') {
             newHistoryData($pid);
             $x['ok'] = 'ok';
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'newInsuranceData') {
             $_POST = $var[0];
             foreach ($var as $key => $value) {
                 if ($key >= 3) {
                     $var[$key] = formData($value);
                 }
                 if ($key >= 1) {
                     $parameters[$key] = $var[$key];
                 }
             }
             $parameters[12] = fixDate($parameters[12]);
             $parameters[27] = fixDate($parameters[27]);
             call_user_func_array('newInsuranceData', $parameters);
             $x['ok'] = 'ok';
             return UserService::function_return_to_xml($x);
         } elseif ($func == 'generate_layout_validation') {
             $form_id = $var['form_id'];
             ob_start();
             generate_layout_validation($form_id);
             $x = ob_get_clean();
             return $x;
         }
     } else {
         throw new SoapFault("Server", "credentials failed");
     }
 }
开发者ID:jatin-52,项目名称:erm,代码行数:93,代码来源:server_side.php


示例8: fwrite

     if (PEAR::isError($success)) {
         fwrite(STDERR, "Error, failed to add instrument ({$testName}) to the battery for timepoint ({$sessionID}):\n" . $success->getMessage() . "\n");
         return false;
     }
     break;
     /**
      * Fixing the dates
      * arguments: $candID, $dateType, $newDate, $sessionID
      */
 /**
  * Fixing the dates
  * arguments: $candID, $dateType, $newDate, $sessionID
  */
 case 'fix_date':
     // fix the date (arguments are checked by the function
     $success = fixDate($candID, $dateType, $newDate, $sessionID);
     if (PEAR::isError($success)) {
         fwrite(STDERR, "Failed to fix the date ({$newDate}) of type ({$dateType}) for candidate ({$candID}) [timepoint ({$sessionID})]:\n" . $success->getMessage() . "\n");
         return false;
     }
     break;
     /**
      * Timepoint Diagnostics
      * Recommended: run the diagnostics once the dates have been fixed, you can also pass the 'correct' date and the date type to see what changes would happen if the dates were different
      */
 /**
  * Timepoint Diagnostics
  * Recommended: run the diagnostics once the dates have been fixed, you can also pass the 'correct' date and the date type to see what changes would happen if the dates were different
  */
 case 'diagnose':
     if (!empty($sessionID)) {
开发者ID:neuromandaqui,项目名称:loris,代码行数:31,代码来源:fix_timepoint_date_problems.php


示例9: loadColumnData

function loadColumnData($key, $row)
{
    global $areport, $arr_titles, $from_date, $to_date, $arr_show;
    // If no result, do nothing.
    if (empty($row['abnormal'])) {
        return;
    }
    // If first instance of this key, initialize its arrays.
    if (empty($areport[$key])) {
        $areport[$key] = array();
        $areport[$key]['.prp'] = 0;
        // previous pid
        $areport[$key]['.wom'] = 0;
        // number of positive results for women
        $areport[$key]['.men'] = 0;
        // number of positive results for men
        $areport[$key]['.neg'] = 0;
        // number of negative results
        $areport[$key]['.age'] = array(0, 0, 0, 0, 0, 0, 0, 0, 0);
        // age array
        foreach ($arr_show as $askey => $dummy) {
            if (substr($askey, 0, 1) == '.') {
                continue;
            }
            $areport[$key][$askey] = array();
        }
    }
    // Flag this patient as having been encountered for this report row.
    $areport[$key]['.prp'] = $row['pid'];
    // Collect abnormal results only, except for a column of total negatives.
    if ($row['abnormal'] == 'no') {
        ++$areport[$key]['.neg'];
        return;
    }
    // Increment the correct sex category.
    if (strcasecmp($row['sex'], 'Male') == 0) {
        ++$areport[$key]['.men'];
    } else {
        ++$areport[$key]['.wom'];
    }
    // Increment the correct age category.
    $age = getAge(fixDate($row['DOB']), $row['date_ordered']);
    $i = min(intval(($age - 5) / 5), 8);
    if ($age < 11) {
        $i = 0;
    }
    ++$areport[$key]['.age'][$i];
    // For each patient attribute to report, this increments the array item
    // whose key is the attribute's value.  This works well for list-based
    // attributes.  A key of "Unspecified" is used where the attribute has
    // no assigned value.
    foreach ($arr_show as $askey => $dummy) {
        if (substr($askey, 0, 1) == '.') {
            continue;
        }
        $status = empty($row[$askey]) ? 'Unspecified' : $row[$askey];
        $areport[$key][$askey][$status] += 1;
        $arr_titles[$askey][$status] += 1;
    }
}
开发者ID:minggLu,项目名称:openemr,代码行数:60,代码来源:procedure_stats.php


示例10: displayLatestMessageBoardPosts

 /**
  * displayLatestMessageBoardPosts 
  * 
  * @param int $memberId 
  * 
  * @return void
  */
 function displayLatestMessageBoardPosts($memberId)
 {
     $memberId = (int) $memberId;
     $sql = "SELECT t.`id`, `subject`, `date`, `post` \n                FROM `fcms_board_posts` AS p, `fcms_board_threads` AS t, `fcms_users` AS u \n                WHERE t.`id` = p.`thread` \n                AND p.`user` = u.`id` \n                AND u.`id` = ?\n                ORDER BY `date` DESC \n                LIMIT 0, 5";
     $rows = $this->fcmsDatabase->getRows($sql, $memberId);
     if ($rows === false) {
         $this->fcmsError->displayError();
         return;
     }
     if (count($rows) <= 0) {
         return;
     }
     echo '
         <h2>' . T_('Latest Posts') . '</h2>';
     $tzOffset = getTimezone($memberId);
     foreach ($rows as $row) {
         $date = fixDate(T_('F j, Y, g:i a'), $tzOffset, $row['date']);
         $subject = $row['subject'];
         $post = removeBBCode($row['post']);
         $post = cleanOutput($post);
         $pos = strpos($subject, '#ANOUNCE#');
         if ($pos !== false) {
             $subject = substr($subject, 9, strlen($subject) - 9);
         }
         $subject = cleanOutput($subject);
         echo '
             <p>
                 <a href="messageboard.php?thread=' . $row['id'] . '">' . $subject . '</a> 
                 <span class="date">' . $date . '</span><br/>
                 ' . $post . '
             </p>';
     }
 }
开发者ID:lmcro,项目名称:fcms,代码行数:40,代码来源:profile.php


示例11: LWDate

function LWDate($field)
{
    $tmp = fixDate($field);
    return substr($tmp, 5, 2) . substr($tmp, 8, 2) . substr($tmp, 0, 4);
}
开发者ID:robonology,项目名称:openemr,代码行数:5,代码来源:export_labworks.php


示例12: loadColumnData

function loadColumnData($key, $row, $quantity = 1)
{
    global $areport, $arr_titles, $form_content, $from_date, $to_date, $arr_show;
    // If first instance of this key, initialize its arrays.
    if (empty($areport[$key])) {
        $areport[$key] = array();
        $areport[$key]['.prp'] = 0;
        // previous pid
        $areport[$key]['.wom'] = 0;
        // number of services for women
        $areport[$key]['.men'] = 0;
        // number of services for men
        $areport[$key]['.age2'] = array(0, 0);
        // age array
        $areport[$key]['.age9'] = array(0, 0, 0, 0, 0, 0, 0, 0, 0);
        // age array
        foreach ($arr_show as $askey => $dummy) {
            if (substr($askey, 0, 1) == '.') {
                continue;
            }
            $areport[$key][$askey] = array();
        }
    }
    // Skip this key if we are counting unique patients and the key
    // has already seen this patient.
    if ($form_content == '2' && $row['pid'] == $areport[$key]['.prp']) {
        return;
    }
    // If we are counting new acceptors, then require a unique patient
    // whose contraceptive start date is within the reporting period.
    if ($form_content == '3') {
        // if ($row['pid'] == $areport[$key]['prp']) return;
        if ($row['pid'] == $areport[$key]['.prp']) {
            return;
        }
        // Check contraceptive start date.
        if (!$row['contrastart'] || $row['contrastart'] < $from_date || $row['contrastart'] > $to_date) {
            return;
        }
    }
    // If we are counting new clients, then require a unique patient
    // whose registration date is within the reporting period.
    if ($form_content == '4') {
        if ($row['pid'] == $areport[$key]['.prp']) {
            return;
        }
        // Check registration date.
        if (!$row['regdate'] || $row['regdate'] < $from_date || $row['regdate'] > $to_date) {
            return;
        }
    }
    // Flag this patient as having been encountered for this report row.
    // $areport[$key]['prp'] = $row['pid'];
    $areport[$key]['.prp'] = $row['pid'];
    // Increment the correct sex category.
    if (strcasecmp($row['sex'], 'Male') == 0) {
        $areport[$key]['.men'] += $quantity;
    } else {
        $areport[$key]['.wom'] += $quantity;
    }
    // Increment the correct age categories.
    $age = getAge(fixDate($row['DOB']), $row['encdate']);
    $i = min(intval(($age - 5) / 5), 8);
    if ($age < 11) {
        $i = 0;
    }
    $areport[$key]['.age9'][$i] += $quantity;
    $i = $age < 25 ? 0 : 1;
    $areport[$key]['.age2'][$i] += $quantity;
    foreach ($arr_show as $askey => $dummy) {
        if (substr($askey, 0, 1) == '.') {
            continue;
        }
        $status = empty($row[$askey]) ? 'Unspecified' : $row[$askey];
        $areport[$key][$askey][$status] += $quantity;
        $arr_titles[$askey][$status] += $quantity;
    }
}
开发者ID:mindfeederllc,项目名称:openemr,代码行数:78,代码来源:ippf_statistics.php


示例13: bucks

// encounters within the specified time period for patients without
// insurance.
require_once "../globals.php";
require_once "{$srcdir}/patient.inc";
require_once "{$srcdir}/sql-ledger.inc";
require_once "{$srcdir}/formatting.inc.php";
$alertmsg = '';
function bucks($amount)
{
    if ($amount) {
        return oeFormatMoney($amount);
    }
    return "";
}
$form_start_date = fixDate($_POST['form_start_date'], date("Y-01-01"));
$form_end_date = fixDate($_POST['form_end_date'], date("Y-m-d"));
$INTEGRATED_AR = $GLOBALS['oer_config']['ws_accounting']['enabled'] === 2;
if (!$INTEGRATED_AR) {
    SLConnect();
}
?>
<html>
<head>
<?php 
html_header_show();
?>
<style type="text/css">

/* specifically include & exclude from printing */
@media print {
    #report_parameters {
开发者ID:minggLu,项目名称:openemr,代码行数:31,代码来源:indigent_patients_report.php


示例14: fixDate

<?php

// Copyright (C) 2006-2015 Rod Roark <[email protected]>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
// This report lists patients that were seen within a given date
// range.
require_once "../globals.php";
require_once "{$srcdir}/patient.inc";
require_once "{$srcdir}/formatting.inc.php";
$from_date = fixDate($_POST['form_from_date'], date('Y-01-01'));
$to_date = fixDate($_POST['form_to_date'], date('Y-12-31'));
if ($_POST['form_labels']) {
    header("Pragma: public");
    header("Expires: 0");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Content-Type: application/force-download");
    header("Content-Disposition: attachment; filename=labels.txt");
    header("Content-Description: File Transfer");
} else {
    ?>
<html>
<head>
<?php 
    html_header_show();
    ?>
<style type="text/css">
/* specifically include & exclude from printing */
开发者ID:katopenzz,项目名称:openemr,代码行数:31,代码来源:unique_seen_patients_report.php


示例15: handleLunchSpecial

require ADCHEATSHEET;
require CLASS_LUNCHSPECIAL;
$lunch = new handleLunchSpecial();
?>

<?php 
getHeader("admin");
?>

<h3>Lunch Specials</h3>

<table class="form">
	<tr>
		<td class="field-name">Date:</td>
		<td class="field-value"><?php 
echo fixDate($lunch->date);
?>
</td>
		<td></td>
	</tr>
	<tr>
		<td class="field-name">Views:</td>
		<td class="field-value"><?php 
echo number_format($lunch->views);
?>
</td>
		<td></td>
	</tr>
	<tr>
		<td class="field-name">Options:</td>
		<td class="field-value"><a href="lunch_special_manage.php?menuid=<?php 
开发者ID:jboydston,项目名称:shop.getlocal.net,代码行数:31,代码来源:lunch_special_view.php


示例16: updatePatientData

    }
    $newdata[$tblname][$colname] = $value;
}
updatePatientData($pid, $newdata['patient_data'], true);
updateEmployerData($pid, $newdata['employer_data'], true);
$i1dob = fixDate(formData("i1subscriber_DOB"));
$i1date = fixDate(formData("i1effective_date"));
// sqlStatement("unlock tables");
// end table lock
newHistoryData($pid);
newInsuranceData($pid, "primary", formData("i1provider"), formData("i1policy_number"), formData("i1group_number"), formData("i1plan_name"), formData("i1subscriber_lname"), formData("i1subscriber_mname"), formData("i1subscriber_fname"), formData("form_i1subscriber_relationship"), formData("i1subscriber_ss"), $i1dob, formData("i1subscriber_street"), formData("i1subscriber_postal_code"), formData("i1subscriber_city"), formData("form_i1subscriber_state"), formData("form_i1subscriber_country"), formData("i1subscriber_phone"), formData("i1subscriber_employer"), formData("i1subscriber_employer_street"), formData("i1subscriber_employer_city"), formData("i1subscriber_employer_postal_code"), formData("form_i1subscriber_employer_state"), formData("form_i1subscriber_employer_country"), formData('i1copay'), formData('form_i1subscriber_sex'), $i1date, formData('i1accept_assignment'));
$i2dob = fixDate(formData("i2subscriber_DOB"));
$i2date = fixDate(formData("i2effective_date"));
newInsuranceData($pid, "secondary", formData("i2provider"), formData("i2policy_number"), formData("i2group_number"), formData("i2plan_name"), formData("i2subscriber_lname"), formData("i2subscriber_mname"), formData("i2subscriber_fname"), formData("form_i2subscriber_relationship"), formData("i2subscriber_ss"), $i2dob, formData("i2subscriber_street"), formData("i2subscriber_postal_code"), formData("i2subscriber_city"), formData("form_i2subscriber_state"), formData("form_i2subscriber_country"), formData("i2subscriber_phone"), formData("i2subscriber_employer"), formData("i2subscriber_employer_street"), formData("i2subscriber_employer_city"), formData("i2subscriber_employer_postal_code"), formData("form_i2subscriber_employer_state"), formData("form_i2subscriber_employer_country"), formData('i2copay'), formData('form_i2subscriber_sex'), $i2date, formData('i2accept_assignment'));
$i3dob = fixDate(formData("i3subscriber_DOB"));
$i3date = fixDate(formData("i3effective_date"));
newInsuranceData($pid, "tertiary", formData("i3provider"), formData("i3policy_number"), formData("i3group_number"), formData("i3plan_name"), formData("i3subscriber_lname"), formData("i3subscriber_mname"), formData("i3subscriber_fname"), formData("form_i3subscriber_relationship"), formData("i3subscriber_ss"), $i3dob, formData("i3subscriber_street"), formData("i3subscriber_postal_code"), formData("i3subscriber_city"), formData("form_i3subscriber_state"), formData("form_i3subscriber_country"), formData("i3subscriber_phone"), formData("i3subscriber_employer"), formData("i3subscriber_employer_street"), formData("i3subscriber_employer_city"), formData("i3subscriber_employer_postal_code"), formData("form_i3subscriber_employer_state"), formData("form_i3subscriber_employer_country"), formData('i3copay'), formData('form_i3subscriber_sex'), $i3date, formData('i3accept_assignment'));
?>
<html>
<body>
<script language="Javascript">
<?php 
if ($alertmsg) {
    echo "alert('{$alertmsg}');\n";
}
echo "window.location='{$rootdir}/patient_file/summary/demographics.php?" . "set_pid={$pid}&is_new=1';\n";
?>
</script>

</body>
</html>
开发者ID:juggernautsei,项目名称:openemr,代码行数:31,代码来源:new_comprehensive_save.php


示例17: array

        echo "   Attach Biometric Fingerprint</a><br />\n";
    }
    echo "   <br />&nbsp;<br />\n";
}
// This stuff only applies to athletic team use of OpenEMR.  The client
// insisted on being able to quickly change fitness and return date here:
//
if (false && $GLOBALS['athletic_team']) {
    //                  blue      green     yellow    red       orange
    $fitcolors = array('#6677ff', '#00cc00', '#ffff00', '#ff3333', '#ff8800', '#ffeecc', '#ffccaa');
    if (!empty($GLOBALS['fitness_colors'])) {
        $fitcolors = $GLOBALS['fitness_colors'];
    }
    $fitcolor = $fitcolors[0];
    $form_fitness = $_POST['form_fitness'];
    $form_userdate1 = fixDate($_POST['form_userdate1'], '');
    $form_issue_id = $_POST['form_issue_id'];
    if ($form_submit) {
        $returndate = $form_userdate1 ? "'{$form_userdate1}'" : "NULL";
        sqlStatement("UPDATE patient_data SET fitness = ?, " . "userdate1 = ? WHERE pid = ?", array($form_fitness, $returndate, $pid));
        // Update return date in the designated issue, if requested.
        if ($form_issue_id) {
            sqlStatement("UPDATE lists SET returndate = ? WHERE " . "id = ?", array($returndate, $form_issue_id));
        }
    } else {
        $form_fitness = $result['fitness'];
        if (!$form_fitness) {
            $form_fitness = 1;
        }
        $form_userdate1 = $result['userdate1'];
    }
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:demographics.php


示例18: array

// Consider this a step towards converting issue forms to layout-based.
// Faking it here makes things easier.
//
$issue_layout = array(array('field_id' => 'type', 'title' => 'Type', 'uor' => '2', 'data_type' => '17', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'title', 'title' => 'Title', 'uor' => '2', 'data_type' => '2', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'diagnosis', 'title' => 'Diagnosis', 'uor' => '1', 'data_type' => '2', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'begdate', 'title' => 'Start Date', 'uor' => '2', 'data_type' => '4', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'enddate', 'title' => 'End Date', 'uor' => '1', 'data_type' => '4', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'occurrence', 'title' => 'Occurrence', 'uor' => '1', 'data_type' => '1', 'list_id' => 'occurrence', 'edit_options' => ''), array('field_id' => 'reaction', 'title' => 'Reaction', 'uor' => '1', 'data_type' => '2', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'outcome', 'title' => 'Outcome', 'uor' => '1', 'data_type' => '1', 'list_id' => 'outcome', 'edit_options' => ''), array('field_id' => 'destination', 'title' => 'Destination', 'uor' => '1', 'data_type' => '2', 'list_id' => '', 'edit_options' => ''), array('field_id' => 'comments', 'title' => 'Comments', 'uor' => '1', 'data_type' => '3', 'list_id' => '', 'fld_length' => '50', 'fld_rows' => '3', 'edit_options' => ''));
$postid = intval($_REQUEST['postid']);
$issueid = empty($_REQUEST['issueid']) ? 0 : intval($_REQUEST['issueid']);
$form_type = empty($_REQUEST['form_type']) ? '' : $_REQUEST['form_type'];
if ($_POST['bn_save']) {
    $ptid = intval($_POST['ptid']);
    $sets = "date = NOW()";
    foreach ($issue_layout as $frow) {
        $key = $frow['field_id'];
        $value = get_layout_form_value($frow);
        if ($frow['data_type'] == 4) {
            // Dates require some special handling.
            $value = fixDate($value, '');
            if (empty($value)) {
                $value = "NULL";
            } else {
                $value = "'{$value}'";
            }
        } else {
            $value = "'" . add_escape_custom($value) . "'";
        }
        $sets .= ", `{$key}` = {$value}";
    }
    if (empty($issueid)) {
        $sql = "INSERT INTO lists SET " . "pid = '" . add_escape_custom($ptid) . "', activity = 1, " . "user = '" . add_escape_custom($_SESSION['authUser']) . "', " . "groupname = '" . add_escape_custom($_SESSION['authProvider']) . "', {$sets}";
        $issueid = sqlInsert($sql);
    } else {
        $sql = "UPDATE lists SET {$sets} WHERE id = '" . add_escape_custom($issueid) . "'";
开发者ID:katopenzz,项目名称:openemr,代码行数:31,代码来源:issue_form.php


示例19: DateFormatRead

 */
//SANITIZE ALL ESCAPES
$sanitize_all_escapes = true;
//STOP FAKE REGISTER GLOBALS
$fake_register_globals = false;
require_once '../globals.php';
require_once "{$srcdir}/formatting.inc.php";
require_once "{$srcdir}/patient.inc";
require_once "{$srcdir}/payment_jav.inc.php";
$DateFormat = DateFormatRead();
$curdate = date_create(date("Y-m-d"));
date_sub($curdate, date_interval_create_from_date_string("7 days"));
$sub_date = date_format($curdate, 'Y-m-d');
// Set the default dates for Lab document search
$form_from_doc_date = $_GET['form_from_doc_date'] ? $_GET['form_from_doc_date'] : oeFormatShortDate(fixDate($_GET['form_from_doc_date'], $sub_date));
$form_to_doc_date = $_GET['form_to_doc_date'] ? $_GET['form_to_doc_date'] : oeFormatShortDate(fixDate($_GET['form_to_doc_date'], date("Y-m-d")));
if ($GLOBALS['date_display_format'] == 1) {
 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP fixLanguageConsistency函数代码示例发布时间:2022-05-15
下一篇:
PHP fixCKeditorText函数代码示例发布时间: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