|
|
@ -28,86 +28,96 @@ import java.util.List; |
|
|
|
@RequestMapping("/patient") |
|
|
|
@Slf4j |
|
|
|
public class PatientController { |
|
|
|
// @Resource
|
|
|
|
// private IPatientService patientService;
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "主治医生查看患者列表", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/doctorId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse<List<PatientVo.Patient>> queryPatientByDoctorId(@ApiParam @Validated @RequestBody QueryDto<HospitalDto.DoctorId> params) {
|
|
|
|
// log.info("主治医生查看患者列表:{}",params);
|
|
|
|
// List<PatientVo.Patient> patientList = patientService.queryPatientByDoctorId(params.getParam(),params.getUserId());
|
|
|
|
// log.info("主治医生查看患者列表成功:{}",patientList);
|
|
|
|
// return JsonResponse.newInstance().ok(patientList);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "康复中心查看患者列表", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/recovery", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse<List<PatientVo.Patient>> queryPatientByRecovery(@ApiParam @Validated @RequestBody QueryDto<HospitalDto.HospitalId> params) {
|
|
|
|
// log.info("康复中心查看患者列表:{}",params);
|
|
|
|
// List<PatientVo.Patient> patientList = patientService.queryPatientByRecovery(params.getParam(),params.getUserId());
|
|
|
|
// log.info("康复中心查看患者列表成功:{}",patientList);
|
|
|
|
// return JsonResponse.newInstance().ok(patientList);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "查看患者的详细信息", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/detail", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse<PatientVo.Patient> getPatientById(@ApiParam @Validated @RequestBody QueryDto<PatientDto.PatientId> params) {
|
|
|
|
// log.info("查看患者的详细信息:{}",params);
|
|
|
|
// PatientVo.Patient patient = patientService.getPatientById(params.getParam(),params.getUserId());
|
|
|
|
// log.info("查看患者的详细信息成功:{}",patient);
|
|
|
|
// return JsonResponse.newInstance().ok(patient);
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "添加患者", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse addPatient(@ApiParam @Validated @RequestBody QueryDto<PatientDto.PatientDetail> params) {
|
|
|
|
// log.info("添加患者:{}",params);
|
|
|
|
// patientService.addPatient(params.getParam(),params.getUserId());
|
|
|
|
// log.info("添加患者成功");
|
|
|
|
// return JsonResponse.newInstance().ok();
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "康复医生选择需要做康复的患者", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/choose", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse choosePatient(@ApiParam @Validated @RequestBody QueryDto<PatientDto.ChoosePatient> params) {
|
|
|
|
// log.info("康复医生选择需要做康复的患者:{}",params);
|
|
|
|
// patientService.choosePatient(params.getParam(),params.getUserId());
|
|
|
|
// log.info("康复医生选择需要做康复的患者成功");
|
|
|
|
// return JsonResponse.newInstance().ok();
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "开启训练", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse<PatientVo.RecipeRecordId> startDrill(@ApiParam @Validated @RequestBody QueryDto<PatientDto.StartDrill> params) {
|
|
|
|
// log.info("开启训练:{}",params);
|
|
|
|
// PatientVo.RecipeRecordId recipeRecordId = patientService.startDrill(params.getParam(),params.getUserId());
|
|
|
|
// log.info("开启训练成功:{}",recipeRecordId);
|
|
|
|
// return JsonResponse.newInstance().ok(recipeRecordId);
|
|
|
|
// }
|
|
|
|
@Resource |
|
|
|
private IPatientService patientService; |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "主治医生查看患者列表", notes = "zy:") |
|
|
|
@RequestMapping(value = "/doctorId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<List<PatientVo.Patient>> queryPatientByDoctorId(@ApiParam @Validated @RequestBody QueryDto<HospitalDto.DoctorId> params) { |
|
|
|
log.info("主治医生查看患者列表:{}",params); |
|
|
|
List<PatientVo.Patient> patientList = patientService.queryPatientByDoctorId(params.getParam(),params.getUserId()); |
|
|
|
log.info("主治医生查看患者列表成功:{}",patientList); |
|
|
|
return JsonResponse.newInstance().ok(patientList); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "康复中心查看患者列表", notes = "zy:") |
|
|
|
@RequestMapping(value = "/recovery", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<List<PatientVo.Patient>> queryPatientByRecovery(@ApiParam @Validated @RequestBody QueryDto<HospitalDto.HospitalId> params) { |
|
|
|
log.info("康复中心查看患者列表:{}",params); |
|
|
|
List<PatientVo.Patient> patientList = patientService.queryPatientByRecovery(params.getParam(),params.getUserId()); |
|
|
|
log.info("康复中心查看患者列表成功:{}",patientList); |
|
|
|
return JsonResponse.newInstance().ok(patientList); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "查看患者的详细信息", notes = "zy:") |
|
|
|
@RequestMapping(value = "/detail", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<PatientVo.Patient> getPatientById(@ApiParam @Validated @RequestBody QueryDto<PatientDto.PatientId> params) { |
|
|
|
log.info("查看患者的详细信息:{}",params); |
|
|
|
PatientVo.Patient patient = patientService.getPatientById(params.getParam(),params.getUserId()); |
|
|
|
log.info("查看患者的详细信息成功:{}",patient); |
|
|
|
return JsonResponse.newInstance().ok(patient); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "添加患者", notes = "zy:") |
|
|
|
@RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse addPatient(@ApiParam @Validated @RequestBody QueryDto<PatientDto.PatientDetail> params) { |
|
|
|
log.info("添加患者:{}",params); |
|
|
|
patientService.addPatient(params.getParam(),params.getUserId()); |
|
|
|
log.info("添加患者成功"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "启动康复流程(康复师选择患者)", notes = "zy:") |
|
|
|
@RequestMapping(value = "/choose", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse choosePatient(@ApiParam @Validated @RequestBody QueryDto<PatientDto.ChoosePatient> params) throws Exception { |
|
|
|
log.info("启动康复流程:{}",params); |
|
|
|
patientService.choosePatient(params.getParam(),params.getUserId()); |
|
|
|
log.info("启动康复流程成功"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "开启训练", notes = "zy:") |
|
|
|
@RequestMapping(value = "/start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse<PatientVo.RecipeRecordId> startDrill(@ApiParam @Validated @RequestBody QueryDto<PatientDto.StartDrill> params) { |
|
|
|
log.info("开启训练:{}",params); |
|
|
|
PatientVo.RecipeRecordId recipeRecordId = patientService.startDrill(params.getParam(),params.getUserId()); |
|
|
|
log.info("开启训练成功:{}",recipeRecordId); |
|
|
|
return JsonResponse.newInstance().ok(recipeRecordId); |
|
|
|
} |
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "结束训练", notes = "zy:") |
|
|
|
@RequestMapping(value = "/end", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse endDrill(@ApiParam @Validated @RequestBody QueryDto<PatientDto.EndDrill> params) { |
|
|
|
log.info("结束训练:{}",params); |
|
|
|
patientService.endDrill(params.getParam(),params.getUserId()); |
|
|
|
log.info("结束训练成功"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "结束训练", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/start", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse endDrill(@ApiParam @Validated @RequestBody QueryDto<PatientDto.EndDrill> params) {
|
|
|
|
// @ApiOperation(value = "结束康复流程", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/finish", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse finishRecovery(@ApiParam @Validated @RequestBody QueryDto<PatientDto.EndDrill> params) {
|
|
|
|
// log.info("结束训练:{}",params);
|
|
|
|
// patientService.endDrill(params.getParam(),params.getUserId());
|
|
|
|
// log.info("结束训练成功");
|
|
|
|
// return JsonResponse.newInstance().ok();
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// @MustLogin
|
|
|
|
// @ApiOperation(value = "动作反馈", notes = "zy:")
|
|
|
|
// @RequestMapping(value = "/feedback", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
|
|
|
// public JsonResponse actionFeedback(@ApiParam @Validated @RequestBody QueryDto<PatientDto.ActionFeedback> params) {
|
|
|
|
// log.info("动作反馈:{}",params);
|
|
|
|
// patientService.actionFeedback(params.getParam(),params.getUserId());
|
|
|
|
// log.info("动作反馈成功");
|
|
|
|
// return JsonResponse.newInstance().ok();
|
|
|
|
// }
|
|
|
|
|
|
|
|
@MustLogin |
|
|
|
@ApiOperation(value = "动作反馈", notes = "zy:") |
|
|
|
@RequestMapping(value = "/feedback", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
|
|
|
public JsonResponse actionFeedback(@ApiParam @Validated @RequestBody QueryDto<PatientDto.ActionFeedback> params) { |
|
|
|
log.info("动作反馈:{}",params); |
|
|
|
patientService.actionFeedback(params.getParam(),params.getUserId()); |
|
|
|
log.info("动作反馈成功"); |
|
|
|
return JsonResponse.newInstance().ok(); |
|
|
|
} |
|
|
|
} |
|
|
|