|  | @ -3837,7 +3837,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(workingTime)){
 | 
	
		
			
				|  |  |             sql+=" AND wk.date = :workingTime ";
 | 
	
		
			
				|  |  |             sql+=" AND wk.work_date = :workingTime ";
 | 
	
		
			
				|  |  |             params.put("workingTime",workingTime);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     
 | 
	
	
		
			
				|  | @ -5712,7 +5712,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |             WlyyOutpatientDO outpatientDO = outpatientDao.findById(wlyyPrescriptionDO.getOutpatientId());
 | 
	
		
			
				|  |  |             if (wxId.equalsIgnoreCase("xm_zsyy_wx")){
 | 
	
		
			
				|  |  |                 try {
 | 
	
		
			
				|  |  |                     /*List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionInfoDO> infoDOS = prescriptionInfoDao.findByPrescriptionId(prescriptionId,1);
 | 
	
		
			
				|  |  |                     List<WlyyInspectionDO> inspectionDOS = wlyyInspectionDao.findByPrescriptionId(prescriptionId,1);
 | 
	
		
			
				|  |  |                     DoctorMappingDO doctorMappingDO = doctorMappingService.findMappingCode(outpatientDO.getDoctor(), outpatientDO.getHospital());
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -5727,7 +5727,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                         setInspectionParam(jsonData, doctorMappingDO, outpatientDO, wlyyPrescriptionDO, ins, outpatientDO.getIcd10());
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     Map<String,Object> map = sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
 | 
	
		
			
				|  |  |                     if (map.get("code").toString().equalsIgnoreCase("0")){*/
 | 
	
		
			
				|  |  |                     if (map.get("code").toString().equalsIgnoreCase("0")){
 | 
	
		
			
				|  |  |                         //  * @param applyDepaName @param applyDoctorName
 | 
	
		
			
				|  |  |                         WlyyPrescriptionDO prescriptionDO = prescriptionDao.findOne(prescriptionId);
 | 
	
		
			
				|  |  |                         String patientCode = prescriptionDO.getPatientCode();
 | 
	
	
		
			
				|  | @ -5750,7 +5750,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                         PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patientCode,"1");
 | 
	
		
			
				|  |  |                         ylzPayService.msgPush("01",patientMedicareCardDO.getCode(),"01",patientDO.getMobile(),"03",userNo,userName,idcard,realerOrder,applyDepaName,applyDoctorName,recipeTime,free,"1");
 | 
	
		
			
				|  |  |                 /*    }*/
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     //sendHisDiagnosis(jsonData, outpatientDO, wlyyPrescriptionDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 } catch (Exception e) {
 | 
	
	
		
			
				|  | @ -6073,7 +6073,12 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 电子病历html
 | 
	
		
			
				|  |  |      * @param registerSn
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String readOutPatient(String registerSn) throws Exception {
 | 
	
		
			
				|  |  |         String url = "";
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_URL");
 | 
	
	
		
			
				|  | @ -6099,16 +6104,44 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |         XMLSerializer xmlSerializer = new XMLSerializer();
 | 
	
		
			
				|  |  |         net.sf.json.JSON json = xmlSerializer.read(returnValue);
 | 
	
		
			
				|  |  |         logger.info("返回json"+json);
 | 
	
		
			
				|  |  |         Object retInfo=  ((JSONObject) json).get("HtResponse");
 | 
	
		
			
				|  |  |         logger.info("retInfo:"+retInfo);
 | 
	
		
			
				|  |  |         if(retInfo!=null){
 | 
	
		
			
				|  |  |             JSONObject jsonObject = (JSONObject)retInfo;
 | 
	
		
			
				|  |  |             String content =jsonObject.getString("XML_CONT");
 | 
	
		
			
				|  |  |             Document doc = Jsoup.parse(content);
 | 
	
		
			
				|  |  |             Elements rows = doc.select("table[class=list]").get(0).select("tr");
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return json.toString();
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 电子病历xml
 | 
	
		
			
				|  |  |      * @param registerSn
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public String readOutPatientXml(String registerSn) throws Exception {
 | 
	
		
			
				|  |  |         String url = "";
 | 
	
		
			
				|  |  |         WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_URL");
 | 
	
		
			
				|  |  |         if (wlyyHospitalSysDictDO!=null){
 | 
	
		
			
				|  |  |             url = wlyyHospitalSysDictDO.getDictCode();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         String xmlStr = "<?xml version=\"1.0\" encoding=\"GBK\"?>\n" +
 | 
	
		
			
				|  |  |                 "<HtRequest>\n";
 | 
	
		
			
				|  |  |         xmlStr+="<REGISTER_SN>"+registerSn+"</REGISTER_SN>";
 | 
	
		
			
				|  |  |         String reqTime = DateUtil.dateToStr(new Date(),"yyyyMMddHHmmssSSS");
 | 
	
		
			
				|  |  |         xmlStr+="<REQ_TIME>"+reqTime+"</REQ_TIME>";
 | 
	
		
			
				|  |  |         xmlStr+="</HtRequest>";
 | 
	
		
			
				|  |  |         String returnValue = "";
 | 
	
		
			
				|  |  |         Map<String, String> params = new HashedMap();
 | 
	
		
			
				|  |  |         params.put("type","readOutPatientDetail");
 | 
	
		
			
				|  |  |         params.put("xmlStr",xmlStr);
 | 
	
		
			
				|  |  |         returnValue = com.yihu.jw.utils.WebserviceUtil.post(url,
 | 
	
		
			
				|  |  |                 "http://business.htemr.haitaiinc.com",
 | 
	
		
			
				|  |  |                 "manageOutRegister",
 | 
	
		
			
				|  |  |                 params);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return returnValue;
 | 
	
		
			
				|  |  |         logger.info("调用电子病历查询接口请求成功,返回值xmlstr:" + returnValue);
 | 
	
		
			
				|  |  |         XMLSerializer xmlSerializer = new XMLSerializer();
 | 
	
		
			
				|  |  |         net.sf.json.JSON json = xmlSerializer.read(returnValue);
 | 
	
		
			
				|  |  |         logger.info("返回json"+json);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return json.toString();
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public String writeOutPatient(String registerSn,String chiefComplaint,String hpi,String elapsemhis,String bodycheck,String assistanTcheck) throws Exception {
 | 
	
	
		
			
				|  | @ -6140,7 +6173,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |                 params);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         logger.info("调用电子病历写入接口请求成功,返回值xmlstr:" + returnValue);
 | 
	
		
			
				|  |  |         return returnValue;
 | 
	
		
			
				|  |  |         XMLSerializer xmlSerializer = new XMLSerializer();
 | 
	
		
			
				|  |  |         net.sf.json.JSON json = xmlSerializer.read(returnValue);
 | 
	
		
			
				|  |  |         logger.info("返回json"+json);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         return json.toString();
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 |