| 
					
				 | 
			
			
				@ -57,7 +57,6 @@ import com.yihu.jw.patient.dao.BaseDoctorPatientFollowDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.patient.dao.BasePatientDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.patient.dao.BasePatientMedicareCardDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.dict.DictHospitalDeptVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.doctor.BaseDoctorVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.base.org.BaseOrgVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.archive.ArchiveVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.consult.WlyyHospitalSysDictVO; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -65,7 +64,6 @@ import com.yihu.jw.restmodel.hospital.doctor.WlyyDoctorWorkTimeVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.hospital.prescription.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.MixEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.PageEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.rm.iot.IotRequestMapping; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -73,7 +71,6 @@ import com.yihu.jw.util.common.IdCardUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.common.LatitudeUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.date.DateUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.util.wechat.WeixinMessagePushUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				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; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -93,9 +90,6 @@ import net.sf.json.JSONObject; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import net.sf.json.xml.XMLSerializer; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.collections.map.HashedMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.jsoup.Jsoup; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.jsoup.nodes.Document; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.jsoup.select.Elements; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.Logger; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.slf4j.LoggerFactory; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.BeanUtils; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -4136,6 +4130,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    t.setDate(time.getDate()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    t.setTimeInterval(time.getTimeInterval()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    t.setSourceNumber(time.getSourceNumber()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    t.setCreateUser(time.getCreateUser()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    t.setCreateUserType(time.getCreateUserType()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    rs.add(t); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info(rs.size()+""); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -5941,7 +5937,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    //同步电子病历 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    WlyyPrescriptionEmrDO prescriptionEmrDO = prescriptionEmrDao.findEmrByPrescriptionId(prescriptionId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (prescriptionEmrDO!=null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        writeOutPatient(outpatientDO.getRegisterNo(),prescriptionEmrDO.getComplaint(),prescriptionEmrDO.getMedicalHistory(),prescriptionEmrDO.getPastHistory(),prescriptionEmrDO.getPhysicalExamination(),prescriptionEmrDO.getAssistExamination()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String doctorId = doctorMappingDO.getMappingCode(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String doctorName =doctorMappingDO.getDoctorName(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        writeOutPatient(outpatientDO.getRegisterNo(),prescriptionEmrDO.getComplaint(),prescriptionEmrDO.getMedicalHistory(),prescriptionEmrDO.getPastHistory(),prescriptionEmrDO.getPhysicalExamination(),prescriptionEmrDO.getAssistExamination(),doctorId,doctorName); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (map.get("code").toString().equalsIgnoreCase("1")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        //  * @param applyDepaName @param applyDoctorName 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -6376,7 +6374,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return wlyyPrescriptionEmrDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String writeOutPatient(String registerSn,String chiefComplaint,String hpi,String elapsemhis,String bodycheck,String assistanTcheck) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public String writeOutPatient(String registerSn,String chiefComplaint,String hpi,String elapsemhis,String bodycheck,String assistanTcheck,String doctorId,String doctorName) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String url = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        WlyyHospitalSysDictDO wlyyHospitalSysDictDO = hospitalSysDictDao.findById("HAI_TAI_URL"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (wlyyHospitalSysDictDO!=null){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -6387,6 +6385,9 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<REGISTER_SN>"+registerSn+"</REGISTER_SN>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String reqTime = DateUtil.dateToStr(new Date(),"yyyyMMddHHmmss"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<REQ_TIME>"+reqTime+"</REQ_TIME>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<TREAT_DOCTOR_ID></TREAT_DOCTOR_ID>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<TREAT_DOCTOR_NAME></REAT_DOCTOR_NAME>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<IS_SGIN>Y</IS_SGIN>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<OUTPATIENT_INFO>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<CHIEF_COMPLAINT>"+chiefComplaint+"</CHIEF_COMPLAINT>"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        xmlStr+="<HPI>"+hpi+"</HPI>"; 
			 |