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

PHP sortAppointments函数代码示例

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

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



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

示例1: getAvailableSlots

function getAvailableSlots($from_date, $to_date, $provider_id = null, $facility_id = null)
{
    $appointments = fetchAllEvents($from_date, $to_date, $provider_id, $facility_id);
    $appointments = sortAppointments($appointments, "date");
    $from_datetime = strtotime($from_date . " 00:00:00");
    $to_datetime = strtotime($to_date . " 23:59:59");
    $availableSlots = array();
    $start_time = 0;
    $date = 0;
    for ($i = 0; $i < count($appointments); ++$i) {
        if ($appointments[$i]['pc_catid'] == 2) {
            // 2 == In Office
            $start_time = $appointments[$i]['pc_startTime'];
            $date = $appointments[$i]['pc_eventDate'];
            $provider_id = $appointments[$i]['uprovider_id'];
        } else {
            if ($appointments[$i]['pc_catid'] == 3) {
                // 3 == Out Of Office
                continue;
            } else {
                $start_time = $appointments[$i]['pc_endTime'];
                $date = $appointments[$i]['pc_eventDate'];
                $provider_id = $appointments[$i]['uprovider_id'];
            }
        }
        // find next appointment with the same provider
        $next_appointment_date = 0;
        $next_appointment_time = 0;
        for ($j = $i + 1; $j < count($appointments); ++$j) {
            if ($appointments[$j]['uprovider_id'] == $provider_id) {
                $next_appointment_date = $appointments[$j]['pc_eventDate'];
                $next_appointment_time = $appointments[$j]['pc_startTime'];
                break;
            }
        }
        $same_day = strtotime($next_appointment_date) == strtotime($date) ? true : false;
        if ($next_appointment_time && $same_day) {
            // check the start time of the next appointment
            $start_datetime = strtotime($date . " " . $start_time);
            $next_appointment_datetime = strtotime($next_appointment_date . " " . $next_appointment_time);
            $curr_time = $start_datetime;
            while ($curr_time < $next_appointment_datetime - getSlotSize() / 2) {
                //create a new appointment ever 15 minutes
                $time = date("H:i:s", $curr_time);
                $available_slot = createAvailableSlot($appointments[$i]['pc_eventDate'], $time, $appointments[$i]['ufname'], $appointments[$i]['ulname'], $appointments[$i]['umname']);
                $availableSlots[] = $available_slot;
                $curr_time += getSlotSize();
                // add a 15-minute slot
            }
        }
    }
    return $availableSlots;
}
开发者ID:jatin-52,项目名称:erm,代码行数:53,代码来源:appointments.inc.php


示例2: htmlspecialchars

    echo "   </select>\n";
    echo "   <br /><span class='bold'>Return to Play:</span><br>\n";
    echo "   <input type='text' size='10' name='form_userdate1' id='form_userdate1' " . "value='{$form_userdate1}' " . "title='" . htmlspecialchars(xl('yyyy-mm-dd Date of return to play'), ENT_QUOTES) . "' " . "onkeyup='datekeyup(this,mypcc)' onblur='dateblur(this,mypcc)' />\n" . "   <img src='../../pic/show_calendar.gif' align='absbottom' width='24' height='22' " . "id='img_userdate1' border='0' alt='[?]' style='cursor:pointer' " . "title='" . htmlspecialchars(xl('Click here to choose a date'), ENT_QUOTES) . "'>\n";
    echo "   <input type='hidden' name='form_original_userdate1' value='" . htmlspecialchars($form_userdate1, ENT_QUOTES) . "' />\n";
    echo "   <input type='hidden' name='form_issue_id' value='' />\n";
    echo "<p><input type='submit' name='form_submit' value='Change' /></p>\n";
    echo "   </form>\n";
}
// Show current and upcoming appointments.
if (isset($pid) && !$GLOBALS['disable_calendar']) {
    //
    $current_date2 = date('Y-m-d');
    $events = array();
    $events = fetchAppointments($current_date2, null, $pid, null, null, null, null, null, null, false, true);
    //////
    $events = sortAppointments($events);
    //////
    if (acl_check('patients', 'med') && ($GLOBALS['enable_cdr'] && $GLOBALS['enable_cdr_crw'])) {
        // clinical summary expand collapse widget
        $widgetTitle = xl("Clinical Reminders");
        $widgetLabel = "clinical_reminders";
        $widgetButtonLabel = xl("Edit");
        $widgetButtonLink = "../reminder/clinical_reminders.php?patient_id=" . $pid;
        $widgetButtonClass = "";
        $linkMethod = "html";
        $bodyClass = "summary_item small";
        $widgetAuth = true;
        $fixedWidth = false;
        expand_collapse_widget($widgetTitle, $widgetLabel, $widgetButtonLabel, $widgetButtonLink, $widgetButtonClass, $linkMethod, $bodyClass, $widgetAuth, $fixedWidth);
        echo "<br/>";
        echo "<div style='margin-left:10px' class='text'><image src='../../pic/ajax-loader.gif'/></div><br/>";
开发者ID:minggLu,项目名称:openemr,代码行数:31,代码来源:demographics.php


示例3: xl

    xl('Comment', 'e');
    ?>
</a>
		</th>

	</thead>
	<tbody>
		<!-- added for better print-ability -->
	<?php 
    $lastdocname = "";
    $appointments = fetchAppointments($from_date, $to_date, $patient, $provider, $facility);
    if ($show_available_times) {
        $availableSlots = getAvailableSlots($from_date, $to_date, $provider, $facility);
        $appointments = array_merge($appointments, $availableSlots);
    }
    $appointments = sortAppointments($appointments, $form_orderby);
    $pid_list = array();
    // Initialize list of PIDs for Superbill option
    foreach ($appointments as $appointment) {
        array_push($pid_list, $appointment['pid']);
        $patient_id = $appointment['pid'];
        $docname = $appointment['ulname'] . ', ' . $appointment['ufname'] . ' ' . $appointment['umname'];
        $errmsg = "";
        ?>

	<tr bgcolor='<?php 
        echo $bgcolor;
        ?>
'>
		<td class="detail">&nbsp;<?php 
        echo $docname == $lastdocname ? "" : $docname;
开发者ID:rreddy70,项目名称:openemr,代码行数:31,代码来源:appointments_report.php


示例4: array

  </td>
 <?php 
}
?>
 </tr>

<?php 
#define variables, future enhancement allow changing the to_date and from_date
#to allow picking a date to review
$appointments = array();
$from_date = date("Y-m-d");
$to_date = date("Y-m-d");
$datetime = date("Y-m-d H:i:s");
# go get the information and process it
$appointments = fetch_Patient_Tracker_Events($from_date, $to_date);
$appointments = sortAppointments($appointments, 'time');
foreach ($appointments as $appointment) {
    # Collect appt date and set up squashed date for use below
    $date_appt = $appointment['pc_eventDate'];
    $date_squash = str_replace("-", "", $date_appt);
    # Collect variables and do some processing
    $docname = $appointment['ulname'] . ', ' . $appointment['ufname'] . ' ' . $appointment['umname'];
    if (strlen($docname) <= 3) {
        continue;
    }
    $ptname = $appointment['lname'] . ', ' . $appointment['fname'] . ' ' . $appointment['mname'];
    $appt_enc = $appointment['encounter'];
    $appt_eid = !empty($appointment['eid']) ? $appointment['eid'] : $appointment['pc_eid'];
    $appt_pid = !empty($appointment['pid']) ? $appointment['pid'] : $appointment['pc_pid'];
    if ($appt_pid == 0) {
        continue;
开发者ID:minggLu,项目名称:openemr,代码行数:31,代码来源:patient_tracker.php



注:本文中的sortAppointments函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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