From ad198e810c49861d720b11de9c5ff0245e8f9412 Mon Sep 17 00:00:00 2001 From: shiyang <316555390@qq.com> Date: Wed, 13 Jul 2022 08:54:47 +0800 Subject: [PATCH] =?UTF-8?q?PC=E6=96=B0=E6=A8=A1=E5=9D=97=E5=BB=BA=E6=A1=A3?= =?UTF-8?q?-=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PatientController.java | 70 ++++++++ .../controller/RegionsController.java | 6 + .../com/lyms/talkonlineweb/domain/LymsPatient.java | 181 +++++++++++++++++++++ 3 files changed, 257 insertions(+) diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java index 7989a04..346b9c3 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java @@ -18,6 +18,7 @@ import com.lyms.talkonlineweb.task.AccessTokenServlet; import com.lyms.talkonlineweb.util.*; import com.mysql.cj.Query; import lombok.extern.log4j.Log4j2; +import org.apache.ibatis.annotations.Delete; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.DigestUtils; import org.springframework.util.StringUtils; @@ -1215,5 +1216,74 @@ public class PatientController { } return baseResponse; } + /** + * PC新模块建档/修改患者 + * + * @param patient + * @return + */ + @PostMapping("addOrUpdateBookbuildingPatient") + @TokenRequired + public BaseResponse bookbuildingPatient(@RequestBody LymsPatient patient) { + BaseResponse baseResponse = new BaseResponse(); + try { + boolean f = lymsPatientService.saveOrUpdate(patient); + baseResponse.setErrorcode(f?0:1); + baseResponse.setErrormsg(f?"注册成功!":"注册失败!"); + } catch (Exception e) { + e.printStackTrace(); + } + return baseResponse; + } + /** + * PC新模块删除患者 + * + * @param patient + * @return + */ + @DeleteMapping("delBookbuildingPatient") + @TokenRequired + public BaseResponse delBookbuildingPatient(Integer id) { + BaseResponse baseResponse =new BaseResponse(); + try { + final boolean b = lymsPatientService.removeById(id); + baseResponse.setErrorcode(b?0:1); + baseResponse.setErrormsg(b?"成功":"失败"); + } catch (Exception e) { + e.printStackTrace(); + } + return baseResponse; + } + /** + * PC新模块建档查询列表分页 + * + * @param patient + * @return + */ + @GetMapping("queryBookbuildingPatient") + @TokenRequired + public BaseResponse queryBookbuildingPatient(LymsPatient patient, int current, int size) { + BaseResponse baseResponse = new BaseResponse(); + try { + QueryWrapper query=new QueryWrapper(); + if(StringUtil.isNotEmpty(patient.getSynthesisQuery())){ + query.and(wrapper -> wrapper .like("pname", patient.getSynthesisQuery()) + .or().eq("enrolment_phone", patient.getSynthesisQuery()) + .or().eq("idno", patient.getSynthesisQuery())); + } + if(StringUtil.isNotEmpty(patient.getStartCreatedtime())){ + query.ge("createdtime", patient.getStartCreatedtime()); + } + if(StringUtil.isNotEmpty(patient.getEndCreatedtime())){ + query.le("createdtime", patient.getEndCreatedtime()); + } + Page page=new Page<>(current,size); + Page lymsPatientPage=lymsPatientService.page(page, query.orderByDesc("updatedtime","createdtime")); + baseResponse.setObject(lymsPatientPage); + } catch (Exception e) { + e.printStackTrace(); + } + return baseResponse; + } } diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java index 00ae508..7523ada 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java @@ -32,6 +32,12 @@ public class RegionsController { @Autowired private LymsDictService lymsDictService; + /** + * 国籍、民族、地区字典。如需查国籍、民族 只需要传level '级别 5:国籍,6:民族' + * '级别 1:省,2:市,3:区,5:国籍,6:民族' + * @param regions + * @return + */ @GetMapping("getRegions") @TokenRequired public BaseResponse getRegions(Regions regions){ diff --git a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java index faa2809..72b23ea 100644 --- a/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java +++ b/talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java @@ -111,6 +111,178 @@ public class LymsPatient implements Serializable { */ @TableField(value = "enrolment_phone") private String enrolmentPhone; + /** + * 国籍 + */ + @TableField(value = "nationality") + private String nationality; + /** + * 民族 + */ + @TableField(value = "nation") + private String nation; + /** + * 婚姻状况 + */ + @TableField(value = "marriage_type") + private String marriage_type; + /** + * 户籍类型 + */ + @TableField(value = "register_type") + private String register_type; + /** + * 居住类型 + */ + @TableField(value = "reside_type") + private String reside_type; + /** + * 文化程度 + */ + @TableField(value = "education") + private String education; + /** + * 职业类别 + */ + @TableField(value = "job_type") + private String job_type; + /** + * 工作单位 + */ + @TableField(value = "job_name") + private String job_name; + /** + * 居住地-省 + */ + @TableField(value = "reside_prov") + private String reside_prov; + /** + * 居住地-市 + */ + @TableField(value = "reside_city") + private String reside_city; + /** + * 居住地-县区 + */ + @TableField(value = "reside_regin") + private String reside_regin; + /** + * 居住地-详细地址 + */ + @TableField(value = "reside_addres") + private String reside_addres; + /** + * 户籍地-省 + */ + @TableField(value = "register_prov") + private String register_prov; + /** + * 户籍地-市 + */ + @TableField(value = "register_city") + private String register_city; + /** + * 户籍地-县区 + */ + @TableField(value = "register_regin") + private String register_regin; + /** + * 户籍地-详细地址 + */ + @TableField(value = "register_addres") + private String register_addres; + /** + * 就诊卡号 + */ + @TableField(value = "medical_card") + private String medical_card; + /** + * 建档医生id + */ + @TableField(value = "bookbuil_doctor") + private String bookbuil_doctor; + /** + * 建档医院id + */ + @TableField(value = "bookbuil_hospital") + private String bookbuil_hospital; + /** + * 建档类型 + */ + @TableField(value = "bookbuil_type") + private String bookbuil_type; + /** + * 现病史(1:无,2:有) + */ + @TableField(value = "xbs") + private String xbs; + /** + * 现病史-其他 + */ + @TableField(value = "xbs_qt") + private String xbs_qt; + /** + * 既往史(1:无,2:有) + */ + @TableField(value = "jws") + private String jws; + /** + * 既往史-其他 + */ + @TableField(value = "jws_qt") + private String jws_qt; + /** + * 个人史(1:无,2:有) + */ + @TableField(value = "grs") + private String grs; + /** + * 个人史是2的内容 + */ + @TableField(value = "grs_info") + private String grs_info; + /** + * 药物过敏史(1:无,2:有) + */ + @TableField(value = "ywgms") + private String ywgms; + /** + * 药物过敏史-其他 + */ + @TableField(value = "ywgms_qt") + private String ywgms_qt; + /** + * 月经史(1:无,2:有) + */ + @TableField(value = "yjs") + private String yjs; + /** + * 月经史-其他 + */ + @TableField(value = "yjs_qt") + private String yjs_qt; + /** + * 生育史(1:无,2:有) + */ + @TableField(value = "shengys") + private String shengys; + /** + * 生育史是2的内容 + */ + @TableField(value = "shengys_info") + private String shengys_info; + /** + * 家族史(1:无,2:有) + */ + @TableField(value = "jzs") + private String jzs; + /** + * 家族史是2的内容 + */ + @TableField(value = "jzs_info") + private String jzs_info; + + /** * 修改/重置密码状态 0修改密码 1重置密码 @@ -128,6 +300,15 @@ public class LymsPatient implements Serializable { // 小程序公众号上传的code @TableField(exist = false) private String code; + //综合查询 姓名/联系电话/身份证号码 + @TableField(exist = false) + private String synthesisQuery; + //开始时间 + @TableField(exist = false) + private String startCreatedtime; + //结束时间 + @TableField(exist = false) + private String endCreatedtime; @Override public boolean equals(Object that) { -- 1.8.3.1