|
@ -167,10 +167,10 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
patientJson.put("idcard", idcard);
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + code.toString());
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
patientJson.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
patientJson.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
patientJson.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
patientJson.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
patientsMap.put(code.toString(), patientJson);
|
|
@ -208,7 +208,7 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
@ResponseBody
|
|
|
public String patientsByDisease(String type, String patientName) {
|
|
|
try {
|
|
|
System.out.println("patients_disease_start:" +new Date());
|
|
|
System.out.println("patients_disease_start:" + new Date());
|
|
|
JSONArray array = new JSONArray();
|
|
|
// 获取医生下的患者
|
|
|
List<Object> doctorPatients = new ArrayList<>();
|
|
@ -283,28 +283,28 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + code.toString());
|
|
|
|
|
|
if(diseases != null){
|
|
|
if (diseases != null) {
|
|
|
JSONArray dis = new JSONArray(diseases);
|
|
|
boolean gxyFlag = false;
|
|
|
boolean tnbFlag = false;
|
|
|
for(int i = 0; i < dis.length();i ++){
|
|
|
for (int i = 0; i < dis.length(); i++) {
|
|
|
JSONObject json = dis.getJSONObject(i);
|
|
|
if(json != null){
|
|
|
if(json.get("disease").toString().equals("1")){
|
|
|
if (json != null) {
|
|
|
if (json.get("disease").toString().equals("1")) {
|
|
|
gxyFlag = true;
|
|
|
}
|
|
|
if(json.get("disease").toString().equals("2")){
|
|
|
if (json.get("disease").toString().equals("2")) {
|
|
|
tnbFlag = true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if(gxyFlag){
|
|
|
if (gxyFlag) {
|
|
|
disease = 1;
|
|
|
}
|
|
|
if(tnbFlag){
|
|
|
if (tnbFlag) {
|
|
|
disease = 2;
|
|
|
}
|
|
|
if(gxyFlag && tnbFlag){
|
|
|
if (gxyFlag && tnbFlag) {
|
|
|
disease = 3;
|
|
|
}
|
|
|
}
|
|
@ -391,10 +391,10 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
patientJson.put("signType", signType);
|
|
|
patientJson.put("idcard", idcard);
|
|
|
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
patientJson.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
patientJson.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
patientJson.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
patientJson.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
if (group.equals("0")) {
|
|
@ -553,10 +553,10 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
patientJson.put("idcard", idcard);
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + code.toString());
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
patientJson.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
patientJson.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
patientJson.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
patientJson.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
patientsMap.put(code.toString(), patientJson);
|
|
@ -586,7 +586,7 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
/**
|
|
|
* 患者信息查询接口
|
|
|
*
|
|
|
* @param code 患者标识
|
|
|
* @param code 患者标识
|
|
|
* @param jyStatus 是否获取解约数据
|
|
|
* @return
|
|
|
*/
|
|
@ -634,52 +634,51 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
String diseases = "";
|
|
|
try {
|
|
|
diseases = redisTemplate.opsForValue().get("disease:" + code.toString());
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
json.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
json.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
json.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
json.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
SignFamily jtSign = null;
|
|
|
if( "1".equals(jyStatus)){
|
|
|
if ("1".equals(jyStatus)) {
|
|
|
List<SignFamily> ls = signFamilyDao.findLastJySignByPatient(code, 2);
|
|
|
jtSign = ls.size()>0? ls.get(0) : null;
|
|
|
}
|
|
|
else{
|
|
|
jtSign = signFamilyDao.findSignByPatient(code,2);
|
|
|
jtSign = ls.size() > 0 ? ls.get(0) : null;
|
|
|
} else {
|
|
|
jtSign = signFamilyDao.findSignByPatient(code, 2);
|
|
|
}
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(code,1);
|
|
|
SignFamily ssSign = signFamilyDao.findSignByPatient(code, 1);
|
|
|
|
|
|
|
|
|
// 家庭签约
|
|
|
if(jtSign != null){
|
|
|
if (jtSign != null) {
|
|
|
JSONObject jtJson = new JSONObject();
|
|
|
jtJson.put("code",jtSign.getCode());
|
|
|
jtJson.put("applyDate",DateUtil.dateToStr(jtSign.getPatientApplyDate(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
|
|
jtJson.put("applyUnsignDate",DateUtil.dateToStr(jtSign.getPatientApplyUnsignDate(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
|
|
jtJson.put("beginDate",DateUtil.dateToStr(jtSign.getBegin(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("endDate",DateUtil.dateToStr(jtSign.getEnd(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("expensesType",jtSign.getExpensesType());
|
|
|
jtJson.put("expensesStatus",jtSign.getExpensesStatus());
|
|
|
jtJson.put("expensesTime",jtSign.getExpensesTime() == null?"":new SimpleDateFormat("yyyy-MM-dd HH:mm").format(jtSign.getExpensesTime()));
|
|
|
jtJson.put("code", jtSign.getCode());
|
|
|
jtJson.put("applyDate", DateUtil.dateToStr(jtSign.getPatientApplyDate(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
|
|
jtJson.put("applyUnsignDate", DateUtil.dateToStr(jtSign.getPatientApplyUnsignDate(), DateUtil.YYYY_MM_DD_HH_MM_SS));
|
|
|
jtJson.put("beginDate", DateUtil.dateToStr(jtSign.getBegin(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("endDate", DateUtil.dateToStr(jtSign.getEnd(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("expensesType", jtSign.getExpensesType());
|
|
|
jtJson.put("expensesStatus", jtSign.getExpensesStatus());
|
|
|
jtJson.put("expensesTime", jtSign.getExpensesTime() == null ? "" : new SimpleDateFormat("yyyy-MM-dd HH:mm").format(jtSign.getExpensesTime()));
|
|
|
jtJson.put("jyDate", DateUtil.dateToStr(jtSign.getApplyUnsignDate(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("status",jtSign.getStatus());
|
|
|
json.put("jtSign",jtJson);
|
|
|
}else{
|
|
|
json.put("jtSign","");
|
|
|
jtJson.put("status", jtSign.getStatus());
|
|
|
json.put("jtSign", jtJson);
|
|
|
} else {
|
|
|
json.put("jtSign", "");
|
|
|
}
|
|
|
// 三师签约
|
|
|
if(ssSign != null){
|
|
|
if (ssSign != null) {
|
|
|
JSONObject jtJson = new JSONObject();
|
|
|
jtJson.put("code",ssSign.getCode());
|
|
|
jtJson.put("beginDate",DateUtil.dateToStr(ssSign.getBegin(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("endDate",DateUtil.dateToStr(ssSign.getEnd(), DateUtil.YYYY_MM_DD));
|
|
|
json.put("ssSign",jtJson);
|
|
|
}else{
|
|
|
json.put("ssSign","");
|
|
|
jtJson.put("code", ssSign.getCode());
|
|
|
jtJson.put("beginDate", DateUtil.dateToStr(ssSign.getBegin(), DateUtil.YYYY_MM_DD));
|
|
|
jtJson.put("endDate", DateUtil.dateToStr(ssSign.getEnd(), DateUtil.YYYY_MM_DD));
|
|
|
json.put("ssSign", jtJson);
|
|
|
} else {
|
|
|
json.put("ssSign", "");
|
|
|
}
|
|
|
|
|
|
return write(200, "患者信息查询成功!", "data", json);
|
|
@ -896,10 +895,10 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
patientJson.put("idcard", idcard);
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + code.toString());
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
patientJson.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
patientJson.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
patientJson.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
patientJson.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
patientsMap.put(code.toString(), patientJson);
|
|
@ -1077,10 +1076,10 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
patientJson.put("idcard", idcard);
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + code.toString());
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
patientJson.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
patientJson.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
patientJson.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
patientJson.put("diseases", "");
|
|
|
}
|
|
|
patients.put(code.toString(), patientJson);
|
|
|
}
|
|
@ -1224,12 +1223,16 @@ public class DoctorPatientGroupController extends BaseController {
|
|
|
|
|
|
/**
|
|
|
* 校验患者手机号是否呗注册
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "checkMobile")
|
|
|
@ResponseBody
|
|
|
public String checkMobile(String mobile) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(mobile)) {
|
|
|
return error(-1,"手机号不能为空");
|
|
|
}
|
|
|
patientInfoService.checkMobile(mobile);
|
|
|
return write(200, "验证成功");
|
|
|
} catch (Exception e) {
|