deb
This commit is contained in:
parent
661d0856e2
commit
0a234525fd
|
|
@ -8,6 +8,7 @@ import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
|||
import com.syjiaer.clinic.server.entity.patient.dto.RegistrationQuery;
|
||||
import com.syjiaer.clinic.server.entity.patient.dto.RegistrationSaveDto;
|
||||
import com.syjiaer.clinic.server.entity.patient.vo.PatientAndRegistrationInfoVo;
|
||||
import com.syjiaer.clinic.server.entity.patient.vo.PatientRegistrationVo;
|
||||
import com.syjiaer.clinic.server.service.patient.PatientInfoService;
|
||||
import com.syjiaer.clinic.server.service.patient.PatientRegistrationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -85,12 +86,12 @@ public class RegistrationController extends BaseController {
|
|||
* @return
|
||||
*/
|
||||
@RequestMapping("/getById")
|
||||
public Result<PatientRegistration> getById() {
|
||||
public Result<PatientRegistrationVo> getById() {
|
||||
Integer id = parmsUtil.getInteger("id");
|
||||
if (id == null) {
|
||||
throw new MessageException("id参数为空");
|
||||
}
|
||||
PatientRegistration result = patientRegistrationService.getById(id);
|
||||
PatientRegistrationVo result = patientRegistrationService.getById(id);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
|
|||
* </p>
|
||||
*
|
||||
* @author NiuZiYuan
|
||||
* @since 2025-04-29
|
||||
* @since 2025-04-30
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
package com.syjiaer.clinic.server.entity.patient.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
@Data
|
||||
public class PatientRegistrationVo {
|
||||
|
||||
@ApiModelProperty("挂号id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("科室id")
|
||||
private Integer organizationSectionId;
|
||||
|
||||
@ApiModelProperty("医生id")
|
||||
private Integer organizationDoctorId;
|
||||
|
||||
@ApiModelProperty("患者姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("患者年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty("患者手机号")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("就诊类型 初诊 复诊")
|
||||
private Short visitType;
|
||||
|
||||
@ApiModelProperty("挂号时间")
|
||||
private LocalDateTime createDatetime;
|
||||
|
||||
@ApiModelProperty("推荐")
|
||||
private String recommendations;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String memo;
|
||||
|
||||
@ApiModelProperty("预诊")
|
||||
private String advanceDiagnosis;
|
||||
|
||||
@ApiModelProperty("挂号费")
|
||||
private BigDecimal registrationMoney;
|
||||
|
||||
@ApiModelProperty("逻辑删除")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("挂号类型 1普通挂号 2医保挂号")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("1男 2女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty("病人id")
|
||||
private Integer patientInfoId;
|
||||
|
||||
@ApiModelProperty("挂号状态 1候诊 2在诊 3已诊 0取消")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("人员编号")
|
||||
private String psnNo;
|
||||
|
||||
@ApiModelProperty("险种类型")
|
||||
private String insutype;
|
||||
|
||||
@ApiModelProperty("就诊id 挂号后医保返会")
|
||||
private String mdtrtId;
|
||||
|
||||
@ApiModelProperty("流水号")
|
||||
private String fstNo;
|
||||
|
||||
@ApiModelProperty("证件类型")
|
||||
private String certType;
|
||||
@ApiModelProperty("证件号码")
|
||||
private String certNo;
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,12 @@ public class MedicalRecordService extends BaseService {
|
|||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void save(MedicalRecordSaveDto saveDto) {
|
||||
|
||||
if (saveDto == null){
|
||||
throw new MessageException("参数不能为空");
|
||||
}
|
||||
if (saveDto.getDiagnosisMedicalRecord().getDiagnosisDetail() == null){
|
||||
throw new MessageException("请填写诊断详情");
|
||||
}
|
||||
//改变挂号单状态
|
||||
PatientRegistration dbRegis = patientRegistrationMapper.selectById(saveDto.getRegistrationId());
|
||||
if (dbRegis == null) {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import com.syjiaer.clinic.server.entity.patient.PatientRegistration;
|
|||
import com.syjiaer.clinic.server.entity.patient.dto.RegistrationQuery;
|
||||
import com.syjiaer.clinic.server.entity.patient.dto.RegistrationSaveDto;
|
||||
import com.syjiaer.clinic.server.entity.patient.vo.PatientAndRegistrationInfoVo;
|
||||
import com.syjiaer.clinic.server.entity.patient.vo.PatientRegistrationVo;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationMemberMapper;
|
||||
import com.syjiaer.clinic.server.mapper.organization.OrganizationSectionMapper;
|
||||
import com.syjiaer.clinic.server.mapper.patient.PatientInfoMapper;
|
||||
|
|
@ -184,8 +185,19 @@ public class PatientRegistrationService extends BaseService {
|
|||
* 根据id查询挂号信息
|
||||
* @param id 挂号id
|
||||
*/
|
||||
public PatientRegistration getById(int id) {
|
||||
return patientRegistrationMapper.selectById(id);
|
||||
public PatientRegistrationVo getById(int id) {
|
||||
PatientRegistrationVo registrationVo = new PatientRegistrationVo();
|
||||
PatientRegistration registration = patientRegistrationMapper.selectById(id);
|
||||
if (registration == null){
|
||||
throw new MessageException("id不存在");
|
||||
}
|
||||
BeanUtils.copyProperties(registration, registrationVo);
|
||||
PatientInfo patientInfo = patientInfoMapper.selectById(registration.getPatientInfoId());
|
||||
if (patientInfo != null){
|
||||
registrationVo.setCertNo(patientInfo.getCertNo());
|
||||
registrationVo.setCertType(patientInfo.getCertType());
|
||||
}
|
||||
return registrationVo;
|
||||
}
|
||||
/*
|
||||
* 获取所有已删除挂号信息
|
||||
|
|
|
|||
Loading…
Reference in New Issue