Commit 0e1f1c4c8175b30ffdfd628cdafdb5545abf4fa4

Authored by gengxiaokai
1 parent 92937939ae
Exists in master and in 1 other branch dev

产后观察记录

Showing 8 changed files with 338 additions and 0 deletions

platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/IPostpartumRecordsDao.java View file @ 0e1f1c4
  1 +package com.lyms.platform.biz.dal;
  2 +
  3 +import com.lyms.platform.common.dao.operator.MongoQuery;
  4 +import com.lyms.platform.pojo.PostpartumRecords;
  5 +
  6 +import java.util.List;
  7 +
  8 +/**
  9 + * Created by Administrator on 2019/1/9.
  10 + */
  11 +public interface IPostpartumRecordsDao {
  12 + public List<PostpartumRecords> queryPostpartumRecords(MongoQuery query);
  13 +
  14 + public PostpartumRecords addPostpartumRecords(PostpartumRecords data);
  15 +
  16 + public void updatePostpartumRecordsById(PostpartumRecords obj,String id);
  17 +
  18 + public PostpartumRecords findOnePostpartumRecordsById(String id);
  19 +
  20 + public int queryPostpartumRecordsCount(MongoQuery query);
  21 +}
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/PostpartumRecordsDaoImpl.java View file @ 0e1f1c4
  1 +package com.lyms.platform.biz.dal.impl;
  2 +
  3 +import com.lyms.platform.biz.dal.IPostpartumRecordsDao;
  4 +import com.lyms.platform.common.dao.BaseMongoDAOImpl;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +import com.lyms.platform.pojo.PostpartumRecords;
  9 +import org.springframework.stereotype.Repository;
  10 +
  11 +import java.util.List;
  12 +
  13 +/**
  14 + * Created by Administrator on 2019/1/9.
  15 + */
  16 +@Repository("postpartumRecordsDao")
  17 +public class PostpartumRecordsDaoImpl extends BaseMongoDAOImpl<PostpartumRecords> implements IPostpartumRecordsDao{
  18 +
  19 + public List<PostpartumRecords> queryPostpartumRecords(MongoQuery query){
  20 + return find(query.convertToMongoQuery());
  21 + }
  22 +
  23 + public PostpartumRecords addPostpartumRecords(PostpartumRecords data){
  24 + return save(data);
  25 + }
  26 +
  27 + public void updatePostpartumRecordsById(PostpartumRecords obj,String id){
  28 + update(new MongoQuery(new MongoCondition("id", id, MongoOper.IS)).convertToMongoQuery(), obj);
  29 + }
  30 +
  31 + public PostpartumRecords findOnePostpartumRecordsById(String id){
  32 + return findById(id);
  33 + }
  34 +
  35 + public int queryPostpartumRecordsCount(MongoQuery query){
  36 + return (int) count(query.convertToMongoQuery());
  37 + }
  38 +
  39 +}
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/PostpartumRecordsService.java View file @ 0e1f1c4
  1 +package com.lyms.platform.biz.service;
  2 +
  3 +import com.lyms.platform.biz.dal.IPostpartumRecordsDao;
  4 +import org.springframework.beans.factory.annotation.Autowired;
  5 +import org.springframework.stereotype.Service;
  6 +
  7 +/**
  8 + * Created by Administrator on 2019/1/9.
  9 + */
  10 +@Service("postpartumRecordsService")
  11 +public class PostpartumRecordsService {
  12 +
  13 + @Autowired
  14 + private IPostpartumRecordsDao postpartumRecordsDao;
  15 +
  16 +
  17 +
  18 +}
platform-dal/src/main/java/com/lyms/platform/beans/SerialIdEnum.java View file @ 0e1f1c4
... ... @@ -15,6 +15,7 @@
15 15 AwModel("AwModel", 97531000060L),
16 16 BabyCheckModel("BabyCheckModel", 97531000070L),
17 17 BabyModel("BabyModel", 97531000080L),
  18 + Records("records", 97531000081L),
18 19 Baby("Baby", 97531000081L),
19 20 Cookbook("Cookbook", 97231020081L),
20 21 BabyVisitModel("BabyVisitModel", 97531000090L),
... ... @@ -76,6 +77,7 @@
76 77 PatientCourseModel("PatientCourseModel", 92531039591L),
77 78 ModularFunctionConfigModel("ModularFunctionConfigModel", 97531039991L),
78 79 BabySieveModel("BabySieveModel", 97531049991L),
  80 + PostpartumRecords("PostpartumRecords", 97521049991L),
79 81 QuestionModel("QuestionModel", 97521049991L),
80 82 BabyEyeCheck("BabyEyeCheck", 97521039591L);
81 83  
platform-dal/src/main/java/com/lyms/platform/pojo/PostpartumRecords.java View file @ 0e1f1c4
  1 +package com.lyms.platform.pojo;
  2 +
  3 +import com.lyms.platform.beans.SerialIdEnum;
  4 +import com.lyms.platform.common.result.BaseModel;
  5 +import org.springframework.data.mongodb.core.mapping.Document;
  6 +
  7 +import java.io.Serializable;
  8 +import java.util.List;
  9 +
  10 +/**
  11 + * Created by Administrator on 2019/1/9.
  12 + * 产后观察记录模型
  13 + */
  14 +@Document(collection = "lyms_postpartum_records")
  15 +public class PostpartumRecords extends BaseModel {
  16 +
  17 + private static final long serialVersionUID = SerialIdEnum.PostpartumRecords.getCid();
  18 + private String id;
  19 + private String parentId;//孕妇ID
  20 + private String maternalDeliverId;//分娩ID
  21 + private String created;//创建时间
  22 + private String modified;//修改时间
  23 + private List<Records> records;//记录列表
  24 +
  25 + public static class Records implements Serializable {
  26 + private static final long serialVersionUID = SerialIdEnum.Records.getCid();
  27 + private String id;
  28 + private String date;//时间
  29 + private String tw;//体温
  30 + private String xy;//血压
  31 + private String mb;//脉搏
  32 + private String xybhd;//血氧饱和度
  33 + private String gd;//宫底
  34 + private String cxl;//出血量
  35 + private String pgjc;//膀胱检查
  36 + private String hyqk;//会阴情况
  37 + private String nz;//内诊
  38 + private String fz;//附注
  39 + private String qm;//签名
  40 +
  41 + public Records(){
  42 +
  43 + }
  44 +
  45 + public String getId() {
  46 + return id;
  47 + }
  48 +
  49 + public void setId(String id) {
  50 + this.id = id;
  51 + }
  52 +
  53 + public String getDate() {
  54 + return date;
  55 + }
  56 +
  57 + public void setDate(String date) {
  58 + this.date = date;
  59 + }
  60 +
  61 + public String getTw() {
  62 + return tw;
  63 + }
  64 +
  65 + public void setTw(String tw) {
  66 + this.tw = tw;
  67 + }
  68 +
  69 + public String getXy() {
  70 + return xy;
  71 + }
  72 +
  73 + public void setXy(String xy) {
  74 + this.xy = xy;
  75 + }
  76 +
  77 + public String getMb() {
  78 + return mb;
  79 + }
  80 +
  81 + public void setMb(String mb) {
  82 + this.mb = mb;
  83 + }
  84 +
  85 + public String getXybhd() {
  86 + return xybhd;
  87 + }
  88 +
  89 + public void setXybhd(String xybhd) {
  90 + this.xybhd = xybhd;
  91 + }
  92 +
  93 + public String getGd() {
  94 + return gd;
  95 + }
  96 +
  97 + public void setGd(String gd) {
  98 + this.gd = gd;
  99 + }
  100 +
  101 + public String getCxl() {
  102 + return cxl;
  103 + }
  104 +
  105 + public void setCxl(String cxl) {
  106 + this.cxl = cxl;
  107 + }
  108 +
  109 + public String getPgjc() {
  110 + return pgjc;
  111 + }
  112 +
  113 + public void setPgjc(String pgjc) {
  114 + this.pgjc = pgjc;
  115 + }
  116 +
  117 + public String getHyqk() {
  118 + return hyqk;
  119 + }
  120 +
  121 + public void setHyqk(String hyqk) {
  122 + this.hyqk = hyqk;
  123 + }
  124 +
  125 + public String getNz() {
  126 + return nz;
  127 + }
  128 +
  129 + public void setNz(String nz) {
  130 + this.nz = nz;
  131 + }
  132 +
  133 + public String getFz() {
  134 + return fz;
  135 + }
  136 +
  137 + public void setFz(String fz) {
  138 + this.fz = fz;
  139 + }
  140 +
  141 + public String getQm() {
  142 + return qm;
  143 + }
  144 +
  145 + public void setQm(String qm) {
  146 + this.qm = qm;
  147 + }
  148 + }
  149 +
  150 +
  151 + public String getId() {
  152 + return id;
  153 + }
  154 +
  155 + public void setId(String id) {
  156 + this.id = id;
  157 + }
  158 +
  159 + public String getParentId() {
  160 + return parentId;
  161 + }
  162 +
  163 + public void setParentId(String parentId) {
  164 + this.parentId = parentId;
  165 + }
  166 +
  167 + public String getMaternalDeliverId() {
  168 + return maternalDeliverId;
  169 + }
  170 +
  171 + public void setMaternalDeliverId(String maternalDeliverId) {
  172 + this.maternalDeliverId = maternalDeliverId;
  173 + }
  174 +
  175 + public String getCreated() {
  176 + return created;
  177 + }
  178 +
  179 + public void setCreated(String created) {
  180 + this.created = created;
  181 + }
  182 +
  183 + public String getModified() {
  184 + return modified;
  185 + }
  186 +
  187 + public void setModified(String modified) {
  188 + this.modified = modified;
  189 + }
  190 +
  191 + public List<Records> getRecords() {
  192 + return records;
  193 + }
  194 +
  195 + public void setRecords(List<Records> records) {
  196 + this.records = records;
  197 + }
  198 +}
platform-dal/src/main/java/com/lyms/platform/query/PostpartumRecordsQuery.java View file @ 0e1f1c4
  1 +package com.lyms.platform.query;
  2 +
  3 +import com.lyms.platform.common.base.IConvertToNativeQuery;
  4 +import com.lyms.platform.common.dao.BaseQuery;
  5 +import com.lyms.platform.common.dao.operator.MongoCondition;
  6 +import com.lyms.platform.common.dao.operator.MongoOper;
  7 +import com.lyms.platform.common.dao.operator.MongoQuery;
  8 +
  9 +/**
  10 + * 产后观察查询模型
  11 + * Created by Administrator on 2019/1/9.
  12 + */
  13 +public class PostpartumRecordsQuery extends BaseQuery implements IConvertToNativeQuery {
  14 +
  15 + private String parentId;//孕妇ID
  16 +
  17 + public MongoQuery convertToQuery() {
  18 + MongoCondition condition = MongoCondition.newInstance();
  19 + if(null != parentId){
  20 + condition = condition.and("parentId", parentId, MongoOper.IS);
  21 + }
  22 + return condition.toMongoQuery();
  23 + }
  24 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PostpartumRecordsController.java View file @ 0e1f1c4
  1 +package com.lyms.platform.operate.web.controller;
  2 +
  3 +import org.springframework.stereotype.Controller;
  4 +
  5 +/**
  6 + * Created by Administrator on 2019/1/9.
  7 + * 产后观察记录
  8 + */
  9 +@Controller
  10 +public class PostpartumRecordsController {
  11 +}
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PostpartumRecordsFacade.java View file @ 0e1f1c4
  1 +package com.lyms.platform.operate.web.facade;
  2 +
  3 +import com.lyms.platform.biz.service.PatientsService;
  4 +import com.lyms.platform.biz.service.PostpartumRecordsService;
  5 +import org.springframework.beans.factory.annotation.Autowired;
  6 +import org.springframework.beans.factory.annotation.Qualifier;
  7 +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +/**
  11 + * Created by Administrator on 2019/1/9.
  12 + * 产后观察
  13 + */
  14 +@Component
  15 +public class PostpartumRecordsFacade {
  16 + @Autowired
  17 + @Qualifier("commonThreadPool")
  18 + private ThreadPoolTaskExecutor commonThreadPool;
  19 + @Autowired
  20 + private PatientsService patientsService;
  21 + @Autowired
  22 + private PostpartumRecordsService postpartumRecordsService;
  23 +
  24 +
  25 +}