|  | @ -1218,6 +1218,35 @@ public class XzzxEntranceService{
 | 
												
													
														
															|  |         return jsonObject;
 |  |         return jsonObject;
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     public String savePatientMapping(String patient){
 | 
												
													
														
															|  | 
 |  |         BasePatientDO patientDO = patientDao.findById(patient);
 | 
												
													
														
															|  | 
 |  |         PatientMappingDO patientMappingDO = patientMappingDao.findByPatient(patient);
 | 
												
													
														
															|  | 
 |  |         String response="";
 | 
												
													
														
															|  | 
 |  |         String idCard = patientDO.getIdcard();
 | 
												
													
														
															|  | 
 |  |         String url = entranceUrl+"findPatientCard?idCard="+idCard;
 | 
												
													
														
															|  | 
 |  |         response = httpClientUtil.get(url,"GBK");
 | 
												
													
														
															|  | 
 |  |         JSONObject object = JSONObject.parseObject(response);
 | 
												
													
														
															|  | 
 |  |         if(object.getInteger("status")==200){
 | 
												
													
														
															|  | 
 |  |             String obj = object.getString("obj");
 | 
												
													
														
															|  | 
 |  |             JSONArray array = JSONArray.parseArray(obj).getJSONArray(0);
 | 
												
													
														
															|  | 
 |  |             if (array!=null&&array.size()!=0){
 | 
												
													
														
															|  | 
 |  |                 JSONObject object1 = array.getJSONObject(0);
 | 
												
													
														
															|  | 
 |  |                 if (patientMappingDO==null){
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO = new PatientMappingDO();
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setIdcard(patientDO.getIdcard());
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setPatientName(patientDO.getName());
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setPatient(patientDO.getId());
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setCreateTime(new Date());
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setSource("1");
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setMappingCode(object1.getString("SICKID"));
 | 
												
													
														
															|  | 
 |  |                 }else {
 | 
												
													
														
															|  | 
 |  |                     patientMappingDO.setMappingCode(object1.getString("SICKID"));
 | 
												
													
														
															|  | 
 |  |                 }
 | 
												
													
														
															|  | 
 |  |                 patientMappingDO = patientMappingDao.save(patientMappingDO);
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |         return patientMappingDO.getMappingCode();
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     /**
 |  |     /**
 | 
												
													
														
															|  |      * 获取门诊就诊记录列表
 |  |      * 获取门诊就诊记录列表
 | 
												
											
												
													
														
															|  | @ -1232,7 +1261,7 @@ public class XzzxEntranceService{
 | 
												
													
														
															|  |         if (patientMappingDO!=null){
 |  |         if (patientMappingDO!=null){
 | 
												
													
														
															|  |             patient = patientMappingDO.getMappingCode();
 |  |             patient = patientMappingDO.getMappingCode();
 | 
												
													
														
															|  |         }else {
 |  |         }else {
 | 
												
													
														
															|  |             patient = null;
 |  | 
 | 
												
													
														
															|  | 
 |  |             patient = savePatientMapping(patient);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         String url = entranceUrl+"findOutpatientInfo?patient="+patient+"&startTime="+startTime+"&endTime="+endTime;
 |  |         String url = entranceUrl+"findOutpatientInfo?patient="+patient+"&startTime="+startTime+"&endTime="+endTime;
 | 
												
													
														
															|  |         response = httpClientUtil.get(url,"GBK");
 |  |         response = httpClientUtil.get(url,"GBK");
 | 
												
											
												
													
														
															|  | @ -1284,7 +1313,7 @@ public class XzzxEntranceService{
 | 
												
													
														
															|  |         if (patientMappingDO!=null){
 |  |         if (patientMappingDO!=null){
 | 
												
													
														
															|  |             patient = patientMappingDO.getMappingCode();
 |  |             patient = patientMappingDO.getMappingCode();
 | 
												
													
														
															|  |         }else {
 |  |         }else {
 | 
												
													
														
															|  |             patient = null;
 |  | 
 | 
												
													
														
															|  | 
 |  |             patient = savePatientMapping(patient);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         String url = entranceUrl+"findOutpatientInfo?patient="+patient+"&conNo="+conNo;
 |  |         String url = entranceUrl+"findOutpatientInfo?patient="+patient+"&conNo="+conNo;
 | 
												
													
														
															|  |         response = httpClientUtil.get(url,"GBK");
 |  |         response = httpClientUtil.get(url,"GBK");
 |