Compare commits

...

2 Commits

3 changed files with 61 additions and 1 deletions

View File

@ -1176,6 +1176,35 @@ public class InspectPatientController {
InspectPatientDO patient = patientService.getPatient(id);
return success(BeanUtils.toBean(patient, InspectPatientRespVO.class));
}
@GetMapping("/MedicalSnPatientInfo")
@Operation(summary = "获得患者信息 对外暴露")
public CommonResult<PersonalInfoVO> getMedicalSnPatientInfo(@RequestParam("medicalSn") String medicalSn)
{
if(medicalSn!=null&&!medicalSn.isEmpty())
{
InspectPatientDO patientDO= patientService.getPatientOfMedicalSn(medicalSn);
if(patientDO!=null)
{
PersonalInfoVO personalInfoVO = new PersonalInfoVO();
personalInfoVO.setIdCard(patientDO.getCardId());
personalInfoVO.setName(patientDO.getPName());
personalInfoVO.setSex(patientDO.getGender());
personalInfoVO.setAge(String.valueOf(StrUtils.calculateAgeFromIdCard(patientDO.getCardId())));
personalInfoVO.setBirthday(patientDO.getBirthday().toString());
personalInfoVO.setAddress(patientDO.getDomicileaddress());
personalInfoVO.setTelephone(patientDO.getPhoneNum());
return success(personalInfoVO);
}
else
{
return success("未查询到体检信息");
}
}
else {
return success("体检编号为空");
}
}
@GetMapping("/getpatientjson")
@Operation(summary = "根据体检获得患者信息")

View File

@ -0,0 +1,29 @@
package cn.iocoder.yudao.module.inspect.controller.admin.inspectpatient.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class PersonalInfoVO {
@Schema(description = "身份证号")
private String idCard;
@Schema(description = "姓名")
private String name;
@Schema(description = "性别")
private String sex;
@Schema(description = "年龄")
private String age;
@Schema(description = "出生日期")
private String birthday;
@Schema(description = "地址")
private String address;
@Schema(description = "电话号码")
private String telephone;
}

View File

@ -228,7 +228,7 @@ yudao:
- /admin-api/inspect/patient/getUSPatientInfo
- /admin-api/inspect/patient/getReportAll
- /admin-api/inspect/patient/createPatientitem
- /admin-api/inspect/patient/MedicalSnPatientInfo
websocket:
enable: true # websocket的开关
path: /infra/ws # 路径
@ -272,6 +272,7 @@ yudao:
- /admin-api/inspect/department/getList
- /admin-api/inspect/patient/getUSPatientInfo
- /admin-api/inspect/patient/getReportAll
- /admin-api/inspect/patient/MedicalSnPatientInfo
- /adminInspect/admin-api/inspect/department/getList
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo
- /adminInspect/admin-api/system/captcha/get
@ -282,6 +283,7 @@ yudao:
- /adminInspect/admin-api/inspect/patient/getUSPatientInfo
- /adminInspect/admin-api/inspect/patient/getReportAll
- /adminInspect/admin-api/inspect/patient/createPatientitem
- /adminInspect/admin-api/inspect/patient/MedicalSnPatientInfo
ignore-tables:
- system_tenant
- system_tenant_package