|  | @ -1155,6 +1155,63 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         return entranceService.MS30012(demoFlag);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 检查模板选择接口
 | 
	
		
			
				|  |  |      * @param bz_code
 | 
	
		
			
				|  |  |      * @param flag
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONArray getJcmb(String bz_code,String flag)throws Exception{
 | 
	
		
			
				|  |  |         return entranceService.BS25033(bz_code,flag,demoFlag);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 检验选择接口
 | 
	
		
			
				|  |  |      * @param bz_code
 | 
	
		
			
				|  |  |      * @param flag
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONArray getJymb(String bz_code,String flag)throws Exception{
 | 
	
		
			
				|  |  |         return entranceService.BS20030(bz_code,flag,demoFlag);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 套餐选择接口
 | 
	
		
			
				|  |  |      * @param bz_code
 | 
	
		
			
				|  |  |      * @param flag
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONArray getTcxz(String bz_code,String flag)throws Exception{
 | 
	
		
			
				|  |  |         return entranceService.MS02017(bz_code,flag,demoFlag);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 套餐子项目接口
 | 
	
		
			
				|  |  |      * @param parent_code 检查检验项目的charge_code
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONArray getTcChild(String parent_code)throws Exception{
 | 
	
		
			
				|  |  |         return entranceService.MS02015(parent_code,demoFlag);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 项目子项目接口
 | 
	
		
			
				|  |  |      * @param zd_charge_code
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public JSONArray getInsChild(String zd_charge_code)throws Exception{
 | 
	
		
			
				|  |  |         return entranceService.MS02016(zd_charge_code,demoFlag);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取检查检验
 | 
	
		
			
				|  |  |      * @return
 | 
	
	
		
			
				|  | @ -1280,7 +1337,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                     info.setPrescriptionId(prescription.getId());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     //设置his药品查询条件
 | 
	
		
			
				|  |  |                     setInfoJsonParam(jsonData,doctorMappingDO,outpatientDO,info,Icd10);
 | 
	
		
			
				|  |  |                     setInfoJsonParam(jsonData,doctorMappingDO,outpatientDO,prescriptionDO,info,Icd10);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 //保存处方
 | 
	
		
			
				|  |  |                 prescriptionInfoDao.save(infoDOs);
 | 
	
	
		
			
				|  | @ -1301,7 +1358,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                     ins.setOutpatientId(outPatientId);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     //设置his药品查询条件
 | 
	
		
			
				|  |  |                     setInspectionParam(jsonData,doctorMappingDO,outpatientDO,ins,Icd10);
 | 
	
		
			
				|  |  |                     setInspectionParam(jsonData,doctorMappingDO,outpatientDO,prescriptionDO,ins,Icd10);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             //上传his开方
 | 
	
	
		
			
				|  | @ -1382,7 +1439,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @param inspectionDO
 | 
	
		
			
				|  |  |      * @param Icd10
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void setInspectionParam(com.alibaba.fastjson.JSONArray jsonData,DoctorMappingDO doctorMappingDO,WlyyOutpatientDO outpatientDO,WlyyInspectionDO inspectionDO,String Icd10){
 | 
	
		
			
				|  |  |     public void setInspectionParam(com.alibaba.fastjson.JSONArray jsonData,DoctorMappingDO doctorMappingDO,WlyyOutpatientDO outpatientDO,WlyyPrescriptionDO prescriptionDO,WlyyInspectionDO inspectionDO,String Icd10){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1439,10 +1496,13 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @param info
 | 
	
		
			
				|  |  |      * @param Icd10
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public void setInfoJsonParam(com.alibaba.fastjson.JSONArray jsonData,DoctorMappingDO doctorMappingDO,WlyyOutpatientDO outpatientDO,WlyyPrescriptionInfoDO info,String Icd10){
 | 
	
		
			
				|  |  |     public void setInfoJsonParam(com.alibaba.fastjson.JSONArray jsonData,DoctorMappingDO doctorMappingDO,WlyyOutpatientDO outpatientDO,WlyyPrescriptionDO prescriptionDO,WlyyPrescriptionInfoDO info,String Icd10){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         com.alibaba.fastjson.JSONObject json = new com.alibaba.fastjson.JSONObject();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(prescriptionDO.getRealOrder())){
 | 
	
		
			
				|  |  |             json.put("realOrder",prescriptionDO.getRealOrder());
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         json.put("cardNo",outpatientDO.getCardNo());
 | 
	
		
			
				|  |  |         json.put("doctor",doctorMappingDO.getMappingCode());
 | 
	
		
			
				|  |  |         json.put("dept",outpatientDO.getDept());
 | 
	
	
		
			
				|  | @ -1458,7 +1518,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         json.put("unit",info.getUnit());
 | 
	
		
			
				|  |  |         json.put("usage",info.getUsageCode());
 | 
	
		
			
				|  |  |         json.put("supplyCode",info.getSupplyCode());
 | 
	
		
			
				|  |  |         json.put("days",info.getDays());
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(info.getDays())){
 | 
	
		
			
				|  |  |             json.put("days",info.getDays());
 | 
	
		
			
				|  |  |         }else{
 | 
	
		
			
				|  |  |             //如果是中草药,贴数为天数,没有默认1天
 | 
	
		
			
				|  |  |             json.put("days",StringUtils.isNotBlank(info.getPostCount())?info.getPostCount():"1");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         json.put("frequency",info.getFrequency());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //设置诊断
 | 
	
	
		
			
				|  | @ -3702,4 +3767,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |     public DoctorMappingDO getDoctorMapping(String doctor,String orgCode){
 | 
	
		
			
				|  |  |         return doctorMappingService.findMappingCode(doctor,orgCode);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | }
 |