当前位置: 首页>>代码示例>>PHP>>正文


PHP sortAppointments函数代码示例

本文整理汇总了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;未经允许,请勿转载。