public function deleteTpl($request, $response)
 {
     /*{{{*/
     $deleteTplId = $request->deletetplid;
     $childCategoryId = $request->childcategoryid;
     FollowupSchemeClient::getInstance()->deleteTpl($deleteTplId);
     //增加操作日志
     $tpl = DAL::get()->find('FollowupSchemeTpl', $deleteTplId);
     $parentCategory = $tpl->followupSchemeCategory->getParentCategory();
     $logContent = "删除常规项目列表[{$tpl->reason}]";
     NfsAuditClient::getInstance()->addAuditLog($parentCategory, $tpl, $this->auditor, NfsAuditLog::TypeFollowupScheme, $logContent);
     $response->setRedirect($response->router->urlfor('followupscheme/followupschemetpl', array('childCategoryId' => $childCategoryId)));
 }
Ejemplo n.º 2
0
 public function passMedicineDiary($request, $response)
 {
     /*{{{*/
     $ticket = DAL::get()->find('NfsTaskTicket', $request->ticketId);
     NfsAuditClient::getInstance()->pass($this->auditor, $ticket->id);
     $payingStatus = $request->payingStatus;
     if (false == isset($payingStatus)) {
         $payingStatus == 'all';
     }
     $response->setRedirect($response->router->urlfor('followup/nextmedicinediary', array('payingStatus' => $payingStatus)));
 }
Ejemplo n.º 3
0
$checkupTicketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($theFollowupCustomer->userId, 'User', 'CheckupAnswerSheet');
if (false == empty($checkupTicketId)) {
    ?>
            <a target="content_frm" class="blue unl" href="<?php 
    echo $router->urlfor('checkup/nextcheckupanswersheet', array('ticketId' => $checkupTicketId));
    ?>
">复查</a>
<?php 
} else {
    echo "复查";
}
?>
        </span>
        <br/><span>
            <?php 
$diaryTicketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($theFollowupCustomer->userId, 'User', 'HealthDiary');
if (false == empty($diaryTicketId)) {
    ?>
            <a target="content_frm" class="blue unl" href="<?php 
    echo $router->urlfor('healthrecord/nextdiary', array('ticketId' => $diaryTicketId));
    ?>
">日记</a>
<?php 
} else {
    echo "日记";
}
?>
        </span>
        <br/><span>
            <a target="content_frm" href="<?php 
echo $router->urlfor('followup/followupcustomerinfo', array('doAction' => 'edit', 'customerId' => $theFollowupCustomer->id));
</div>
<!--手术情况结束-->
<div class="mt5">
<input id="submitinput" type="submit" value="提交" class="blueBtn"/>
</div>

</form>
</div>




<div class="mt10">
    <button class="blue f12" onclick='window.open("/patientcasehistory/displayvessel","_blank", "width=500, height=400,left=500,top=200, toolbar=0, scrollbar=0, resize=0");' target='_blank'>添加血管(名称)</button>
    <button class="blue f12" onclick='window.open("/patientcasehistory/showaddsupportbrand","_blank", "width=500, height=400,left=500,top=200, toolbar=0, scrollbar=0, resize=0");' target='_blank'> 添加支架(品牌)</button>
    
    <?php 
$checkupTicketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($theFollowupCustomer->userId, 'User', 'CheckupAnswerSheet');
?>
    <a target="content_frm" id="attachmentlistlink" class="blue unl ml40" href="<?php 
echo $router->urlfor('worknote/attachmentlistofpatient', array('userid' => $theFollowupCustomer->userId));
?>
">复查报告列表</a>
    <span> (右帧打开,提示:右侧点击图片放大后, 用小键盘方向键可移动图片) </span>
</div>

</div>
</body>
</html>
	<div id='result' style="margin-top:5px">
	<table width="90%"  cellpadding="0" cellspacing="0" border="1" class="adminlist" style="padding:10px;">
	<tr style="background-color: #FCEDDA">
	<td width="10%">患者</td>
	<td width="10%">随访医生</td>
	<td width="30%">复查报告</td>
	<td width="15%">销售责任人</td>
	<td width="10%">复查填写时间</td>
	<td width="10%">复查</td>
	</tr>
<?php 
    foreach ($checkupAnswerSheetList as $checkupAnswerSheet) {
        /*{{{*/
        $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($checkupAnswerSheet->user->id, 'User', 'CheckupAnswerSheet');
        if (empty($ticketId)) {
            $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($checkupAnswerSheet->user->id, 'User', 'CheckupAnswerSheet');
        }
        ?>
		<tr style="background-color:#F8FCFD">
        <td><?php 
        echo $checkupAnswerSheet->user->getFollowupPatient()->name;
        ?>
(<?php 
        echo $checkupAnswerSheet->user->name;
        ?>
)</td>
		<td><?php 
        echo $checkupAnswerSheet->user->getFollowupPatientSignin()->space->name;
        ?>
</td>
		<td><?php 
</span>
<span style="float:right;">
<?php 
if (isset($owner) && false == $owner->isNull()) {
    ?>
            <a href='<?php 
    echo $router->urlfor('followupscheme/showfollowupschemetasklist', array('followupownerid' => $owner->id));
    ?>
#flowinfo' target='_blank'>调整方案</a>|		
            <a href='<?php 
    echo $router->urlfor('checkup/managetemporarytask', array('refid' => $doctorPatientRef->id));
    ?>
' target='_blank'>打开临时任务</a>|		
<?php 
}
$diaryTicketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($doctorPatientRef->user->id, 'User', 'HealthDiary');
if (false == empty($diaryTicketId)) {
    echo "<a href='/healthrecord/nextdiary?ticketId={$diaryTicketId}' target='_blank'>打开健康日记</a>|";
}
if ($doctorPatientRef->isFollowedUp()) {
    ?>
    <a href="<?php 
    echo $router->urlfor('patientcasehistory/showcasehistorylist', array('userId' => $doctorPatientRef->user->id));
    ?>
" target="_blank">打开病历库</a>
<?php 
} else {
    ?>
    <a href="<?php 
    echo $router->urlfor('intention/selectbingli', array('patientid' => $doctorPatientRef->patient->id));
    ?>
Ejemplo n.º 7
0
 public function modifyFollowupServices($request, $response)
 {
     /*{{{*/
     NfsAuditClient::getInstance()->auditFollowupServices($this->auditor, $request->customerid, $request->new, $request->deleted, $request->services);
     $response->setRedirect('/nfsaudit/showcustomerfollowupservices?customerid=' . $request->customerid);
 }
if (false == empty($customerInfoRecordList)) {
    ?>
	<div id='result' style="margin-top:5px">
	<table width="90%"  cellpadding="0" cellspacing="0" border="1" class="adminlist" style="padding:10px;">
	<tr style="background-color: #FCEDDA">
	<td width="20%">时间</td>
	<td width="20%">姓名/用户名</td>
	<td width="13%">负责人</td>
	<td width="10%">医生</td>
	<td width="10%">销售进程</td>
	<td width="7%">报到</td>
	<td width="10%">&nbsp;</td>
	</tr>
<?php 
    foreach ($customerInfoRecordList as $infoRecord) {
        $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($infoRecord->customer->id, 'FollowupCustomer', 'FollowupCustomerInfoRecord');
        ?>
		<tr style="background-color:#F8FCFD">
        <td><?php 
        echo $infoRecord->ctime;
        ?>
</td>
        <td><?php 
        echo $infoRecord->customer->customerName;
        $user = $infoRecord->customer->getBindUser();
        if (false == $user->isNull() && $user->id != 0) {
            echo "(" . $user->name . ")";
        } else {
            echo "()";
        }
        ?>
 public function ticketQuery($request, $response)
 {
     /*{{{*/
     $searchVars = $request->vars;
     if ('true' == $searchVars['search']) {
         $params = array();
         foreach ($searchVars as $k => $v) {
             if ('' != $v) {
                 $params[$k] = $v;
             }
         }
         // 如果以后查其它类型的工单,从界面传过来即可,现在只查健康日记工单
         $params['hostType'] = 'HealthDiary';
         $page = $request->getRequest('page', 1);
         $count = 15;
         $res = NfsAuditClient::getInstance()->getTicketList4Audit($page, $count, $params);
         $response->ticketList = $res['list'];
         $response->pagelink = '';
         if (false == empty($res['pageInfo'])) {
             $response->pagelink = PageNav::getNavLink(PageNav::getPageNavTemplate('/healthrecord/ticketquery?' . http_build_query(array('vars' => $searchVars)) . '&page='), $res['pageInfo']['nowpage'], $res['pageInfo']['pagesize'], $res['pageInfo']['total']);
         }
     } else {
         $searchVars['passDateBegin'] = '';
         $searchVars['passDateEnd'] = '';
         $searchVars['auditorId'] = '';
         $searchVars['reviewAuditorId'] = '';
         $searchVars['reviewResult'] = '';
     }
     $response->searchVars = $searchVars;
     $response->followupAuditorList = FollowupOwner::getFollowupAuditors();
 }
<h3>健康日记</h3>
	<?php 
if (empty($diaryList)) {
    ?>
		<span>近期无自填健康日记</span>
	<?php 
}
$ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($owner->user->id, 'User', 'HealthDiary');
foreach ($diaryList as $diary) {
    ?>
	<div class="diary">
	<div class="date">
	<span>
	<?php 
    echo $diary->doTime->toShortString();
    ?>
	</span>
	<?php 
    if ($diary->isUnaudited()) {
        echo '<font color="red">new!</font>';
    }
    ?>
	<span class="fr"><?php 
    echo $diary->getHtmlTextAgentAuditor();
    ?>
<span style="color:gray;">创建时间:<?php 
    echo $diary->ctime;
    ?>
</span>
	|<span><a target="_blank" href="<?php 
    echo $router->urlfor('healthrecord/showDiary', array('diaryId' => $diary->id, 'ticketId' => $ticketId));
Ejemplo n.º 11
0
if (empty($diaryList) == false) {
    ?>
	<div id='result' style="margin-top:5px">
	<table width="90%"  cellpadding="0" cellspacing="0" border="1" class="adminlist" style="padding:10px;">
	<tr style="background-color: #FCEDDA">
	<td width="30%">患者姓名</td>
	<td width="30%">患者用户名</td>
	<td width="30%">更新日期</td>
	<td width="10%">日记</td>
	</tr>
<?php 
    foreach ($diaryList as $diary) {
        if ($diary->user->isNull()) {
            continue;
        }
        $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($diary->user->id, 'User', 'MedicineDiary');
        $patientSignin = new NullEntity();
        $followupPatient = $diary->user->getFollowupPatient();
        if (false == $followupPatient->isNull()) {
            $patientSignin = FollowupClient::getInstance()->getOneVipFollowupOwnerByPatientId($followupPatient->id);
        }
        $strV = "";
        if ($patientSignin->isNull() == false) {
            $strV = "<span style='color:red;'>[V]</span>";
        }
        ?>
		<tr style="background-color:#F8FCFD">
		<td><?php 
        echo $followupPatient->name;
        ?>
</td>
Ejemplo n.º 12
0
<!-- search result -->
<?php 
if (empty($checkupList) == false) {
    ?>
	<div style="margin-top:5px">
	<table width="90%"  cellpadding="0" cellspacing="0" border="1" class="adminlist" style="padding:10px;">
	<tr style="background-color: #FCEDDA">
	<td width="10%">患者</td>
	<td width="10%">随访医生</td>
	<td width="30%">复查</td>
	<td width="10%">复查填写时间</td>
	<td width="10%">复查</td>
	</tr>
<?php 
    foreach ($checkupList as $checkup) {
        $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($checkup->user->id, 'User', 'AnswerNaire');
        ?>
		<tr style="background-color:#F8FCFD">
        <td><?php 
        echo $checkup->user->getFollowupPatient()->name;
        ?>
(<?php 
        echo $checkup->user->name;
        ?>
)</td>
		<td><?php 
        echo $checkup->questionNaire->space->name;
        ?>
</td>
		<td><?php 
        echo $checkup->questionNaire->questionNaireTpl->name;
Ejemplo n.º 13
0
    ?>
	<div id='result' style="margin-top:5px">
	<table width="90%"  cellpadding="0" cellspacing="0" border="1" class="adminlist" style="padding:10px;">
	<tr style="background-color: #FCEDDA">
	<td width="20">用户名</td>
	<td width="20">来源</td>
	<td width="25">状态</td>
	<td width="20">报到时间</td>
	<td width="25">开通随访</td>
	<td width="20">收费患者</td>
	<td width="40">责任人</td>
	<td width="20">详情</td>	
	</tr>
<?php 
    foreach ($patientSigninList as $patientSignin) {
        $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($patientSignin->id, get_class($patientSignin), 'FollowupOwner');
        $serviceAuditorName = '未分配';
        if (false == $patientSignin->serviceAuditor->isNull()) {
            $serviceAuditorName = $patientSignin->serviceAuditor->realName;
        }
        $userName = $patientSignin->user->name;
        $userRealName = $patientSignin->patient->name;
        if ($userRealName) {
            $userName .= "<br />({$userRealName})";
        }
        $sourceShowStr = FollowupOwner::$sourceDesc[$patientSignin->source];
        if (FollowupOwner::SOURCE_VIPAPPLY == $patientSignin->source) {
            $sourceShowStr = "<span class='red'>{$sourceShowStr}</span>";
        }
        ?>
		<tr style="background-color:#F8FCFD">
 public function saveCaseHistory($request, $response)
 {
     /*{{{*/
     $sourceId = $request->sourceId;
     $sourceType = $request->sourceType;
     $sourceEntity = $this->getSourceEntity($sourceType, $sourceId);
     $user = $this->getUser4SourceEntity($sourceEntity);
     $auditor = $this->auditor;
     $ownerEntity = $user;
     //记录日志用
     if ($sourceEntity instanceof DoctorPatientPost) {
         $ownerEntity = $sourceEntity->doctorPatientRef;
     }
     $diseaseName = $request->diseaseName;
     $hospitalFaculty = $request->hospitalFaculty;
     $doctorName = $request->doctorName;
     $params = array();
     $params['diseaseName'] = $diseaseName;
     $params['hospitalFaculty'] = $hospitalFaculty;
     $params['doctorName'] = $doctorName;
     //类别
     $item = DAL::get()->find('QuestionCategory', $request->casetype);
     $txtName = "事件";
     if (false == $item->isNull()) {
         $txtName = $item->name;
     }
     $params['caseType'] = $txtName;
     //所属子项目分类&ID,先取末级分类
     $questionCategoryId = $request->itemcategory2;
     if ($questionCategoryId === "0") {
         $questionCategoryId = $request->itemcategory;
     }
     $questionCategory = DAL::get()->find('QuestionCategory', $questionCategoryId);
     $txtName = "";
     if (false == $questionCategory->isNull()) {
         $txtName = $questionCategory->name;
     }
     $params['questionCategoryName'] = $txtName;
     $params['questionCategoryId'] = $questionCategory->id;
     //问题&项目名称
     $questionId = $request->itemname;
     $questionType = $this->getQuestionTypeByCategoryId($questionCategory->id);
     $params['questionType'] = $questionType;
     $txtName = $request->realitemname;
     $item = $this->getQuestionByTypeAndId($questionType, $questionId, $txtName);
     if ($item->isNull()) {
         echo "问题不存在,无法添加到病历库";
         return parent::DIRECT_OUTPUT;
     } else {
         $questionId = $item->id;
     }
     if (empty($txtName) && false == $item->isNull()) {
         $txtName = $item->title;
     }
     $params['questionId'] = $questionId;
     $params['itemName'] = $txtName;
     $params['itemValue'] = $request->itemvalue;
     $params['itemUnit'] = $request->itemunit;
     $params['itemStatus'] = '';
     $params['itemTextValue'] = $request->itemtextvalue;
     $params['catalog'] = $request->catalog;
     $dYear = $request->dateyear;
     $dYear = empty($dYear) ? "0000" : $dYear;
     $dMonth = $request->datemonth;
     $dMonth = empty($dMonth) ? "00" : $dMonth;
     $dDay = $request->dateday;
     $dDay = empty($dDay) ? "00" : $dDay;
     $dHour = $request->datehour;
     $dHour = empty($dHour) ? "00" : $dHour;
     $dMinu = $request->dateminu;
     $dMinu = empty($dMinu) ? "00" : $dMinu;
     $dSecd = "00";
     $occurTime = $dYear . "-" . $dMonth . "-" . $dDay . " " . $dHour . ":" . $dMinu . ":" . $dSecd;
     $params['occurTime'] = $occurTime;
     $caseHistoryId = $request->caseHistoryId;
     if (empty($caseHistoryId)) {
         $patientCaseHistory = PatientCaseHistoryClient::getInstance()->addPatientCaseHistory($user, $auditor, $sourceEntity, $params);
         //
         $caseHistoryId = $patientCaseHistory->id;
     } else {
         //编辑
         $patientCaseHistory = DAL::get()->find('PatientCaseHistory', $caseHistoryId);
         PatientCaseHistoryClient::getInstance()->updatePatientCaseHistory($user, $auditor, $caseHistoryId, $params);
     }
     $patientCaseHistory = DAL::get()->find('PatientCaseHistory', $caseHistoryId);
     $secondLayerCategory = $patientCaseHistory->questionCategory->getSecondLayerCategory();
     $caseTypeId = $secondLayerCategory->parentCategory->id;
     $secondLayerCategoryId = $secondLayerCategory->id;
     $questionCategoryId = $patientCaseHistory->questionCategory->id;
     $questionId = $patientCaseHistory->questionId;
     $strItemUnit = $patientCaseHistory->itemUnit;
     $defaultOccurTime = $occurTime;
     $catalog = $patientCaseHistory->catalog;
     //操作日志加在这里,因为svc中量表会自动进入病历库
     $logType = NfsAuditLog::TypeExtractData;
     $logContent = $params['questionCategoryName'] . ':' . $params['itemName'];
     NfsAuditClient::getInstance()->addAuditLog($ownerEntity, $sourceEntity, $auditor, $logType, $logContent);
     if ($patientCaseHistory->isNull() == false) {
         $response->setRedirect($response->router->urlfor('patientcasehistory/extractdata', array('caseHistoryScope' => $request->caseHistoryScope, 'sourceType' => $sourceType, 'sourceId' => $sourceId, 'diseaseName' => $diseaseName, 'hospitalFaculty' => $hospitalFaculty, 'doctorName' => $doctorName, 'caseTypeId' => $caseTypeId, 'secondLayerCategoryId' => $secondLayerCategoryId, 'questionCategoryId' => $questionCategoryId, 'questionId' => $questionId, 'strItemUnit' => $strItemUnit, 'defaultOccurTime' => $defaultOccurTime, 'catalog' => $catalog)));
     }
 }
Ejemplo n.º 15
0
 public function submitPost($request, $response)
 {
     /*{{{*/
     $worknoteid = $request->worknoteid;
     $workNote = DAL::get()->find('worknote', $worknoteid);
     DBC::requireFalse($workNote->isNull(), "没找到 WorkNote {$worknoteid},请核对!");
     $theFollowupCustomer = $workNote->customer;
     $modules = $this->getModules_first();
     echo "<pre>";
     foreach ($modules as $module) {
         $_func = "_submit_" . $module;
         $_key = "_" . $module;
         $data = array();
         if ('yongyao' == $module) {
             $data['labelid'] = $request->labelid;
             $data['otherlabelstr'] = $request->otherlabelstr;
             $data['medicinearray'] = $request->medicinearray;
             $data['initiatetype'] = $request->initiatetype;
             $data['remark'] = $request->remark;
         }
         $resultStr = $this->{$_func}($theFollowupCustomer, $request->getRequest($_key, $data), $workNote);
         echo $resultStr;
     }
     //  同时生成一个worksheet 任务, 若是已经存在, 则忽略。
     $assistantRole = DAL::get()->find_by_name('followupauditorrole', FollowupAuditorRole::NAME_ASSISTANTDOCTOROPERATION);
     // 医助运营角色
     $worksheetModel = DAL::get()->find_by_title('nfstaskmodel', NfsTaskModel::TITLE_WORKSHEET);
     if ($request->worksheetdeadline) {
         $deadLine = XDateTime::valueOf($request->worksheetdeadline);
     } else {
         $deadLine = XDateTime::today()->addWorkingDay(3);
     }
     TaskClient::getInstance()->createTask4NoUserCustomer($theFollowupCustomer->id, array($worksheetModel->id), $workNote, $this->auditor, $deadLine, "由首次工作单生成", $assistantRole->id);
     NfsAuditClient::getInstance()->addAuditLog($workNote->customer, $workNote, $this->auditor, NfsAuditLog::TypeSubmitFirstWorknote, '提交首次工作单');
     //疑问解决的其他 , 存进工作单"其他信息"字段
     $_yiwenjiejue = $request->getRequest('_yiwenjiejue', array());
     $otherinfo = "疑问解决-其他";
     $otherinfo .= "\n描述: " . $_yiwenjiejue['otherinfo']['desc'];
     $otherinfo .= "\n医助建议: " . $_yiwenjiejue['otherinfo']['advice'];
     $result = WorkNoteClient::getInstance()->modifyDatajsonAndMarkSubmit($worknoteid, $otherinfo, $this->dataJson, $this->curInspector->user->id);
     $response->setRedirect($response->router->urlfor('worknote/modify', array('worknoteid' => $worknoteid, 'preMsg' => '工作单已提交' . date('Y-m-d H:i:s'))));
 }
Ejemplo n.º 16
0
 public function copyReport($request, $response)
 {
     /*{{{*/
     $reportId = $request->id;
     $newCheckupReportId = CheckupClient::getInstance()->copyCheckupReport($reportId);
     $checkupReport = DAL::get()->find('checkupreport', $reportId);
     foreach ($checkupReport->reportLabelRefList as $reportLabelRef) {
         $reportLabel = $reportLabelRef->label;
         if (CheckupLabel::CATEGORYTYPE_CHECKTIME == $reportLabel->categoryType) {
             NfsClient::getInstance()->addCheckupReportLabelRef($newCheckupReportId, $reportLabel->id);
         }
     }
     $ticketId = NfsAuditClient::getInstance()->getMaxTaskTicketId($checkupReport->getUser()->id, 'User', 'CheckupReport');
     $response->setRedirect($response->router->urlfor("checkup/nextcheckupanswersheet", array('ticketId' => $ticketId)));
 }