|
@@ -548,8 +548,6 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
o.setPatientGender(f.getPatientGender());
|
|
o.setPatientGender(f.getPatientGender());
|
|
|
o.setPatientAge(f.getPatientAge());
|
|
o.setPatientAge(f.getPatientAge());
|
|
|
o.setOutpatientId(f.getPrescribeCode());
|
|
o.setOutpatientId(f.getPrescribeCode());
|
|
|
- o.setUrl(f.getUrl());
|
|
|
|
|
- o.setDrugDoctorUrl(f.getDrugDoctorSignUrl());
|
|
|
|
|
if (order != null) {
|
|
if (order != null) {
|
|
|
o.setBedId(order.getDeptName());
|
|
o.setBedId(order.getDeptName());
|
|
|
} else {
|
|
} else {
|
|
@@ -575,11 +573,16 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
// 在这里添加处方药品列表的值
|
|
// 在这里添加处方药品列表的值
|
|
|
List<FsPrescribeDrug> PrescribeDrugList=filterNonDrugPrescribe(list);
|
|
List<FsPrescribeDrug> PrescribeDrugList=filterNonDrugPrescribe(list);
|
|
|
o.setPrescribeDrug(PrescribeDrugList);
|
|
o.setPrescribeDrug(PrescribeDrugList);
|
|
|
|
|
+ //医生签名
|
|
|
|
|
+ o.setUrl(f.getUrl());
|
|
|
|
|
+ //药师签名
|
|
|
|
|
+ o.setDrugDoctorUrl(f.getDrugDoctorSignUrl());
|
|
|
|
|
+ //医生名称
|
|
|
o.setDoctorName(f.getDoctorName());
|
|
o.setDoctorName(f.getDoctorName());
|
|
|
|
|
+ //审核药师
|
|
|
o.setAuditDoctor(f.getDoctorDrugName());
|
|
o.setAuditDoctor(f.getDoctorDrugName());
|
|
|
o.setDispatcher("");
|
|
o.setDispatcher("");
|
|
|
o.setCheckDoctor("");
|
|
o.setCheckDoctor("");
|
|
|
- o.setDoctorName(f.getDoctorName());
|
|
|
|
|
o.setTelPhone(f.getPatientTel());
|
|
o.setTelPhone(f.getPatientTel());
|
|
|
FsDoctor fsDoctor = doctorMapper.selectFsDoctorByDoctorId(f.getDoctorId());
|
|
FsDoctor fsDoctor = doctorMapper.selectFsDoctorByDoctorId(f.getDoctorId());
|
|
|
Asserts.notNull(fsDoctor,String.format("医生 %s 未找到!",f.getDoctorId()));
|
|
Asserts.notNull(fsDoctor,String.format("医生 %s 未找到!",f.getDoctorId()));
|
|
@@ -598,6 +601,75 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
}
|
|
}
|
|
|
return f.getPrescribeImgUrl();
|
|
return f.getPrescribeImgUrl();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //更新处方单图片
|
|
|
|
|
+ private void prescriptionPicUpdate(PrescribeXyImgParam param,Long prescribeId){
|
|
|
|
|
+ FsPrescribeVO prescribeVO = fsPrescribeMapper.selectFsPrescribeByPrescribeIdVO(prescribeId);
|
|
|
|
|
+ Asserts.notNull(prescribeVO,String.format("处方 %d 未找到!",prescribeId));
|
|
|
|
|
+
|
|
|
|
|
+ FsStoreOrder fsStoreOrder = storeOrderService.selectFsStoreOrderByOrderId(prescribeVO.getStoreOrderId());
|
|
|
|
|
+ FsInquiryOrderVO order = fsInquiryOrderMapper.selectFsInquiryOrderVOByOrderId(prescribeVO.getInquiryOrderId());
|
|
|
|
|
+ if (StringUtils.isNotBlank(prescribeVO.getPrescribeImgUrl())) {
|
|
|
|
|
+ FsPrescribeDrug d = new FsPrescribeDrug();
|
|
|
|
|
+ d.setPrescribeId(prescribeVO.getPrescribeId());
|
|
|
|
|
+ List<FsPrescribeDrug> list = fsPrescribeDrugMapper.selectFsPrescribeDrugList(d);
|
|
|
|
|
+
|
|
|
|
|
+ if (CollectionUtils.isEmpty(list)) {
|
|
|
|
|
+ throw new IllegalArgumentException(String.format("处方单 %d 对应药品为空!",prescribeId));
|
|
|
|
|
+ }
|
|
|
|
|
+ PrescribeXyImgParam o = new PrescribeXyImgParam();
|
|
|
|
|
+ o.setStatus(fsStoreOrder.getStatus());
|
|
|
|
|
+ o.setTotalPrice(fsStoreOrder.getPayPrice());
|
|
|
|
|
+ o.setTime(prescribeVO.getCreateTime());
|
|
|
|
|
+ o.setPrescribeId(prescribeVO.getPrescribeCode());
|
|
|
|
|
+ o.setPatientName(prescribeVO.getPatientName());
|
|
|
|
|
+ o.setPatientGender(prescribeVO.getPatientGender());
|
|
|
|
|
+ o.setPatientAge(prescribeVO.getPatientAge());
|
|
|
|
|
+ o.setOutpatientId(prescribeVO.getPrescribeCode());
|
|
|
|
|
+ if (order != null) {
|
|
|
|
|
+ o.setBedId(order.getDeptName());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ o.setBedId("中医科");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isNotBlank(prescribeVO.getRemark())){
|
|
|
|
|
+ o.setRemark(prescribeVO.getRemark());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ o.setRemark("请按照用药说明书服用药品,如有不适,请及时就医!");
|
|
|
|
|
+ }
|
|
|
|
|
+ o.setHistoryAllergic(prescribeVO.getHistoryAllergic());
|
|
|
|
|
+ o.setDiagnose(prescribeVO.getDiagnose());
|
|
|
|
|
+ // 在这里添加处方药品列表的值
|
|
|
|
|
+ List<FsPrescribeDrug> PrescribeDrugList=filterNonDrugPrescribe(list);
|
|
|
|
|
+ o.setPrescribeDrug(PrescribeDrugList);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //医生名称
|
|
|
|
|
+ o.setDoctorName(prescribeVO.getDoctorName());
|
|
|
|
|
+ //审核药师
|
|
|
|
|
+ o.setAuditDoctor(prescribeVO.getDoctorDrugName());
|
|
|
|
|
+ o.setDispatcher("");
|
|
|
|
|
+ o.setCheckDoctor("");
|
|
|
|
|
+ o.setTelPhone(prescribeVO.getPatientTel());
|
|
|
|
|
+ FsDoctor fsDoctor = doctorMapper.selectFsDoctorByDoctorId(prescribeVO.getDoctorId());
|
|
|
|
|
+ Asserts.notNull(fsDoctor,String.format("医生 %s 未找到!",prescribeVO.getDoctorId()));
|
|
|
|
|
+ o.setDoctorNo(fsDoctor.getCertificateCode());
|
|
|
|
|
+ o.setDoctorTitle(fsDoctor.getPosition());
|
|
|
|
|
+ //TODO 在医生确认开放及以后阶段可赋值 医生签名
|
|
|
|
|
+ param.setUrl(prescribeVO.getUrl());
|
|
|
|
|
+ //TODO 在药师审核及以后阶段可赋值 药师签名
|
|
|
|
|
+ param.setDrugDoctorUrl(prescribeVO.getDrugDoctorSignUrl());
|
|
|
|
|
+ String url = prescriptionImageService.generatePrescriptionImage(o);
|
|
|
|
|
+ FsPrescribe fsPrescribe = new FsPrescribe();
|
|
|
|
|
+ fsPrescribe.setPrescribeImgUrl(url);
|
|
|
|
|
+ fsPrescribe.setPrescribeId(prescribeVO.getPrescribeId());
|
|
|
|
|
+ fsPrescribeMapper.updateFsPrescribe(fsPrescribe);
|
|
|
|
|
+ prescribeVO.setPrescribeImgUrl(url);
|
|
|
|
|
+
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.info("处方 {} 对应处方单已经被生成!",prescribeId);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
/**
|
|
/**
|
|
|
* 根据产品最新状态过滤处方单药品列表。
|
|
* 根据产品最新状态过滤处方单药品列表。
|
|
|
* <p>
|
|
* <p>
|
|
@@ -1239,7 +1311,7 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
//确认完成后删除缓存
|
|
//确认完成后删除缓存
|
|
|
redisCache.deleteObject("collectionPrescribeId:" + fsPrescribe.getPrescribeId());
|
|
redisCache.deleteObject("collectionPrescribeId:" + fsPrescribe.getPrescribeId());
|
|
|
//同步用户信息采集进度
|
|
//同步用户信息采集进度
|
|
|
- FsUserInformationCollectionSchedule schedule = scheduleMapper.selectFsUserInformationCollectionScheduleByCollectionId(collection.getId());
|
|
|
|
|
|
|
+ FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleByCollectionId(collection.getId());
|
|
|
if (schedule != null){
|
|
if (schedule != null){
|
|
|
//"待药师审核“节点
|
|
//"待药师审核“节点
|
|
|
schedule.setCurrentStep(PrescriptionTaskStepEnum.WAITING_PHARMACIST_REVIEW.getCode());
|
|
schedule.setCurrentStep(PrescriptionTaskStepEnum.WAITING_PHARMACIST_REVIEW.getCode());
|
|
@@ -1254,7 +1326,7 @@ public class FsPrescribeServiceImpl implements IFsPrescribeService
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 医生确认后生成处方单
|
|
|
|
|
|
|
+ //TODO 医生确认后生成处方单
|
|
|
PrescriptionTaskRecord record = new PrescriptionTaskRecord();
|
|
PrescriptionTaskRecord record = new PrescriptionTaskRecord();
|
|
|
record.setPrescribeId(param.getPrescribeId());
|
|
record.setPrescribeId(param.getPrescribeId());
|
|
|
record.setCreateTime(LocalDateTime.now());
|
|
record.setCreateTime(LocalDateTime.now());
|