Commit ad198e810c49861d720b11de9c5ff0245e8f9412

Authored by shiyang
1 parent 22c324537b
Exists in master and in 1 other branch dev

PC新模块建档-增删改查业务逻辑

Showing 3 changed files with 257 additions and 0 deletions

talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java View file @ ad198e8
... ... @@ -18,6 +18,7 @@
18 18 import com.lyms.talkonlineweb.util.*;
19 19 import com.mysql.cj.Query;
20 20 import lombok.extern.log4j.Log4j2;
  21 +import org.apache.ibatis.annotations.Delete;
21 22 import org.springframework.beans.factory.annotation.Autowired;
22 23 import org.springframework.util.DigestUtils;
23 24 import org.springframework.util.StringUtils;
... ... @@ -1210,6 +1211,75 @@
1210 1211 List<Map<String,Object>> visitRecordList = lymsPushVisitRecordService.getPage(page,query);
1211 1212 page.setRecords(visitRecordList);
1212 1213 baseResponse.setObject(page);
  1214 + } catch (Exception e) {
  1215 + e.printStackTrace();
  1216 + }
  1217 + return baseResponse;
  1218 + }
  1219 + /**
  1220 + * PC新模块建档/修改患者
  1221 + *
  1222 + * @param patient
  1223 + * @return
  1224 + */
  1225 + @PostMapping("addOrUpdateBookbuildingPatient")
  1226 + @TokenRequired
  1227 + public BaseResponse bookbuildingPatient(@RequestBody LymsPatient patient) {
  1228 + BaseResponse baseResponse = new BaseResponse();
  1229 + try {
  1230 + boolean f = lymsPatientService.saveOrUpdate(patient);
  1231 + baseResponse.setErrorcode(f?0:1);
  1232 + baseResponse.setErrormsg(f?"注册成功!":"注册失败!");
  1233 + } catch (Exception e) {
  1234 + e.printStackTrace();
  1235 + }
  1236 + return baseResponse;
  1237 + }
  1238 + /**
  1239 + * PC新模块删除患者
  1240 + *
  1241 + * @param patient
  1242 + * @return
  1243 + */
  1244 + @DeleteMapping("delBookbuildingPatient")
  1245 + @TokenRequired
  1246 + public BaseResponse delBookbuildingPatient(Integer id) {
  1247 + BaseResponse baseResponse =new BaseResponse();
  1248 + try {
  1249 + final boolean b = lymsPatientService.removeById(id);
  1250 + baseResponse.setErrorcode(b?0:1);
  1251 + baseResponse.setErrormsg(b?"成功":"失败");
  1252 + } catch (Exception e) {
  1253 + e.printStackTrace();
  1254 + }
  1255 + return baseResponse;
  1256 + }
  1257 + /**
  1258 + * PC新模块建档查询列表分页
  1259 + *
  1260 + * @param patient
  1261 + * @return
  1262 + */
  1263 + @GetMapping("queryBookbuildingPatient")
  1264 + @TokenRequired
  1265 + public BaseResponse queryBookbuildingPatient(LymsPatient patient, int current, int size) {
  1266 + BaseResponse baseResponse = new BaseResponse();
  1267 + try {
  1268 + QueryWrapper<LymsPatient> query=new QueryWrapper();
  1269 + if(StringUtil.isNotEmpty(patient.getSynthesisQuery())){
  1270 + query.and(wrapper -> wrapper .like("pname", patient.getSynthesisQuery())
  1271 + .or().eq("enrolment_phone", patient.getSynthesisQuery())
  1272 + .or().eq("idno", patient.getSynthesisQuery()));
  1273 + }
  1274 + if(StringUtil.isNotEmpty(patient.getStartCreatedtime())){
  1275 + query.ge("createdtime", patient.getStartCreatedtime());
  1276 + }
  1277 + if(StringUtil.isNotEmpty(patient.getEndCreatedtime())){
  1278 + query.le("createdtime", patient.getEndCreatedtime());
  1279 + }
  1280 + Page<LymsPatient> page=new Page<>(current,size);
  1281 + Page<LymsPatient> lymsPatientPage=lymsPatientService.page(page, query.orderByDesc("updatedtime","createdtime"));
  1282 + baseResponse.setObject(lymsPatientPage);
1213 1283 } catch (Exception e) {
1214 1284 e.printStackTrace();
1215 1285 }
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java View file @ ad198e8
... ... @@ -32,6 +32,12 @@
32 32 @Autowired
33 33 private LymsDictService lymsDictService;
34 34  
  35 + /**
  36 + * 国籍、民族、地区字典。如需查国籍、民族 只需要传level '级别 5:国籍,6:民族'
  37 + * '级别 1:省,2:市,3:区,5:国籍,6:民族'
  38 + * @param regions
  39 + * @return
  40 + */
35 41 @GetMapping("getRegions")
36 42 @TokenRequired
37 43 public BaseResponse getRegions(Regions regions){
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsPatient.java View file @ ad198e8
... ... @@ -111,7 +111,179 @@
111 111 */
112 112 @TableField(value = "enrolment_phone")
113 113 private String enrolmentPhone;
  114 + /**
  115 + * 国籍
  116 + */
  117 + @TableField(value = "nationality")
  118 + private String nationality;
  119 + /**
  120 + * 民族
  121 + */
  122 + @TableField(value = "nation")
  123 + private String nation;
  124 + /**
  125 + * 婚姻状况
  126 + */
  127 + @TableField(value = "marriage_type")
  128 + private String marriage_type;
  129 + /**
  130 + * 户籍类型
  131 + */
  132 + @TableField(value = "register_type")
  133 + private String register_type;
  134 + /**
  135 + * 居住类型
  136 + */
  137 + @TableField(value = "reside_type")
  138 + private String reside_type;
  139 + /**
  140 + * 文化程度
  141 + */
  142 + @TableField(value = "education")
  143 + private String education;
  144 + /**
  145 + * 职业类别
  146 + */
  147 + @TableField(value = "job_type")
  148 + private String job_type;
  149 + /**
  150 + * 工作单位
  151 + */
  152 + @TableField(value = "job_name")
  153 + private String job_name;
  154 + /**
  155 + * 居住地-省
  156 + */
  157 + @TableField(value = "reside_prov")
  158 + private String reside_prov;
  159 + /**
  160 + * 居住地-市
  161 + */
  162 + @TableField(value = "reside_city")
  163 + private String reside_city;
  164 + /**
  165 + * 居住地-县区
  166 + */
  167 + @TableField(value = "reside_regin")
  168 + private String reside_regin;
  169 + /**
  170 + * 居住地-详细地址
  171 + */
  172 + @TableField(value = "reside_addres")
  173 + private String reside_addres;
  174 + /**
  175 + * 户籍地-省
  176 + */
  177 + @TableField(value = "register_prov")
  178 + private String register_prov;
  179 + /**
  180 + * 户籍地-市
  181 + */
  182 + @TableField(value = "register_city")
  183 + private String register_city;
  184 + /**
  185 + * 户籍地-县区
  186 + */
  187 + @TableField(value = "register_regin")
  188 + private String register_regin;
  189 + /**
  190 + * 户籍地-详细地址
  191 + */
  192 + @TableField(value = "register_addres")
  193 + private String register_addres;
  194 + /**
  195 + * 就诊卡号
  196 + */
  197 + @TableField(value = "medical_card")
  198 + private String medical_card;
  199 + /**
  200 + * 建档医生id
  201 + */
  202 + @TableField(value = "bookbuil_doctor")
  203 + private String bookbuil_doctor;
  204 + /**
  205 + * 建档医院id
  206 + */
  207 + @TableField(value = "bookbuil_hospital")
  208 + private String bookbuil_hospital;
  209 + /**
  210 + * 建档类型
  211 + */
  212 + @TableField(value = "bookbuil_type")
  213 + private String bookbuil_type;
  214 + /**
  215 + * 现病史(1:无,2:有)
  216 + */
  217 + @TableField(value = "xbs")
  218 + private String xbs;
  219 + /**
  220 + * 现病史-其他
  221 + */
  222 + @TableField(value = "xbs_qt")
  223 + private String xbs_qt;
  224 + /**
  225 + * 既往史(1:无,2:有)
  226 + */
  227 + @TableField(value = "jws")
  228 + private String jws;
  229 + /**
  230 + * 既往史-其他
  231 + */
  232 + @TableField(value = "jws_qt")
  233 + private String jws_qt;
  234 + /**
  235 + * 个人史(1:无,2:有)
  236 + */
  237 + @TableField(value = "grs")
  238 + private String grs;
  239 + /**
  240 + * 个人史是2的内容
  241 + */
  242 + @TableField(value = "grs_info")
  243 + private String grs_info;
  244 + /**
  245 + * 药物过敏史(1:无,2:有)
  246 + */
  247 + @TableField(value = "ywgms")
  248 + private String ywgms;
  249 + /**
  250 + * 药物过敏史-其他
  251 + */
  252 + @TableField(value = "ywgms_qt")
  253 + private String ywgms_qt;
  254 + /**
  255 + * 月经史(1:无,2:有)
  256 + */
  257 + @TableField(value = "yjs")
  258 + private String yjs;
  259 + /**
  260 + * 月经史-其他
  261 + */
  262 + @TableField(value = "yjs_qt")
  263 + private String yjs_qt;
  264 + /**
  265 + * 生育史(1:无,2:有)
  266 + */
  267 + @TableField(value = "shengys")
  268 + private String shengys;
  269 + /**
  270 + * 生育史是2的内容
  271 + */
  272 + @TableField(value = "shengys_info")
  273 + private String shengys_info;
  274 + /**
  275 + * 家族史(1:无,2:有)
  276 + */
  277 + @TableField(value = "jzs")
  278 + private String jzs;
  279 + /**
  280 + * 家族史是2的内容
  281 + */
  282 + @TableField(value = "jzs_info")
  283 + private String jzs_info;
114 284  
  285 +
  286 +
115 287 /**
116 288 * 修改/重置密码状态 0修改密码 1重置密码
117 289 */
... ... @@ -128,6 +300,15 @@
128 300 // 小程序公众号上传的code
129 301 @TableField(exist = false)
130 302 private String code;
  303 + //综合查询 姓名/联系电话/身份证号码
  304 + @TableField(exist = false)
  305 + private String synthesisQuery;
  306 + //开始时间
  307 + @TableField(exist = false)
  308 + private String startCreatedtime;
  309 + //结束时间
  310 + @TableField(exist = false)
  311 + private String endCreatedtime;
131 312  
132 313 @Override
133 314 public boolean equals(Object that) {