| 
					
				 | 
			
			
				@ -1416,10 +1416,35 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> result = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //调用his开方接口 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        net.sf.json.JSONObject jsonObject = entranceService.BS10112(jsonData.toJSONString(),demoFlag); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //如果无法解析his系统报文,his系统报错 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(jsonObject==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //记录http日志 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            WlyyHttpLogDO log = new WlyyHttpLogDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setCode("makeDiagnosis"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setName("下诊断"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setPatient(outpatientDO.getPatient()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setDoctor(outpatientDO.getDoctor()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setResponse("his系统异常,无法解析返回值"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setRequest(jsonData.toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setStatus("-99"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            log.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            wlyyHttpLogDao.save(log); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //开方失败 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //更新处方状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescription.setStatus(13); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescriptionDao.save(prescription); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //记录开发失败日志 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescriptionLogService.addPrescriptionLog(prescription.getId(),13,2,outpatientDO.getDoctor(),outpatientDO.getDoctorName(),"",new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //开方失败返回值 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("code",-1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("mes","开方失败,his系统异常"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("调用his开方接口: "+jsonObject.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //判断返回结果 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String rs = jsonObject.getString("@RESULT"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //保存日志 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyHttpLogDO log = new WlyyHttpLogDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        log.setCode("makeDiagnosis"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1448,11 +1473,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //开方失败 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescription.setStatus(13); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescriptionDao.save(prescription); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("code",-1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            result.put("mes",jsonObject.getString("@MSG")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //更新处方状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescription.setStatus(13); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescriptionDao.save(prescription); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //记录开发失败日志 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            prescriptionLogService.addPrescriptionLog(prescription.getId(),13,2,outpatientDO.getDoctor(),outpatientDO.getDoctorName(),"",new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 |