|
@ -871,6 +871,77 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询待签约患者数据
|
|
|
*
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/patient_signing_renew")
|
|
|
@ResponseBody
|
|
|
public String getSigningRenewPatientInfo(@RequestParam String patient) {
|
|
|
try {
|
|
|
Patient temp = patientInfoService.findByCode(patient);
|
|
|
if (temp != null) {
|
|
|
JSONObject json = new JSONObject();
|
|
|
// 设置患者标识
|
|
|
json.put("code", temp.getCode());
|
|
|
// 设置患者姓名
|
|
|
json.put("name", temp.getName());
|
|
|
// 设置患者头像
|
|
|
json.put("photo", temp.getPhoto());
|
|
|
// 设置患者年龄
|
|
|
json.put("age", DateUtil.getAgeByBirthday(temp.getBirthday()));
|
|
|
// 设置患者性别
|
|
|
json.put("sex", temp.getSex());
|
|
|
// 设置患者病情:0绿标,1黄标,2红标
|
|
|
json.put("diseaseLevel", temp.getDiseaseCondition());
|
|
|
// 设置患者身份证号
|
|
|
json.put("idCard", temp.getIdcard());
|
|
|
// 设置患者出生年月
|
|
|
json.put("birthday", DateUtil.dateToStr(temp.getBirthday(), DateUtil.YYYY_MM_DD));
|
|
|
// 设置患者手机号码
|
|
|
json.put("mobile", temp.getMobile());
|
|
|
// 设置患者联系电话
|
|
|
json.put("phone", temp.getPhone());
|
|
|
// 设置患者居住省份
|
|
|
json.put("provinceName", temp.getProvinceName());
|
|
|
json.put("cityName", temp.getCityName());
|
|
|
json.put("townName", temp.getTownName());
|
|
|
json.put("streetName", temp.getStreetName());
|
|
|
// 设置患者地址
|
|
|
json.put("address", temp.getAddress());
|
|
|
//设置患者医保号
|
|
|
json.put("ssc", temp.getSsc());
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + patient);
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
json.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
json.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
SignFamily jtSign = familyContractService.findSigningRenewByPatient(patient);
|
|
|
|
|
|
// 家庭签约
|
|
|
if (jtSign != null) {
|
|
|
json.put("applySurrDate", jtSign.getPatientApplyUnsignDate());
|
|
|
json.put("applyDate", jtSign.getPatientApplyDate());
|
|
|
json.put("jtSign", new JSONObject(jtSign));
|
|
|
} else {
|
|
|
throw new Exception("未找到患者待家庭签约的数据");
|
|
|
}
|
|
|
|
|
|
return write(200, "患者信息查询成功!", "data", json);
|
|
|
} else {
|
|
|
return error(-1, "患者信息查询失败!");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "患者信息查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取家庭签约社保流水号
|
|
|
*
|