提交 1c712b5f authored 作者: luzhangjian's avatar luzhangjian

feat:测试

上级 5b871dc8
......@@ -3,6 +3,10 @@ package com.ebaiyihui.family.doctor.server.controller;
import com.ebaiyihui.family.doctor.common.dto.InvalidMedicalRecordDTO;
import com.ebaiyihui.family.doctor.common.vo.PatientCaseDetail;
import com.ebaiyihui.family.doctor.server.entity.PatientSignEntity;
import com.ebaiyihui.family.doctor.server.exception.BusinessException;
import com.ebaiyihui.family.doctor.server.mapper.PatientSignMapper;
import com.ebaiyihui.family.doctor.server.service.HisTemplateService;
import com.ebaiyihui.family.doctor.server.service.PatientMedicalRecordService;
import com.ebaiyihui.framework.response.BaseResponse;
import io.swagger.annotations.Api;
......@@ -22,45 +26,12 @@ public class PatientMedicalRecordController {
@Autowired
private PatientMedicalRecordService patientMedicalRecordService;
// @PostMapping("/insert")
// @ApiOperation(value = "新建复诊病历", notes = "医生开具复诊病历")
// public BaseResponse<InsertPatientMedicalRecordVO> insert(@RequestBody @Validated InsertPatientMedicalRecordDTO dto,
// BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return BaseResponse.error(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
// }
// return patientMedicalRecordService.insertPatientMedicalRecord(dto);
// }
//
// @PostMapping("/update")
// @ApiOperation(value = "修改复诊病历", notes = "医生修改复诊病历")
// public BaseResponse<InsertPatientMedicalRecordVO> update(@RequestBody @Validated UpdatePatientMedicalRecordDTO dto,
// BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return BaseResponse.error(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
// }
// return patientMedicalRecordService.updatePatientMedicalRecord(dto);
// }
//
// @PostMapping("/insertOrUpdate")
// @ApiOperation(value = "新建或修改复诊病历", notes = "新建或修改复诊病历")
// public BaseResponse<Object> insertOrUpdate(@RequestBody @Validated InsertPatientMedicalRecordDTO dto,
// BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return BaseResponse.error(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
// }
// return patientMedicalRecordService.insertOrUpdate(dto);
// }
//
// @PostMapping("/detail")
// @ApiOperation(value = "复诊病历详情", notes = "复诊病历详情")
// public BaseResponse<PatientMedicalRecordVO> detail(@RequestBody @Validated InvalidMedicalRecordDTO dto,
// BindingResult bindingResult) {
// if (bindingResult.hasErrors()) {
// return BaseResponse.error(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
// }
// return patientMedicalRecordService.detailMedicalRecord(dto);
// }
@Autowired
private PatientSignMapper patientSignMapper;
@Autowired
private HisTemplateService hisTemplateService;
/**
* 根据admID查询病例
* @param admId
......@@ -93,4 +64,25 @@ public class PatientMedicalRecordController {
}
return patientMedicalRecordService.getBaseInfoByAdmId(param.getAdmId());
}
@ApiOperation(value = "test", notes = "test")
@RequestMapping(value = "/test", method = RequestMethod.GET)
public BaseResponse<Object> test(@RequestParam String admId,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return BaseResponse.error(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage());
}
PatientSignEntity patientSignEntity = patientSignMapper.queryByAdmId(admId);
BaseResponse<Object> response = hisTemplateService.registrationAndTreatment(patientSignEntity);
if (response.isSuccess()){
patientSignEntity.setClinicCode(response.getData().toString());
}else {
throw new BusinessException("his挂号失败");
}
patientSignMapper.updateById(patientSignEntity);
return BaseResponse.success();
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论