新增门诊医生站取消接诊功能
This commit is contained in:
@@ -52,6 +52,14 @@ public interface IDoctorStationMainAppService {
|
||||
*/
|
||||
R<?> completeEncounter(Long encounterId);
|
||||
|
||||
/**
|
||||
* 取消完成
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
R<?> cancelEncounter(Long encounterId);
|
||||
|
||||
/**
|
||||
* 查询处方号列表信息
|
||||
*
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.openhis.web.doctorstation.appservice.impl;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.openhis.web.doctorstation.appservice.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@@ -25,7 +24,6 @@ import com.openhis.administration.service.IEncounterParticipantService;
|
||||
import com.openhis.common.enums.*;
|
||||
import com.openhis.common.utils.EnumUtils;
|
||||
import com.openhis.common.utils.HisQueryUtils;
|
||||
import com.openhis.web.doctorstation.appservice.IDoctorStationMainAppService;
|
||||
import com.openhis.web.doctorstation.dto.PatientInfoDto;
|
||||
import com.openhis.web.doctorstation.dto.PrescriptionInfoBaseDto;
|
||||
import com.openhis.web.doctorstation.dto.PrescriptionInfoDetailDto;
|
||||
@@ -46,6 +44,17 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
@Resource
|
||||
IEncounterParticipantService iEncounterParticipantService;
|
||||
|
||||
@Resource
|
||||
IDoctorStationAdviceAppService iDoctorStationAdviceAppService;
|
||||
|
||||
@Resource
|
||||
IDoctorStationEmrAppService iDoctorStationEmrAppService;
|
||||
|
||||
@Resource
|
||||
IDoctorStationDiagnosisAppService iDoctorStationDiagnosisAppService;
|
||||
|
||||
@Resource
|
||||
IDoctorStationChineseMedicalAppService iDoctorStationChineseMedicalAppService;
|
||||
/**
|
||||
* 查询就诊患者信息
|
||||
*
|
||||
@@ -154,6 +163,45 @@ public class DoctorStationMainAppServiceImpl implements IDoctorStationMainAppSer
|
||||
return update > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消接诊
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public R<?> cancelEncounter(Long encounterId) {
|
||||
//1.判断是否已经产生业务,如医生已经开有病历、处方、诊断、检验检查或相关项目已收费、执行等,
|
||||
//如果有则提示:需要医生删除、作废、退费才能【取消接诊】。
|
||||
//1.1病历
|
||||
Object emrDetailResult = iDoctorStationEmrAppService.getEmrDetail(encounterId).getData();
|
||||
|
||||
//1.2诊断
|
||||
Object diagnosisResult = iDoctorStationDiagnosisAppService.getEncounterDiagnosis(encounterId).getData();
|
||||
|
||||
//1.3处方
|
||||
Object adviceResult = iDoctorStationAdviceAppService.getRequestBaseInfo(encounterId).getData();
|
||||
|
||||
//1.4中医诊断、处方
|
||||
Map<?,?> tcmDiagnosisResult = (Map<?,?>) iDoctorStationChineseMedicalAppService.getTcmEncounterDiagnosis(encounterId).getData();
|
||||
Object symptom = tcmDiagnosisResult.get("symptom");
|
||||
Object illness = tcmDiagnosisResult.get("illness");
|
||||
Object tcmPrescriptionResult = iDoctorStationChineseMedicalAppService.getTcmRequestBaseInfo(encounterId).getData();
|
||||
|
||||
boolean isEmpty = ObjectUtil.isAllEmpty(emrDetailResult, diagnosisResult, adviceResult, symptom,illness, tcmPrescriptionResult);
|
||||
|
||||
if (!isEmpty) {
|
||||
return R.fail("已产生业务数据,无法取消,请删除相关业务数据!");
|
||||
}
|
||||
|
||||
//2.取消接诊,患者重新回到患者队列待诊中
|
||||
int update = encounterMapper.update(null,
|
||||
new LambdaUpdateWrapper<Encounter>().eq(Encounter::getId, encounterId)
|
||||
.set(Encounter::getStatusEnum, EncounterStatus.PLANNED.getValue())
|
||||
.set(Encounter::getSubjectStatusEnum, EncounterSubjectStatus.TRIAGED.getValue()));
|
||||
return update > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方号列表信息
|
||||
*
|
||||
|
||||
@@ -92,6 +92,17 @@ public class DoctorStationMainController {
|
||||
return iDoctorStationMainAppService.completeEncounter(encounterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消接诊
|
||||
*
|
||||
* @param encounterId 就诊id
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping(value = "/cancel-encounter")
|
||||
public R<?> cancelEncounter(@RequestParam Long encounterId) {
|
||||
return iDoctorStationMainAppService.cancelEncounter(encounterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询处方号列表信息
|
||||
*
|
||||
|
||||
@@ -63,6 +63,16 @@ export function completeEncounter(encounterId) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消接诊
|
||||
*/
|
||||
export function cancelEncounter(encounterId) {
|
||||
return request({
|
||||
url: '/doctor-station/main/cancel-encounter?encounterId=' + encounterId,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存病历
|
||||
*/
|
||||
|
||||
@@ -127,6 +127,13 @@
|
||||
>
|
||||
办理住院
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click.stop="handleCancelEncounter"
|
||||
>
|
||||
取消接诊
|
||||
</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
@@ -207,6 +214,7 @@ import {
|
||||
leaveEncounter,
|
||||
completeEncounter,
|
||||
getEnPrescriptionInfo,
|
||||
cancelEncounter,
|
||||
getEmrHistoryList
|
||||
} from './components/api.js';
|
||||
import prescriptionlist from './components/prescription/prescriptionlist.vue';
|
||||
@@ -481,6 +489,30 @@ function handleReceive(row) {
|
||||
function openDrawer() {
|
||||
drawer.value = true;
|
||||
}
|
||||
|
||||
function handleCancelEncounter(){
|
||||
proxy.$modal.confirm('您确定要取消病人本次的就诊记录吗?','提示信息',{
|
||||
confirmButtonText: '是(Y)',
|
||||
cancelButtonText: '否(N)',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
//调用取消接诊API
|
||||
cancelEncounter(patientInfo.value.encounterId).then((res) => {
|
||||
if (res.code == 200) {
|
||||
proxy.$modal.msgSuccess('取消接诊成功');
|
||||
patientInfo.value = {};
|
||||
getPatientList();
|
||||
}
|
||||
}).catch((error) => {
|
||||
proxy.$modal.confirm('该病人本次就诊已经有业务产生,不能取消接诊!','提示信息',{
|
||||
confirmButtonText: '是(Y)',
|
||||
type: 'warning'
|
||||
});
|
||||
});
|
||||
}).catch(() => {
|
||||
// 用户取消操作
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user