|
@ -66,6 +66,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "getSignMessage")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("得到患者的签约的医生的信息")
|
|
|
public String getSignDoctorMessage(String patientCode) {
|
|
|
try {
|
|
|
|
|
@ -80,6 +81,7 @@ public class FamilyContractController extends BaseController {
|
|
|
|
|
|
@RequestMapping(value = "getSignMessageOverdue")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("")
|
|
|
public String getSignDoctorMessageOverDue(String patientCode) {
|
|
|
try {
|
|
|
|
|
@ -104,6 +106,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "hospitals")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("社区医院列表查询接口")
|
|
|
public String hospitals(
|
|
|
int type,
|
|
|
@RequestParam(required = false) String province,
|
|
@ -156,6 +159,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "doctors")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("社区医院下医生列表查询接口")
|
|
|
public String hospitalList(String hospital, long id, int pagesize) {
|
|
|
try {
|
|
|
JSONArray array = new JSONArray();
|
|
@ -201,6 +205,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "homepage")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("医生主页信息查询接口")
|
|
|
public String homepage(String doctor) {
|
|
|
try {
|
|
|
JSONObject json = familyContractService.findDoctorMainPage(getRepUID(), doctor);
|
|
@ -224,6 +229,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "status")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("与指定医生的签约状态查询接口")
|
|
|
public String signStatus(String doctor) {
|
|
|
try {
|
|
|
// -1未签约,0待签约,1已签约,2患者申请取消签约,3医生申请取消签约
|
|
@ -245,6 +251,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "getPatientSign")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("得到患者的签约信息")
|
|
|
public String getPatientSign(
|
|
|
String homePageDoctorCode,//主页医生code
|
|
|
String invitePatientCode //邀请患者
|
|
@ -310,6 +317,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "checkOpenid")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("校验openid是否有签约信息")
|
|
|
public String checkOpenid() {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(getOpenid())) {
|
|
@ -332,6 +340,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "check")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("校验是否有签约信息")
|
|
|
public String checkSign(String idcard) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(idcard)) {
|
|
@ -370,92 +379,6 @@ public class FamilyContractController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// /**
|
|
|
// * 发送签约申请
|
|
|
// *
|
|
|
// * @param province 省代码
|
|
|
// * @param provinceName 省名称
|
|
|
// * @param city 城市代码
|
|
|
// * @param cityName 城市名称
|
|
|
// * @param town 区县代码
|
|
|
// * @param townName 区县名称
|
|
|
// * @param address 详细地址
|
|
|
// * @param name 患者姓名
|
|
|
// * @param doctor 医生标识
|
|
|
// * @param idcard 患者身份证号
|
|
|
// * @param ssc 患者社保卡号
|
|
|
// * @param mobile 患者手机号
|
|
|
// * @param emerMobile 患者紧急联系人
|
|
|
// */
|
|
|
// @RequestMapping(value = "sign")
|
|
|
// @ResponseBody
|
|
|
// public String sign(
|
|
|
// @RequestParam(required = false) String province,
|
|
|
// @RequestParam(required = false) String provinceName,
|
|
|
// @RequestParam(required = false) String city,
|
|
|
// @RequestParam(required = false) String cityName,
|
|
|
// @RequestParam(required = false) String town,
|
|
|
// @RequestParam(required = false) String townName,
|
|
|
// @RequestParam(required = false) String address,
|
|
|
// String name,
|
|
|
// String doctor,
|
|
|
// String doctorName,
|
|
|
// @RequestParam(required = false) String patientCode,
|
|
|
// @RequestParam(required = false) String idcard,
|
|
|
// String ssc,
|
|
|
// @RequestParam(required = false) String mobile,
|
|
|
// @RequestParam(required = false) String emerMobile) {
|
|
|
// try {
|
|
|
// // String openid = getOpenid();
|
|
|
// // String uid = getUID();
|
|
|
// // if (StringUtils.isEmpty(openid) && StringUtils.isEmpty(uid)) {
|
|
|
// // return error(-1, "无效的用户请求!");
|
|
|
// // }
|
|
|
// // if (StringUtils.isEmpty(idcard)) {
|
|
|
// // return error(-1, "身份证号不允许为空!");
|
|
|
// // }
|
|
|
// // // 解密身份证号
|
|
|
//// idcard = RSAUtils.getInstance(familyContractService).decryptString(idcard);
|
|
|
//// idcard = URLDecoder.decode(idcard, "UTF-8");
|
|
|
//// idcard = StringUtils.reverse(idcard);
|
|
|
// if (StringUtils.isEmpty(patientCode)) {
|
|
|
// patientCode = getUID();
|
|
|
// }
|
|
|
// Patient patient = patientService.findByCode(patientCode);
|
|
|
// int amount = familyContractService.hasSingStatus(patient.getIdcard());
|
|
|
// if (amount > 0) {
|
|
|
// return error(-1, "只可以签约一个家庭医生!");
|
|
|
// }
|
|
|
// JSONObject json = familyContractService.sign(patient.getProvince(), patient.getProvinceName(),
|
|
|
// patient.getCity(), patient.getCityName(), patient.getTown(), patient.getTownName(), patient.getAddress(),
|
|
|
// patient.getName(), doctor, patient.getOpenid(), patient.getCode(), patient.getIdcard(), patient.getSsc(), patient.getMobile(), emerMobile);
|
|
|
// int res = json.getInt("res");
|
|
|
// if (res == -2) {
|
|
|
// return error(-1, "身份证号与当前登录用户的身份证号不匹配!");
|
|
|
// } else if (res == -3) {
|
|
|
// return error(-1, "身份证号已经注册!");
|
|
|
// }
|
|
|
// //更新患者信息
|
|
|
//// if (StringUtils.isEmpty(name) ) {
|
|
|
//// patient.setName(name);
|
|
|
//// }
|
|
|
//// if (StringUtils.isEmpty(idcard) ) {
|
|
|
//// patient.setIdcard(idcard);
|
|
|
//// }
|
|
|
// if (StringUtils.isEmpty(ssc)) {
|
|
|
// patient.setSsc(ssc);
|
|
|
// }
|
|
|
//// if (StringUtils.isEmpty(mobile) ) {
|
|
|
//// patient.setMobile(mobile);
|
|
|
//// }
|
|
|
// patientService.updatePatientInfo(patient);
|
|
|
// return write(200, "签约申请已发送!", "data", json);
|
|
|
// } catch (Exception e) {
|
|
|
// error(e);
|
|
|
// return error(-1, "签约申请发送失败!");
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* 签约申请
|
|
|
*
|
|
@ -464,6 +387,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "sign")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("签约申请")
|
|
|
public String sign(@RequestParam(required = false)String doctor,
|
|
|
@RequestParam(required = false)String patient,
|
|
|
@RequestParam(required = false)String countryCode) {
|
|
@ -497,6 +421,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "signRenew")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("续签申请")
|
|
|
public String signRenew(@RequestParam(required = true) String doctor,
|
|
|
@RequestParam(required = false) String healthDoctor,
|
|
|
@RequestParam(required = false) String patient,
|
|
@ -544,6 +469,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "unsign")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("取消签约申请")
|
|
|
public String unsign(
|
|
|
String doctor,
|
|
|
@RequestParam(required = false) String patientCode
|
|
@ -573,6 +499,7 @@ public class FamilyContractController extends BaseController {
|
|
|
|
|
|
@RequestMapping(value = "unsignRenew")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("取消续签约申请")
|
|
|
public String unsignRenew(
|
|
|
String doctor,
|
|
|
@RequestParam(required = false) String patientCode
|
|
@ -603,6 +530,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "surrender")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("申请解约")
|
|
|
public String surrender(String doctor, String doctorName, String reason,
|
|
|
@RequestParam(required = false) String patientCode) {
|
|
|
try {
|
|
@ -628,6 +556,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "messages")
|
|
|
@ResponseBody
|
|
|
@ApiOperation("查询患者相关的签约消息")
|
|
|
public String messages(long id, int pagesize) {
|
|
|
try {
|
|
|
JSONArray array = new JSONArray();
|
|
@ -679,6 +608,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/doctor_sign_exist", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
@ApiOperation("查询居民是否与某个医生存在签约关系")
|
|
|
public String isPatientAndDoctorExistSign(@RequestParam(required = true) String doctor) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(doctor)) {
|
|
@ -701,6 +631,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/doctor_can_sign", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
@ApiOperation("查询居民与某个医生是否可签约")
|
|
|
public String isPatientAndDoctorCanSign(@RequestParam(required = true) String doctor) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(doctor)) {
|
|
@ -722,6 +653,7 @@ public class FamilyContractController extends BaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/checkCanRenew", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
@ApiOperation("验证是否允许签约")
|
|
|
public String checkCanRenew(@RequestParam(required = true) String patient){
|
|
|
try {
|
|
|
JSONObject result = patientService.checkCanSignRenew(patient);
|