|  | @ -650,7 +650,7 @@ public class YkyyEntranceService {
 | 
	
		
			
				|  |  |      * HIS处方记录
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<WlyyPrescriptionVO> findV_MSDD01And02(String admNo) throws Exception{
 | 
	
		
			
				|  |  |     public List<WlyyPrescriptionVO> findV_MSDD01And02(String admNo,boolean demoFlag) throws Exception{
 | 
	
		
			
				|  |  |         List<WlyyPrescriptionVO> wlyyPrescriptionVOList = new ArrayList<>();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //处方数据
 | 
	
	
		
			
				|  | @ -672,12 +672,38 @@ public class YkyyEntranceService {
 | 
	
		
			
				|  |  |                 "\tV_MS_DD01 d\n" +
 | 
	
		
			
				|  |  |                 "WHERE\n" +
 | 
	
		
			
				|  |  |                 "\td.JZXH = '"+admNo+"'";
 | 
	
		
			
				|  |  |         Map<String,Object> params = new HashedMap();
 | 
	
		
			
				|  |  |         params.put("sql",msd01);
 | 
	
		
			
				|  |  |         HttpResponse response = HttpUtils.doGet(url,params);
 | 
	
		
			
				|  |  |         String content = response.getContent();
 | 
	
		
			
				|  |  |         logger.info("response:"+content);
 | 
	
		
			
				|  |  |         JSONObject rs = JSON.parseObject(content);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         JSONObject rs = new JSONObject();
 | 
	
		
			
				|  |  |         String content="";
 | 
	
		
			
				|  |  |         if (demoFlag){
 | 
	
		
			
				|  |  |             JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |             jsonObject.put("cfsb","X155245");
 | 
	
		
			
				|  |  |             jsonObject.put("cfhm","2524863258522");
 | 
	
		
			
				|  |  |             jsonObject.put("fkzt","0");
 | 
	
		
			
				|  |  |             jsonObject.put("cflx","其他");
 | 
	
		
			
				|  |  |             jsonObject.put("kfrq","2020-06-23 15:25:58");
 | 
	
		
			
				|  |  |             jsonObject.put("scddh","SH2856545254");
 | 
	
		
			
				|  |  |             jsonObject.put("brid","25318532");
 | 
	
		
			
				|  |  |             jsonObject.put("brxm","杨楠");
 | 
	
		
			
				|  |  |             jsonObject.put("ksdm","350524A0221");
 | 
	
		
			
				|  |  |             jsonObject.put("ysdm","152586232");
 | 
	
		
			
				|  |  |             jsonObject.put("jzxh","MZ258515");
 | 
	
		
			
				|  |  |             jsonObject.put("guid","255df252s222");
 | 
	
		
			
				|  |  |             jsonObject.put("jzkh","JZ255317855");
 | 
	
		
			
				|  |  |             JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |             array.add(jsonObject);
 | 
	
		
			
				|  |  |             rs.put("detailModelList",array);
 | 
	
		
			
				|  |  |             rs.put("status","200");
 | 
	
		
			
				|  |  |             content=rs.toJSONString();
 | 
	
		
			
				|  |  |         }else {
 | 
	
		
			
				|  |  |             Map<String,Object> params = new HashedMap();
 | 
	
		
			
				|  |  |             params.put("sql",msd01);
 | 
	
		
			
				|  |  |             HttpResponse response = HttpUtils.doGet(url,params);
 | 
	
		
			
				|  |  |              content = response.getContent();
 | 
	
		
			
				|  |  |             logger.info("response:"+content);
 | 
	
		
			
				|  |  |             rs = JSON.parseObject(content);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         Integer status = rs.getInteger("status");
 | 
	
		
			
				|  |  |         if(status!=null&&status == 200){
 | 
	
		
			
				|  |  |             JSONArray array =rs.getJSONArray("detailModelList");
 | 
	
	
		
			
				|  | @ -723,12 +749,37 @@ public class YkyyEntranceService {
 | 
	
		
			
				|  |  |                         "WHERE\n" +
 | 
	
		
			
				|  |  |                         "\td.cfsb = '"+wlyyPrescriptionVO.getRealOrder()+"'";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 Map<String,Object> params1 = new HashedMap();
 | 
	
		
			
				|  |  |                 params1.put("sql",msd02);
 | 
	
		
			
				|  |  |                 HttpResponse response1 = HttpUtils.doGet(url,params1);
 | 
	
		
			
				|  |  |                 String content1 = response1.getContent();
 | 
	
		
			
				|  |  |                 logger.info("response:"+content);
 | 
	
		
			
				|  |  |                 JSONObject rs1 = JSON.parseObject(content1);
 | 
	
		
			
				|  |  |                 JSONObject rs1 =new JSONObject();
 | 
	
		
			
				|  |  |                 if (demoFlag){
 | 
	
		
			
				|  |  |                     JSONArray array1 = new JSONArray();
 | 
	
		
			
				|  |  |                     JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |                     jsonObject.put("cfsb","X1552155");
 | 
	
		
			
				|  |  |                     jsonObject.put("ypxh","CF2552142");
 | 
	
		
			
				|  |  |                     jsonObject.put("ypcd","YP2552212");
 | 
	
		
			
				|  |  |                     jsonObject.put("ypsl","5");
 | 
	
		
			
				|  |  |                     jsonObject.put("ypdj","10");
 | 
	
		
			
				|  |  |                     jsonObject.put("hjje","9.99");
 | 
	
		
			
				|  |  |                     jsonObject.put("yfdw","盒");
 | 
	
		
			
				|  |  |                     jsonObject.put("mrcs","2");
 | 
	
		
			
				|  |  |                     jsonObject.put("yfbz","消化科");
 | 
	
		
			
				|  |  |                     jsonObject.put("ypyf","X1552155");//给药途径
 | 
	
		
			
				|  |  |                     jsonObject.put("ycjl","X1552155");
 | 
	
		
			
				|  |  |                     jsonObject.put("yyts","X1552155");
 | 
	
		
			
				|  |  |                     jsonObject.put("sbxh","X1552155");
 | 
	
		
			
				|  |  |                     jsonObject.put("yfgg","X1552155");
 | 
	
		
			
				|  |  |                     array1.add(jsonObject);
 | 
	
		
			
				|  |  |                     rs1.put("status","200");
 | 
	
		
			
				|  |  |                     rs1.put("detailModelList",array);
 | 
	
		
			
				|  |  |                 }else {
 | 
	
		
			
				|  |  |                     Map<String,Object> params1 = new HashedMap();
 | 
	
		
			
				|  |  |                     params1.put("sql",msd02);
 | 
	
		
			
				|  |  |                     HttpResponse response1 = HttpUtils.doGet(url,params1);
 | 
	
		
			
				|  |  |                     String content1 = response1.getContent();
 | 
	
		
			
				|  |  |                     logger.info("response:"+content);
 | 
	
		
			
				|  |  |                     rs1 = JSON.parseObject(content1);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 Integer status1 = rs1.getInteger("status");
 | 
	
		
			
				|  |  |                 List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOS = new ArrayList<>();
 | 
	
		
			
				|  |  |                 if(status1!=null&&status1 == 200){
 | 
	
	
		
			
				|  | @ -738,12 +789,25 @@ public class YkyyEntranceService {
 | 
	
		
			
				|  |  |                         JSONObject object1 = array1.getJSONObject(i);
 | 
	
		
			
				|  |  |                         WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
 | 
	
		
			
				|  |  |                         String sql = "SELECT ypxh as \"ypxh\",ypmc2 as \"ypmc2\" from V_ZKSG_MZ_YPXX WHERE ypxh='"+object1.getString("ypxh")+"' ";
 | 
	
		
			
				|  |  |                         Map<String,Object> params4 = new HashedMap();
 | 
	
		
			
				|  |  |                         params4.put("sql",sql);
 | 
	
		
			
				|  |  |                         HttpResponse response4 = HttpUtils.doGet(url,params4);
 | 
	
		
			
				|  |  |                         String content4 = response4.getContent();
 | 
	
		
			
				|  |  |                         logger.info("response:"+content4);
 | 
	
		
			
				|  |  |                         JSONObject rs4 = JSON.parseObject(content4);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         JSONObject rs4 = new JSONObject();
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         if (demoFlag){
 | 
	
		
			
				|  |  |                             JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |                             jsonObject.put("ypxh","X456225");
 | 
	
		
			
				|  |  |                             jsonObject.put("ypmc2","板蓝根");
 | 
	
		
			
				|  |  |                             JSONArray array2 = new JSONArray();
 | 
	
		
			
				|  |  |                             rs4.put("detailModelList",array2);
 | 
	
		
			
				|  |  |                             rs4.put("status",200);
 | 
	
		
			
				|  |  |                         }else {
 | 
	
		
			
				|  |  |                             Map<String,Object> params4 = new HashedMap();
 | 
	
		
			
				|  |  |                             params4.put("sql",sql);
 | 
	
		
			
				|  |  |                             HttpResponse response4 = HttpUtils.doGet(url,params4);
 | 
	
		
			
				|  |  |                             String content4 = response4.getContent();
 | 
	
		
			
				|  |  |                             logger.info("response:"+content4);
 | 
	
		
			
				|  |  |                             rs4 = JSON.parseObject(content4);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                         Integer status4 = rs4.getInteger("status");
 | 
	
		
			
				|  |  |                         if(status4!=null&&status4 == 200){
 | 
	
		
			
				|  |  |                             JSONArray array4 =  rs4.getJSONArray("detailModelList");
 | 
	
	
		
			
				|  | @ -772,12 +836,24 @@ public class YkyyEntranceService {
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOS);
 | 
	
		
			
				|  |  |                 List<WlyyPrescriptionDiagnosisVO> diagnosisVOS = new ArrayList<>();
 | 
	
		
			
				|  |  |                 String mz = "SELECT ICD AS \"icd\",MSZD AS \"mszd\",JZXH AS \"jzxh\" FROM v_hlwys_mz_jbzd WHERE jzxh = '"+admNo+"'";
 | 
	
		
			
				|  |  |                 Map<String,Object> params2 = new HashedMap();
 | 
	
		
			
				|  |  |                 params2.put("sql",mz);
 | 
	
		
			
				|  |  |                 HttpResponse response2 = HttpUtils.doGet(url,params2);
 | 
	
		
			
				|  |  |                 String content2 = response2.getContent();
 | 
	
		
			
				|  |  |                 logger.info("response:"+content2);
 | 
	
		
			
				|  |  |                 JSONObject rs2 = JSON.parseObject(content2);
 | 
	
		
			
				|  |  |                 JSONObject rs2 =new JSONObject();
 | 
	
		
			
				|  |  |                 if (demoFlag){
 | 
	
		
			
				|  |  |                     JSONObject jsonObject = new JSONObject();
 | 
	
		
			
				|  |  |                     jsonObject.put("icd","250465322053223");
 | 
	
		
			
				|  |  |                     jsonObject.put("mszd","感冒");
 | 
	
		
			
				|  |  |                     jsonObject.put("jzxh","JZ25521875232");
 | 
	
		
			
				|  |  |                     JSONArray array1 = new JSONArray();
 | 
	
		
			
				|  |  |                     array1.add(jsonObject);
 | 
	
		
			
				|  |  |                     rs2.put("status",200);
 | 
	
		
			
				|  |  |                     rs2.put("detailModelList",array1);
 | 
	
		
			
				|  |  |                 }else {
 | 
	
		
			
				|  |  |                     Map<String,Object> params2 = new HashedMap();
 | 
	
		
			
				|  |  |                     params2.put("sql",mz);
 | 
	
		
			
				|  |  |                     HttpResponse response2 = HttpUtils.doGet(url,params2);
 | 
	
		
			
				|  |  |                     String content2 = response2.getContent();
 | 
	
		
			
				|  |  |                     logger.info("response:"+content2);
 | 
	
		
			
				|  |  |                     rs2 = JSON.parseObject(content2);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 Integer status2 = rs2.getInteger("status");
 | 
	
		
			
				|  |  |                 if(status2!=null&&status2 == 200){
 | 
	
		
			
				|  |  |                     JSONArray array2 = rs2.getJSONArray("detailModelList");
 |