|
|
|
@ -14,6 +14,7 @@ import com.supervision.manage.pojo.vo.MedicalRecManageVO;
|
|
|
|
|
import com.supervision.manage.pojo.vo.MedicalRecQaVO;
|
|
|
|
|
import com.supervision.manage.service.*;
|
|
|
|
|
import com.supervision.model.*;
|
|
|
|
|
import com.supervision.model.Process;
|
|
|
|
|
import com.supervision.service.*;
|
|
|
|
|
import com.supervision.vo.manage.DiseaseAncillaryResVo;
|
|
|
|
|
import com.supervision.vo.manage.DiseasePhysicalResVo;
|
|
|
|
@ -66,6 +67,8 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
|
|
|
|
|
private final MaterialLibraryService materialLibraryService;
|
|
|
|
|
|
|
|
|
|
private final ProcessService processService;
|
|
|
|
|
|
|
|
|
|
public List<Disease> queryDiseaseListByDropList() {
|
|
|
|
|
return diseaseService.lambdaQuery().list();
|
|
|
|
|
}
|
|
|
|
@ -307,6 +310,14 @@ public class MedicalRecManageServiceImpl implements MedicalRecManageService {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void deleteMedicalRec(String id) {
|
|
|
|
|
// 删除前校验
|
|
|
|
|
MedicalRec medicalRec = medicalRecService.lambdaQuery().eq(MedicalRec::getId, id)
|
|
|
|
|
.oneOpt().orElseThrow(() -> new BusinessException("未找到病历"));
|
|
|
|
|
Assert.isFalse(Integer.valueOf(2).equals(medicalRec.getStatus()), "该病历已上线,不能删除");
|
|
|
|
|
Long count = processService.lambdaQuery().eq(Process::getMedicalRecId, id).count();
|
|
|
|
|
Assert.isFalse(count > 0, "该病历已关联问诊,不能删除");
|
|
|
|
|
|
|
|
|
|
// 删除操作
|
|
|
|
|
medicalRecService.removeById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|