|
@@ -63,6 +63,8 @@ public class MzPharmacyController {
|
|
|
private DispensingWindowsService dispensingWindowsService;
|
|
|
@Autowired
|
|
|
private YpBaseYfService ypBaseYfService;
|
|
|
+ @Autowired
|
|
|
+ private MzBlRecordService mzBlRecordService;
|
|
|
/**
|
|
|
* 查询处方信息
|
|
|
*
|
|
@@ -379,7 +381,12 @@ public class MzPharmacyController {
|
|
|
List<MzSendMedicineVo> cfxxList = mzPharmacyService.getFyclPrescriptionDetail(mzChargeDetail);
|
|
|
if (cfxxList.size() > 0) {
|
|
|
MzVisitTable visit = mzVisitTableService.queryByPatientIdAndTimes(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes());
|
|
|
- cfxxList.get(0).setIcdText(visit.getIcdText());
|
|
|
+ if(StringUtils.isBlank(visit.getIcdText())){
|
|
|
+ MzBlRecord mzBlRecord = mzBlRecordService.queryMzBlRecordByPatientIdAndTimes(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes());
|
|
|
+ cfxxList.get(0).setIcdText(mzBlRecord.getTentativeDiagnosis());
|
|
|
+ }else{
|
|
|
+ cfxxList.get(0).setIcdText(visit.getIcdText());
|
|
|
+ }
|
|
|
String warnDeptName = zdUnitCodeService.queryDeptNameByIdInCache(cfxxList.get(0).getWarnDept());
|
|
|
cfxxList.get(0).setWarnDeptName(warnDeptName);
|
|
|
Employee employee = employeeService.queryByUserCode(cfxxList.get(0).getDoctorCode());
|
|
@@ -591,6 +598,12 @@ public class MzPharmacyController {
|
|
|
Map<String, Object> printMap = new HashMap<>();
|
|
|
MzPatientMi mzPatientMi = mzPatientMiService.queryByPatientId(mzChargeDetail.getPatientId());
|
|
|
MzVisitTable visit = mzVisitTableService.queryByPatientIdAndTimes(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes());
|
|
|
+ if(StringUtils.isBlank(visit.getIcdText())){
|
|
|
+ MzBlRecord mzBlRecord = mzBlRecordService.queryMzBlRecordByPatientIdAndTimes(mzChargeDetail.getPatientId(), mzChargeDetail.getTimes());
|
|
|
+ printMap.put("icdText", mzBlRecord.getTentativeDiagnosis());//诊断
|
|
|
+ }else{
|
|
|
+ printMap.put("icdText", visit.getIcdText());
|
|
|
+ }
|
|
|
printMap.put("patientId", mzChargeDetail.getPatientId());
|
|
|
printMap.put("ybCardNo", mzPatientMi.getYbCardNo());
|
|
|
printMap.put("icCardNo", mzPatientMi.getIcCardNo());
|
|
@@ -601,7 +614,6 @@ public class MzPharmacyController {
|
|
|
printMap.put("socialNo", mzPatientMi.getSocialNo());
|
|
|
printMap.put("phoneNo", mzPatientMi.getPhoneNo());
|
|
|
printMap.put("address", mzPatientMi.getAddress());
|
|
|
- printMap.put("icdText", visit.getIcdText());//诊断
|
|
|
mzChargeDetail.setBillItemCode("TC");
|
|
|
List<MzChargeDetail> mzChargeDetails = mzChargeDetailService.getMzChargeDetailList(mzChargeDetail);
|
|
|
if (mzChargeDetails.size() > 0) {
|
|
@@ -1031,7 +1043,6 @@ public class MzPharmacyController {
|
|
|
|
|
|
/**
|
|
|
* 放射科发药处理
|
|
|
- *
|
|
|
* @return
|
|
|
*/
|
|
|
@UserLoginToken
|
|
@@ -1141,7 +1152,8 @@ public class MzPharmacyController {
|
|
|
pharmacyCellVo.setPatientId(pm.getPatientId());
|
|
|
}
|
|
|
List<HashMap> lineUpList = pharmacyCellVo.getLineUpList()==null?new ArrayList<>():pharmacyCellVo.getLineUpList();
|
|
|
- if(mzPharmacyService.getIncludeWfyPrescription(pharmacyCellVo.getPatientId()) > 0){
|
|
|
+ boolean bool = lineUpList.stream().anyMatch(m-> m.get("patient_id").equals(pharmacyCellVo.getPatientId()));
|
|
|
+ if(!bool && mzPharmacyService.getIncludeWfyPrescription(pharmacyCellVo.getPatientId()) > 0){
|
|
|
int lineUp = 1;
|
|
|
if(null != lineUpList && lineUpList.size() != 0){
|
|
|
lineUp = (Integer) lineUpList.get(lineUpList.size()-1).get("lineUp") + 1;
|
|
@@ -1155,7 +1167,7 @@ public class MzPharmacyController {
|
|
|
resultMap.put("message", "排队成功");
|
|
|
}else{
|
|
|
resultMap.put("code", -1);
|
|
|
- resultMap.put("message", "排队失败,未找到待取药的处方");
|
|
|
+ resultMap.put("message", bool?"排队成功,请勿重复排队":"排队失败,未找到待取药的处方");
|
|
|
}
|
|
|
if(lineUpList.size() != 0){
|
|
|
dispensingSocketService.sendToMedicineAndSendMedicine(lineUpList, SocketSenderTypeEnum.LINE_UP.code);
|