|  | @ -109,7 +109,7 @@ public class XzzxEntranceService{
 | 
	
		
			
				|  |  |     public static String sendMessageUrl ="http://172.16.100.37:8090/hospitalPortal-sms/sms/sendMessage";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public static String entranceUrl = "http://172.16.100.240:10023/xzzx/";
 | 
	
		
			
				|  |  | //    public static String entranceUrl = "http://localhost:10023/xzzx/";
 | 
	
		
			
				|  |  |     public static String entranceUrlLocal = "http://localhost:10023/xzzx/";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public String getSelectUrl(){
 | 
	
	
		
			
				|  | @ -638,7 +638,7 @@ public class XzzxEntranceService{
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         XMLSerializer xmlSerializer = new XMLSerializer();
 | 
	
		
			
				|  |  |         String json = xmlSerializer.read(xml).toString();
 | 
	
		
			
				|  |  |         logger.info("getCardInfo json:"+json);
 | 
	
		
			
				|  |  |         logger.info("FindOutpatientInfo json:"+json);
 | 
	
		
			
				|  |  |         return json;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -1314,6 +1314,72 @@ public class XzzxEntranceService{
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public Map<String,Object> updatePreStatusLocal(String admNo,String realOrder,String status) throws Exception {
 | 
	
		
			
				|  |  |         Map<String,Object> map = new HashedMap();
 | 
	
		
			
				|  |  |         logger.info("admNo"+admNo+"=========realOrder"+realOrder+"===========status"+status);
 | 
	
		
			
				|  |  |         List<WlyyOutpatientDO> wlyyOutpatientDOList = outpatientDao.findByAdmNo(admNo);
 | 
	
		
			
				|  |  |         if (wlyyOutpatientDOList==null||wlyyOutpatientDOList.size()==0){
 | 
	
		
			
				|  |  |             throw new Exception("该就诊号查不到!");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         for (WlyyOutpatientDO wlyyOutpatientDO:wlyyOutpatientDOList){
 | 
	
		
			
				|  |  |             String registerNo = wlyyOutpatientDO.getRegisterNo();
 | 
	
		
			
				|  |  |             if (!StringUtils.isNoneBlank(registerNo)){
 | 
	
		
			
				|  |  |                 throw new Exception("挂号流水号为空!");
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(wlyyOutpatientDO.getPatient());
 | 
	
		
			
				|  |  |             List<WlyyPrescriptionDO> prescriptionDOList = prescriptionDao.findByOutpatientId(wlyyOutpatientDO.getId());
 | 
	
		
			
				|  |  |             if (prescriptionDOList==null||prescriptionDOList.size()==0){
 | 
	
		
			
				|  |  |                 List<WlyyPrescriptionVO> prescriptionVOList = selectOriginPrescriptionListLocal(registerNo,patientMappingDO.getMappingCode(),admNo,realOrder);
 | 
	
		
			
				|  |  |                 logger.info("处方数据"+prescriptionVOList);
 | 
	
		
			
				|  |  |                 for (WlyyPrescriptionVO prescriptionVO:prescriptionVOList){
 | 
	
		
			
				|  |  |                     WlyyPrescriptionDO prescriptionDO =JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(prescriptionVO)),WlyyPrescriptionDO.class);
 | 
	
		
			
				|  |  |                     prescriptionDO.setOutpatientId(wlyyOutpatientDO.getId());
 | 
	
		
			
				|  |  |                     if (status.equalsIgnoreCase("3")){
 | 
	
		
			
				|  |  |                         prescriptionDO.setStatus(30);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     prescriptionDO.setPatientCode(wlyyOutpatientDO.getPatient());
 | 
	
		
			
				|  |  |                     prescriptionDO.setDoctor(wlyyOutpatientDO.getDoctor());
 | 
	
		
			
				|  |  |                     prescriptionDO.setHospital("350211A5010");
 | 
	
		
			
				|  |  |                     prescriptionDO= prescriptionDao.save(prescriptionDO);
 | 
	
		
			
				|  |  |                     //处方诊断表vo
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionDiagnosisVO> diagnosisVOS = prescriptionVO.getDiagnosisVOs();
 | 
	
		
			
				|  |  |                     if (diagnosisVOS!=null&&diagnosisVOS.size()!=0){
 | 
	
		
			
				|  |  |                         for (WlyyPrescriptionDiagnosisVO diagnosisVO:diagnosisVOS){
 | 
	
		
			
				|  |  |                             WlyyPrescriptionDiagnosisDO prescriptionDiagnosisDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(diagnosisVO)),WlyyPrescriptionDiagnosisDO.class);
 | 
	
		
			
				|  |  |                             prescriptionDiagnosisDO.setPrescriptionId(prescriptionDO.getId());
 | 
	
		
			
				|  |  |                             prescriptionDiagnosisDO.setDel(1);
 | 
	
		
			
				|  |  |                             diagnosisDao.save(prescriptionDiagnosisDO);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     //药品表
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionInfoVO> infoVOList = prescriptionVO.getInfoVOs();
 | 
	
		
			
				|  |  |                     if (infoVOList!=null&&infoVOList.size()!=0){
 | 
	
		
			
				|  |  |                         for (WlyyPrescriptionInfoVO infoVO:infoVOList){
 | 
	
		
			
				|  |  |                             WlyyPrescriptionInfoDO infoDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(infoVO)),WlyyPrescriptionInfoDO.class);
 | 
	
		
			
				|  |  |                             infoDO.setPrescriptionId(prescriptionDO.getId());
 | 
	
		
			
				|  |  |                             infoDO.setDel(1);
 | 
	
		
			
				|  |  |                             prescriptionInfoDao.save(infoDO);
 | 
	
		
			
				|  |  |                         }
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     List<WlyyInspectionVO> inspectionVOList = prescriptionVO.getInspectionVOs();
 | 
	
		
			
				|  |  |                     if (inspectionVOList!=null&&inspectionVOList.size()!=0)
 | 
	
		
			
				|  |  |                     for (WlyyInspectionVO inspectionVO:inspectionVOList){
 | 
	
		
			
				|  |  |                         WlyyInspectionDO inspectionDO = JSONObject.toJavaObject(JSONObject.parseObject(JSONObject.toJSONString(inspectionVO)),WlyyInspectionDO.class);
 | 
	
		
			
				|  |  |                         BeanUtils.copyProperties(inspectionVO,inspectionDO);
 | 
	
		
			
				|  |  |                         inspectionDO.setPrescriptionId(prescriptionDO.getId());
 | 
	
		
			
				|  |  |                         inspectionDO.setDel(1);
 | 
	
		
			
				|  |  |                         wlyyInspectionDao.save(inspectionDO);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return map;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取门诊下所有处方信息
 | 
	
		
			
				|  |  |      * @param registerSn 流水号
 | 
	
	
		
			
				|  | @ -1334,7 +1400,7 @@ public class XzzxEntranceService{
 | 
	
		
			
				|  |  |         response = httpClientUtil.get(url,"GBK");
 | 
	
		
			
				|  |  |         logger.info("处方response:"+response+"===="+url);
 | 
	
		
			
				|  |  |         JSONObject object = JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |         if (object.getInteger("status")==200){
 | 
	
		
			
				|  |  |         if (object!=null&&object.getInteger("status")==200){
 | 
	
		
			
				|  |  |             JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |             array = JSONArray.parseArray(object.getString("obj")).getJSONArray(0);
 | 
	
		
			
				|  |  |             for (int i=0;i<array.size();i++){
 | 
	
	
		
			
				|  | @ -1486,6 +1552,181 @@ public class XzzxEntranceService{
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      * 获取门诊下所有处方信息---内网调下
 | 
	
		
			
				|  |  |      * @param registerSn 流水号
 | 
	
		
			
				|  |  |      * @param patNo 居民id
 | 
	
		
			
				|  |  |      * @param admNo 住院唯一号
 | 
	
		
			
				|  |  |      * @param realOrder 处方号
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<WlyyPrescriptionVO> selectOriginPrescriptionListLocal(String registerSn,String patNo,String admNo,String realOrder){
 | 
	
		
			
				|  |  |         List<WlyyPrescriptionVO> prescriptionVOList = new ArrayList<>();
 | 
	
		
			
				|  |  |         String response="";
 | 
	
		
			
				|  |  |         String params = "";
 | 
	
		
			
				|  |  |         if (StringUtils.isNoneBlank(realOrder)){
 | 
	
		
			
				|  |  |             params +="&realOrder="+realOrder;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         logger.info("处方request:"+registerSn+"=="+patNo+"==="+admNo+"===="+realOrder);
 | 
	
		
			
				|  |  |         String url = entranceUrlLocal+"getOriginPrescriptionList?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+params;
 | 
	
		
			
				|  |  |         response = httpClientUtil.get(url,"GBK");
 | 
	
		
			
				|  |  |         logger.info("处方response:"+response+"===="+url);
 | 
	
		
			
				|  |  |         JSONObject object = JSONObject.parseObject(response);
 | 
	
		
			
				|  |  |         if (object!=null&&object.getInteger("status")==200){
 | 
	
		
			
				|  |  |             JSONArray array = new JSONArray();
 | 
	
		
			
				|  |  |             array = JSONArray.parseArray(object.getString("obj")).getJSONArray(0);
 | 
	
		
			
				|  |  |             for (int i=0;i<array.size();i++){
 | 
	
		
			
				|  |  |                 WlyyPrescriptionVO wlyyPrescriptionVO = new WlyyPrescriptionVO();
 | 
	
		
			
				|  |  |                 JSONObject jsonObject = array.getJSONObject(i);
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCreateTime(DateUtil.strToDate(isEmty(jsonObject.getString("CREATETIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCreateUser(isEmty(jsonObject.getString("CREATEUSER")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCreateUserName(isEmty(jsonObject.getString("CREATENAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setUpdateTime(DateUtil.strToDate(isEmty(jsonObject.getString("UPDATETIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setUpdateUser(isEmty(jsonObject.getString("UPDATEUSER")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setUpdateUserName(isEmty(jsonObject.getString("UPDATEUSERNAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setRealOrder(isEmty(jsonObject.getString("REALORDER")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setOriginRealOrder(isEmty(jsonObject.getString("ORIGINREALORDER")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setAdmNo(isEmty(jsonObject.getString("ADMNO")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setOriginAdmNo(isEmty(jsonObject.getString("ORIGINADMNO")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setSerialNo(isEmty(jsonObject.getString("SERIALNO")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setOriginSerialNo(isEmty(jsonObject.getString("ORIGINSERIALNO")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setType(jsonObject.getInteger("TYPE"));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setPatientCode(isEmty(jsonObject.getString("PATIENTCODE")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setPatientName(isEmty(jsonObject.getString("PATEINTNAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setIdcard(isEmty(jsonObject.getString("IDCARD")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCardNo(isEmty(jsonObject.getString("CARDNO")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setSsc(isEmty(jsonObject.getString("SSC")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDoctor(isEmty(jsonObject.getString("DOCTOR")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDoctorName(isEmty(jsonObject.getString("DOCTORNAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setStatus(jsonObject.getInteger("STATUS"));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setMkFailReason(isEmty(jsonObject.getString("MKFAILREASON")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setMkTime(DateUtil.strToDate(isEmty(jsonObject.getString("MKTIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setPrescribeTime(DateUtil.strToDate(isEmty(jsonObject.getString("PRESCRIBETIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setPrescribeReason(isEmty(jsonObject.getString("PRESCRIBEREASON")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setPayTime(DateUtil.strToDate(isEmty(jsonObject.getString("PAYTIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDosageTime(DateUtil.strToDate(isEmty(jsonObject.getString("DOSAGETIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setFinishTime(DateUtil.strToDate(isEmty(jsonObject.getString("FINISHTIME"))));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDept(isEmty(jsonObject.getString("DEPT")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDeptName(isEmty(jsonObject.getString("DEPTNAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHospital(isEmty(jsonObject.getString("HOSPITAL")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHospitalName(isEmty(jsonObject.getString("HOSPITALNAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setConsult(isEmty(jsonObject.getString("CONSULT")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDispensaryType(isEmty(jsonObject.getString("DISPENSARYTYPE"))!=null?Integer.parseInt(isEmty(jsonObject.getString("DISPENSARYTYPE"))):null);
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setReason(isEmty(jsonObject.getString("REASON")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDiseaseImg(isEmty(jsonObject.getString("DISEASEIMG")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setRemark(isEmty(jsonObject.getString("REMARK")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCancelReason(isEmty(jsonObject.getString("CANCELREASON")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCaCertData(isEmty(jsonObject.getString("CACERTDATA")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setCaMessage(isEmty(jsonObject.getString("CAMESSAGE")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDigitalSignNo(isEmty(jsonObject.getString("DIGITALSIGNNO")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setOriginalDataAbstract(isEmty(jsonObject.getString("ORIGINALDATAABSTRACT")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setStrOriginalData(isEmty(jsonObject.getString("STRORIGINALDATA")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHisDeptCode(isEmty(jsonObject.getString("HISDEPTCODE")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHisDoctorCode(isEmty(jsonObject.getString("HISDOCTORCODE")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHisGisterTypeCode(isEmty(jsonObject.getString("HISGISTERTYPECODE")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHisRateTypeCode(isEmty(jsonObject.getString("HISRATETYPECODE")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHisHospital(isEmty(jsonObject.getString("HISHOSPITAL")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setHisRegisterFee(isEmty(jsonObject.getString("HISREGISTERFEE"))!=null?Integer.parseInt(isEmty(jsonObject.getString("HISREGISTERFEE"))):null);
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setPayStatus(isEmty(jsonObject.getString("PAYSTATUS"))!=null?Integer.parseInt(isEmty(jsonObject.getString("PAYSTATUS"))):null);
 | 
	
		
			
				|  |  |                 //TODO 快递数据
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDispUser(isEmty(jsonObject.getString("DISPUSER")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDispUserName(isEmty(jsonObject.getString("DISPUSERNAME")));
 | 
	
		
			
				|  |  |                 wlyyPrescriptionVO.setDispDate(DateUtil.strToDate(isEmty(jsonObject.getString("DISPDATE"))));
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 //诊断
 | 
	
		
			
				|  |  |                 String disagnosisUrl = entranceUrlLocal+"getOutpatientDiagnosis?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
 | 
	
		
			
				|  |  |                 String disagnosisResponse = httpClientUtil.get(disagnosisUrl,"GBK");
 | 
	
		
			
				|  |  |                 logger.info("诊断disagnosisResponse:"+disagnosisResponse);
 | 
	
		
			
				|  |  |                 JSONObject object1 = JSONObject.parseObject(disagnosisResponse);
 | 
	
		
			
				|  |  |                 if (object1.getString("status").equalsIgnoreCase("200")){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                     JSONArray jsonArray = JSONArray.parseArray(object1.getString("obj")).getJSONArray(0);
 | 
	
		
			
				|  |  |                     logger.info("诊断"+jsonArray.toJSONString());
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionDiagnosisVO> prescriptionDiagnosisVOS = new ArrayList<>();
 | 
	
		
			
				|  |  |                     for (int j=0;j<jsonArray.size();j++){
 | 
	
		
			
				|  |  |                         JSONObject disagnosisJson = jsonArray.getJSONObject(j);
 | 
	
		
			
				|  |  |                         WlyyPrescriptionDiagnosisVO prescriptionDiagnosisVO = new WlyyPrescriptionDiagnosisVO();
 | 
	
		
			
				|  |  |                         prescriptionDiagnosisVO.setCode(isEmty(disagnosisJson.getString("DIAGNOSECODE")));
 | 
	
		
			
				|  |  |                         prescriptionDiagnosisVO.setName(isEmty(disagnosisJson.getString("DIAGNOSENAME")));
 | 
	
		
			
				|  |  |                         prescriptionDiagnosisVO.setType(isEmty(disagnosisJson.getString("DIAGNOSETYPE"))==null?null:Integer.parseInt(disagnosisJson.getString("DIAGNOSETYPE")));
 | 
	
		
			
				|  |  |                         prescriptionDiagnosisVOS.add(prescriptionDiagnosisVO);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     wlyyPrescriptionVO.setDiagnosisVOs(prescriptionDiagnosisVOS);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 String infoUrl = entranceUrlLocal+"getOutpatientDrugInfo?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
 | 
	
		
			
				|  |  |                 String infoResponse = httpClientUtil.get(infoUrl,"GBK");
 | 
	
		
			
				|  |  |                 logger.info("药品infoResponse:"+infoResponse);
 | 
	
		
			
				|  |  |                 JSONObject infoObject = JSONObject.parseObject(infoResponse);
 | 
	
		
			
				|  |  |                 if (infoObject.getString("status").equalsIgnoreCase("200")) {
 | 
	
		
			
				|  |  |                     JSONArray infoArray = JSONArray.parseArray(infoObject.getString("obj")).getJSONArray(0);
 | 
	
		
			
				|  |  |                     //药品
 | 
	
		
			
				|  |  |                     List<WlyyPrescriptionInfoVO> wlyyPrescriptionInfoVOList = new ArrayList<>();
 | 
	
		
			
				|  |  |                     for (int j=0;j<infoArray.size();j++){
 | 
	
		
			
				|  |  |                         WlyyPrescriptionInfoVO prescriptionInfoVO = new WlyyPrescriptionInfoVO();
 | 
	
		
			
				|  |  |                         JSONObject infoJson = infoArray.getJSONObject(j);
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setDrugNo(isEmty(infoJson.getString("DRUGNO")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setDrugName(isEmty(infoJson.getString("DRUGNAME")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setDispDeposite(isEmty(infoJson.getString("DISPDEPOSITE")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setDosage(isEmty(infoJson.getString("DOSAGE")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setQuantity(isEmty(infoJson.getString("QUANTITY")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setUnit(isEmty(infoJson.getString("UNIT")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setUnitName(isEmty(infoJson.getString("UNITNAME")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setPackUnitName(isEmty(infoJson.getString("PACKUNITNAME")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setPackUnit(isEmty(infoJson.getString("PACKUNIT")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setUsageCode(isEmty(infoJson.getString("USAGECODE")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setUsageName(isEmty(infoJson.getString("USAGENAME")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setSupplyCode(isEmty(infoJson.getString("SUPPLYCODE")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setSupplyName(isEmty(infoJson.getString("SUPPLYNAME")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setDays(isEmty(infoJson.getString("DAYS")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setFrequency(isEmty(infoJson.getString("FREQUENCY")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setSerial(isEmty(infoJson.getString("SERIAL")));
 | 
	
		
			
				|  |  |                     /*    prescriptionInfoVO.setGroupNo(isEmty(infoJson.getString("groupNo")));*/
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setSpecification(isEmty(infoJson.getString("SPECIFICATION")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setPackRetprice(isEmty(infoJson.getString("PACKRETPRICE"))!=null?Double.parseDouble(isEmty(infoJson.getString("PACKRETPRICE"))):null);
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setHerbalCount(isEmty(infoJson.getString("HERBALCOUNT")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setPostCount(isEmty(infoJson.getString("POSTCOUNT")));
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setDel(isEmty(infoJson.getString("DEL"))!=null?Integer.parseInt(infoJson.getString("DEL")):null);
 | 
	
		
			
				|  |  |                         prescriptionInfoVO.setComm(infoJson.getString("COMM"));
 | 
	
		
			
				|  |  |                         wlyyPrescriptionInfoVOList.add(prescriptionInfoVO);
 | 
	
		
			
				|  |  |                         wlyyPrescriptionVO.setInfoVOs(wlyyPrescriptionInfoVOList);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 //检查检验内容
 | 
	
		
			
				|  |  |                 String inspectionUrl = entranceUrlLocal+"getOutpatientCheckTestInfo?registerSn="+registerSn+"&patNo="+patNo+"&admNo="+admNo+"&realOrder="+jsonObject.getString("REALORDER");
 | 
	
		
			
				|  |  |                 String inspectionResponse = httpClientUtil.get(inspectionUrl,"GBK");
 | 
	
		
			
				|  |  |                 logger.info("检查检验内容inspectionResponse:"+inspectionResponse);
 | 
	
		
			
				|  |  |                 JSONObject inspectionObject = JSONObject.parseObject(inspectionResponse);
 | 
	
		
			
				|  |  |                 if (inspectionObject.getString("status").equalsIgnoreCase("200")) {
 | 
	
		
			
				|  |  |                     List<WlyyInspectionVO> wlyyInspectionVOList = new ArrayList<>();
 | 
	
		
			
				|  |  |                     JSONArray inspectionArray = JSONArray.parseArray(inspectionObject.getString("obj")).getJSONArray(0);
 | 
	
		
			
				|  |  |                     for (int j=0;j<inspectionArray.size();j++){
 | 
	
		
			
				|  |  |                         WlyyInspectionVO inspectionVO = new WlyyInspectionVO();
 | 
	
		
			
				|  |  |                         JSONObject inspectionJson = inspectionArray.getJSONObject(j);
 | 
	
		
			
				|  |  |                         inspectionVO.setGroupName(isEmty(inspectionJson.getString("GROUPNAME")));
 | 
	
		
			
				|  |  |                         inspectionVO.setQuantity(isEmty(inspectionJson.getString("QUANTITYS"))!=null?Integer.parseInt(isEmty(inspectionJson.getString("QUANTITYS"))):null);
 | 
	
		
			
				|  |  |                         inspectionVO.setFrequency(isEmty(inspectionJson.getString("FREQUENCYS")));
 | 
	
		
			
				|  |  |                         inspectionVO.setParentCode(isEmty(inspectionJson.getString("PARENTCODE")));
 | 
	
		
			
				|  |  |                         inspectionVO.setParentName(isEmty(inspectionJson.getString("PARENTCODENAME")));
 | 
	
		
			
				|  |  |                         inspectionVO.setCode(isEmty(inspectionJson.getString("CODES")));
 | 
	
		
			
				|  |  |                         inspectionVO.setName(isEmty(inspectionJson.getString("NAMES")));
 | 
	
		
			
				|  |  |                         inspectionVO.setInformation(isEmty(inspectionJson.getString("INFORMATION")));
 | 
	
		
			
				|  |  |                         inspectionVO.setCheckEquip(isEmty(inspectionJson.getString("CHECKEQUIP")));
 | 
	
		
			
				|  |  |                         inspectionVO.setCheckPartName(isEmty(inspectionJson.getString("CHECKPARTNAME")));
 | 
	
		
			
				|  |  |                         inspectionVO.setCheckPart(isEmty(inspectionJson.getString("CHECKPART")));
 | 
	
		
			
				|  |  |                         wlyyInspectionVOList.add(inspectionVO);
 | 
	
		
			
				|  |  |                     }
 | 
	
		
			
				|  |  |                     wlyyPrescriptionVO.setInspectionVOs(wlyyInspectionVOList);
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 prescriptionVOList.add(wlyyPrescriptionVO);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return prescriptionVOList;
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     /**
 | 
	
		
			
				|  |  |      *
 | 
	
		
			
				|  |  |      * 挂号(调his后台包)
 |