public function displayDoctorDetail4Guest($request, $response)
 {
     /*{{{*/
     $response->spaceBusinessRequirement = DAL::get()->find('spaceBusinessRequirement', $request->id);
     $response->callPanelLink = 'http://' . URL_PREFIX . 'hdfadmin.haodf.com/doctor/callpanel?username=' . $response->spaceBusinessRequirement->space->user->name;
     $isMobileCallable = XString::isMobile($response->spaceBusinessRequirement->space->user->mobile);
     $isFixedLineCallable = XString::findPhoneNO($response->spaceBusinessRequirement->space->user->phone) != false;
     $response->isCallPanelLinkShown = $isMobileCallable || $isFixedLineCallable;
 }
Exemplo n.º 2
0
 public function showOrderDetail($request, $response)
 {
     /*{{{*/
     $response->showContent = true;
     $orderId = $request->orderId;
     DBC::requireNotEmptyString($orderId, '无效的订单ID');
     $response->doctortype = $request->doctortype;
     $order = DAL::get()->mustFind('BookingOrder', $orderId, true);
     $space = $order->space;
     $taskList = DAL::get()->find_all_by_objectid_and_objecttype('BookingTask', $orderId, 'bookingorder');
     //约满
     $seatLimits = BookingClient::getInstance()->getseatLimitCount($order->space, date('Y-m-d', strtotime("+ 0 day")), date('Y-m-d', strtotime("+ 17 day")));
     //停诊
     $stopDiagnose = DAL::get()->find_all_by_spaceid('StopDiagnose', $order->space->id);
     $doctorOrderTotal = BookingClient::getInstance()->countDoctorOrder('BookingOrder', $order->space->id);
     $proposalIds = DAL::get()->querySpacePatientProposals('proposal', $order->space, array(), $order->patient->id);
     $proposals = DAL::get()->find('proposal', $proposalIds);
     $doctorPatientRef = new NullEntity();
     if (empty($proposalIds)) {
         $doctorPatientRef = DAL::get()->find_by_spaceid_and_patientid('doctorpatientref', $order->space->id, $order->patient->id);
     }
     $response->doctorPatientRef = $doctorPatientRef;
     $response->order = $order;
     $response->taskList = $taskList;
     $response->patientOrderTotal = BookingClient::getInstance()->countPatientOrder('BookingOrder', $order->user->id);
     $response->doctorOrderTotal = $doctorOrderTotal;
     $response->seatLimits = $seatLimits;
     $response->stopDiagnose = $stopDiagnose;
     //$bingLis4Schedule = BingLiDtoClient::getInstance()->getBingLiByRelatedObj($order->notification->proposal)->schedule;
     //$response->bingLiSchedule = $bingLis4Schedule[0]->schedule;
     //$response->bingLiAddress = BingLiDtoClient::getInstance()->getBingLiByRelatedObj($order->notification->proposal)->address;
     $response->space = $space;
     $response->doctorMobileEncoded = XString::encodeMobileNo($space->user->mobile);
     $response->doctorMobileFaked = XString::generateFakePhoneno($space->user->mobile);
     $response->cardOrderTotal = BookingClient::getInstance()->countCardOrder($order->patient->idcard);
     $response->mobileOrderTotal = BookingClient::getInstance()->countMobileOrder($order->patient->mobile);
     $response->patientDefaulted = BookingClient::getInstance()->countPatientDefaulted('BookingBlackList', $order->user->id, $order->patient->idcard, $order->user->mobile, $order->patient->mobile);
     $response->proposals = $proposals;
     $response->scheduleList = $this->getSchedule($order->space);
     $isMobileCallable = XString::isMobile($space->user->mobile);
     $isFixedLineCallable = XString::findPhoneNO($space->user->phone) != false;
     $response->isCallPanelLinkShown = $isMobileCallable || $isFixedLineCallable;
     $response->spaceBusinessRequirement = $space->getSpaceBusinessRequirement4Booking();
 }