|
@ -8,10 +8,7 @@ import com.yihu.jw.hospital.mapping.dao.HospitalDeptMappingDao;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.ConvertUtil;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.MqSdkUtil;
|
|
|
import com.yihu.jw.hospital.prescription.service.entrance.util.WebserviceUtil;
|
|
|
import com.yihu.jw.restmodel.hospital.prescription.WlyyHisPrescriptionVO;
|
|
|
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.date.DateUtil;
|
|
|
import net.sf.json.JSON;
|
|
|
import net.sf.json.JSONArray;
|
|
@ -381,8 +378,8 @@ public class EntranceService {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
public JSONArray BS30025(String PAT_NO,String admNo,String registerSn,String startTime,String endTime,boolean demoFlag) throws Exception {
|
|
|
String fid=BS30025;
|
|
|
public List<WlyyOutpatientVO> BS30025(String PAT_NO,String admNo,String registerSn,String startTime,String endTime,boolean demoFlag) throws Exception {
|
|
|
String fid = BS30025;
|
|
|
String resp = "";
|
|
|
if (demoFlag) {
|
|
|
resp = getJosnFileResullt(fid);
|
|
@ -414,7 +411,39 @@ public class EntranceService {
|
|
|
resp = MqSdkUtil.putReqAndGetRespByQueryStr(sbs.toString(), fid);
|
|
|
resp = MqSdkUtil.xml2jsonArrayRootRow(resp);
|
|
|
}
|
|
|
return ConvertUtil.convertListEnvelopInRow(resp);
|
|
|
JSONArray jsonArray = ConvertUtil.convertListEnvelopInRow(resp);
|
|
|
List<WlyyOutpatientVO> wlyyOutpatientVOS = new ArrayList<>();
|
|
|
WlyyOutpatientVO wlyyOutpatientVO;
|
|
|
for (Object object : jsonArray) {
|
|
|
net.sf.json.JSONObject jsonObjectMgsInfo = (net.sf.json.JSONObject) object;
|
|
|
if (null != jsonObjectMgsInfo) {
|
|
|
wlyyOutpatientVO = new WlyyOutpatientVO();
|
|
|
wlyyOutpatientVO.setAdmNo(null == jsonObjectMgsInfo.get("ADM_NO") ? "" : jsonObjectMgsInfo.get("ADM_NO") + "");
|
|
|
wlyyOutpatientVO.setRegisterNo(null == jsonObjectMgsInfo.get("REGISTER_SN") ? "" : jsonObjectMgsInfo.get("REGISTER_SN") + "");
|
|
|
wlyyOutpatientVO.setDept(null == jsonObjectMgsInfo.get("ADM_SPEC") ? "" : jsonObjectMgsInfo.get("ADM_SPEC") + "");
|
|
|
wlyyOutpatientVO.setDeptName(null == jsonObjectMgsInfo.get("ADM_SPEC_NAME") ? "" : jsonObjectMgsInfo.get("ADM_SPEC_NAME") + "");
|
|
|
|
|
|
wlyyOutpatientVO.setPatient(null == jsonObjectMgsInfo.get("PAT_NO") ? "" : jsonObjectMgsInfo.get("PAT_NO") + "");
|
|
|
wlyyOutpatientVO.setPatientName(null == jsonObjectMgsInfo.get("PAT_NAME") ? "" : jsonObjectMgsInfo.get("PAT_NAME") + "");
|
|
|
|
|
|
wlyyOutpatientVO.setDoctor(null == jsonObjectMgsInfo.get("CON_DOC") ? "" : jsonObjectMgsInfo.get("CON_DOC") + "");
|
|
|
wlyyOutpatientVO.setDoctorName(null == jsonObjectMgsInfo.get("CON_DOC_NAME") ? "" : jsonObjectMgsInfo.get("CON_DOC_NAME") + "");
|
|
|
|
|
|
wlyyOutpatientVO.setIdcard(null == jsonObjectMgsInfo.get("social_no") ? "" : jsonObjectMgsInfo.get("social_no") + "");
|
|
|
wlyyOutpatientVO.setMjz(null == jsonObjectMgsInfo.get("MJZ") ? "" : jsonObjectMgsInfo.get("MJZ") + "");
|
|
|
String icds = null == jsonObjectMgsInfo.get("icd_name") ? "" : jsonObjectMgsInfo.get("icd_name") + "";
|
|
|
String[] icdcodeAndName = icds.split("&");
|
|
|
wlyyOutpatientVO.setIcd10(icdcodeAndName.length > 1 ? icdcodeAndName[1].toString() : "");
|
|
|
wlyyOutpatientVO.setIcd10Name(icdcodeAndName.length > 0 ? icdcodeAndName[0].toString() : "");
|
|
|
String admDate = null == jsonObjectMgsInfo.get("ADM_NO") ? "" : jsonObjectMgsInfo.get("ADM_NO") + "";
|
|
|
String conDate = null == jsonObjectMgsInfo.get("ADM_NO") ? "" : jsonObjectMgsInfo.get("ADM_NO") + "";
|
|
|
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);
|
|
|
|
|
|
}
|
|
|
}
|
|
|
return wlyyOutpatientVOS;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@ -922,18 +951,22 @@ public class EntranceService {
|
|
|
net.sf.json.JSONArray jsonArray = (net.sf.json.JSONArray) jsonObject.get("MsgInfo");
|
|
|
//获取第一条
|
|
|
net.sf.json.JSONObject object = (net.sf.json.JSONObject) jsonArray.get(0);
|
|
|
if(null!=object){
|
|
|
object = (net.sf.json.JSONObject) object.get("row");
|
|
|
}
|
|
|
String ybFlag=null != object.get("yb_flag")?object.get("yb_flag").toString():"";
|
|
|
//市医保,1;省医保,2;自费,3,其他医保,99)
|
|
|
if (null != object.get("yb_flag") && "2".equals(object.get("yb_flag").toString())) {
|
|
|
if ("2".equals(ybFlag)) {
|
|
|
return true;
|
|
|
}
|
|
|
if (null != object.get("yb_flag") && ("1".equals(object.get("yb_flag").toString())) || "3".equals(object.get("yb_flag").toString())) {
|
|
|
String admDateStr = object.get("ADM_DAT").toString();
|
|
|
if (("1".equals(ybFlag) || "3".equals(ybFlag))) {
|
|
|
String admDateStr = object.get("ADM_DAT")+"";
|
|
|
//挂号时间
|
|
|
Date admDate = DateUtil.strToDate(admDateStr + "", DateUtil.YYYY_MM_DD);
|
|
|
SimpleDateFormat format = new SimpleDateFormat(DateUtil.yyyy_MM_dd_HH_mm_ss);
|
|
|
Date admDate = DateUtil.strToDate(admDateStr + "", DateUtil.YYYY_MM_DD_);
|
|
|
SimpleDateFormat format = new SimpleDateFormat(DateUtil.YYYY_MM_DD_);
|
|
|
//获取当前时间
|
|
|
String dateString = format.format(new Date());
|
|
|
Date nowDate = DateUtil.strToDate(dateString, DateUtil.YYYY_MM_DD);
|
|
|
Date nowDate = DateUtil.strToDate(dateString, DateUtil.YYYY_MM_DD_);
|
|
|
if (0 == nowDate.compareTo(admDate)) {
|
|
|
return true;
|
|
|
} else {
|