Commit b9cead890fe8ed15a0b79a440f193da58e3fef65

Authored by wtt
1 parent dbe39881eb

滦平分娩

Showing 12 changed files with 229 additions and 21 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/FetalPositionCDEnums.java View file @ b9cead8
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +import org.apache.commons.lang.StringUtils;
  4 +
  5 +/**
  6 + *
  7 + * 胎方位枚举
  8 + *
  9 + * Created by Administrator on 2016/6/21 0021.
  10 + */
  11 +public enum FetalPositionCDEnums {
  12 + ONE1("左枕前","1"),
  13 + ONE2("左枕横","2"),
  14 + ONE3("左枕后","3"),
  15 + ONE4("右枕前","4"),
  16 + ONE5("右枕横","5"),
  17 + ONE6("右枕后","6"),
  18 + ONE7("左颏前","7"),
  19 + ONE8("左颏横","8"),
  20 + ONE9("左颏后","9"),
  21 + ONE10("右颏前","10"),
  22 + ONE11("右颏横","11"),
  23 + ONE12("右颏后","12"),
  24 + ONE13("额后位","13"),
  25 + ONE24("额前位","24"),
  26 + ONE14("左骶前","14"),
  27 + ONE15("左骶横","15"),
  28 + ONE16("左骶后","16"),
  29 + ONE17("右骶前","17"),
  30 + ONE18("右骶横","18"),
  31 + ONE19("右骶后","19"),
  32 + ONE20("左肩前","20"),
  33 + ONE21("左肩后","21"),
  34 + ONE22("右肩前","22"),
  35 + ONE23("右肩后","23"),
  36 + ONE31("左枕前复合左手","31"),
  37 + ONE26("左枕前复合右手","26"),
  38 + ONE27("右枕前复合左手","27"),
  39 + ONE28("右枕前复合右手","28"),
  40 + ONE29("正枕前位","29"),
  41 + ONE30("正枕后位","30"),
  42 + ONE25("不详","25");
  43 +
  44 + public static String getTitle(String id){
  45 + if (StringUtils.isNotEmpty(id)){
  46 + for (FetalPositionCDEnums fetalPositionEnums: FetalPositionCDEnums.values()){
  47 + if (fetalPositionEnums.getId().equals(id)){
  48 + return fetalPositionEnums.getName();
  49 + }
  50 + }
  51 + }
  52 + return null;
  53 + }
  54 +
  55 + public static String getTitle2(String id){
  56 + if (StringUtils.isNotEmpty(id)){
  57 + for (FetalPositionCDEnums fetalPositionEnums: FetalPositionCDEnums.values()){
  58 + if (fetalPositionEnums.getId().equals(id)){
  59 + return fetalPositionEnums.getName();
  60 + }
  61 + }
  62 + }
  63 + return "--";
  64 + }
  65 +
  66 +
  67 + private FetalPositionCDEnums(String name, String id){
  68 + this.name=name;
  69 + this.id=id;
  70 + }
  71 + private String name;
  72 + private String id;
  73 +
  74 + public String getId() {
  75 + return id;
  76 + }
  77 +
  78 + public void setId(String id) {
  79 + this.id = id;
  80 + }
  81 +
  82 + public String getName() {
  83 + return name;
  84 + }
  85 +
  86 + public void setName(String name) {
  87 + this.name = name;
  88 + }
  89 +}
platform-dal/src/main/java/com/lyms/platform/pojo/MaternalDeliverModel.java View file @ b9cead8
... ... @@ -21,6 +21,9 @@
21 21 private static final long serialVersionUID = SerialIdEnum.MaternalDeliverModel.getCid();
22 22  
23 23 private String id;
  24 + //分娩记录加住院管床大夫
  25 + private String gcdfDoctorId;
  26 +
24 27 /**
25 28 * 新加字段
26 29 ***/
... ... @@ -206,6 +209,14 @@
206 209  
207 210 public void setAddressPostRest(String addressPostRest) {
208 211 this.addressPostRest = addressPostRest;
  212 + }
  213 +
  214 + public String getGcdfDoctorId() {
  215 + return gcdfDoctorId;
  216 + }
  217 +
  218 + public void setGcdfDoctorId(String gcdfDoctorId) {
  219 + this.gcdfDoctorId = gcdfDoctorId;
209 220 }
210 221  
211 222 public String getStreetRegisterId() {
platform-dal/src/main/java/com/lyms/platform/pojo/Patients.java View file @ b9cead8
... ... @@ -276,6 +276,8 @@
276 276 // 分娩相关信息
277 277 // 分娩医院
278 278 private String fmHospital;
  279 + //分娩记录加住院管床大夫
  280 + private String gcdfDoctorId;
279 281 // 分娩年龄
280 282 private Integer fmAge;
281 283 // 分娩孕周
... ... @@ -416,6 +418,14 @@
416 418  
417 419 public Integer getMarriageCheck() {
418 420 return marriageCheck;
  421 + }
  422 +
  423 + public String getGcdfDoctorId() {
  424 + return gcdfDoctorId;
  425 + }
  426 +
  427 + public void setGcdfDoctorId(String gcdfDoctorId) {
  428 + this.gcdfDoctorId = gcdfDoctorId;
419 429 }
420 430  
421 431 public void setMarriageCheck(Integer marriageCheck) {
platform-dal/src/main/java/com/lyms/platform/query/PatientsQuery.java View file @ b9cead8
... ... @@ -308,6 +308,8 @@
308 308 // 分娩相关信息
309 309 // 分娩医院
310 310 private String fmHospital;
  311 + //分娩记录加住院管床大夫
  312 + private String gcdfDoctorId;
311 313 // 这个是分娩医院+建档医院的综合查询
312 314 private List<String> fmHospitalQueryList;
313 315 private List<String> fmHospitalList;
... ... @@ -416,6 +418,14 @@
416 418 this.noRlevel = noRlevel;
417 419 }
418 420  
  421 + public String getGcdfDoctorId() {
  422 + return gcdfDoctorId;
  423 + }
  424 +
  425 + public void setGcdfDoctorId(String gcdfDoctorId) {
  426 + this.gcdfDoctorId = gcdfDoctorId;
  427 + }
  428 +
419 429 public boolean isHistory() {
420 430 return isHistory;
421 431 }
... ... @@ -841,7 +851,10 @@
841 851 if (CollectionUtils.isNotEmpty(fmHospitalList)) {
842 852 condition = condition.and("fmHospital", fmHospitalList, MongoOper.IN);
843 853 }
844   -
  854 + //分娩记录加住院管床大夫
  855 + if (StringUtils.isNotEmpty(gcdfDoctorId)) {
  856 + condition = condition.and("gcdfDoctorId", gcdfDoctorId, MongoOper.IS);
  857 + }
845 858 if (StringUtils.isNotEmpty(normal)) {
846 859  
847 860 if ("1".equals(normal))
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MatDeliverFacade.java View file @ b9cead8
... ... @@ -243,6 +243,7 @@
243 243 List <MaternalDeliverModel.Baby> babyList = new ArrayList <>();
244 244  
245 245 MaternalDeliverModel maternalDeliverModel = deliverAddRequest.convertToDataModel();
  246 + maternalDeliverModel.setGcdfDoctorId(deliverAddRequest.getGcdfDoctorId()); //分娩记录加住院管床大夫
246 247  
247 248 //非卫计委出修改做区域隐藏建档
248 249 if (deliverAddRequest.getPatient() == null) {
... ... @@ -398,6 +399,7 @@
398 399 System.out.println(patients1.getId() + ":这条数据的末日月经和分娩时间异常");
399 400 // 跳过
400 401 }
  402 + patientsLocal.setGcdfDoctorId(deliverAddRequest.getGcdfDoctorId());//全部产妇管理要使用作为查询条件
401 403 // HuJiaqi添加结束
402 404 patientsService.updatePatient(patientsLocal);
403 405  
... ... @@ -544,6 +546,7 @@
544 546 patients1.setModified(new Date());
545 547 patients1.setId(deliverAddRequest.getParentId());
546 548 patients1.setFmDate(fmDate);
  549 + patients1.setGcdfDoctorId(deliverAddRequest.getGcdfDoctorId());//全部产妇管理要使用作为查询条件
547 550 // HuJiaqi添加开始,这里冗余了分娩分娩医院,分娩年龄,分娩孕周,分娩方式,并将状态更改为产妇
548 551 patients1.setType(3);
549 552 patients1.setIsAutoFm(YnEnums.NO.getId());
550 553  
... ... @@ -1553,9 +1556,19 @@
1553 1556 map.put("id", "-1");
1554 1557 map.put("name", doctorId);
1555 1558 }
  1559 + maternalDeliverResult.setDeliverDoctor(map);
  1560 + //分娩记录加住院管床大夫
  1561 + if (StringUtils.isNotEmpty(deliverModel.getGcdfDoctorId())) {
  1562 + Users users = usersService.getUsers(Integer.valueOf(deliverModel.getGcdfDoctorId()));
  1563 + Map<String, String> map1 = new HashMap<>();
  1564 + if (null != users) {
  1565 + map1.put("id", users.getId() + "");
  1566 + map1.put("name", users.getName());
  1567 + }
  1568 + maternalDeliverResult.setGcdfDoctorId(map1);
  1569 + }
1556 1570  
1557 1571  
1558   - maternalDeliverResult.setDeliverDoctor(map);
1559 1572 //督导医生
1560 1573 String supervisorDoctorId = deliverModel.getSupervisorDoctor();
1561 1574 if (StringUtils.isNotEmpty(supervisorDoctorId)) {
... ... @@ -1612,6 +1625,7 @@
1612 1625 map.put("getDeathCauseEnums", getDeathCauseEnums());
1613 1626 map.put("getTpmcTypeEnums", getTpmcTypeEnums());
1614 1627 map.put("getFetPosition", getFetPosition());
  1628 + map.put("getFetPositionCDDZ", getFetPositionCDDZ());
1615 1629 map.put("getFetal", getFetal());
1616 1630 map.put("getTaiShu", getTaiShu());
1617 1631 map.put("getTaiPan", getTaiPan());
... ... @@ -1653,6 +1667,17 @@
1653 1667 return list;
1654 1668 }
1655 1669  
  1670 + //胎方位(承德滦平定制)
  1671 + public List <Object> getFetPositionCDDZ() {
  1672 + List <Object> list = new ArrayList <>();
  1673 + for (FetalPositionCDEnums enums : FetalPositionCDEnums.values()) {
  1674 + Map <String, Object> resultMap = new HashMap <>();
  1675 + resultMap.put("id", enums.getId());
  1676 + resultMap.put("name", enums.getName());
  1677 + list.add(resultMap);
  1678 + }
  1679 + return list;
  1680 + }
1656 1681 //胎先露
1657 1682 public List getFetal() {
1658 1683 List <Object> list = new ArrayList <>();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ b9cead8
... ... @@ -659,7 +659,7 @@
659 659 public BaseResponse queryHighRisk(RiskPatientsQueryRequest riskPatientsQueryRequest, Boolean isHighRisk, Integer type, Integer userId, String needPage, boolean isRegion) {
660 660 //组合请求
661 661 PatientsQuery patientsQuery = complayRequest(riskPatientsQueryRequest, isHighRisk, type, userId, needPage, isRegion);
662   -
  662 + patientsQuery.setGcdfDoctorId( riskPatientsQueryRequest.getGcdfDoctorId());//分娩记录加住院管床大夫
663 663 String hospital = autoMatchFacade.getHospitalId(userId);
664 664 //查询符合条件的孕妇
665 665 StopWatch stopWatch = new StopWatch("queryPatient1 -" + hospital);
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java View file @ b9cead8
... ... @@ -3626,6 +3626,19 @@
3626 3626  
3627 3627 Map <String, Object> map = new HashMap <>();
3628 3628 map.put("id", data.getId());
  3629 + if (StringUtils.isNotEmpty(data.getGcdfDoctorId())) {
  3630 + Users users = usersService.getUsers(Integer.valueOf(data.getGcdfDoctorId()));
  3631 + Map<String, String> map1 = new HashMap<>();
  3632 + if (null != users) {
  3633 + map.put("gcdfDoctorId", users.getName());
  3634 + }
  3635 + }
  3636 + if (StringUtils.isNotEmpty( data.getGcdfDoctorId())) {
  3637 + Users users = usersService.getUsers(Integer.valueOf( data.getGcdfDoctorId()));
  3638 + if (null != users) {
  3639 + map.put("gcdfDoctorId", users.getName());
  3640 + }
  3641 + }
3629 3642 if (StringUtils.isNotEmpty(data.getFmType())) {
3630 3643 map.put("fmType", FmTypeEnums.getFmDzNameById(data.getFmType()));
3631 3644 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/MatDeliverAddRequest.java View file @ b9cead8
... ... @@ -30,7 +30,8 @@
30 30  
31 31  
32 32 private String id;
33   -
  33 + //分娩记录加住院管床大夫
  34 + private String gcdfDoctorId;
34 35 /**
35 36 * 新加字段
36 37 ***/
... ... @@ -283,6 +284,14 @@
283 284  
284 285 public String getAnalMode() {
285 286 return analMode;
  287 + }
  288 +
  289 + public String getGcdfDoctorId() {
  290 + return gcdfDoctorId;
  291 + }
  292 +
  293 + public void setGcdfDoctorId(String gcdfDoctorId) {
  294 + this.gcdfDoctorId = gcdfDoctorId;
286 295 }
287 296  
288 297 public void setAnalMode(String analMode) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/RiskPatientsQueryRequest.java View file @ b9cead8
... ... @@ -135,6 +135,8 @@
135 135  
136 136 //分娩医院
137 137 private String fmHospital;
  138 + //分娩记录加住院管床大夫
  139 + private String gcdfDoctorId;
138 140  
139 141 private String fmWeekStart;
140 142 private String fmWeekEnd;
... ... @@ -189,6 +191,14 @@
189 191  
190 192 public int getIsEncry() {
191 193 return isEncry;
  194 + }
  195 +
  196 + public String getGcdfDoctorId() {
  197 + return gcdfDoctorId;
  198 + }
  199 +
  200 + public void setGcdfDoctorId(String gcdfDoctorId) {
  201 + this.gcdfDoctorId = gcdfDoctorId;
192 202 }
193 203  
194 204 public void setIsEncry(int isEncry) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/MaternalDeliverResult.java View file @ b9cead8
... ... @@ -85,6 +85,8 @@
85 85 private Map<String, String> fmHospital;
86 86 //接生医生
87 87 private Map<String, String> deliverDoctor;
  88 + //分娩记录加住院管床大夫
  89 + private Map<String, String> gcdfDoctorId;
88 90  
89 91 //督导医生
90 92 private Map<String, String> supervisorDoctor;
... ... @@ -126,6 +128,14 @@
126 128  
127 129 public Map<String, Object> getHandDueWeek() {
128 130 return handDueWeek;
  131 + }
  132 +
  133 + public Map <String, String> getGcdfDoctorId() {
  134 + return gcdfDoctorId;
  135 + }
  136 +
  137 + public void setGcdfDoctorId(Map <String, String> gcdfDoctorId) {
  138 + this.gcdfDoctorId = gcdfDoctorId;
129 139 }
130 140  
131 141 public void setHandDueWeek(Map<String, Object> handDueWeek) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/QuanChanResult.java View file @ b9cead8
... ... @@ -16,6 +16,9 @@
16 16 */
17 17 public class QuanChanResult implements IBasicResultConvert<QuanChanResult, Patients> {
18 18 public static final String SPIT = "-";
  19 + //分娩记录加住院管床大夫
  20 + private String gcdfDoctorId;
  21 +
19 22 private String id;
20 23 //名称
21 24 private String name;
... ... @@ -105,6 +108,14 @@
105 108  
106 109 public String getrFactor() {
107 110 return rFactor;
  111 + }
  112 +
  113 + public String getGcdfDoctorId() {
  114 + return gcdfDoctorId;
  115 + }
  116 +
  117 + public void setGcdfDoctorId(String gcdfDoctorId) {
  118 + this.gcdfDoctorId = gcdfDoctorId;
108 119 }
109 120  
110 121 public void setrFactor(String rFactor) {
platform-operate-api/src/main/java/com/lyms/platform/operate/web/worker/QuanChanPatientWorker.java View file @ b9cead8
... ... @@ -36,10 +36,10 @@
36 36 * <p/>
37 37 * Created by Administrator on 2016/10/13 0013.
38 38 */
39   -public class QuanChanPatientWorker implements Callable<List<QuanChanResult>> {
  39 +public class QuanChanPatientWorker implements Callable <List <QuanChanResult>> {
40 40  
41 41 private static final Logger logger = LoggerFactory.getLogger(PatientFacade.class);
42   - private List<Patients> patientses;
  42 + private List <Patients> patientses;
43 43  
44 44 private PatientsService patientsService;
45 45  
... ... @@ -55,7 +55,7 @@
55 55 private DischargeAbstractMotherService dischargeAbstractMotherService;
56 56 private MatDeliverFollowService matDeliverFollowService;
57 57  
58   - public QuanChanPatientWorker(List<Patients> patientses,
  58 + public QuanChanPatientWorker(List <Patients> patientses,
59 59 String hospital,
60 60 UsersService usersService,
61 61 PostReviewService postReviewService,
... ... @@ -78,8 +78,8 @@
78 78  
79 79  
80 80 @Override
81   - public List<QuanChanResult> call() throws Exception {
82   - List data = new ArrayList<>();
  81 + public List <QuanChanResult> call() throws Exception {
  82 + List data = new ArrayList <>();
83 83 AntExQuery antExQuery = new AntExQuery();
84 84 AntExChuQuery antExChuQuery1 = new AntExChuQuery();//初诊
85 85 antExChuQuery1.setYn(YnEnums.YES.getId());
86 86  
... ... @@ -102,9 +102,9 @@
102 102 //antExChuQuery1.setParentId(patients.getId());
103 103 //增加查询本次产程条数
104 104 antExChuQuery1.setStart(patients.getLastMenses());
105   - List<AntExChuModel> chu = antExService.queryAntExChu(antExChuQuery1.convertToQuery());
  105 + List <AntExChuModel> chu = antExService.queryAntExChu(antExChuQuery1.convertToQuery());
106 106 //复诊次数
107   - List<AntenatalExaminationModel> ant = null;
  107 + List <AntenatalExaminationModel> ant = null;
108 108 int i = 0;
109 109 if (CollectionUtils.isNotEmpty(chu)) {
110 110 for (AntExChuModel a : chu) {//唐山滦县导出判断初诊是否是本院
... ... @@ -162,7 +162,7 @@
162 162 DischargeAbstractMotherQuery dischargeAbstractMotherQuery = new DischargeAbstractMotherQuery();
163 163 dischargeAbstractMotherQuery.setYn(YnEnums.YES.getId());
164 164 dischargeAbstractMotherQuery.setPatientId(patients.getId());
165   - List<DischargeAbstractMotherModel> dischargeAbstractMotherModels = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery);
  165 + List <DischargeAbstractMotherModel> dischargeAbstractMotherModels = dischargeAbstractMotherService.query(dischargeAbstractMotherQuery);
166 166 if (dischargeAbstractMotherModels != null && dischargeAbstractMotherModels.size() > 0) {
167 167 chanResult.setCyxj("有");
168 168 } else {
... ... @@ -171,7 +171,7 @@
171 171 //产后访视
172 172 MatDeliverFollowQuery mfQuery = new MatDeliverFollowQuery();
173 173 mfQuery.setPid(patients.getPid());
174   - List<MatdeliverFollowModel> maternalDeliverList = matDeliverFollowService.query(mfQuery);
  174 + List <MatdeliverFollowModel> maternalDeliverList = matDeliverFollowService.query(mfQuery);
175 175 if (maternalDeliverList != null && maternalDeliverList.size() > 0) {
176 176 chanResult.setChfs("有");
177 177 } else {
... ... @@ -181,7 +181,7 @@
181 181 pReviewQuery.setYn(YnEnums.YES.getId());
182 182 pReviewQuery.setParentId(patients.getId());
183 183 //产后复查记录
184   - List<PostReviewModel> reviewModels = postReviewService.findWithList(pReviewQuery);
  184 + List <PostReviewModel> reviewModels = postReviewService.findWithList(pReviewQuery);
185 185 if (reviewModels != null && reviewModels.size() > 0) {
186 186 chanResult.setChfc("有");
187 187 } else {
... ... @@ -222,7 +222,7 @@
222 222 matDeliverQuery.setCreatedStart(patients.getLastMenses());
223 223 matDeliverQuery.setYn(YnEnums.YES.getId());
224 224 stopWatch.start("query matdeliver");
225   - List<MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery);
  225 + List <MaternalDeliverModel> maternalDeliverModels = matDeliverService.query(matDeliverQuery);
226 226 if (CollectionUtils.isNotEmpty(maternalDeliverModels)) {
227 227 chanResult.setTireNumber(TaiShuEnums.getTitle(maternalDeliverModels.get(0).getTireNumber() + ""));
228 228 try {
... ... @@ -230,6 +230,14 @@
230 230 } catch (Exception e) {
231 231 chanResult.setfCh("");
232 232 }
  233 + if (StringUtils.isNotEmpty(maternalDeliverModels.get(0).getGcdfDoctorId())) {
  234 + Users users = usersService.getUsers(Integer.valueOf(maternalDeliverModels.get(0).getGcdfDoctorId()));
  235 + Map <String, String> map1 = new HashMap <>();
  236 + if (null != users) {
  237 + chanResult.setGcdfDoctorId(users.getName());//分娩时的管床大夫
  238 + }
  239 + }
  240 +
233 241 }
234 242 stopWatch.stop();
235 243 //复查次数
236 244  
... ... @@ -243,13 +251,13 @@
243 251 patientsQuery.setYn(YnEnums.YES.getId());
244 252 patientsQuery.setPid(patients.getPid());
245 253 patientsQuery.setLastMensesStart(patients.getFmDate());
246   - List<Patients> patientses = patientsService.queryPatient(patientsQuery);
  254 + List <Patients> patientses = patientsService.queryPatient(patientsQuery);
247 255 if (CollectionUtils.isNotEmpty(patientses)) {
248 256 postReviewQuery.setEnd(patientses.get(0).getLastMenses());
249 257 }
250 258  
251 259 stopWatch.start("query postreview list");
252   - List<PostReviewModel> withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
  260 + List <PostReviewModel> withList = postReviewService.findWithList(postReviewQuery.convertToQuery().addOrder(Sort.Direction.DESC, "created"));
253 261 if (CollectionUtils.isNotEmpty(withList)) {
254 262 Users users = usersService.getUsers(NumberUtils.toInt(withList.get(0).getProdDoctor()));
255 263 if (null != users) {
... ... @@ -286,7 +294,7 @@
286 294  
287 295  
288 296 //高危因素
289   - List<String> factor = patients.getRiskFactorId();
  297 + List <String> factor = patients.getRiskFactorId();
290 298 if (CollectionUtils.isNotEmpty(factor)) {
291 299 StringBuilder sb = new StringBuilder(56);
292 300 for (String srt : factor) {
... ... @@ -314,7 +322,7 @@
314 322 List level = new ArrayList();
315 323 if (StringUtils.isNotEmpty(patients.getRiskLevelId())) {
316 324 try {
317   - List<String> list = JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class);
  325 + List <String> list = JsonUtil.jkstr2Obj(patients.getRiskLevelId(), List.class);
318 326 for (String str : list) {
319 327 BasicConfig basicConfig = basicConfigService.getOneBasicConfigById(str);
320 328 if (null != basicConfig) {
... ... @@ -339,8 +347,7 @@
339 347 data.add(chanResult);
340 348 logger.debug(stopWatch.toString());
341 349 }
342   - }catch (Exception e)
343   - {
  350 + } catch (Exception e) {
344 351 ExceptionUtils.catchException(e, "convertToQuanCPatient get result error.");
345 352 }
346 353