Commit bff95afe314ec43e61f546a923b2ada609209c23

Authored by changpengfei
1 parent 092a250f89

小程序端儿童建档

Showing 2 changed files with 118 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ bff95af
... ... @@ -192,6 +192,9 @@
192 192 @Autowired
193 193 private BabyEarFacade babyEarFacade;
194 194  
  195 + @Autowired
  196 + private MatDeliverFacade matDeliverFacade;//分娩记录
  197 +
195 198 public BaseResponse getBabyBase(String babyId) {
196 199 //查询儿童的基本信息
197 200 BabyBasicResult base = new BabyBasicResult();
... ... @@ -5597,9 +5600,9 @@
5597 5600 List <Map> datas = new ArrayList <>();
5598 5601 if (CollectionUtils.isNotEmpty(babyModels)) {
5599 5602 for (BabyModel model : babyModels) {
5600   - if (model.getYn() == null || model.getYn() == 1) {
5601   - continue;
5602   - }
  5603 +// if (model.getYn() == null || model.getYn() == 1) {
  5604 +// continue;
  5605 +// }
5603 5606 Map data = new HashMap();
5604 5607 data.put("id", model.getId());
5605 5608 data.put("phone", model.getMphone());
... ... @@ -5610,6 +5613,7 @@
5610 5613 data.put("sex", model.getSex());
5611 5614 data.put("vcCardNo", model.getVcCardNo());
5612 5615 data.put("sINCard", model.getsINCard());
  5616 +
5613 5617 datas.add(data);
5614 5618 }
5615 5619 }
... ... @@ -5706,6 +5710,35 @@
5706 5710 //创建儿童检查
5707 5711 createBabyCheck(babyModelDb, appRequest.getDiseases());
5708 5712 }
  5713 +
  5714 + List<BabyModel> bLst=this.mongoTemplate.find(new Query(Criteria.where("mphone").is(appRequest.getPhone())),BabyModel.class);
  5715 + if(bLst.size()>0){
  5716 + babyModelDb=bLst.get(0);
  5717 + }
  5718 + PatientsQuery patientsQuery = new PatientsQuery();
  5719 + patientsQuery.setId(babyModelDb.getParentId());
  5720 + List <Patients> patients = patientsService.queryPatient(patientsQuery);
  5721 +
  5722 + if (CollectionUtils.isNotEmpty(patients)) {
  5723 + Patients p1=patients.get(0);
  5724 + p1.setBirth(DateUtil.parseYMD(appRequest.getmBirth()));
  5725 + patientsService.updatePatient(p1);
  5726 +
  5727 + MaternalDeliverModel maternalDeliverModel=new MaternalDeliverModel();
  5728 + maternalDeliverModel.setParentId(p1.getId());
  5729 +
  5730 + maternalDeliverModel.setDueWeek(appRequest.getDulWeek());
  5731 + maternalDeliverModel.setDueCount(Integer.parseInt(appRequest.getChan()));
  5732 + maternalDeliverModel.setTireNumber(Integer.parseInt(appRequest.getTai()));
  5733 + maternalDeliverModel.setFmType(appRequest.getFmtype());
  5734 +
  5735 + }
  5736 +
  5737 + babyModelDb.setBabyWeight(appRequest.getWeight());
  5738 + babyModelDb.setBabyHeight(appRequest.getHeight());
  5739 + babyModelDb.setAddress(appRequest.getAddr());
  5740 + babyModelDb.setBabyDiagnosis(appRequest.getCyzdnr());
  5741 + babyService.updateOneBaby(babyModelDb,babyModelDb.getId());
5709 5742  
5710 5743 return new BaseObjectResponse()
5711 5744 .setErrormsg("成功").setErrorcode(ErrorCodeConstants.SUCCESS).setData(babyModelDb.getEncoded());
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/BabyAppBuildAddRequest.java View file @ bff95af
... ... @@ -23,6 +23,88 @@
23 23 private String vcCardNo;
24 24 private String hospitalId;
25 25  
  26 + private String mBirth;//母亲出生日期
  27 + private String dulWeek;//分娩孕周
  28 + private String tai;//胎
  29 + private String chan;//产
  30 + private String fmtype;//分娩方式
  31 + private String cyzdnr;//出院诊断内容
  32 + private String weight;
  33 + private String height;
  34 + private String addr;
  35 +
  36 + public String getmBirth() {
  37 + return mBirth;
  38 + }
  39 +
  40 + public void setmBirth(String mBirth) {
  41 + this.mBirth = mBirth;
  42 + }
  43 +
  44 + public String getDulWeek() {
  45 + return dulWeek;
  46 + }
  47 +
  48 + public void setDulWeek(String dulWeek) {
  49 + this.dulWeek = dulWeek;
  50 + }
  51 +
  52 + public String getTai() {
  53 + return tai;
  54 + }
  55 +
  56 + public void setTai(String tai) {
  57 + this.tai = tai;
  58 + }
  59 +
  60 + public String getChan() {
  61 + return chan;
  62 + }
  63 +
  64 + public void setChan(String chan) {
  65 + this.chan = chan;
  66 + }
  67 +
  68 + public String getFmtype() {
  69 + return fmtype;
  70 + }
  71 +
  72 + public void setFmtype(String fmtype) {
  73 + this.fmtype = fmtype;
  74 + }
  75 +
  76 + public String getCyzdnr() {
  77 + return cyzdnr;
  78 + }
  79 +
  80 + public void setCyzdnr(String cyzdnr) {
  81 + this.cyzdnr = cyzdnr;
  82 + }
  83 +
  84 + public String getWeight() {
  85 + return weight;
  86 + }
  87 +
  88 + public void setWeight(String weight) {
  89 + this.weight = weight;
  90 + }
  91 +
  92 + public String getHeight() {
  93 + return height;
  94 + }
  95 +
  96 + public void setHeight(String height) {
  97 + this.height = height;
  98 + }
  99 +
  100 + public String getAddr() {
  101 + return addr;
  102 + }
  103 +
  104 + public void setAddr(String addr) {
  105 + this.addr = addr;
  106 + }
  107 +
26 108 private String doctorId;
27 109 //儿童疾病
28 110 private List<String> diseases;