|
@ -1,5 +1,6 @@
|
|
|
package com.yihu.wlyy.web.patient.account;
|
|
|
|
|
|
import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
|
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
@ -21,6 +22,7 @@ import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
import com.yihu.wlyy.wechat.util.WeiXinTagUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.json.JSONArray;
|
|
|
import org.json.JSONObject;
|
|
@ -918,4 +920,65 @@ public class PatientController extends WeixinBaseController {
|
|
|
return error(-1, "切换账号失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "createProfile",method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("档案建立")
|
|
|
@ObserverRequired
|
|
|
public String createProfile(@ApiParam(value = "医生code", name = "doctorCode") @RequestParam(required = true)String doctorCode ,
|
|
|
@ApiParam(value = "患者code", name = "patient") @RequestParam(required = true)String patient,
|
|
|
@ApiParam(value = "生日(yyyy-MM-dd)", name = "brithday") @RequestParam(required = true)String brithday,
|
|
|
@ApiParam(value = "居委会", name = "jwCountryCode") @RequestParam(required = true)String jwCountryCode,
|
|
|
@ApiParam(value = "民族", name = "nation") @RequestParam(required = true)String nation,
|
|
|
@ApiParam(value = "血型", name = "blood") @RequestParam(required = true)String blood,
|
|
|
@ApiParam(value = "婚姻状况", name = "marry") @RequestParam(required = true)String marry,
|
|
|
@ApiParam(value = "详细地址", name = "adress") @RequestParam(required = true)String adress){
|
|
|
try {
|
|
|
// 获取医生下的患者
|
|
|
return write(200, "档案建立成功!", "data", patientInfoService.createProfile(doctorCode , patient,brithday, jwCountryCode, nation, blood, marry,adress));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return invalidUserException(e, -1, "档案建立失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getNationDict",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("获取民族信息列表")
|
|
|
public String getNationDict(){
|
|
|
try {
|
|
|
// 获取医生下的患者
|
|
|
return write(200, "获取成功!", "data",patientInfoService.getNationDict());
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return invalidUserException(e, -1, "获取字典信息失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "getMarryDict",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("婚姻状态字典")
|
|
|
public String getMarryDict(){
|
|
|
try {
|
|
|
// 获取医生下的患者
|
|
|
return write(200, "获取成功!", "data",patientInfoService.getMarryDict());
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return invalidUserException(e, -1, "获取字典信息失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "getBloodDict",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("血型状态字典")
|
|
|
public String getBloodDict(){
|
|
|
try {
|
|
|
// 获取医生下的患者
|
|
|
return write(200, "获取成功!", "data",patientInfoService.getBloodDict());
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return invalidUserException(e, -1, "获取字典信息失败!");
|
|
|
}
|
|
|
}
|
|
|
}
|