|  | @ -12,7 +12,6 @@ import com.yihu.jw.entity.base.dict.DictDeptDescDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.im.ConsultDo;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.im.ConsultTeamDo;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.org.BaseDoctorPatientFollowDO;
 | 
	
		
			
				|  |  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 | 
	
	
		
			
				|  | @ -80,7 +79,6 @@ import com.yihu.jw.util.wechat.WeixinMessagePushUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.GenerateUserSig;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.Pkis.PKIService_PortType;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.Pkis.PKIService_ServiceLocator;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.StringUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.WebserviceUtil;
 | 
	
		
			
				|  |  | import com.yihu.jw.utils.hibernate.HibenateUtils;
 | 
	
		
			
				|  |  | import com.yihu.jw.wechat.dao.BasePatientWechatDao;
 | 
	
	
		
			
				|  | @ -281,9 +279,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @return
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<WlyyOutpatientVO> findOutpatientList(String patient, String startTime, String endTime, boolean demoFlag,String ksdm) throws Exception {
 | 
	
		
			
				|  |  |     public List<WlyyOutpatientVO> findOutpatientList(String patient, String startTime, String endTime, boolean demoFlag,String ksdm,String cardNo) throws Exception {
 | 
	
		
			
				|  |  |         logger.info("findOutpatientList patient:" + patient);
 | 
	
		
			
				|  |  |         String patNo = patientMappingService.findHisPatNoByPatient(patient);
 | 
	
		
			
				|  |  |         String patNo = patientMappingService.findHisPatNoByPatient(patient,cardNo);
 | 
	
		
			
				|  |  |         if (StringUtils.isBlank(patNo)) {
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -300,7 +298,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public WlyyOutpatientVO findOutpatientInfo(String patient, String conNo) throws Exception {
 | 
	
		
			
				|  |  |         logger.info("findOutpatientList patient:" + patient);
 | 
	
		
			
				|  |  |         String patNo = patientMappingService.findHisPatNoByPatient(patient);
 | 
	
		
			
				|  |  |         /*String patNo = patientMappingService.findHisPatNoByPatient(patient);*/
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = basePatientDao.findById(patient);
 | 
	
		
			
				|  |  |         if (patientDO==null){
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
 | 
	
		
			
				|  |  |         String patNo = "";
 | 
	
		
			
				|  |  |         if (patientMappingDO!=null){
 | 
	
		
			
				|  |  |             patNo = patientMappingDO.getMappingCode();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isBlank(patNo)) {
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -309,7 +316,6 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         if (list != null && list.size() > 0) {
 | 
	
		
			
				|  |  |             WlyyOutpatientVO outpatientVO = list.get(0);
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = basePatientDao.findById(patient);
 | 
	
		
			
				|  |  |             outpatientVO.setSex(patientDO.getSex() + "");
 | 
	
		
			
				|  |  |             outpatientVO.setBirthday(patientDO.getBirthday());
 | 
	
		
			
				|  |  |             outpatientVO.setIdcard(patientDO.getIdcard());
 | 
	
	
		
			
				|  | @ -322,7 +328,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      *
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<WlyyPrescriptionVO> findOriginPrescriptionList(String registerSn, String patient, String realOrder, String admNo, boolean demoFlag) throws Exception {
 | 
	
		
			
				|  |  |         String patNo = patientMappingService.findHisPatNoByPatient(patient);
 | 
	
		
			
				|  |  |         /*String patNo = patientMappingService.findHisPatNoByPatient(patient);*/
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = basePatientDao.findById(patient);
 | 
	
		
			
				|  |  |         if (patientDO==null){
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
 | 
	
		
			
				|  |  |         String patNo = "";
 | 
	
		
			
				|  |  |         if (patientMappingDO!=null){
 | 
	
		
			
				|  |  |             patNo = patientMappingDO.getMappingCode();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isBlank(patNo)) {
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -348,7 +363,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |      * @throws Exception
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public WlyyPrescriptionVO findOriginPrescription(String registerSn, String patient, String admNo, String realOrder, boolean demoFlag) throws Exception {
 | 
	
		
			
				|  |  |         String patNo = patientMappingService.findHisPatNoByPatient(patient);
 | 
	
		
			
				|  |  |         /*String patNo = patientMappingService.findHisPatNoByPatient(patient);*/
 | 
	
		
			
				|  |  |         BasePatientDO patientDO = basePatientDao.findById(patient);
 | 
	
		
			
				|  |  |         if (patientDO==null){
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
 | 
	
		
			
				|  |  |         String patNo = "";
 | 
	
		
			
				|  |  |         if (patientMappingDO!=null){
 | 
	
		
			
				|  |  |             patNo = patientMappingDO.getMappingCode();
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         if (StringUtils.isBlank(patNo)) {
 | 
	
		
			
				|  |  |             return null;
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -7643,7 +7667,15 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |     public JSONArray findPatientRecord(String idcard, String patient, String admitNum, String ybcard) throws Exception {
 | 
	
		
			
				|  |  |         String patientId = null;
 | 
	
		
			
				|  |  |         if (StringUtils.isNotBlank(patient)) {
 | 
	
		
			
				|  |  |             patientId = patientMappingService.findHisPatNoByPatient(patient);
 | 
	
		
			
				|  |  |             /*patientId = patientMappingService.findHisPatNoByPatient(patient);*/
 | 
	
		
			
				|  |  |             BasePatientDO patientDO = basePatientDao.findById(patient);
 | 
	
		
			
				|  |  |             if (patientDO==null){
 | 
	
		
			
				|  |  |                 return null;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |             PatientMappingDO patientMappingDO = patientMappingDao.findByIdcardAndSource(patientDO.getIdcard(),"1");
 | 
	
		
			
				|  |  |             if (patientMappingDO!=null){
 | 
	
		
			
				|  |  |                 patientId = patientMappingDO.getMappingCode();
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         return entranceService.BS10008(idcard, null,null,patientId, admitNum, ybcard, demoFlag);
 | 
	
		
			
				|  |  |     }
 |