Commit 09bc0c422beee9561f018ca65a0c10c7921ea9f7

Authored by liquanyu
1 parent 17c29c52fa

衡水妇幼对接儿童档案

Showing 4 changed files with 136 additions and 11 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBuildController.java View file @ 09bc0c4
... ... @@ -60,6 +60,18 @@
60 60 private MongoTemplate mongoTemplate;
61 61  
62 62 /**
  63 + * 衡水妇幼把his儿童信息导入到儿童档案中
  64 + * @param request
  65 + * @return
  66 + */
  67 + @RequestMapping(method = RequestMethod.POST, value = "/addBabyHsfy")
  68 + @ResponseBody
  69 + public BaseResponse addBabyHsfy(@Valid @RequestBody HsfyHisRequest request) {
  70 + return babyBookbuildingFacade.addBabyHsfy(request);
  71 + }
  72 +
  73 +
  74 + /**
63 75 * 添加或者修改儿童建档
64 76 *
65 77 * @param request
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 09bc0c4
... ... @@ -633,6 +633,24 @@
633 633 babyCheckService.updateBabyCheckByBuildId(checkModel, babyModel.getId());
634 634 }
635 635  
  636 + public BaseObjectResponse addBabyHsfy(HsfyHisRequest hisRequest) {
  637 + BabyBookbuildingAddRequest request = new BabyBookbuildingAddRequest();
  638 + request.setBabyName(hisRequest.getName());
  639 + request.setBabyBirthday(hisRequest.getBirthday());
  640 + request.setSex(Integer.parseInt(hisRequest.getSex()));
  641 + request.setMommyPhone(hisRequest.getPhone());
  642 + request.setMommyName(hisRequest.getName()+"母亲");
  643 + request.setBabyCardNo(hisRequest.getIdCard());
  644 + request.setHospitalId("2100002261");
  645 + request.setDisplayState("2");
  646 + request.setBuildDate(DateUtil.getyyyy_MM_dd(DateUtil.parseYyyyMMddHHssmm(hisRequest.getCreated())));
  647 + request.setBuildDoctor("2100005613");
  648 + request.setVcCardNo(hisRequest.getVcCardNo());
  649 +
  650 + return addBabyBookbuilding(request,2100005613);
  651 + }
  652 +
  653 +
636 654 /**
637 655 * 添加儿童建档
638 656 *
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/LivelihoodProjectsFacade.java View file @ 09bc0c4
... ... @@ -1168,22 +1168,32 @@
1168 1168 String organ_id=organizationService.getPlatHosNewCode(hospital_name);
1169 1169 map.put("organ_id", StringUtils.isNotEmpty(organ_id)?organ_id:"/");
1170 1170 //关联妇女档id
1171   - String person_id="/";
  1171 +// String person_id="/";
  1172 +// if(StringUtils.isNotEmpty(model.getParentId())){
  1173 +// Patients patients = patientsService.findOnePatientById(model.getParentId());
  1174 +// if(null!=patients && StringUtils.isNotEmpty(patients.getCardNo())) {
  1175 +// ResidentsArchiveQuery archiveQuery = new ResidentsArchiveQuery();
  1176 +// archiveQuery.setYn(YnEnums.YES.getId());
  1177 +// archiveQuery.setCertificateNum(patients.getCardNo());
  1178 +// List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(archiveQuery);
  1179 +// if (CollectionUtils.isNotEmpty(modelList)) {
  1180 +// person_id = modelList.get(0).getId();
  1181 +// }
  1182 +// }
  1183 +// }
  1184 +// map.put("person_id", person_id);
  1185 +// //关联专档id
1172 1186 if(StringUtils.isNotEmpty(model.getParentId())){
1173 1187 Patients patients = patientsService.findOnePatientById(model.getParentId());
1174 1188 if(null!=patients && StringUtils.isNotEmpty(patients.getCardNo())) {
1175   - ResidentsArchiveQuery archiveQuery = new ResidentsArchiveQuery();
1176   - archiveQuery.setYn(YnEnums.YES.getId());
1177   - archiveQuery.setCertificateNum(patients.getCardNo());
1178   - List<ResidentsArchiveModel> modelList = residentsArchiveService.queryResident(archiveQuery);
1179   - if (CollectionUtils.isNotEmpty(modelList)) {
1180   - person_id = modelList.get(0).getId();
1181   - }
  1189 + map.put("file_id", patients.getCardNo());
1182 1190 }
1183 1191 }
1184   - map.put("person_id", person_id);
1185   - //关联专档id
1186   - map.put("file_id", StringUtils.isNotEmpty(model.getParentId())?model.getParentId():"/");
  1192 + else
  1193 + {
  1194 + map.put("file_id", "");
  1195 + }
  1196 +
1187 1197 //导入时间
1188 1198 // map.put("import_time", null);
1189 1199 //修改时间
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/HsfyHisRequest.java View file @ 09bc0c4
  1 +package com.lyms.platform.operate.web.request;
  2 +
  3 +public class HsfyHisRequest {
  4 + private String name;
  5 + private String sex;
  6 + private String birthday;
  7 + private String phone;
  8 + private String vcCardNo;
  9 + private String idCard;
  10 + private String doctor;
  11 + private String casee;
  12 + private String created;
  13 +
  14 + public String getName() {
  15 + return name;
  16 + }
  17 +
  18 + public void setName(String name) {
  19 + this.name = name;
  20 + }
  21 +
  22 + public String getSex() {
  23 + return sex;
  24 + }
  25 +
  26 + public void setSex(String sex) {
  27 + this.sex = sex;
  28 + }
  29 +
  30 + public String getBirthday() {
  31 + return birthday;
  32 + }
  33 +
  34 + public void setBirthday(String birthday) {
  35 + this.birthday = birthday;
  36 + }
  37 +
  38 + public String getPhone() {
  39 + return phone;
  40 + }
  41 +
  42 + public void setPhone(String phone) {
  43 + this.phone = phone;
  44 + }
  45 +
  46 + public String getVcCardNo() {
  47 + return vcCardNo;
  48 + }
  49 +
  50 + public void setVcCardNo(String vcCardNo) {
  51 + this.vcCardNo = vcCardNo;
  52 + }
  53 +
  54 + public String getIdCard() {
  55 + return idCard;
  56 + }
  57 +
  58 + public void setIdCard(String idCard) {
  59 + this.idCard = idCard;
  60 + }
  61 +
  62 + public String getDoctor() {
  63 + return doctor;
  64 + }
  65 +
  66 + public void setDoctor(String doctor) {
  67 + this.doctor = doctor;
  68 + }
  69 +
  70 + public String getCasee() {
  71 + return casee;
  72 + }
  73 +
  74 + public void setCasee(String casee) {
  75 + this.casee = casee;
  76 + }
  77 +
  78 + public String getCreated() {
  79 + return created;
  80 + }
  81 +
  82 + public void setCreated(String created) {
  83 + this.created = created;
  84 + }
  85 +}