public function recoverComment($request, $response) { /*{{{*/ $ids = $request->ids; $messageIds = $request->indexs; $doctorCommentId = DoctorCommentClient::getInstance()->recoverDoctorComment(reset($messageIds), $this->inspector); $doctorComment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($doctorCommentId); InspectClient::getInstance()->process($doctorComment, $doctorComment->getInspectProperties()); if (false == $doctorComment->isNull()) { $response->oldData = array('DoctorComment' => ''); $response->newData = 'recover'; $response->ids = $ids; } //dodo::psq S3LogClient::getInstance()->add($this->inspector, $doctorComment->getLogable()->action(DoctorCommentLog::ACTION_RECOVER_COMMENT)); $response->result = $doctorCommentId; $response->actionDesc = "»Ö¸´Óû§ÆÀÂÛ"; $response->id = implode(",", $ids); }
public function ajaxBindTicket($request, $response) { /*{{{*/ $doctorCommentPostList = DoctorCommentPost::createList($request->ids); $res = InspectClient::getInstance()->bindTicket($doctorCommentPostList, $this->inspector); echo json_encode($res); return parent::DIRECT_OUTPUT; }
public function bindTicket4CurInspector($request, $response) { /*{{{*/ $spaceBusinessRequirementId = $request->id; $spaceBusinessRequirement = DAL::get()->find('SpaceBusinessRequirement', $spaceBusinessRequirementId); $group = DAL::get()->find_parent('SpaceBizInspectGroup'); $isSuccess = InspectClient::getInstance()->bindTicket2Group($this->curInspector, $spaceBusinessRequirement, $group, $comment = ""); if ($isSuccess == false) { die("亲,你不能绑定哦,请联系管理员开权限哦!"); } $response->setRedirect($response->router->urlfor('spacebusinessrequirement/showdoctordetailList', array('id' => $request->id))); }
public function ajaxShowMyTickets($request, $response) { /*{{{*/ $hostType = $request->hosttype; if ($hostType == 'DoctorPatientPost') { $res = InspectClient::getInstance()->getInspectedSourceIds($this->curInspector, InspectGroup::APP_FOLLOWUPPOST, array('beginTime' => XDateTime::today(), 'endTime' => XDateTime::tomorrow())); $flowPostList = DAL::get()->find('DoctorPatientPost', $res['ids']); $response->doctorPatientPostList = $flowPostList; } else { $response->tickets = DAL::get()->find_all_byAuditor_hosttype_status_date('nfstaskticket', $this->auditor, $request->hosttype, NfsTaskTicket::STATUS_DONE, XDateTime::today(), XDateTime::tomorrow()); } $response->hosttype = $hostType; }
public function mine($request, $response) { /*{{{*/ $response->startTime = $startTime = XDateTime::valueOf($request->getRequest('startTime', XDateTime::now(XDateTime::DEFAULT_DATE_FORMAT))); $response->endTime = $endTime = XDateTime::valueOf($request->getRequest('endTime', XDateTime::now(XDateTime::DEFAULT_DATE_FORMAT)->addDay(1))); $response->intentions = InspectClient::getInstance()->getPrepassIntentionsByInspector($this->curInspector, $startTime, $endTime); }
public function passDoctorRankWarningAndNext($request, $response) { /*{{{*/ $ticketId = $request->ticketId; $comment = $request->reason; $ticket = DAL::get()->find('ticket', $ticketId); InspectClient::getInstance()->markTicketDoneAndComment($ticket, $comment, $this->inspector); //dodo:psq S3LogClient::getInstance()->add($this->inspector, $ticket->source->commentDoctor->getLogable()->action(CommentDoctorLog::ACTION_WARNING_FINSIH, "进排名预警原因:" . $ticket->comment . ";处理结果:" . $request->reason)); $nextTicket = InspectClient::getInstance()->pickTicket($this->inspector, $ticket->inspectGroup); if ($nextTicket->isNull()) { // 没有下一条工单了 echo "没有工单了"; exit; } else { // 还有下一条 $response->setRedirect('/commentdoctor/showrankwarningdetail?ticketid=' . $nextTicket->id); } }
public function updatePost($request, $response) { /*{{{*/ $ticket = DAL::get()->find("ticket", $request->ticketid); DBC::requireFalse($ticket->isNull(), 'ticket does not exist'); $deleteType = $ticket->source->deleteType; //dodo::djf 是真的时候 要处理upBill和upBillTime $realComment = DAL::get()->useMaster()->find($ticket->sourceType, $ticket->sourceId, true); $upBill = $realComment->upBill; $upBillTime = $realComment->upBillTime; if (TelInspectResult::isTelResultReal($request->confirmstate)) { if (false == $realComment->hasUpBill() && $realComment->doctor->commentDoctor->isNeedEvidence()) { $upBill = DoctorComment::UPBILL_UNUPLOAD; $upBillTime = XDateTime::now(); } } $deleteStr = ''; if (TelInspectResult::isNeedDeleteResult($request->confirmstate)) { $deleteType = DoctorComment::DELETETYPE_TELVERIFICATION; $deleteStr = '点评删除'; } if (TelInspectResult::isNeedCheate($request->confirmstate)) { $deleteType = DoctorComment::DELETETYPE_CHEAT; $deleteStr = '电话核实,判定作弊'; } $telResultDto = new DoctorCommentTelInspectResultDto($ticket->source, $request->confirmstate, $request->lastcalltime, $this->inspector->id, $request->remark, $request->top, $request->from, $deleteType, $upBill, $upBillTime); $res = InspectClient::getInstance()->next($request->ticketid, $telResultDto, $this->inspector); if (false == $res) { echo "审核失败"; exit; } $evidenceDesc = ''; if ($realComment->doctor->commentDoctor->isNeedEvidence()) { $evidenceDesc = "该医生需要上传缴费单"; } //dodo::psq $passContent = "核实结果:" . TelInspectResult::$telResultDesc[$request->confirmstate] . " " . $evidenceDesc . $deleteStr . ";备注:" . $request->remark; S3LogClient::getInstance()->add($this->inspector, $ticket->source->getLogable()->action(DoctorCommentLog::ACTION_CONFIRM_COMMIT, $passContent)); $ticket = InspectClient::getInstance()->pickTicket($this->inspector, $ticket->inspectGroup); if ($ticket->isNull()) { echo "亲:\n审核完成, 没有待审核的工单啦"; exit; } $response->setRedirect("/commentconfirm/edit?ticketid={$ticket->id}"); }
public function completePatientCaseRef($request, $response) { /*{{{*/ $status = $request->matchstatus; DBC::requireTrue(in_array($status, array_keys(PatientCaseRef::$statusDesc)), "非法状态"); $ticketId = $request->ticketid; $ticket = DAL::get()->find('ticket', $ticketId); $resultDto = new PatientCaseRefInspectResultDto($status, '', $ticket->source); $logContent = $ticket->source->patient->name . "(ID:" . $ticket->source->patient->id . ")"; if ($status == PatientCaseRef::STATUS_MATCH) { InspectClient::getInstance()->next($ticket->id, $resultDto, $this->curInspector); S3LogClient::getInstance()->add($this->curInspector, $ticket->source->patientCase->getRefLogable()->action(PatientCaseRefLog::ACTION_BIND, $logContent)); } else { if ($status == PatientCaseRef::STATUS_UNMATCH) { InspectClient::getInstance()->refuse($ticket->id, $this->curInspector, $resultDto); S3LogClient::getInstance()->add($this->curInspector, $ticket->source->patientCase->getRefLogable()->action(PatientCaseRefLog::ACTION_REFUSE, $logContent)); } } $patientCaseRefGroup = OutpatientToolInspectGroup::getPatientCaseRefGroup(); $nextAction = 'patientcaserefdetail'; $this->pickUpNextTicket($patientCaseRefGroup, $response, $nextAction); }
public function ajaxChangeGroup($request, $response) { /*{{{*/ $doctorComment = DoctorCommentClient::getInstance()->getDoctorCommentSubClass($request->id); if (false == $doctorComment->isNull()) { $ticket = DAL::get()->find_waiting_ticket('ticket', $doctorComment); } else { $ticket = NullEntity::create(); } $contentGroup = DAL::get()->find_by_name('CommentInspectGroup', DoctorCommentInspectRule::GROUP_DOCTORCOMMENT_CONTENT); //内容组没有重新审核权限,并且内容组的工单在绑定状态下不能被重新审核 if ($contentGroup->isIn($this->inspector) || $ticket->isBind() && $ticket->inspectGroupId == $contentGroup->id) { $res = false; echo json_encode($res); return parent::DIRECT_OUTPUT; } $textGroup = DAL::get()->find_by_name('CommentInspectGroup', DoctorCommentInspectRule::GROUP_DOCTORCOMMENT); //设置点评为待审核,更新点评库 DoctorCommentClient::getInstance()->setInValid($doctorComment); $res = InspectClient::getInstance()->getBackTicket($ticket, $textGroup, $this->inspector); echo json_encode($res); return parent::DIRECT_OUTPUT; }
public function findList() { /*{{{*/ $nowPage = $this->request->getRequest('page', 1); $group = DoctorCommentInspectRule::getDoctorCommentGroup(); $groupId = $this->request->groupid ? $this->request->groupid : $group->id; if ($this->request->showtype) { $recordListAndPageInfo = InspectClient::getInstance()->getInspectorRecordList($nowPage, 50, $this->request->inspectorid, $groupId); } else { $recordListAndPageInfo = DoctorCommentClient::getInstance()->getDoctorCommentListForInspector($nowPage, self::PAGE_SIZE, $this->request->inspectorid, $groupId, $this->getOptions()); self::$doctorCommentList = $recordListAndPageInfo['list']; } $this->res = $recordListAndPageInfo; $dcIds = array(); foreach ($this->getDoctorCommentList() as $doctorComment) { $dcIds[] = $doctorComment->id; } if (false == empty($dcIds)) { $this->response->inspectResultInfos = InspectClient::getInstance()->getInspectResultInfos($dcIds); } return $this; }
public function ajaxReleaseAllTickets($request, $response) { /*{{{*/ $hostType = $request->hosttype; if (false == $this->auditor->isNull()) { FollowupClient::getInstance()->releaseAllTickets($hostType); } // 因随访流审核迁移到inspect, 当是审核随访流的时候,需要调用inspect的service if ($hostType == 'DoctorPatientPost' && false == $this->curInspector->isNull()) { InspectClient::getInstance()->forceReleaseAllTicket($this->curInspector, InspectGroup::APP_FOLLOWUPPOST); } echo $hostType . " ok"; exit; }