|
@ -377,7 +377,7 @@ public class FamilyContractService extends BaseService {
|
|
|
* @param patient 患者标识
|
|
|
* @return
|
|
|
*/
|
|
|
public JSONObject findJiMeiDoctorMainPage(String patient, String doctor) {
|
|
|
public JSONObject findJiMeiDoctorMainPage(String patient, String doctor,Integer page,Integer pagesize) {
|
|
|
JSONObject json = new JSONObject();
|
|
|
// 查询医生基本信息
|
|
|
Doctor d = doctorDao.findByCode(doctor);
|
|
@ -395,19 +395,29 @@ public class FamilyContractService extends BaseService {
|
|
|
json.put("level", d.getLevel());
|
|
|
|
|
|
SignFamily sf = signFamilyDao.findByjiatingPatient(patient);
|
|
|
if(sf==null||!sf.getHospital().startsWith("350211")){
|
|
|
//未签约和不是集美签约的按原有接口走
|
|
|
|
|
|
}else {
|
|
|
//获取健康文章
|
|
|
com.alibaba.fastjson.JSONArray jsonArray = new com.alibaba.fastjson.JSONArray();
|
|
|
try {
|
|
|
jsonArray = healthEducationArticleService.getDoctorArticalByUserId(null,1,null,0,3,doctor);
|
|
|
}catch (Exception e){
|
|
|
logger.error("获取福州健康文章失败,"+e.getMessage());
|
|
|
if (sf == null) {
|
|
|
// 没有签约信息
|
|
|
json.put("sign", -1);
|
|
|
json.put("isjimei", 0);
|
|
|
} else {
|
|
|
// 有签约信息
|
|
|
json.put("sign", sf.getStatus());
|
|
|
if(sf.getHospital().startsWith("350211")){
|
|
|
json.put("isjimei", 1);
|
|
|
}else {
|
|
|
json.put("isjimei", 0);
|
|
|
}
|
|
|
json.put("healthEduArticles",jsonArray);
|
|
|
}
|
|
|
|
|
|
//获取健康文章
|
|
|
com.alibaba.fastjson.JSONArray jsonArray = new com.alibaba.fastjson.JSONArray();
|
|
|
try {
|
|
|
jsonArray = healthEducationArticleService.getDoctorArticalByUserId(null,1,null,page,pagesize,doctor);
|
|
|
}catch (Exception e){
|
|
|
logger.error("获取福州健康文章失败,"+e.getMessage());
|
|
|
}
|
|
|
json.put("healthEduArticles",jsonArray);
|
|
|
|
|
|
return json;
|
|
|
}
|
|
|
|
|
@ -2057,6 +2067,40 @@ public class FamilyContractService extends BaseService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取签约医生
|
|
|
* @param patientCode
|
|
|
* @return
|
|
|
*/
|
|
|
public com.alibaba.fastjson.JSONArray getSignDoctors(String patientCode){
|
|
|
com.alibaba.fastjson.JSONArray jsonArray = new com.alibaba.fastjson.JSONArray();
|
|
|
SignFamily jtSignFamily = signFamilyDao.findFamilySignByPatient(patientCode);
|
|
|
if (jtSignFamily != null) {
|
|
|
Patient patient = patientDao.findByCode(patientCode);
|
|
|
Doctor doctor = doctorDao.findByCode(jtSignFamily.getDoctor());
|
|
|
if (doctor != null) {
|
|
|
com.alibaba.fastjson.JSONObject jo = new com.alibaba.fastjson.JSONObject();
|
|
|
jo.put("code", doctor.getCode());
|
|
|
jo.put("sex", doctor.getSex());
|
|
|
jo.put("name", doctor.getName());
|
|
|
jo.put("photo", doctor.getPhoto());
|
|
|
jo.put("hosptialName", doctor.getHospitalName());
|
|
|
jo.put("level", doctor.getLevel());
|
|
|
jo.put("signType", "2");//2是家庭
|
|
|
jo.put("signStatus", jtSignFamily.getStatus());
|
|
|
jo.put("jobName", doctor.getJobName());
|
|
|
jo.put("disease", patient.getDisease());//0健康,1高血压,2糖尿病,3高血压+糖尿病
|
|
|
if (jtSignFamily.getStatus() == 0) {
|
|
|
jo.put("sqDate", DateUtil.dateToStrShort(jtSignFamily.getPatientApplyDate()));//申请时间
|
|
|
} else {
|
|
|
jo.put("qyDate", DateUtil.dateToStrShort(jtSignFamily.getBegin()));//签约时间
|
|
|
jo.put("endDate", DateUtil.dateToStrShort(jtSignFamily.getEnd()));//结束时间
|
|
|
}
|
|
|
jsonArray.add(jo);
|
|
|
}
|
|
|
}
|
|
|
return jsonArray;
|
|
|
}
|
|
|
public JSONArray getSignDoctorMessage(String patientCode) {
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
//找出患者的三师签约信息
|