|  | @ -428,11 +428,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 //药品信息
 |  |                 //药品信息
 | 
												
													
														
															|  |                 List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
 |  |                 List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
 | 
												
													
														
															|  |                 vo.setInfoVOs(convertToModels(prescriptionInfoDao.findByPrescriptionId(vo.getId()),infoVOs,WlyyPrescriptionInfoVO.class));
 |  | 
 | 
												
													
														
															|  | 
 |  |                 vo.setInfoVOs(convertToModels(prescriptionInfoDao.findByPrescriptionId(vo.getId(),1),infoVOs,WlyyPrescriptionInfoVO.class));
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                 //检查检验信息
 |  |                 //检查检验信息
 | 
												
													
														
															|  |                 List<WlyyInspectionVO> inspectionVOs = new ArrayList<>();
 |  |                 List<WlyyInspectionVO> inspectionVOs = new ArrayList<>();
 | 
												
													
														
															|  |                 vo.setInspectionVOs(convertToModels(wlyyInspectionDao.findByPrescriptionId(vo.getId()),inspectionVOs,WlyyInspectionVO.class));
 |  | 
 | 
												
													
														
															|  | 
 |  |                 vo.setInspectionVOs(convertToModels(wlyyInspectionDao.findByPrescriptionId(vo.getId(),1),inspectionVOs,WlyyInspectionVO.class));
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         rs.put("prescriptions",prescriptionVOs);
 |  |         rs.put("prescriptions",prescriptionVOs);
 | 
												
											
												
													
														
															|  | @ -445,15 +445,18 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             rs.put("expressage",null);
 |  |             rs.put("expressage",null);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         //物流配送新
 |  | 
 | 
												
													
														
															|  |         List<WlyyPrescriptionExpressageLogDO>  expressageLogDOs = prescriptionExpressageLogDao.queryByOutpatientIdOrderByCreateTimeDesc(outpatientId);
 |  | 
 | 
												
													
														
															|  |         List<WlyyPrescriptionExpressageLogVO> expressageLogVOs = new ArrayList<>();
 |  | 
 | 
												
													
														
															|  |         if(expressageLogDOs!=null&&expressageLogDOs.size()>0){
 |  | 
 | 
												
													
														
															|  |             rs.put("expressageLogs",convertToModels(expressageLogDOs,expressageLogVOs, WlyyPrescriptionExpressageLogVO.class));
 |  | 
 | 
												
													
														
															|  |         }else{
 |  | 
 | 
												
													
														
															|  |             rs.put("expressageLogs",null);
 |  | 
 | 
												
													
														
															|  | 
 |  |         if (!wechatId.equalsIgnoreCase("xm_ykyy_wx")){
 | 
												
													
														
															|  | 
 |  |             //物流配送新
 | 
												
													
														
															|  | 
 |  |             List<WlyyPrescriptionExpressageLogDO>  expressageLogDOs = prescriptionExpressageLogDao.queryByOutpatientIdOrderByCreateTimeDesc(outpatientId);
 | 
												
													
														
															|  | 
 |  |             List<WlyyPrescriptionExpressageLogVO> expressageLogVOs = new ArrayList<>();
 | 
												
													
														
															|  | 
 |  |             if(expressageLogDOs!=null&&expressageLogDOs.size()>0){
 | 
												
													
														
															|  | 
 |  |                 rs.put("expressageLogs",convertToModels(expressageLogDOs,expressageLogVOs, WlyyPrescriptionExpressageLogVO.class));
 | 
												
													
														
															|  | 
 |  |             }else{
 | 
												
													
														
															|  | 
 |  |                 rs.put("expressageLogs",null);
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         //预约记录
 |  |         //预约记录
 | 
												
													
														
															|  |         List<WlyyPatientRegisterTimeDO> timeDOs = patientRegisterTimeDao.findByOutpatientId(outpatientId);
 |  |         List<WlyyPatientRegisterTimeDO> timeDOs = patientRegisterTimeDao.findByOutpatientId(outpatientId);
 | 
												
													
														
															|  |         if(timeDOs!=null&&timeDOs.size()>0){
 |  |         if(timeDOs!=null&&timeDOs.size()>0){
 | 
												
											
												
													
														
															|  | @ -568,7 +571,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             for(WlyyPrescriptionVO vo:list){
 |  |             for(WlyyPrescriptionVO vo:list){
 | 
												
													
														
															|  |                 vo.setDiagnosisVOs(findDiagnosisById(vo.getId()));
 |  |                 vo.setDiagnosisVOs(findDiagnosisById(vo.getId()));
 | 
												
													
														
															|  |                 List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
 |  |                 List<WlyyPrescriptionInfoVO> infoVOs = new ArrayList<>();
 | 
												
													
														
															|  |                 vo.setInfoVOs(convertToModels(prescriptionInfoDao.findByPrescriptionId(vo.getId()),infoVOs,WlyyPrescriptionInfoVO.class));
 |  | 
 | 
												
													
														
															|  | 
 |  |                 vo.setInfoVOs(convertToModels(prescriptionInfoDao.findByPrescriptionId(vo.getId(),1),infoVOs,WlyyPrescriptionInfoVO.class));
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -576,7 +579,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     public List<WlyyPrescriptionDiagnosisVO> findDiagnosisById(String id){
 |  |     public List<WlyyPrescriptionDiagnosisVO> findDiagnosisById(String id){
 | 
												
													
														
															|  |         List<WlyyPrescriptionDiagnosisDO> list = prescriptionDiagnosisDao.findByPrescriptionId(id);
 |  | 
 | 
												
													
														
															|  | 
 |  |         List<WlyyPrescriptionDiagnosisDO> list = prescriptionDiagnosisDao.findByPrescriptionId(id,1);
 | 
												
													
														
															|  |         List<WlyyPrescriptionDiagnosisVO> rs = new ArrayList<>();
 |  |         List<WlyyPrescriptionDiagnosisVO> rs = new ArrayList<>();
 | 
												
													
														
															|  |         if(list!=null&&list.size()>0){
 |  |         if(list!=null&&list.size()>0){
 | 
												
													
														
															|  |             return convertToModels(list,rs,WlyyPrescriptionDiagnosisVO.class);
 |  |             return convertToModels(list,rs,WlyyPrescriptionDiagnosisVO.class);
 | 
												
											
												
													
														
															|  | @ -608,7 +611,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         rs.put("diagnosis",findDiagnosisById(wlyyPrescriptionDO.getId()));
 |  |         rs.put("diagnosis",findDiagnosisById(wlyyPrescriptionDO.getId()));
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         //药品信息
 |  |         //药品信息
 | 
												
													
														
															|  |         rs.put("infos",prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId()));
 |  | 
 | 
												
													
														
															|  | 
 |  |         rs.put("infos",prescriptionInfoDao.findByPrescriptionId(wlyyPrescriptionDO.getId(),1));
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         return rs;
 |  |         return rs;
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
											
												
													
														
															|  | @ -1851,10 +1854,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         //============================下诊断==============================================================
 |  |         //============================下诊断==============================================================
 | 
												
													
														
															|  |         //删除之前诊断
 |  |         //删除之前诊断
 | 
												
													
														
															|  |        /* List<WlyyPrescriptionDiagnosisDO> ds = prescriptionDiagnosisDao.findByPrescriptionId(prescription.getId());
 |  | 
 | 
												
													
														
															|  | 
 |  |         List<WlyyPrescriptionDiagnosisDO> ds = prescriptionDiagnosisDao.findByPrescriptionId(prescription.getId(),1);
 | 
												
													
														
															|  |         if (ds != null && ds.size() > 0) {
 |  |         if (ds != null && ds.size() > 0) {
 | 
												
													
														
															|  |             prescriptionDiagnosisDao.delete(ds);
 |  | 
 | 
												
													
														
															|  |         }*/
 |  | 
 | 
												
													
														
															|  | 
 |  |             prescriptionDiagnosisDao.deleteByPrescriptionId(prescription.getId());
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
 |  |         List<WlyyPrescriptionDiagnosisDO> diagnosisDOs = (List<WlyyPrescriptionDiagnosisDO>) com.alibaba.fastjson.JSONArray.parseArray(diagnosisJson, WlyyPrescriptionDiagnosisDO.class);
 | 
												
													
														
															|  |         String Icd10 = "";
 |  |         String Icd10 = "";
 | 
												
											
												
													
														
															|  | @ -1867,6 +1870,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 Icd10 += diagnosisDO.getCode() + ",";
 |  |                 Icd10 += diagnosisDO.getCode() + ",";
 | 
												
													
														
															|  |                 Icd10Name += diagnosisDO.getName() + ",";
 |  |                 Icd10Name += diagnosisDO.getName() + ",";
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  | 
 |  |             diagnosisDO.setDel(1);
 | 
												
													
														
															|  |             diagnosisDO.setPrescriptionId(prescription.getId());
 |  |             diagnosisDO.setPrescriptionId(prescription.getId());
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         prescriptionDiagnosisDao.save(diagnosisDOs);
 |  |         prescriptionDiagnosisDao.save(diagnosisDOs);
 | 
												
											
												
													
														
															|  | @ -1892,10 +1896,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             //===================药品操作======================================================
 |  |             //===================药品操作======================================================
 | 
												
													
														
															|  |             // 删除原有药品信息
 |  |             // 删除原有药品信息
 | 
												
													
														
															|  |             /*List<WlyyPrescriptionInfoDO> oldInfos = prescriptionInfoDao.findByPrescriptionId(prescription.getId());
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<WlyyPrescriptionInfoDO> oldInfos = prescriptionInfoDao.findByPrescriptionId(prescription.getId(),1);
 | 
												
													
														
															|  |             if (oldInfos != null && oldInfos.size() > 0) {
 |  |             if (oldInfos != null && oldInfos.size() > 0) {
 | 
												
													
														
															|  |                 prescriptionInfoDao.delete(oldInfos);
 |  | 
 | 
												
													
														
															|  |             }*/
 |  | 
 | 
												
													
														
															|  | 
 |  |                 prescriptionInfoDao.deleteByPrescriptionId(prescription.getId());
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             //存储药品,构建his开方入参
 |  |             //存储药品,构建his开方入参
 | 
												
													
														
															|  |             if (StringUtils.isNotBlank(infoJsons)) {
 |  |             if (StringUtils.isNotBlank(infoJsons)) {
 | 
												
											
												
													
														
															|  | @ -1923,15 +1927,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             //=====================检查检验=======================================================================
 |  |             //=====================检查检验=======================================================================
 | 
												
													
														
															|  |             //存储检查检验,构建his开方入参
 |  |             //存储检查检验,构建his开方入参
 | 
												
													
														
															|  |             //删除之前检查检验
 |  |             //删除之前检查检验
 | 
												
													
														
															|  |             /*List<WlyyInspectionDO> inspectionDels = wlyyInspectionDao.findByOutpatientId(outPatientId);
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<WlyyInspectionDO> inspectionDels = wlyyInspectionDao.findByOutpatientId(outPatientId);
 | 
												
													
														
															|  |             if (inspectionDels != null && inspectionDels.size() > 0) {
 |  |             if (inspectionDels != null && inspectionDels.size() > 0) {
 | 
												
													
														
															|  |                 wlyyInspectionDao.delete(inspectionDels);
 |  | 
 | 
												
													
														
															|  |             }*/
 |  | 
 | 
												
													
														
															|  | 
 |  |                 wlyyInspectionDao.deleteByPrescriptionId(prescription.getId());
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             if (StringUtils.isNotBlank(inspectionJson)) {
 |  |             if (StringUtils.isNotBlank(inspectionJson)) {
 | 
												
													
														
															|  |                 List<WlyyInspectionDO> inspections = (List<WlyyInspectionDO>) com.alibaba.fastjson.JSONArray.parseArray(inspectionJson, WlyyInspectionDO.class);
 |  |                 List<WlyyInspectionDO> inspections = (List<WlyyInspectionDO>) com.alibaba.fastjson.JSONArray.parseArray(inspectionJson, WlyyInspectionDO.class);
 | 
												
													
														
															|  |                 for (WlyyInspectionDO ins : inspections) {
 |  |                 for (WlyyInspectionDO ins : inspections) {
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |                     ins.setDel(1);
 | 
												
													
														
															|  |                     ins.setCreateTime(new Date());
 |  |                     ins.setCreateTime(new Date());
 | 
												
													
														
															|  |                     ins.setPrescriptionId(prescription.getId());
 |  |                     ins.setPrescriptionId(prescription.getId());
 | 
												
													
														
															|  |                     ins.setOutpatientId(outPatientId);
 |  |                     ins.setOutpatientId(outPatientId);
 | 
												
											
												
													
														
															|  | @ -1954,6 +1958,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 savePrescriptionCheck(prescription.getDoctor(),"开具处方",5,prescription.getId());
 |  |                 savePrescriptionCheck(prescription.getDoctor(),"开具处方",5,prescription.getId());
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             if (prescriptionDOs != null && prescriptionDOs.size() > 0) {
 | 
												
													
														
															|  | 
 |  |                 savePrescriptionCheck(prescription.getDoctor(),"处方修改",3,prescription.getId());
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             //=====================保存日志 end=========================================================
 |  |             //=====================保存日志 end=========================================================
 | 
												
													
														
															|  |             //保存费用
 |  |             //保存费用
 | 
												
													
														
															|  |             prescriptionDao.save(prescription);
 |  |             prescriptionDao.save(prescription);
 | 
												
											
												
													
														
															|  | @ -1981,7 +1989,10 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 //上传his开方
 |  |                 //上传his开方
 | 
												
													
														
															|  |                 //sendHisDiagnosis(jsonData, outpatientDO, prescription)
 |  |                 //sendHisDiagnosis(jsonData, outpatientDO, prescription)
 | 
												
													
														
															|  |                 //zsSynHis(prescription.getId());
 |  |                 //zsSynHis(prescription.getId());
 | 
												
													
														
															|  |                 return null;
 |  | 
 | 
												
													
														
															|  | 
 |  |                 Map<String, Object> result1 = new HashedMap();
 | 
												
													
														
															|  | 
 |  |                 result1.put("code", 1);
 | 
												
													
														
															|  | 
 |  |                 result1.put("mes", "开方提交成功");
 | 
												
													
														
															|  | 
 |  |                 return result1;
 | 
												
													
														
															|  |             }else {
 |  |             }else {
 | 
												
													
														
															|  |                 result.put("code", 1);
 |  |                 result.put("code", 1);
 | 
												
													
														
															|  |                 result.put("mes", "诊断完成");
 |  |                 result.put("mes", "诊断完成");
 | 
												
											
												
													
														
															|  | @ -2344,15 +2355,19 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         if (rstotal != null && rstotal.size() > 0) {
 |  |         if (rstotal != null && rstotal.size() > 0) {
 | 
												
													
														
															|  |             count = Long.parseLong(rstotal.get(0).get("total").toString()) ;
 |  |             count = Long.parseLong(rstotal.get(0).get("total").toString()) ;
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         String sql = "SELECT " +
 |  | 
 | 
												
													
														
															|  |                 " e.create_time AS createTime, " +
 |  | 
 | 
												
													
														
															|  |                 " e.`name`, " +
 |  | 
 | 
												
													
														
															|  |                 " e.oneself_pickup_flg AS oneselfPickupFlg, " +
 |  | 
 | 
												
													
														
															|  |                 " o.id AS outpatientId, " +
 |  | 
 | 
												
													
														
															|  |                 " o.icd10_name AS icd10Name, " +
 |  | 
 | 
												
													
														
															|  |                 " p.`status`, " +
 |  | 
 | 
												
													
														
															|  |                 " p.id AS prescriptionId ," +
 |  | 
 | 
												
													
														
															|  |                 " e.id AS expressageId" +
 |  | 
 | 
												
													
														
															|  | 
 |  |         String sql = "SELECT  " ;
 | 
												
													
														
															|  | 
 |  |         if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  | 
 |  |             sql =sql+  "to_char(e.create_time,'YYYY-MM-DD hh24:mi:ss')  AS \"createTime\",";
 | 
												
													
														
															|  | 
 |  |         }else{
 | 
												
													
														
															|  | 
 |  |             sql =sql+  "date_format(e.create_time,'%Y-%m-%d %H:%i:%S' )  AS \"createTime\",";
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |                 sql=sql+" e.name as \"name\", " +
 | 
												
													
														
															|  | 
 |  |                 " e.oneself_pickup_flg AS \"oneselfPickupFlg\", " +
 | 
												
													
														
															|  | 
 |  |                 " o.id AS \"outpatientId\", " +
 | 
												
													
														
															|  | 
 |  |                 " o.icd10_name AS \"icd10Name\", " +
 | 
												
													
														
															|  | 
 |  |                 " p.status as \"status\", " +
 | 
												
													
														
															|  | 
 |  |                 " p.id AS \"prescriptionId\" ," +
 | 
												
													
														
															|  | 
 |  |                 " e.id AS \"expressageId\"" +
 | 
												
													
														
															|  |                 " FROM " +
 |  |                 " FROM " +
 | 
												
													
														
															|  |                 " wlyy_outpatient o " +
 |  |                 " wlyy_outpatient o " +
 | 
												
													
														
															|  |                 " JOIN wlyy_prescription p ON p.outpatient_id = o.id " +
 |  |                 " JOIN wlyy_prescription p ON p.outpatient_id = o.id " +
 | 
												
											
												
													
														
															|  | @ -2370,25 +2385,27 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         if (StringUtils.isNotBlank(startTime)) {
 |  |         if (StringUtils.isNotBlank(startTime)) {
 | 
												
													
														
															|  |             if("xm_ykyy_wx".equals(wxId)){
 |  |             if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  |                 totalSql +=" and e.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 sql +=" and e.create_time >= to_date('" + startTime + " 00:00:00','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  |             }else {
 |  |             }else {
 | 
												
													
														
															|  |                 totalSql += " AND e.create_time >='" + startTime + " 00:00:00'";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 sql += " AND e.create_time >='" + startTime + " 00:00:00'";
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         if (StringUtils.isNotBlank(endTime)) {
 |  |         if (StringUtils.isNotBlank(endTime)) {
 | 
												
													
														
															|  |             if("xm_ykyy_wx".equals(wxId)){
 |  |             if("xm_ykyy_wx".equals(wxId)){
 | 
												
													
														
															|  |                 totalSql +=" and e.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 sql +=" and e.create_time <= to_date('" + endTime + " 23:59:59','YYYY-MM-DD HH24:MI:SS')";
 | 
												
													
														
															|  |             }else {
 |  |             }else {
 | 
												
													
														
															|  |                 totalSql += " AND e.create_time <='" + endTime + " 23:59:59'";
 |  | 
 | 
												
													
														
															|  | 
 |  |                 sql += " AND e.create_time <='" + endTime + " 23:59:59'";
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |  /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
 |  |  /*       sql += " LIMIT " + (page - 1) * size + "," + size + "";*/
 | 
												
													
														
															|  |         List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql,page,size);
 |  |         List<Map<String, Object>> list = hibenateUtils.createSQLQuery(sql,page,size);
 | 
												
													
														
															|  |         for (Map<String,Object> map:list){
 |  |         for (Map<String,Object> map:list){
 | 
												
													
														
															|  |             List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(map.get("prescriptionId").toString());
 |  | 
 | 
												
													
														
															|  |             map.put("info",wlyyPrescriptionInfoDOS);
 |  | 
 | 
												
													
														
															|  | 
 |  |             if (map.get("prescriptionId")!=null){
 | 
												
													
														
															|  | 
 |  |                 List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(map.get("prescriptionId").toString(),1);
 | 
												
													
														
															|  | 
 |  |                 map.put("info",wlyyPrescriptionInfoDOS);
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, size, count);
 |  |         return MixEnvelop.getSuccessListWithPage(BaseHospitalRequestMapping.Prescription.api_success, list, page, size, count);
 | 
												
											
												
													
														
															|  | @ -5318,7 +5335,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |      * @param status
 |  |      * @param status
 | 
												
													
														
															|  |      */
 |  |      */
 | 
												
													
														
															|  |     public void updateStatus(String prescriptionId,Integer status){
 |  |     public void updateStatus(String prescriptionId,Integer status){
 | 
												
													
														
															|  | 
 |  |         WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
 | 
												
													
														
															|  |         prescriptionDao.updateStatus(prescriptionId,status,new Date());
 |  |         prescriptionDao.updateStatus(prescriptionId,status,new Date());
 | 
												
													
														
															|  | 
 |  |         prescriptionLogService.addPrescriptionLog(prescriptionId,status,1,wlyyPrescriptionDO.getPatientCode(),wlyyPrescriptionDO.getPatientName(),null,new Date());
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -5356,37 +5375,41 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         prescriptionCheckDO = prescriptionCheckDao.save(prescriptionCheckDO);
 |  |         prescriptionCheckDO = prescriptionCheckDao.save(prescriptionCheckDO);
 | 
												
													
														
															|  |         WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
 |  |         WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
 | 
												
													
														
															|  |         if (status==2){
 |  |         if (status==2){
 | 
												
													
														
															|  |             prescriptionDao.updateCheckStatus(prescriptionId,2,reason,12);
 |  | 
 | 
												
													
														
															|  |             /*if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
 |  | 
 | 
												
													
														
															|  | 
 |  |             /*prescriptionDao.updateCheckStatus(prescriptionId,2,reason,20);*/
 | 
												
													
														
															|  | 
 |  |             logger.info("开始====="+wlyyPrescriptionDO.getCheckStatus());
 | 
												
													
														
															|  | 
 |  |             if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
 | 
												
													
														
															|  |                 try {
 |  |                 try {
 | 
												
													
														
															|  |                     WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
 |  | 
 | 
												
													
														
															|  |                     List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  |                     List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
 |  | 
 | 
												
													
														
															|  | 
 |  |                     List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  | 
 |  |                     List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  | 
 |  |                     WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
 | 
												
													
														
															|  |                     DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
 |  |                     DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                     //his处方拼接开方条件
 |  |                     //his处方拼接开方条件
 | 
												
													
														
															|  |                     com.alibaba.fastjson.JSONArray jsonData = new com.alibaba.fastjson.JSONArray();
 |  |                     com.alibaba.fastjson.JSONArray jsonData = new com.alibaba.fastjson.JSONArray();
 | 
												
													
														
															|  |                     for (WlyyPrescriptionInfoDO info:infoDOS){
 |  |                     for (WlyyPrescriptionInfoDO info:infoDOS){
 | 
												
													
														
															|  |                         //设置his药品查询条件
 |  |                         //设置his药品查询条件
 | 
												
													
														
															|  |                         setInfoJsonParam(jsonData, doctorMappingDO, outpatientDO, prescriptionDO, info, outpatientDO.getIcd10());
 |  | 
 | 
												
													
														
															|  | 
 |  |                         setInfoJsonParam(jsonData, doctorMappingDO, outpatientDO, wlyyPrescriptionDO, info, outpatientDO.getIcd10());
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |                     for (WlyyInspectionDO ins:inspectionDOS){
 |  |                     for (WlyyInspectionDO ins:inspectionDOS){
 | 
												
													
														
															|  |                         //设置his药品查询条件
 |  |                         //设置his药品查询条件
 | 
												
													
														
															|  |                         setInspectionParam(jsonData, doctorMappingDO, outpatientDO, prescriptionDO, ins, outpatientDO.getIcd10());
 |  | 
 | 
												
													
														
															|  | 
 |  |                         setInspectionParam(jsonData, doctorMappingDO, outpatientDO, wlyyPrescriptionDO, ins, outpatientDO.getIcd10());
 | 
												
													
														
															|  |                     }
 |  |                     }
 | 
												
													
														
															|  |                     sendHisDiagnosis(jsonData, outpatientDO, prescriptionDO);
 |  | 
 | 
												
													
														
															|  | 
 |  |                     sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
 | 
												
													
														
															|  |                 } catch (Exception e) {
 |  |                 } catch (Exception e) {
 | 
												
													
														
															|  |                     e.printStackTrace();
 |  |                     e.printStackTrace();
 | 
												
													
														
															|  |                 }
 |  |                 }
 | 
												
													
														
															|  |             }*/
 |  | 
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |             prescriptionLogService.addPrescriptionLog(prescriptionId,20,2,operate,operateName,reason,new Date());
 | 
												
													
														
															|  | 
 |  |             wlyyPrescriptionDO.setCheckStatus(2);
 | 
												
													
														
															|  | 
 |  |             wlyyPrescriptionDO.setCheckReason(reason);
 | 
												
													
														
															|  | 
 |  |             wlyyPrescriptionDO.setStatus(20);
 | 
												
													
														
															|  |         }else{
 |  |         }else{
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setCheckStatus(status);
 |  |             wlyyPrescriptionDO.setCheckStatus(status);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setCheckReason(reason);
 |  |             wlyyPrescriptionDO.setCheckReason(reason);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setStatus(11);
 |  |             wlyyPrescriptionDO.setStatus(11);
 | 
												
													
														
															|  |             prescriptionDao.save(wlyyPrescriptionDO);
 |  | 
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  |         prescriptionDao.save(wlyyPrescriptionDO);
 | 
												
													
														
															|  |         if (status==2||status==1){
 |  |         if (status==2||status==1){
 | 
												
													
														
															|  |             sendCheckMessage(status,wlyyPrescriptionDO,operate,operateName);
 |  |             sendCheckMessage(status,wlyyPrescriptionDO,operate,operateName);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
											
												
													
														
															|  | @ -5430,11 +5453,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         prescriptionCheckDO = prescriptionCheckDao.save(prescriptionCheckDO);
 |  |         prescriptionCheckDO = prescriptionCheckDao.save(prescriptionCheckDO);
 | 
												
													
														
															|  |         WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
 |  |         WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(prescriptionId);
 | 
												
													
														
															|  |         if (status==3){
 |  |         if (status==3){
 | 
												
													
														
															|  | 
 |  |             wlyyPrescriptionDO.setStatus(10);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setCheckStatus(0);
 |  |             wlyyPrescriptionDO.setCheckStatus(0);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setCheckReason("未审核");
 |  |             wlyyPrescriptionDO.setCheckReason("未审核");
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setDealStatus(1);
 |  |             wlyyPrescriptionDO.setDealStatus(1);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setDealReason(reason);
 |  |             wlyyPrescriptionDO.setDealReason(reason);
 | 
												
													
														
															|  |         }else if (status==4){
 |  |         }else if (status==4){
 | 
												
													
														
															|  | 
 |  |             wlyyPrescriptionDO.setStatus(10);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setCheckStatus(0);
 |  |             wlyyPrescriptionDO.setCheckStatus(0);
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setCheckReason("未审核");
 |  |             wlyyPrescriptionDO.setCheckReason("未审核");
 | 
												
													
														
															|  |             wlyyPrescriptionDO.setDealStatus(2);
 |  |             wlyyPrescriptionDO.setDealStatus(2);
 | 
												
											
												
													
														
															|  | @ -5469,24 +5494,34 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |     public SystemMessageDO sendCheckMessage(Integer status,WlyyPrescriptionDO prescriptionDO,String operate,String operateName){
 |  |     public SystemMessageDO sendCheckMessage(Integer status,WlyyPrescriptionDO prescriptionDO,String operate,String operateName){
 | 
												
													
														
															|  |         SystemMessageDO systemMessageDO = new SystemMessageDO();
 |  |         SystemMessageDO systemMessageDO = new SystemMessageDO();
 | 
												
													
														
															|  |         try{
 |  |         try{
 | 
												
													
														
															|  |             systemMessageDO.setType("5");
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             systemMessageDO.setReceiver(prescriptionDO.getDoctor());
 |  |             systemMessageDO.setReceiver(prescriptionDO.getDoctor());
 | 
												
													
														
															|  |             systemMessageDO.setReceiverName(prescriptionDO.getDoctorName());
 |  |             systemMessageDO.setReceiverName(prescriptionDO.getDoctorName());
 | 
												
													
														
															|  |             systemMessageDO.setRelationCode(prescriptionDO.getId());
 |  |             systemMessageDO.setRelationCode(prescriptionDO.getId());
 | 
												
													
														
															|  |             systemMessageDO.setSender(operate);
 |  |             systemMessageDO.setSender(operate);
 | 
												
													
														
															|  |             systemMessageDO.setSenderName(operateName);
 |  |             systemMessageDO.setSenderName(operateName);
 | 
												
													
														
															|  |             JSONObject data = new JSONObject();
 |  |             JSONObject data = new JSONObject();
 | 
												
													
														
															|  | 
 |  |             Integer age = 0;
 | 
												
													
														
															|  | 
 |  |             String gender = "";
 | 
												
													
														
															|  | 
 |  |             if (StringUtils.isNoneBlank(prescriptionDO.getIdcard())){
 | 
												
													
														
															|  | 
 |  |                 age = IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard());
 | 
												
													
														
															|  | 
 |  |                 gender=IdCardUtil.getSexForIdcard(prescriptionDO.getIdcard());
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  |             data.put("name",prescriptionDO.getPatientName());
 |  |             data.put("name",prescriptionDO.getPatientName());
 | 
												
													
														
															|  |             data.put("age",IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard()));
 |  | 
 | 
												
													
														
															|  |             data.put("gender",IdCardUtil.getSexForIdcard(prescriptionDO.getIdcard()));
 |  | 
 | 
												
													
														
															|  | 
 |  |             data.put("age",age);
 | 
												
													
														
															|  | 
 |  |             data.put("gender",gender);
 | 
												
													
														
															|  | 
 |  |             data.put("outpatientId",prescriptionDO.getOutpatientId());
 | 
												
													
														
															|  | 
 |  |             data.put("prescriptionId",prescriptionDO.getId());
 | 
												
													
														
															|  |             if (status==2){
 |  |             if (status==2){
 | 
												
													
														
															|  | 
 |  |                 systemMessageDO.setType("9");
 | 
												
													
														
															|  |                 systemMessageDO.setTitle("审方通过");
 |  |                 systemMessageDO.setTitle("审方通过");
 | 
												
													
														
															|  |                 data.put("message","审方通过");
 |  |                 data.put("message","审方通过");
 | 
												
													
														
															|  |                 data.put("message","您为"+prescriptionDO.getPatientName()+"("+IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard())+"岁 "+IdCardUtil.getSexForIdcard(prescriptionDO.getIdcard())+")开具的处方已审核通过。");
 |  | 
 | 
												
													
														
															|  | 
 |  |                 data.put("message","您为"+prescriptionDO.getPatientName()+"("+age+"岁 "+gender+")开具的处方已审核通过。");
 | 
												
													
														
															|  |             } else if (status==1) {
 |  |             } else if (status==1) {
 | 
												
													
														
															|  | 
 |  |                 systemMessageDO.setType("8");
 | 
												
													
														
															|  |                 systemMessageDO.setTitle("审方退回");
 |  |                 systemMessageDO.setTitle("审方退回");
 | 
												
													
														
															|  |                 data.put("message","审方退回");
 |  |                 data.put("message","审方退回");
 | 
												
													
														
															|  |                 data.put("message","您为"+prescriptionDO.getPatientName()+"("+IdCardUtil.getAgeForIdcard(prescriptionDO.getIdcard())+"岁 "+IdCardUtil.getSexForIdcard(prescriptionDO.getIdcard())+")开具的处方被审方退回,请尽快处理");
 |  | 
 | 
												
													
														
															|  | 
 |  |                 data.put("message","您为"+prescriptionDO.getPatientName()+"("+age+"岁 "+gender+")开具的处方被审方退回,请尽快处理");
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |             systemMessageDO.setData(data.toString());
 |  |             systemMessageDO.setData(data.toString());
 | 
												
													
														
															|  |             systemMessageService.saveMessage(systemMessageDO);
 |  |             systemMessageService.saveMessage(systemMessageDO);
 | 
												
											
												
													
														
															|  | @ -5508,7 +5543,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |         if (wlyyPrescriptionDO!=null){
 |  |         if (wlyyPrescriptionDO!=null){
 | 
												
													
														
															|  |             com.alibaba.fastjson.JSONObject objectString = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(wlyyPrescriptionDO);
 |  |             com.alibaba.fastjson.JSONObject objectString = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(wlyyPrescriptionDO);
 | 
												
													
														
															|  |             WlyyPrescriptionVO prescriptionVO =  com.alibaba.fastjson.JSONObject.toJavaObject(objectString,WlyyPrescriptionVO.class);
 |  |             WlyyPrescriptionVO prescriptionVO =  com.alibaba.fastjson.JSONObject.toJavaObject(objectString,WlyyPrescriptionVO.class);
 | 
												
													
														
															|  |             List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<WlyyPrescriptionInfoDO> wlyyPrescriptionInfoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  |             List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
 |  |             List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
 | 
												
													
														
															|  |             for (WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO:wlyyPrescriptionInfoDOS){
 |  |             for (WlyyPrescriptionInfoDO wlyyPrescriptionInfoDO:wlyyPrescriptionInfoDOS){
 | 
												
													
														
															|  |                 com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(wlyyPrescriptionInfoDO);
 |  |                 com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(wlyyPrescriptionInfoDO);
 | 
												
											
												
													
														
															|  | @ -5517,7 +5552,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                 wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
 |  |                 wlyyPrescriptionInfoVOS.add(prescriptionInfoVO);
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |             prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
 |  |             prescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
 | 
												
													
														
															|  |             List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = prescriptionDiagnosisDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<WlyyPrescriptionDiagnosisDO> wlyyPrescriptionDiagnosisDOS = prescriptionDiagnosisDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  |             List<WlyyPrescriptionDiagnosisVO> wlyyPrescriptionDiagnosisVOS = new ArrayList<>();
 |  |             List<WlyyPrescriptionDiagnosisVO> wlyyPrescriptionDiagnosisVOS = new ArrayList<>();
 | 
												
													
														
															|  |             for (WlyyPrescriptionDiagnosisDO prescriptionDiagnosisDO:wlyyPrescriptionDiagnosisDOS){
 |  |             for (WlyyPrescriptionDiagnosisDO prescriptionDiagnosisDO:wlyyPrescriptionDiagnosisDOS){
 | 
												
													
														
															|  |                 com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(prescriptionDiagnosisDO);
 |  |                 com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(prescriptionDiagnosisDO);
 | 
												
											
												
													
														
															|  | @ -5527,7 +5562,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |             prescriptionVO.setDiagnosisVOs(wlyyPrescriptionDiagnosisVOS);
 |  |             prescriptionVO.setDiagnosisVOs(wlyyPrescriptionDiagnosisVOS);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  |             List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
 |  |             List<WlyyInspectionVO> inspectionVOList = new ArrayList<>();
 | 
												
													
														
															|  |             for (WlyyInspectionDO inspectionDO:inspectionDOS){
 |  |             for (WlyyInspectionDO inspectionDO:inspectionDOS){
 | 
												
													
														
															|  |                 com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(inspectionDO);
 |  |                 com.alibaba.fastjson.JSONObject object = (com.alibaba.fastjson.JSONObject) com.alibaba.fastjson.JSONObject.toJSON(inspectionDO);
 | 
												
											
												
													
														
															|  | @ -5565,8 +5600,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |     public void zsSynHis(String prescriptionId){
 |  |     public void zsSynHis(String prescriptionId){
 | 
												
													
														
															|  |         try {
 |  |         try {
 | 
												
													
														
															|  |             WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
 |  |             WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
 | 
												
													
														
															|  |             List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  |             List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId);
 |  | 
 | 
												
													
														
															|  | 
 |  |             List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  | 
 |  |             List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId,1);
 | 
												
													
														
															|  |             WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
 |  |             WlyyOutpatientDO outpatientDO = outpatientDao.findById(prescriptionDO.getOutpatientId());
 | 
												
													
														
															|  |             DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
 |  |             DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
 | 
												
													
														
															|  | 
 |  | 
 |