|
@ -47,6 +47,7 @@ import com.yihu.jw.entity.hospital.dict.WlyyChargeDictDO;
|
|
|
import com.yihu.jw.entity.hospital.doctor.WlyyDoctorOnlineTimeDO;
|
|
|
import com.yihu.jw.entity.hospital.doctor.WlyyDoctorWorkTimeDO;
|
|
|
import com.yihu.jw.entity.hospital.doctor.WlyyPatientRegisterTimeDO;
|
|
|
import com.yihu.jw.entity.hospital.family.WlyyPatientFamilyMemberDO;
|
|
|
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalMxDO;
|
|
|
import com.yihu.jw.entity.hospital.healthCare.YlzMedicalRelationDO;
|
|
|
import com.yihu.jw.entity.hospital.httplog.WlyyHttpLogDO;
|
|
@ -69,6 +70,7 @@ import com.yihu.jw.hospital.doctor.dao.DoctorWorkTimeDao;
|
|
|
import com.yihu.jw.hospital.doctor.dao.PatientRegisterTimeDao;
|
|
|
import com.yihu.jw.hospital.doctor.dao.WlyyDoctorOnlineTimeDao;
|
|
|
import com.yihu.jw.hospital.drugstore.dao.BaseDrugStoreDao;
|
|
|
import com.yihu.jw.hospital.family.dao.WlyyPatientFamilyMemberDao;
|
|
|
import com.yihu.jw.hospital.healthCare.YlzMedicailMxDao;
|
|
|
import com.yihu.jw.hospital.healthCare.YlzMedicailRelationDao;
|
|
|
import com.yihu.jw.hospital.httplog.dao.WlyyHttpLogDao;
|
|
@ -372,7 +374,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
private HealthCareNewService healthCareNewService;
|
|
|
@Autowired
|
|
|
private BasePatientAddressInfoDao addressInfoDao;
|
|
|
|
|
|
@Autowired
|
|
|
private WlyyPatientFamilyMemberDao familyMemberDao;
|
|
|
//已就诊医生列表
|
|
|
public PageEnvelop visitedDoctorPage(String patientId,String startTime,String endTime,Integer page,Integer size){
|
|
|
String sql = "SELECT d.id,d.name,d.job_title_name jobTitleName,o.dept_name deptName,d.photo,date_format(MAX(o.create_time),'%Y-%m-%d %H:%i:%S' )" +
|
|
@ -16072,4 +16075,50 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
|
|
|
return object;
|
|
|
}
|
|
|
|
|
|
public void initPatientAfter() throws Exception {
|
|
|
String sql = "select * from base_patient_temp ";
|
|
|
List<Map<String,Object>> maps = jdbcTemplate.queryForList(sql);
|
|
|
for (Map<String,Object> map:maps){
|
|
|
String idcard =map.get("idcard").toString();
|
|
|
String name = map.get("name").toString();
|
|
|
String mobile = map.get("mobile")==null?null:map.get("mobile").toString();
|
|
|
BasePatientDO patientDO = basePatientDao.findByIdcardAndDel(idcard,"1");
|
|
|
if(StringUtils.isNotBlank(idcard)&&patientDO == null){
|
|
|
BasePatientDO patient = new BasePatientDO();
|
|
|
String salt = UUID.randomUUID().toString().substring(0,5);
|
|
|
String pw = null;
|
|
|
pw = idcard.substring(idcard.length()-6);
|
|
|
patient.setIdcard(idcard);
|
|
|
patient.setName(name);
|
|
|
patient.setMobile(mobile);
|
|
|
patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
|
|
|
patient.setSalt(salt);
|
|
|
patient.setDel("1");
|
|
|
patient.setEnabled(1);
|
|
|
patient.setLocked(0);
|
|
|
patient.setSex(Integer.parseInt(com.yihu.jw.util.idcard.IdCardUtil.getSexForIdcard_new(idcard)));
|
|
|
patient.setCreateTime(new Date());
|
|
|
patient.setUpdateTime(new Date());
|
|
|
patient.setBirthday(DateUtil.strToDate(com.yihu.jw.util.idcard.IdCardUtil.getBirthdayForIdcardStr(idcard),"yyyyMMdd"));
|
|
|
patientDO = basePatientDao.save(patient);
|
|
|
WlyyPatientFamilyMemberDO basePatientFamilyMemberDO = familyMemberDao.findFamilyMemberByPatientAndRelationCode(patientDO.getId(),"7");
|
|
|
if (basePatientFamilyMemberDO==null){
|
|
|
basePatientFamilyMemberDO = new WlyyPatientFamilyMemberDO();
|
|
|
basePatientFamilyMemberDO.setPatient(patientDO.getId());
|
|
|
basePatientFamilyMemberDO.setFamilyRelation("7");
|
|
|
basePatientFamilyMemberDO.setFamilyRelationName("自己");
|
|
|
basePatientFamilyMemberDO.setCardType("身份证");
|
|
|
basePatientFamilyMemberDO.setCardNo(patientDO.getIdcard());
|
|
|
basePatientFamilyMemberDO.setCreateTime(new Date());
|
|
|
basePatientFamilyMemberDO.setUpdateTime(new Date());
|
|
|
basePatientFamilyMemberDO.setIsAuthorize(1);
|
|
|
basePatientFamilyMemberDO.setIsDel(1);
|
|
|
basePatientFamilyMemberDO.setFamilyMember(patientDO.getId());
|
|
|
familyMemberDao.save(basePatientFamilyMemberDO);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|