| 
					
				 | 
			
			
				@ -32,10 +32,7 @@ import com.yihu.jw.hospital.prescription.dao.PrescriptionInfoDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.hospital.ykyy.service.YkyyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.patient.dao.BasePatientDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.patient.dao.BasePatientMedicareCardDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyOutpatientVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionDiagnosisVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionInfoVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.WlyyPrescriptionVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.common.IdCardUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.http.HttpClientUtil; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -445,6 +442,26 @@ public class YkyyEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                wlyyOutpatientVO.setAdmDate(DateUtil.strToDate(admDate, DateUtil.YYYY_MM_DD_HH_MM_SS_)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                wlyyOutpatientVO.setConDate(DateUtil.strToDate(conDate, DateUtil.YYYY_MM_DD_HH_MM_SS_)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                wlyyOutpatientVOS.add(wlyyOutpatientVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<WlyyInspectionVO> inspectionVOList = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONArray array = findV_ZKSG_JCCX(PAT_NO,wlyyOutpatientVO.getAdmNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                for (int j=0;j<array.size();j++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONObject object = array.getJSONObject(j); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String ksdm = object.getString("ksdm");//科室代码 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String fymc = object.getString("fymc");//费用名称 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String fydj = object.getString("fydj");//单价 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String fysl = object.getString("fysl");//数量 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String fyhj = object.getString("fyhj");//金额 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String jzxh = object.getString("jzxh");//就诊序号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    String zxks = object.getString("zxks");//执行科室 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    WlyyInspectionVO wlyyInspectionVO = new WlyyInspectionVO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    wlyyInspectionVO.setName(fymc); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    wlyyInspectionVO.setDeptName(zxks); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    wlyyInspectionVO.setDept(ksdm); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    wlyyInspectionVO.setQuantity(Integer.parseInt(fysl)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    inspectionVOList.add(wlyyInspectionVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                wlyyOutpatientVO.setInspectionVOS(inspectionVOList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return wlyyOutpatientVOS; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -528,6 +545,51 @@ public class YkyyEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * HIS就诊患者历史查询 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public JSONArray findV_ZKSG_JCCX(String brid,String conNo) throws Exception{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = "SELECT\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.BRID AS \"brid\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.BRXM AS \"brxm\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tto_char (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\tz.KDRQ,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\t'yyyy/MM/dd hh24:mi:ss'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t) AS \"kdrq\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tto_char (\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\tz.ZXRQ,\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t\t'yyyy/MM/dd hh24:mi:ss'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\t) AS \"zxrq\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.YSDM AS \"ysdm\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.KSDM AS \"ksdm\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.FYMC AS \"fymc\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.FYDJ AS \"fydj\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.FYSL AS \"fysl\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.FYHJ AS \"fyhj\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.YBLB AS \"yblb\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.JZXH AS \"jzxh\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.YJXH AS \"yjxh\",\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.ZXKS AS \"zxks\"\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tV_ZKSG_JCCX z\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "WHERE\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tz.JZXH = '"+conNo+"'\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "AND z.brid = '"+brid+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Map<String,Object> params = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        params.put("sql",sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        HttpResponse response = HttpUtils.doGet(url,params); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String content = response.getContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        logger.info("response:"+content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONObject rs = JSON.parseObject(content); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer status = rs.getInteger("status"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(status!=null&&status == 200){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return rs.getJSONArray("detailModelList"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return new JSONArray(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * HIS处方记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @throws Exception 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1196,7 +1258,7 @@ public class YkyyEntranceService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "FROM\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "\tV_ZKSG_JCXM_MZ mz where 1=1 "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isNoneBlank(pydm)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and lower(pydm) = '%"+pydm.toLowerCase()+"%'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql+=" and lower(pydm) like '%"+pydm.toLowerCase()+"%'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        /*List<Map<String,Object>> list = hibenateUtils.createSQLQuery(sql);*/ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        JSONArray array = new JSONArray(); 
			 |