|
@ -408,7 +408,8 @@ public class TnyyEntranceService {
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray findV_ZKSG_HZCX_HIS(String brid,String conNo,String startTime,String endTime,String ksdm) throws Exception{
|
|
|
String sql = "SELECT h.JZXH,h.GHXH,h.BRBH,h.KSDM,h.YSDM,h.ZYZD,h.KSSJ,h.JSSJ,h.JZZT,h.FZRQ,h.GHFZ,ks.KSMC,yg.YGXM from YS_MZ_JZLS h,GY_KSDM ks,GY_YGDM yg WHERE yg.YGDM=h.YSDM and ks.KSDM=h.KSDM and h.BRBH = "+brid+" ";
|
|
|
String sql = "SELECT h.JZXH,h.GHXH,h.BRBH,h.KSDM,h.YSDM,zd.JBMC as ZYZD,h.KSSJ,h.JSSJ,h.JZZT,h.FZRQ,h.GHFZ,ks.KSMC,yg.YGXM from YS_MZ_JZLS h,GY_KSDM ks,GY_YGDM yg " +
|
|
|
" ,GY_JBBM zd WHERE yg.YGDM=h.YSDM and ks.KSDM=h.KSDM and h.ZYZD = zd.JBXH and h.BRBH = "+brid+" ";
|
|
|
if(!StringUtil.isBlank(conNo)){
|
|
|
sql += " and h.JZXH = " + conNo;
|
|
|
}
|
|
@ -455,19 +456,17 @@ public class TnyyEntranceService {
|
|
|
logger.info("EntranceService " + fid + " PAT_NO :" + PAT_NO + " conNo:" + conNo + " startTime:" + startTime + " endTime:" + endTime);
|
|
|
|
|
|
String resp = "";
|
|
|
String orgCode = "350211A5004";
|
|
|
String orgName = "厦门大学附属厦门眼科中心";
|
|
|
String orgCode = "350211A1002";
|
|
|
String orgName = "泰安市中医医院";
|
|
|
|
|
|
//居民id转化
|
|
|
PatientMappingDO patientMappingDO = patientMappingDao.findByMappingCodeAndSource(PAT_NO,"1");
|
|
|
if(patientMappingDO == null){
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
//KSSJ,h.BRID,h.BRXM,h.SJHM,h.JZKH,h.SFZH,h.BRXZ,h.YSDM,h.KDYS" +
|
|
|
// ",h.KSDM,h.KSMC,h.ZDMC,h.JZXH
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
jsonArray = findV_ZKSG_HZCX_HIS(patientMappingDO.getMappingCode(),conNo,startTime,endTime,ksdm);
|
|
|
jsonArray = findV_ZKSG_HZCX_HIS(PAT_NO,conNo,startTime,endTime,ksdm);
|
|
|
//查找眼科数据
|
|
|
if (jsonArray.size() == 0) {
|
|
|
return null;
|
|
@ -485,8 +484,10 @@ public class TnyyEntranceService {
|
|
|
//wlyyOutpatientVO.setRegisterNo(null == jsonObjectMgsInfo.get("REGISTER_SN") ? "" : jsonObjectMgsInfo.get("REGISTER_SN") + "");
|
|
|
wlyyOutpatientVO.setDept(null == jsonObjectMgsInfo.get("KSDM") ? "" : jsonObjectMgsInfo.get("KSDM") + "");
|
|
|
wlyyOutpatientVO.setDeptName(null == jsonObjectMgsInfo.get("KSMC") ? "" : jsonObjectMgsInfo.get("KSMC") + "");
|
|
|
wlyyOutpatientVO.setPatient(patientMappingDO.getPatient());
|
|
|
wlyyOutpatientVO.setPatientName(patientMappingDO.getPatientName());
|
|
|
if (patientMappingDO!=null){
|
|
|
wlyyOutpatientVO.setPatient(patientMappingDO.getPatient());
|
|
|
wlyyOutpatientVO.setPatientName(patientMappingDO.getPatientName());
|
|
|
}
|
|
|
wlyyOutpatientVO.setConNo(null == jsonObjectMgsInfo.get("JZXH") ? "" : jsonObjectMgsInfo.get("JZXH") + "");
|
|
|
String doctor = null == jsonObjectMgsInfo.get("YSDM") ? "" : jsonObjectMgsInfo.get("YSDM") + "";
|
|
|
|