public function showDetail($request, $response)
 {/*{{{*/
     $proposalId = $request->proposalid;
     $proposal = DAL::get()->find('proposal', $proposalId);
     DBC::requireEquals($proposal->patient->user->id, $this->user->id, '您无权查看别人的订单!');
     $bingLiSet = BingLiDtoHelper::create($proposal)->getAll();
     $response->bingliSet = $bingLiSet;
     $response->proposal = $proposal;
     $response->patient = $proposal->patient;
     if($proposal->isFromBooking())
     {
         $bookingDto = BookingDto::createByProposalId($proposal->id);
         $response->bookingDto = $bookingDto;
         $now = XDateTime::now("Y-m-d H:i:s");
         $before1Schedule = $bookingDto->schedule->addDay(-1)->setHour("16")->setMinute("00");
         $before2Schedule = $bookingDto->schedule->addDay(-2)->setHour("20")->setMinute("00");
         $actionStyle = ($now <= $before1Schedule && $now > $before2Schedule) ? "red":'';
         $response->scheduleMessage = "<div class=".$actionStyle."> 加号提示: 请您在".date('Y-m-d H:i', strtotime($before2Schedule))."至".date('Y-m-d H:i', strtotime($before1Schedule))."到此页面领取加号凭证短信</div> ";
     }
     if($proposal->isFromTel())
     {
         $telDto = TelDto::create($proposal->id);
         $response->telDto = $telDto;
         $response->score = $telDto->getScore();
         $response->content = $telDto->getTelVisitContent();
         $flow = DAL::get()->find_by_patientid_and_spaceid('DoctorPatientRef', $proposal->patient->id, $proposal->space->id);
         $response->flow = $flow;
         $response->statusDesc = $telDto->statusDesc;
     }
 }/*}}}*/
 private function returnConditionDesc($response, $orderId)
 {/*{{{*/
     $order = DAL::get()->find('telorder', $orderId);
     $response->conditiondesc = '';
     if (false == $order->getBingLiSource()->isNull())
     {
         $response->conditiondesc = BingLiDtoHelper::create($order->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc;
     }
 }/*}}}*/
 public function showDetail($request, $response)
 {/*{{{*/
     $response->showUpdateFrame = $request->showUpdateFrame;
     $intentionId = $request->intentionid;
     $intention = DAL::get()->find('intention', $intentionId);
     DBC::requireEquals($this->user->id, $intention->user->id, '你不能查看别人的数据');
     $bingLiSet = BingLiDtoHelper::create($intention)->getAll();
     $response->bingliSet = $bingLiSet;
     $response->intention = $intention;
     $response->patient = $intention->patient;
     $response->isShowReplenishNotice = $request->getRequest('fromReplenish', 0);  
 }/*}}}*/
                }
            }
        }
        if ($status == 'finished' && $order->schedule->toShortString() == $lastFinishSchedule) {
            ?>
                        <span class="jia_status_bg1">上次就诊</span>
<?php 
        }
        ?>
                </p>
                <p><span class="fb">患者信息:</span><span class="gray2">姓名:<?php 
        echo $order->patient->name;
        ?>
</span></p>
                <p><span class="fb">疾病名称:</span><span class="gray2"><?php 
        echo BingLiDtoHelper::create($order->getBingLiSource())->disease->combine(' ')->diseaseName;
        ?>
</span></p>
                <p><span class="fb">预约时间:</span><span class="orange1"><?php 
        echo $order->schedule;
        ?>
</span></p>
                <p><span class="fb">就诊地点:</span><span class="gray2"><?php 
        echo $order->address;
        ?>
</span></p>
                <p class="pb5 pt10 clearfix">
<?php 
        if ($status == 'finished') {
            ?>
                    <a href="/adminbooking/doctorconfirmfinish?id=<?php 
Пример #5
0
                $patientName = $flow->patient->getPrivatePatientName();
              }
              ?>                      
                    <span><?=$patientName ?></span>
             </p>
              <p class="pt5"><span class="stream-box-content-w1">
                    <span class="fb"> 预约时间:</span>&nbsp;<?=$flowable->confirmStartTime->toString() ?></span>
                    <span>
                        <span class="fb">提交时间:</span>&nbsp;<?=$flowable->ctime->toString() ?>
                    </span>
              </p>
              <p class="pt5">
                    <span class="stream-box-content-w1">
                            <span class="fb"> 服&nbsp;务&nbsp;费:</span>&nbsp;<?=$flowable->getProductName() ?> 
                    </span>
                    <span>
                            <span class="fb">订单状态:</span>&nbsp;<?=$flowable->getFlowShowStatus() ?>
                    </span>
              </p>
              <div class="clearfix pt5">
                <p class="fl fb" style="width: 75px;">病情信息:</p>
                <div class="fr" style="width: 420px;padding-left:2px">
                  <p class="stream-box-content-w3"><?=$flowable->getBingLiSource()->isNull() ? $flowable->diseaseDesc : BingLiDtoHelper::create($flowable->getBingLiSource())->conditiondesc->combine(" ")->conditionDesc ?></p>
                </div>
              </div>
           </div>
         </div>
         <p class="tr gray2 pt10"> 提交于<?=$flowable->ctime->toString() ?></p>
       </div>
     </div>
Пример #6
0
    /**
        * @brief 根据用户id加号订单列表
        * @author whd
        * @exampleUrl http://dev.mobile-api.haodf.com/patientapi/booking_getBookingOrderList?userId=581662815&pageId=1&pageSize=10&xdoc=1
        *
        * @Param $userId 用户id
        * @Param $pageId 当前页码
        * @Param $pageSize 每页显示数
        *
        * @Returns array('id', 'sn', 'statusDesc', 'spaceId', 'doctorName', 'hospitalName', 'hospitalFacultyName', 'schedule', 'alertMsg', 'confirmTime', 'isCallBack');
     */
    public function getBookingOrderList($userId, $pageId, $pageSize)
    {/*{{{*/
    	$user = DAL::get()->find('user', $userId);
        if ($user->isNull())
        {
            $this->setErrorCode(107);
            return 0;
        }
    	$this->_initPageInfo($pageId, $pageSize);
    	$postInfos = array();
		$pageInfo['pages'] = 1; 
		$pageInfo['total'] = 0;

        $statusType = BookingDto::QUERY_STATUS_ALL;
        $tmpAllBookingList = BookingDto::getList4UserMobile($user, $statusType);
        $allBookingList = array();
        foreach ($tmpAllBookingList as $tmpBooking)
        {
            if ($tmpBooking->space instanceof Space)
            {
                $allBookingList[] = $tmpBooking;
            }
        }
        $pageInfo['nowpage'] = $pageId; 
        $pageInfo['pagesize'] = $pageSize;
		$pageInfo['pages'] = (int)ceil(count($allBookingList)/$pageSize); 
		$pageInfo['total'] = count($allBookingList);
		$bookingList = array_slice($allBookingList, ($pageInfo['nowpage']-1)*$pageSize, $pageSize);

        $infos = array();
        foreach($bookingList as $booking) 
        { 
            $info['id'] = $booking->id; 
            $info['sn'] = $booking->id; 
            if ($booking instanceof Intention)
            {
                $info['schedule'] = strtotime(BingLiDtoHelper::create($booking)->getLastSchedule());
            }
            else
            {
                $info['schedule'] = strtotime($booking->getSchedule());
                $booking = DAL::get()->find('proposal', $booking->id);
            }
            $info['schedule'] = ($info['schedule']) ? date('Y-m-d H:i', $info['schedule']) : '';
            $info['alertMsg'] = '';
            if ($booking->space instanceof Space)
            {
                $info['spaceId'] = $booking->space->id;
                $info['doctorName'] = $booking->space->host->name;
                $info['hospitalName'] = $booking->space->host->hospitalfaculty->hospital->commonName;
                $info['hospitalFacultyName'] = $booking->space->host->hospitalfaculty->name;
            }
            else
            {
                continue;
            }
            $status = $this->getBookingOrderStatus4User($booking);
            $info['statusDesc'] = self::$BookingStatusMap[$status];
            if ($booking instanceof Proposal && $booking->isPending())
            {
                $info['statusDesc'] = "联系管理员";
            }
            $info['confirmTime'] = $info['confirmFromTime'] = $info['confirmEndTime'] = ''; 
            if ($status == self::BOOKING_SUCCESS || $status == self::BOOKING_APPLY_SUCCESS)
            {
                $before1Schedule = XDateTime::valueOf($info['schedule'])->addDay(-1)->setHour("16")->setMinute("00");
                $before2Schedule = XDateTime::valueOf($info['schedule'])->addDay(-2)->setHour("20")->setMinute("00");
                $info['confirmTime'] = date('Y-m-d H:i', strtotime($before2Schedule)).'至'.date('Y-m-d H:i', strtotime($before1Schedule)).'前领取';
                $info['confirmFromTime'] = date('Y-m-d H:i', strtotime($before2Schedule));
                $info['confirmEndTime'] = date('Y-m-d H:i', strtotime($before1Schedule));
            }
            $info['isCallBack'] = ($status == self::BOOKING_WAIT_CALLBACK) ? 1 : 0;
            $infos[] = $info;
        } 
		$this->pageInfo = $pageInfo;
    	$this->content = $infos;
    }/*}}}*/
Пример #7
0
 public function getTelOrderInfo($postId)
 {/*{{{*/
     $info = array();
     $tel = DAL::get()->find('proposal', $postId);
     if ($tel->isNull())
     {
         $tel = DAL::get()->find('telorder', $postId);
     }
     if ($tel->isNull())
     {
         $this->setErrorCode(313);
         return 0;
     }
     if ($tel instanceof Proposal)
     {
         $paymentDatabucket = new PaymentDataBucket();
         $status = $paymentDatabucket->getStatus($tel);
         $nIds = DAL::get()->find_id_by_proposalid('Notification', $tel->id);
         $executions = TelOrderClient::getInstance()->getExecutionsByNotificationIds($nIds);
         $execution = new NullEntity();
         if(false == empty($executions))
         {
             $execution = array_pop($executions);
         }
         $info['content'] = array(
             array('item'=>'提交时间', 'itemValue'=> $tel->ctime), 
             array('item'=>'预约时间','itemValue'=> $execution->isNull() ? "未确定" : $execution->confirmStartTime->toString()), 
             array('item'=>'服务费','itemValue'=> strip_tags(round($tel->product->salePrice).'元/次(最长'.$tel->product->duration.'分钟)')),
             array('item'=>'订单状态','itemValue'=> $status), 
             array('item'=>'病情信息','itemValue'=> BingLiDtoHelper::create($tel)->getLastConditionDesc()), 
         ); 
     }
     else
     {
         $telBingLiSource = $tel->getBingLiSource();
         $telProductName = strip_tags($tel->getProductName());
         $info['content'] = array(
             array('item'=>'提交时间', 'itemValue'=> $tel->ctime), 
             array('item'=>'预约时间','itemValue'=> $tel->confirmStartTime->toString()), 
             array('item'=>'服务费','itemValue'=> substr_replace($telProductName, "", strpos($telProductName, "."), 3)),
             array('item'=>'订单状态','itemValue'=> $tel->getFlowShowStatus()), 
             array('item'=>'病情信息','itemValue'=> BingLiDtoHelper::create($telBingLiSource)->getLastConditionDesc()), 
         ); 
     }
     $info['title'] = '电话咨询';
     $this->content = $info;
 }/*}}}*/
echo $flow->relatedObject->id;
?>
" class="dn">
                            <?php 
echo BingLiDtoHelper::create($flow->relatedObject->getBingLiSource())->disease->combine(' ')->diseaseName;
?>
                            <a href="#" onclick="return showDiseaseInfo(this);" class="red2" >收起<font class="f8">>></font></a>
                        </span>
                        <span id="truncateDisease_<?php 
echo $flow->relatedObject->id;
?>
"><?php 
echo mb_substr(BingLiDtoHelper::create($flow->relatedObject->getBingLiSource())->disease->combine(' ')->diseaseName, 0, 100);
?>
                            <?php 
if (mb_strlen(BingLiDtoHelper::create($flow->relatedObject->getBingLiSource())->disease->combine(' ')->diseaseName, 'gbk') > 100) {
    ?>
                                ...<a href="#" onclick="return showDiseaseInfo(this);" class="red2" >详情<font class="f8">>></font></a>
                            <?php 
}
?>
                        </span>
                    </p>
                    <p><span class="fb">就诊程序:</span></p>
                    <p>1、这是跟医生个人的预约。只有医生或他指定的助手知道这个预约。</p>
                    <p>2、先要在医院里指定地点找到医生本人,出示加号短信凭证,请医生开加号条。</p>
                    <p>3、持医生开具的加号条,挂号室挂号后排队看病。</p>
                    <p><span class="fb">特别注意:</span></p>
                    <p>1、<span class="red">不得爽约!</span></p>
                    <p>2、医生有可能临时停诊。</p>
                    <p>3、仅保证您当天就诊可以看上医生,并无任何优先,请按挂号顺序看病。</p>
    /**
     * getBookingOrder 医生查看订单详情
     * @exampleUrl http://dev.mobile-api.haodf.com/doctorapi/bookingorder_getbookingorder?userId=105133781&bookingOrderId=1518927615&xdebug=1 
     * @param mixed $userId 
     * @param mixed $bookingOrderId 
     * @access public
     * @return void
     */
    public function getBookingOrder($userId, $bookingOrderId)
    {/*{{{*/
        $goals = array(1=>"检查/诊断", 2=>"治疗/手术", 3=>"检查/诊断 治疗/手术", 4=>"复诊", 5=>"检查/诊断 复诊", 
            6=>"治疗/手术 复诊", 7=>"检查/诊断 治疗/手术 复诊");

        $space = DAL::get()->find('space', $userId);
        if($space->isNull())
        {
            $this->setErrorCode(328);
            return 0;
        }
        $bookingOrder = DAL::get()->find('bookingorder', $bookingOrderId, true);
        if ($bookingOrder->isNull())
        {
            $this->setErrorCode(158);
            return 0;
        }
        if($bookingOrder->space->id != $userId)
        {
            $this->setErrorCode(159);
            return 0;
        }
        $flow = DAL::get()->find_by_patientid_and_spaceid('DoctorPatientRef', $bookingOrder->patient->id, $bookingOrder->space->id);
        $attachmentIds = BingLiDtoHelper::create($bookingOrder->getBingLiSource())->patientAttachment->makeArray()->patientAttachmentId;
        $result = array();
        $result['id'] = $bookingOrder->id;
        $result['schedule'] = date('Y-m-d H:i',strtotime($bookingOrder->schedule->toString()));
        $patient = $bookingOrder->patient;
        $result += $this->getBookingOrderPatientMessage($patient);
        $result += $this->getBingliDetail($bookingOrder->getBingLiSource()->id, get_class($bookingOrder->getBingLiSource()));
        $result['time'] = $bookingOrder->schedule; 
        $result['address'] = $bookingOrder->getAddressFromBusinessRequireIfNone(); 
        $helper = BingLiDtoHelper::create($bookingOrder->getBingLiSource());
        $result['disease'] = $helper->getDiseasesStr();
        $result['treatmentStatus'] = $helper->getLastUserCategory();//是否得到过该医生的诊治1是,0否
        $result['purpose'] = isset($goals[$helper->getLastGoal()]) ? $goals[$helper->getLastGoal()] : '';//本次预约的目的 1诊察/诊断  2治疗/手术  3复诊
        $result['lastTreatmentTitle'] = $helper->getLastUserCategoryDescription();//上次在大夫处就诊时间,最后一次就诊医院 两种情况
        $lastTreatmentInfo = str_replace("&#8226;", "", $helper->getLastHospitalOrLastTreatedTime());
        $result['lastTreatmentInfo'] = $lastTreatmentInfo;
        $result['recentTreatment'] = XString::getContentWithOutHtml($helper->getLastConditionDesc()); //病情描述
        $result['status'] = $this->getBookingOrderStatus($bookingOrder);
        $result['buttonstatus'] = $this->getBookingOrderStatus4Doctor($bookingOrder);
        $result['flowtitle'] = '';
        $result['flowId'] = '';
        if(false == empty($attachmentIds))
        {
            foreach($attachmentIds as $attachmentId)
            {
                $result['attachments'][] = MainDataBucket::getAttachmentInfoByAttachId($attachmentId);
            }
        }
        if(false == isset($result['attachments']))
        {
            $result['attachments'] = array();
        }
        if(false == $flow->isNull())
        {
            $result['flowtitle'] = $flow->title;
            $result['flowId'] = $flow->id;
            $result['userId'] = $flow->space->user->id;
            $result['patientId'] = $flow->patient->id;
        }

        $this->content = $result;
    }/*}}}*/
Пример #10
0
 private function getServiceTitle($entity)
 {/*{{{*/
     $title = '';
     if ($entity instanceof Proposal)
     {
         $bingLiSet = BingLiDtoHelper::create($entity)->getAll();
         if (false == empty($bingLiSet->title))
         {
             $titleArr = array();
             foreach ($bingLiSet->title as $dto)
             {
                 $titleArr[] = strip_tags(htmlspecialchars_decode($dto->title, ENT_QUOTES));
             }
             $title = implode(" ", $titleArr);
         }
     }
     else if ($entity instanceof DoctorPatientRef)
     {
         $title = strip_tags($entity->title);
     }
     return $title;
 }/*}}}*/
<?php
     foreach ($bookingOrderList as $bookingOrder)
     {
         $helper = BingLiDtoHelper::create($bookingOrder->notification->proposal);
         $goal = $helper->getLastGoal();
         $diseaseDesc = XString::truncate($bookingOrder->getDisease4Flow(), 56);
         $flow = DAL::get()->find_by_spaceid_and_patientid('DoctorPatientRef', $space->id, $bookingOrder->patient->id);

         if ($flow instanceof DoctorPatientRef && false == $flow->isClosed() && (false == $flow->isPrivated() || $user->id == $flow->user->id))
         {
?>
            <a href="<?=$flow->getTouchUrl($touchDomain)?>" class="doc_list2_box">
<?php 
         } 
         else if ($flow instanceof DoctorPatientRef && $flow->isPrivated())
         { 
?>
            <a href="javascript:alert('医患关系已设置为隐私,暂不可查看')" class="doc_list2_box">
<?php 
         } 
         else
         {
?>
            <a href="javascript:alert('医患关系已关闭,暂不可查看')" class="doc_list2_box">
<?php
         }
?>
            <div class="doc_list2">
                <ul>
                    <li><div class="left"><span style="letter-spacing:5px">订单号</span>:</div><div class="right"><?=$bookingOrder->id?></div></li>
                    <li><div class="left">患  者:</div><div class="right"><?=$bookingOrder->patient->privateName?></div></li>
Пример #12
0
 private function getRelationSearchForBrowser(DoctorPatientRef $ref, $firstPost, $request, $response)
 {
     /*{{{*/
     if ('' != trim($ref->diseaseName)) {
         $this->getRightRelatedInfo($this->space, $ref->diseaseName, $response);
         $firstProposal = ProposalClient::getInstance()->getFirstProposalOfFlow($ref->space->id, $ref->patient->id);
         if ($firstProposal instanceof Proposal) {
             $this->getRelationSearchForBrowserWithLoginOrNot($response, $firstProposal->getKey());
             $response->firstProposal = $firstProposal;
         } else {
             if ($firstPost instanceof BookingLog) {
                 $diseaseName = BingLiDtoHelper::create($firstPost->relatedObject->getBingLiSource())->disease->combine(" ")->diseaseName;
                 if ($diseaseName != '') {
                     $this->getRelationSearchForBrowserWithLoginOrNot($response, $diseaseName);
                 }
                 $response->firstProposal = new NullEntity();
             } else {
                 if ($firstPost instanceof TelOrder) {
                     $diseaseName = BingLiDtoHelper::create($firstPost->getBingLiSource())->getDiseasesStr();
                     if ($diseaseName != '') {
                         $this->getRelationSearchForBrowserWithLoginOrNot($response, $diseaseName);
                     } elseif ($firstPost->diseaseDesc != "") {
                         $this->getRelationSearchForBrowserWithLoginOrNot($response, $firstPost->diseaseDesc);
                     }
                     $response->firstProposal = new NullEntity();
                 } else {
                     if (false == $response->patientDisease->isNull()) {
                         $this->getRelationSearchForBrowserWithLoginOrNot($response, $response->patientDisease->name);
                     }
                     $response->firstProposal = new NullEntity();
                 }
             }
         }
     }
 }
Пример #13
0
 private function getDiseaseName($ref)
 {/*{{{*/
     $hostTypeClient = DoctorPatientRef::$appList[DoctorPatientRef::$hostArr[$ref->hosttype]];
     $ins = call_user_func(array($hostTypeClient, 'getInstance'));
     $objArrs = $ins->getList4Flow($ref->space->id, $ref->patient->id);
     ksort($objArrs);
     $objArr = array_shift($objArrs);
     $diseaseName = "";
     if (false == empty($objArr) && isset($objArr['entityType']) && isset($objArr['id']))
     {
         $obj = DAL::get()->find($objArr['entityType'], $objArr['id']);
         if (false == $obj->isNull())
         {
             if ($obj instanceof TelOrder)
             {
                 $diseaseName = BingLiDtoHelper::create($obj->getBingLiSource())->getDiseasesStr();
                 if($diseaseName == '')
                 {
                     $diseaseName = $obj->diseaseDesc;
                 }
             }
             else if ($obj instanceof BookingLog)
             {
                 $diseaseName = BingLiDtoHelper::create($obj->relatedObject->getBingLiSource())->disease->combine(" ")->diseaseName;
             }
         }
     }
     return $diseaseName;
 }/*}}}*/
Пример #14
0
        $i = 0;
        foreach ($orderList as $order) {
            if ($i == 3) {
                break;
            }
            if (false == $order->isOverdue()) {
                //去掉过期
                ?>

                    <tr <?php 
                echo $i++ % 2 ? 'style="background-color:#f5f5f5"' : '';
                ?>
>
                        <td>
                        <?php 
                echo mb_substr(BingLiDtoHelper::create($order->getBingLiSource())->disease->combine(' ')->diseaseName, 0, 5, 'gbk');
                ?>
                        </td>
                        <td><?php 
                echo $order->user->name;
                ?>
</td>
                        <td><?php 
                echo $order->patient->province . ' ' . $order->patient->city;
                ?>
</td>
                        <td><?php 
                echo $statusDef[$order->status];
                ?>
</td>
                    </tr>
Пример #15
0
<?php if ($doctorSpaceIsOpened && $bookingCnt > 0 && $space->isBookingOpened()) { ?>
    <!--<div class="doc_list_box_wamp">-->
    <a href="<?=$doctor->getTouchBookingListUrl($touchDomain)?>" rel="nofollow" class="doc_list_box">
        <div class="doc_list">
            <h3><i class="icon_new_ordered"></i>预约加号<span>(已就诊<?=$bookingCnt?>人)</span></h3>
            <ul>
                <?php $helper = BingLiDtoHelper::create($bookingOrder->getBingLiSource());?>
                <li><div class="left">患者姓名:</div><div class="right"><?=$bookingOrder->patient->privateName?></div></li>
                <li><div class="left">所患疾病:</div><div class="right"><?=XString::truncate($helper->disease->first()->diseaseName, 16)?></div></li>
                <li><div class="left">预约目的:</div>
                    <div class="right">
                        <?=($helper->goal->first()->jianCha)?'检查/诊断':''?>
                        <?=($helper->goal->first()->zhiLiao)?'治疗/手术':''?>
                        <?=($helper->goal->first()->fuZhen)?'复诊':''?>
                    </div>
                </li>
                <li><div class="left">加号时间:</div><div class="right"><?=$bookingOrder->ctime->toStringByFormat("Y-m-d H:i")?></div></li>
                <li class="position"><img src="http://i1.hdfimg.com/touch/images/go_r.png" width="26" height="26" /></li>
            </ul>
        </div>
    </a>
    <!--
        <div class="doc_list_btn">
            <a href="<?=$router->urlfor('doctor/showdownloadapp', array('doctorId' => $doctor->id))?>">申请加号</a>
        </div>
    </div>
    -->
<?php } ?>
 /**
     * @brief 获取意向详情
     * @author cs
     * @exampleUrl  http://dev.mobile-api.haodf.com/patient/intention_getIntentionDetail?userId=581662815&intentionId=1203944573
     *
     * @Param $intentionId 意向id
     * @Param $userId 用户id
     *
     * @Returns  array('id', 'serviceDesc', 'servicePrice', 'serviceDoctorName', 'serviceDef', 'needPay', 'patientInfo'=>array(), 'bingliInfo' => array(), 'attachInfo' => array()) 
  */
 public function getIntentionDetail($intentionId, $userId)
 {/*{{{*/
     $intention = DAL::get()->find('intention', $intentionId);
     $user = DAL::get()->find('user', $userId);
     if ($intention->isNull())
     {
         $this->setErrorCode(700);
         return 0;
     }
     if ($user->isNull())
     {
         $this->setErrorCode(107);
         return 0;
     }
     if ($intention->user->id != $user->id)
     {
         $this->setErrorCode(701);
         return 0;
     }
     $bingLiSet = BingLiDtoHelper::create($intention)->getAll();
     $info = array();
     $info['id'] = $intention->id;
     $info['serviceDesc'] = $this->getServiceDesc($intention);
     if ($intention->isFromTel())
     {
         $info['price'] = round($intention->getSalePrice());
         $info['servicePrice'] = round($intention->getSalePrice()).'元/次(不超过'.$intention->product->duration.'分钟)';
         $info['servicePriceInfo'] = round($intention->getSalePrice()).'元/次';
         $info['servicePriceIntro'] = '(不超过'.$intention->product->duration.'分钟)';
     }
     $info['serviceDoctorName'] = $intention->hasSpace() ? $intention->space->name : '未指定医生';
     $info['serviceDef'] = $intention->serviceDef;
     $info['needPay'] = $intention->needPay() ? 1 : 0;
     $info['status'] = $intention->getStatusDesc();
     $info['adminDesc'] = $intention->adminComment ? $intention->adminComment : '';
     $info['patientInfo'] = $this->getPatientInfo($intention->patient);
     $info['bingliInfo'] = $this->getAllBingLi($bingLiSet);
     $info['attachInfo'] = $this->getAttachmentBingLi($bingLiSet);
     $info['proposalAndFlowInfo'] = $this->getProposalAndFlowListByIntention($intention);
     $this->content = $info;
 }/*}}}*/
Пример #17
0
<div>
    <div class="list_con_tit">申请服务:预约转诊服务</div>
    <?php include '_spaceinfo.php';?>
    <div class="list_con_tit">申请加号时间:</div>

    <?php 
    $schedule = BingLiDtoHelper::create($intention)->schedule->first()->schedule;
    $scheduleStr = BingLiDtoHelper::create($intention)->scheduleStr->first()->scheduleStr;
    $time = '';
    if($schedule)
    {
        $time = XDateTime::valueOf($schedule)->toShortString().','.$scheduleStr;
    }
    ?>
    <div class="list_con"><?=$time?></div>
    <div id="treatedSpaceName" value="<?=$intention->space->name?>"></div>
</div>
Пример #18
0
    public function getPhoneCallOrderByOrderId($orderId)
    {/*{{{*/
        $tel = $this->getRightObj($orderId);
        if($tel->isNull())
        {
            $this->setErrorCode(313);
            return 0;
        }
        if ($tel->space->isNull())
        {
            $this->setErrorCode(1224);
            return 0;
        }
        $info = array();
        $info['doctorAssistant'] = '';
        $info['doctorAssistantTel'] = HdfPhoneNumber::PHONE_FENZHEN;
        if($tel instanceof Proposal)
        {
            $info['doctorAssistant'] = $tel->inspector->realName;
            $serviceOrder = DAL::get()->find_by_source('ServiceOrder', $tel);
            if(false == $serviceOrder->isNull())
            {
                $info['id'] = $serviceOrder->id;
                $info['sn'] = $serviceOrder->id;
            }
            else
            {
                $info['id'] = $tel->id;
                $info['sn'] = $tel->id;
            }
        }
        else
        {
            $info['id'] = $tel->id;
            $info['sn'] = $tel->id;
        }

        $info['mobile'] = $tel->patient->mobile;
        $info['price'] = round($tel->product->salePrice)."元/次(不超过".$tel->product->duration."分钟)";
        $info['doctorName'] = $tel->space->name;
        $info['hospital'] = $tel->space->host->hospitalfaculty->hospital->commonName.$tel->space->host->hospitalfaculty->name;
        $info['ctime'] = substr($tel->ctime, 0, strlen($tel->ctime)-3); 
        $needComment = 0;
        $info['status'] = $this->getStatus($tel, $needComment);
        $info['needComment'] = $needComment;
        if ($tel instanceof Intention)
        {
            $info['showCancelOrder'] = 0;
            $info['telTime'] = '未确定';
        }
        else
        {
            $info['showCancelOrder'] = 0;
            $serviceOrder = $this->getServiceOrder($tel);
            if (false == $serviceOrder->isNull() && $serviceOrder->isUnpaid() && $tel->isNormalStatus())
            {
                $info['showCancelOrder'] = 1;
            }
            $telOrder = $this->getTelOrder($tel);
            if ($telOrder->isNull())
            {
                $info['telTime'] = '未确定';
            }
            else
            {
                $info['telTime'] = $telOrder->getTelTime();
                if (false == $telOrder->isConfirmTime() && $serviceOrder->isPaid() && false == $tel->isCanceled() && false == $tel->isRefunded())
                {
                    $info['telTime'] = '医生助理正在努力为您联系医生';
                }
           }
        }
        $info['payType'] = 0;
        if(false == $tel->patient->isNull())
        {
            $info['patientName'] = empty($tel->patient->name)?"无姓名患者":$tel->patient->name;
            $info['sex'] = $tel->patient->getSexRef();
            $info['birthday'] = $tel->patient->birthday;
            $info['province'] = $tel->patient->province." ".$tel->patient->city;
        }
        $info['desc'] = strip_tags(BingLiDtoHelper::create($tel)->getLastConditionDesc());
        $this->content = $info;
    }/*}}}*/
Пример #19
0
 public function getFinishedBookingOrderList($pageId, $pageSize)
 {/*{{{*/
     $this->_initPageInfo($pageId, $pageSize);
     $bookingContractId = 0;
     $wapget = 1;
     $out = PlussignChannelClient::getInstance()->getBookingOrders($bookingContractId, $pageId, $pageSize, $wapget);
     $orders = $out['bookingOrder'];
     $pageInfo = $out['pageInfo'];
     $infos = array();
     $bookingCnts = $this->_getBookingCounts($orders);
     foreach($orders as $order)
     {
         $info = array();
         $info['orderId'] = $order->id; 
         $helper = BingLiDtoHelper::create($order->getBingLiSource());
         $info['disease'] = $helper->getDiseasesStr(); 
         $info['description'] = XString::htmlspecialchars_decode($helper->getLastConditionDesc()); 
         $info['ctime'] = substr($order->ctime, 0, 16); 
         $info['bookingTime'] = substr($order->schedule, 0, 16); 
         $info['orderStatusMsg'] = $order->getOrderStatusMsg(); 
         $info['statusTime'] = substr($order->schedule, 0, 16);
         foreach($bookingCnts as $bookingCnt)
         {
             if($bookingCnt['spaceid'] == $order->space->id)
             {
                 $info['finishBookingCnt'] = $bookingCnt['cnt'];
             }
         }
         $space = $order->space;
         $doctorInfo = $this->_getDoctorInfo($space);
         $info = array_merge($info,$doctorInfo);
         $infos[] = $info;
     }
     $this->pageInfo = $pageInfo;
     $this->content = $infos;
 }/*}}}*/
Пример #20
0
<p class="fl">
    <span class="fb">病情信息:</span>
    <?php 
echo nl2br(BingLiDtoHelper::create($flow->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc);
?>
</p>
<?php 
if (BingLiDtoHelper::create($flow->getBingLiSource())->patientAttachment->makeArray()->patientAttachmentId) {
    ?>
<p>
    <div id="el_patient_attachment_show_<?php 
    echo $flow->id;
    ?>
"></div>
    <script type="text/javascript">
    $(function(){
        showBingliDetail("el_patient_attachment_show_<?php 
    echo $flow->id;
    ?>
", "<?php 
    echo implode(',', BingLiDtoHelper::create($flow->getBingLiSource())->patientAttachment->makeArray()->patientAttachmentId);
    ?>
", "<?php 
    echo $space->id;
    ?>
");
    });
    </script>
</p>
<?php 
}
Пример #21
0
  </tr>

</table>
<form id="order" name="order" method="post" action="<?=$router->urlfor('booking/saveorder', array('id'=>$order->id))?>">
<input type="hidden" name="orderId" id="orderId" value="<?=$order->id?>" />
<div style="background-color:#eee" align="left">执行单详情:</div>
<table border="1" class="adminlist" cellspacing="1" cellpadding="0" style="font-size:12px">
  <tr>
     <div class="bingLiInfo clearfix"></div>
  </tr>
  <tr>
    <td valign="middle" width="100px">附件: </td>
    <td valign="middle">
    <div class="clearfix" style="width:800px;">
    <?php 
    $attachmentIds = BingLiDtoHelper::create($order->getBingLiSource())->patientAttachment->makeArray()->patientAttachmentId;
    if ($attachmentIds) 
    { 
    ?>
                <span class="pl20 red f14 showAttachment">有附件!(<?=count($attachmentIds)?>个)</span>
                <div id="el_patient_attachment_show"></div>
                <script type="text/javascript">
                $(".showAttachment").click(function(){ 
                    if ($('#el_patient_attachment_show').html() == '')
                    {
                        show_simple_bingli("el_patient_attachment_show", "<?= implode(',', $attachmentIds) ?>");
                    }
                    else
                    {
                        $('#el_patient_attachment_show').html('');
                    }
Пример #22
0
$patientIdCard = $doctorPatientRef->patient->idcard;
echo $patientIdCard . '(保密)';
?>
              
              </p> 
              <p class="pt5"><span class="fb">就诊时间:</span>&nbsp;<?php 
echo $flow->relatedObject->schedule->toString();
?>
</p> 
                <p class="fl fb" style="width: 75px;">就诊疾病:</p>
                  <span id="fullDisease_<?php 
echo $flow->relatedObject->id;
?>
">
                  <?php 
echo BingLiDtoHelper::create($flow->relatedObject->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc;
?>
                  </span>
                  </p>
              <p class="pt5"><span class="fb" style="width: 75px;">就诊程序:</span></p>
              <p><span id="fullAddr_<?php 
echo $flow->id;
?>
" >
                1、这是跟医生个人的预约。只有医生或他指定的助手知道这个预约。<br>
                2、先要在医院里指定地点找到医生本人,出示加号短信凭证,请医生开加号条。<br>
                3、持医生开具的加号条,挂号室挂号后排队看病。
                </span>		
             </p>	
              <p class="pt5"><span class="fb" style="width: 75px;">特别注意:</span></p>
              <p><span style="color:red;">1、不得爽约!</span> <br>    
        <ul class="fs gray2 flow_patient" id="rightnewbooking" >
<?php 
    foreach ($orderList as $order) {
        ?>
            <li class="lh180 pt10 pb10 bbd_e9">
                <p class="f14 lh140 pb10">
                    <span class="mr5 black">[<?php 
        echo mb_substr(BingLiDtoHelper::create($order->getBingLiSource())->disease->combine(' ')->diseaseName, 0, 5, 'gbk');
        ?>
]</span>

<?php 
        if (mb_strlen(BingLiDtoHelper::create($order->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc, 'gbk') < 12) {
            echo BingLiDtoHelper::create($order->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc;
        } else {
            echo mb_substr(BingLiDtoHelper::create($order->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc, 0, 12, 'gbk') . "...";
        }
        ?>
                    </p>
                    <p class="fs">
                        <span>预约:</span>
                        <a href="http://www.haodf.com/hospital/<?php 
        echo $space->host->hospitalfaculty->hospital->getEncodeId();
        ?>
.htm" target="_blank" class="mr5"><?php 
        echo $space->host->hospitalfaculty->hospital->commonName;
        ?>
</a>
                        <a href="http://www.haodf.com/faculty/<?php 
        echo $space->host->hospitalfaculty->getEncodeId();
        ?>
              {
              	$patientIdCard = "**********"; 
              }
              echo $patientIdCard.'(保密)';?>              
              </p> 
              <p class="pt5"><span class="fb">就诊时间:</span>&nbsp;<?=$flowable->relatedObject->schedule->toString() ?></p> 
              <div class="clearfix pt5">
                <p class="fl fb" style="width: 75px;">就诊疾病:</p>
                <div class="fl" style="width: 420px;padding-left:2px">
                  <p class="stream-box-content-w3">
                  <span id="fullDisease_<?=$flowable->relatedObject->id ?>" style="display: none;">
                  <?=BingLiDtoHelper::create($flowable->relatedObject->getBingLiSource())->conditiondesc->combine(" ")->conditionDesc ?>
                  <a href="javascript:" onclick="showDiseaseInfo(this)" class="red2" >收起&gt;&gt;</a>
	              </span>
	              <span id="truncateDisease_<?=$flowable->relatedObject->id ?>"><?=mb_substr(BingLiDtoHelper::create($flowable->relatedObject->getBingLiSource())->conditiondesc->combine(" ")->conditionDesc, 0 , 100) ?>
	              <?php if(mb_strlen(BingLiDtoHelper::create($flowable->relatedObject->getBingLiSource())->conditiondesc->combine(" ")->conditionDesc, 'gbk') > 100) {?>
	              ...<a href="javascript:" onclick="showDiseaseInfo(this)" class="red2" >详情&gt;&gt;</a>
	              <?php }?>
	              </span>
                  </p>
                </div>
              </div> 
              <p class="pt5"><span class="fb" style="width: 75px;">就诊程序:</span></p>
              <p><span id="fullAddr_<?=$flowable->id ?>" >
				1、这是跟医生个人的预约。只有医生或他指定的助手知道这个预约。<br>
				2、先要在医院里指定地点找到医生本人,出示加号短信凭证,请医生开加号条。<br>
				3、持医生开具的加号条,挂号室挂号后排队看病。
				</span>		
			 </p>	
			  <p class="pt5"><span class="fb" style="width: 75px;">特别注意:</span></p>
			  <p><span style="color:red;">1、不得爽约!</span> <br>    
Пример #25
0
 private function getTelOrderFlowDesc($telOrder)
 {/*{{{*/
     $desc  = "<b>预约时间:</b><br/>".$telOrder->confirmStartTime->toString()."<br/>";
     $desc .= "<b>服务费:</b><br/>".$telOrder->getProductName()."<br/>";
     $desc .= "<b>订单状态:</b><br/>".$telOrder->getFlowShowStatus()."<br/>";
     $desc .= "<b>病情信息:</b><br/>";
     $desc .= $telOrder->getBingLiSource()->isNull() ? nl2br($telOrder->diseaseDesc) :nl2br(BingLiDtoHelper::create($telOrder->getBingLiSource())->conditiondesc->combine(' ')->conditionDesc)."<br/>";
     return $desc;
 }/*}}}*/