From 6f9294f349e85513a58386cb03104b3f29147182 Mon Sep 17 00:00:00 2001 From: lxd <1004405501@qq.com> Date: Tue, 15 Apr 2025 17:03:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=AF=B9=E5=A4=96=E6=9A=B4?= =?UTF-8?q?=E9=9C=B2=E7=9A=84=E6=8E=A5=E5=8F=A3=20=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E4=BD=93=E6=A3=80=E7=BC=96=E5=8F=B7=E6=9F=A5=E8=AF=A2=E6=82=A3?= =?UTF-8?q?=E8=80=85=E5=9F=BA=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InspectPatientController.java | 29 +++++++++++++++++++ .../inspectpatient/vo/PersonalInfoVO.java | 29 +++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/PersonalInfoVO.java diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java index 7933281..5ecb780 100644 --- a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/InspectPatientController.java @@ -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 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 = "根据体检获得患者信息") diff --git a/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/PersonalInfoVO.java b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/PersonalInfoVO.java new file mode 100644 index 0000000..5c985cc --- /dev/null +++ b/yudao-module-inspect/yudao-module-inspect-biz/src/main/java/cn/iocoder/yudao/module/inspect/controller/admin/inspectpatient/vo/PersonalInfoVO.java @@ -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; +}