Commit cc59b13d0b3cb9885b874cefcf0bc07f35e178f0

Authored by xujiahong
1 parent e4a8426dad
Exists in master

分娩相关各种枚举

Showing 17 changed files with 861 additions and 43 deletions

parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthInfo.java View file @ cc59b13
... ... @@ -18,6 +18,11 @@
18 18 public class ChildbirthInfo implements Serializable {
19 19  
20 20 private static final long serialVersionUID = 1L;
  21 +
  22 + //会阴情况:1完整,2切开
  23 + public static final int PERINEUM_SITUATION_WHOLE = 1;
  24 + public static final int PERINEUM_SITUATION_SPLIT = 2;
  25 +
21 26  
22 27 /**
23 28 * ID(分娩信息)
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CfEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * 产妇情况
  10 + * Created by Administrator on 2016/6/24 0024.
  11 + */
  12 +public enum CfEnums {
  13 + O("良好","1"),
  14 + O1("死亡","2");
  15 +
  16 + public static List<Map<String,String>> getList(){
  17 + List<Map<String,String>> list = new ArrayList<>();
  18 + for(CfEnums e : values()){
  19 + Map<String,String> map = new LinkedHashMap<>();
  20 + map.put("id", e.getId());
  21 + map.put("name", e.getName());
  22 + list.add(map);
  23 + }
  24 + return list;
  25 + }
  26 +
  27 + private CfEnums(String name, String id){
  28 + this.id=id;
  29 + this.name=name;
  30 + }
  31 +
  32 + public static String getTitle(String id){
  33 + if (id==null){
  34 + return "";
  35 + }
  36 + for (CfEnums cfEnums:CfEnums.values()){
  37 + if (id.equals(cfEnums.getId())){
  38 + return cfEnums.getName();
  39 + }
  40 + }
  41 + return "";
  42 + }
  43 +
  44 + private String id;
  45 + private String name;
  46 +
  47 + public String getId() {
  48 + return id;
  49 + }
  50 +
  51 + public void setId(String id) {
  52 + this.id = id;
  53 + }
  54 +
  55 + public String getName() {
  56 + return name;
  57 + }
  58 +
  59 + public void setName(String name) {
  60 + this.name = name;
  61 + }
  62 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CosEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * 产科并发症
  10 + *
  11 + * Created by Administrator on 2016/6/24 0024.
  12 + */
  13 +public enum CosEnums {
  14 + O("前置胎盘","1"),
  15 +
  16 + O1("胎盘早剥","2"),
  17 + O2("胎盘滞留","3"),
  18 + O3("胎膜早破","4"),
  19 + O4("产后出血","5"),
  20 + O5("妊娠期高血压","6"),
  21 + O6("子痫前期(轻)","7"),
  22 + O7("子痫前期(重)","8"),
  23 +
  24 + O8("子痫慢性高血压并发子痫前期","9"),
  25 + O9("妊娠合并慢性高血压","10"),
  26 + O10("其他","11"),
  27 + ;
  28 +
  29 + public static List<Map<String,String>> getList(){
  30 + List<Map<String,String>> list = new ArrayList<>();
  31 + for(CosEnums e : values()){
  32 + Map<String,String> map = new LinkedHashMap<>();
  33 + map.put("id", e.getId());
  34 + map.put("name", e.getName());
  35 + list.add(map);
  36 + }
  37 + return list;
  38 + }
  39 +
  40 + private CosEnums(String name,String id){
  41 + this.id=id;
  42 + this.name=name;
  43 + }
  44 + private String id;private String name;
  45 +
  46 + public String getId() {
  47 + return id;
  48 + }
  49 +
  50 + public void setId(String id) {
  51 + this.id = id;
  52 + }
  53 +
  54 + public String getName() {
  55 + return name;
  56 + }
  57 +
  58 + public void setName(String name) {
  59 + this.name = name;
  60 + }
  61 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/DeathCauseEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +import org.apache.commons.lang.StringUtils;
  9 +
  10 +/**
  11 + * 死亡原因
  12 + * <p>
  13 + * Created by Administrator on 2016/6/24 0024.
  14 + */
  15 +public enum DeathCauseEnums {
  16 + O("产科出血", "1"), O2("妊娠高血压疾病", "2"), O3("内科合并症", "3"), O4("羊水栓塞", "4"), O5("其他", "5");
  17 +
  18 + public static List<Map<String,String>> getList(){
  19 + List<Map<String,String>> list = new ArrayList<>();
  20 + for(DeathCauseEnums e : values()){
  21 + Map<String,String> map = new LinkedHashMap<>();
  22 + map.put("id", e.getId());
  23 + map.put("name", e.getName());
  24 + list.add(map);
  25 + }
  26 + return list;
  27 + }
  28 +
  29 +
  30 +
  31 + private DeathCauseEnums(String name, String id) {
  32 + this.id = id;
  33 + this.name = name;
  34 + }
  35 +
  36 + private String id;
  37 + private String name;
  38 +
  39 + public static String getName(String id) {
  40 + if (StringUtils.isNotEmpty(id)) {
  41 + for (DeathCauseEnums deathCauseEnums : DeathCauseEnums.values()) {
  42 + if (deathCauseEnums.getId().equals(id)) {
  43 + return deathCauseEnums.getName();
  44 + }
  45 + }
  46 + }
  47 + return "";
  48 + }
  49 +
  50 + public String getId() {
  51 + return id;
  52 + }
  53 +
  54 + public void setId(String id) {
  55 + this.id = id;
  56 + }
  57 +
  58 + public String getName() {
  59 + return name;
  60 + }
  61 +
  62 + public void setName(String name) {
  63 + this.name = name;
  64 + }
  65 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/FmTypeEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * 分娩方式枚举
  10 + * <p>
  11 + * Created by Administrator on 2016/6/24 0024.
  12 + */
  13 +public enum FmTypeEnums {
  14 + O("顺产", "0"), O1("剖宫产", "1");
  15 +
  16 + public static List<Map<String,String>> getList(){
  17 + List<Map<String,String>> list = new ArrayList<>();
  18 + for(FmTypeEnums e : values()){
  19 + Map<String,String> map = new LinkedHashMap<>();
  20 + map.put("id", e.getId());
  21 + map.put("name", e.getName());
  22 + list.add(map);
  23 + }
  24 + return list;
  25 + }
  26 +
  27 + private FmTypeEnums(String name, String id) {
  28 + this.id = id;
  29 + this.name = name;
  30 + }
  31 +
  32 +
  33 + public static String getIdByName(String name)
  34 + {
  35 + for (FmTypeEnums e : FmTypeEnums.values()) {
  36 + if (e.getName().equals(name))
  37 + {
  38 + return e.getId();
  39 + }
  40 + }
  41 + return null;
  42 + }
  43 +
  44 + public static String getFmNameById(String id)
  45 + {
  46 + for (FmTypeEnums e : FmTypeEnums.values()) {
  47 + if (e.getId().equals(id))
  48 + {
  49 + return e.getName();
  50 + }
  51 + }
  52 + return null;
  53 + }
  54 +
  55 +
  56 + public static String getFmScNameById(String id)
  57 + {
  58 + for (FmScEnums e : FmScEnums.values()) {
  59 + if (e.getId().equals(id))
  60 + {
  61 + return e.getName();
  62 + }
  63 + }
  64 + return null;
  65 + }
  66 +
  67 + private String id;
  68 + private String name;
  69 +
  70 + public String getId() {
  71 + return id;
  72 + }
  73 +
  74 + public void setId(String id) {
  75 + this.id = id;
  76 + }
  77 +
  78 + public String getName() {
  79 + return name;
  80 + }
  81 +
  82 + public void setName(String name) {
  83 + this.name = name;
  84 + }
  85 +
  86 + public enum FmScEnums {
  87 +
  88 + O2("自然娩出", "2"),
  89 + O3("胎头吸引", "3"),
  90 + O4("产钳低位", "4"),
  91 + O5("产钳中位", "5"),
  92 + O6("臀位助产", "6"),
  93 + O7("臀位牵引", "7");
  94 +
  95 + public static List<Map<String,String>> getList(){
  96 + List<Map<String,String>> list = new ArrayList<>();
  97 + for(FmScEnums e : values()){
  98 + Map<String,String> map = new LinkedHashMap<>();
  99 + map.put("id", e.getId());
  100 + map.put("name", e.getName());
  101 + list.add(map);
  102 + }
  103 + return list;
  104 + }
  105 +
  106 + private FmScEnums(String name,String id) {
  107 + this.id = id;
  108 + this.name = name;
  109 + }
  110 +
  111 + private String id;
  112 + private String name;
  113 +
  114 + public String getId() {
  115 + return id;
  116 + }
  117 +
  118 + public void setId(String id) {
  119 + this.id = id;
  120 + }
  121 +
  122 + public String getName() {
  123 + return name;
  124 + }
  125 +
  126 + public void setName(String name) {
  127 + this.name = name;
  128 + }
  129 + }
  130 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/QiDaiEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * 脐带异常类型
  10 + * <p>
  11 + * Created by Administrator on 2016/6/24 0024.
  12 + */
  13 +public enum QiDaiEnums {
  14 + O2("脐带过长", "1"), O3("脐带过短", "2"), O4("脐带缠绕", "3"), O5("脐带打结", "4"),
  15 + O6("脐带扭转", "5"), O7("脐带脱垂", "6");
  16 +
  17 + public static List<Map<String,String>> getList(){
  18 + List<Map<String,String>> list = new ArrayList<>();
  19 + for(QiDaiEnums e : values()){
  20 + Map<String,String> map = new LinkedHashMap<>();
  21 + map.put("id", e.getId());
  22 + map.put("name", e.getName());
  23 + list.add(map);
  24 + }
  25 + return list;
  26 + }
  27 +
  28 + private QiDaiEnums(String name, String id) {
  29 + this.name = name;
  30 + this.id = id;
  31 + }
  32 +
  33 + private String name;
  34 + private String id;
  35 +
  36 + public String getId() {
  37 + return id;
  38 + }
  39 +
  40 + public void setId(String id) {
  41 + this.id = id;
  42 + }
  43 +
  44 + public String getName() {
  45 + return name;
  46 + }
  47 +
  48 + public void setName(String name) {
  49 + this.name = name;
  50 + }
  51 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/RenShenJieJuEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * Created by Administrator on 2016/6/24 0024.
  10 + */
  11 +public enum RenShenJieJuEnums {
  12 + O("活产", "0"),O1("死胎", "1"),O2("浸软胎", "2"),O3("死产", "3");
  13 +
  14 + public static List<Map<String,String>> getList(){
  15 + List<Map<String,String>> list = new ArrayList<>();
  16 + for(RenShenJieJuEnums e : values()){
  17 + Map<String,String> map = new LinkedHashMap<>();
  18 + map.put("id", e.getId());
  19 + map.put("name", e.getName());
  20 + list.add(map);
  21 + }
  22 + return list;
  23 + }
  24 +
  25 + private RenShenJieJuEnums(String name, String id) {
  26 + this.name = name;
  27 + this.id = id;
  28 + }
  29 +
  30 + private String name;
  31 + private String id;
  32 +
  33 + public String getId() {
  34 + return id;
  35 + }
  36 +
  37 + public void setId(String id) {
  38 + this.id = id;
  39 + }
  40 +
  41 + public String getName() {
  42 + return name;
  43 + }
  44 +
  45 + public void setName(String name) {
  46 + this.name = name;
  47 + }
  48 + public static String getTitle(String id){
  49 + for(RenShenJieJuEnums enums:values()){
  50 + if(id.equals(enums.getId())){
  51 + return enums.getName();
  52 + }
  53 + }
  54 + return null;
  55 + }
  56 +
  57 + public static String getIdByName(String name){
  58 + for(RenShenJieJuEnums enums:values()){
  59 + if(name.equals(enums.getName())){
  60 + return enums.getId();
  61 + }
  62 + }
  63 + return null;
  64 + }
  65 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/SXCauseEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + *
  10 + * 失血原因
  11 + * Created by Administrator on 2016/6/24 0024.
  12 + */
  13 +public enum SXCauseEnums {
  14 +
  15 + O("宫缩乏力","1"),O1("胎盘因素","2"),O2("产道损伤","3"), O3("凝血功能障碍","4"),O5("其他","5");
  16 +
  17 + public static List<Map<String,String>> getList(){
  18 + List<Map<String,String>> list = new ArrayList<>();
  19 + for(SXCauseEnums e : values()){
  20 + Map<String,String> map = new LinkedHashMap<>();
  21 + map.put("id", e.getId());
  22 + map.put("name", e.getName());
  23 + list.add(map);
  24 + }
  25 + return list;
  26 + }
  27 +
  28 + private SXCauseEnums(String name, String id){
  29 + this.id=id;
  30 + this.name=name;
  31 + }
  32 + private String id;private String name;
  33 +
  34 + public String getId() {
  35 + return id;
  36 + }
  37 +
  38 + public void setId(String id) {
  39 + this.id = id;
  40 + }
  41 +
  42 + public String getName() {
  43 + return name;
  44 + }
  45 +
  46 + public void setName(String name) {
  47 + this.name = name;
  48 + }
  49 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/TpmcTypeEnums.java View file @ cc59b13
  1 +package com.lyms.hospital.enums.business;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.LinkedHashMap;
  5 +import java.util.List;
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + *
  10 + * 胎盘娩出方式
  11 + * Created by Administrator on 2016/6/24 0024.
  12 + */
  13 +public enum TpmcTypeEnums {
  14 + O("自然娩出","1"),O2("手术娩出","2");
  15 +
  16 + public static List<Map<String,String>> getList(){
  17 + List<Map<String,String>> list = new ArrayList<>();
  18 + for(TpmcTypeEnums e : values()){
  19 + Map<String,String> map = new LinkedHashMap<>();
  20 + map.put("id", e.getId());
  21 + map.put("name", e.getName());
  22 + list.add(map);
  23 + }
  24 + return list;
  25 + }
  26 +
  27 + private TpmcTypeEnums(String name,String id){
  28 + this.id=id;
  29 + this.name=name;
  30 + }
  31 + private String id;private String name;
  32 +
  33 + public String getId() {
  34 + return id;
  35 + }
  36 +
  37 + public void setId(String id) {
  38 + this.id = id;
  39 + }
  40 +
  41 + public String getName() {
  42 + return name;
  43 + }
  44 +
  45 + public void setName(String name) {
  46 + this.name = name;
  47 + }
  48 +}
parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/HistoryMapsService.java View file @ cc59b13
... ... @@ -4,11 +4,14 @@
4 4 import com.lyms.web.service.BaseService;
5 5 import java.io.Serializable;
6 6 import java.util.List;
  7 +import java.util.Map;
7 8  
8 9 /**
9 10 * <p>
10 11 * 服务类
11 12 * </p>
  13 + *
  14 + * 前端页面展示的病史信息<br/>
12 15 *
13 16 * @author fangcheng
14 17 * @since 2017-03-28
... ... @@ -45,6 +48,18 @@
45 48 * <li>修改时间:
46 49 */
47 50 public List<HistoryMaps> getListByTarget(String targetId,Integer targetType);
  51 +
  52 + /**
  53 + * <li>@Description:前端页面展示的病史信息
  54 + * <li>@param targetId
  55 + * <li>@param targetType
  56 + * <li>@return
  57 + * <li>创建人:xujiahong
  58 + * <li>创建时间:2017年5月8日
  59 + * <li>修改人:
  60 + * <li>修改时间:
  61 + */
  62 + public Map<String,String> showHistory(String targetId,Integer targetType);
48 63  
49 64 }
parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistoryMapsServiceImpl.java View file @ cc59b13
1 1 package com.lyms.hospital.service.history.impl;
2 2  
3 3 import java.io.Serializable;
  4 +import java.util.HashMap;
  5 +import java.util.HashSet;
4 6 import java.util.List;
  7 +import java.util.Map;
  8 +import java.util.Set;
5 9  
6 10 import org.apache.commons.collections.CollectionUtils;
7 11 import org.springframework.beans.factory.annotation.Autowired;
8 12  
... ... @@ -14,10 +18,11 @@
14 18 import com.lyms.hospital.dao.history.HistoryMapsMapper;
15 19 import com.lyms.hospital.entity.diagnose.DiagnoseInfo;
16 20 import com.lyms.hospital.entity.history.HistoryMaps;
  21 +import com.lyms.hospital.entity.history.HistorySource;
17 22 import com.lyms.hospital.entity.woman.WomanRecord;
18 23 import com.lyms.hospital.service.diagnose.DiagnoseInfoService;
19 24 import com.lyms.hospital.service.history.HistoryMapsService;
20   -import com.lyms.hospital.service.woman.WomanFetationRecordService;
  25 +import com.lyms.hospital.service.history.HistorySourceService;
21 26 import com.lyms.hospital.service.woman.WomanRecordService;
22 27 import com.lyms.util.StrUtils;
23 28  
24 29  
... ... @@ -33,11 +38,11 @@
33 38 public class HistoryMapsServiceImpl extends ServiceImpl<HistoryMapsMapper, HistoryMaps> implements HistoryMapsService {
34 39  
35 40 @Autowired
36   - private WomanFetationRecordService fetationService;
37   - @Autowired
38 41 private DiagnoseInfoService infoService;
39 42 @Autowired
40 43 private WomanRecordService womanRecordService;
  44 + @Autowired
  45 + private HistorySourceService historySourceService;
41 46  
42 47 public Integer deleteLogicById(Serializable id){
43 48 return baseMapper.deleteLogicById(id);
... ... @@ -89,6 +94,70 @@
89 94 EntityWrapper<HistoryMaps> ew = new EntityWrapper<HistoryMaps>();
90 95 ew.where("TARGET_ID={0}", targetId).and("TARGET_TYPE={0}", targetType);
91 96 return this.selectList(ew);
  97 + }
  98 +
  99 + @Override
  100 + public Map<String, String> showHistory(String targetId, Integer targetType) {
  101 + List<HistorySource> sourceList = historySourceService.selectStructureByType();
  102 + List<HistoryMaps> mapsList = this.getListByTarget(targetId, targetType);
  103 + if(sourceList==null || sourceList.isEmpty() || mapsList == null || mapsList.isEmpty()
  104 + ){
  105 + return null;
  106 + }
  107 + Set<String> mapsIdSet = new HashSet<>();
  108 + for(HistoryMaps m : mapsList){//实际病史信息
  109 + mapsIdSet.add(m.getId());
  110 + }
  111 + //各种病史
  112 + Map<String,String> txtMap = new HashMap<>();
  113 + //病史配置信息
  114 + for(HistorySource s1 : sourceList){//1级
  115 + StringBuffer sb = new StringBuffer();
  116 + List<HistorySource> children2 = s1.getChildren();//2级
  117 + if(children2!=null && !children2.isEmpty()){
  118 + for(int i=0;i<children2.size();i++){
  119 + HistorySource s2 = children2.get(i);
  120 + if("JWS".equals(s2.getType())){//既往史是3级结构,特殊处理
  121 + if(i!=0){
  122 + sb.append("、");
  123 + }
  124 + sb.append(s2.getName()).append("[");
  125 + List<HistorySource> children3 = s2.getChildren();//3级
  126 + if(children3!=null && !children3.isEmpty()){
  127 + for(int j=0;j<children3.size();j++){
  128 + HistorySource s3 = children3.get(j);
  129 + if(j!=0){
  130 + sb.append("、");
  131 + }
  132 + if(mapsIdSet.contains(s3.getId())){//该病史项被选中
  133 + sb.append(s3.getName());
  134 + }
  135 + }
  136 + }
  137 + sb.append("]");
  138 + }else{//其他病史是2级结构
  139 + if(mapsIdSet.contains(s2.getId())){//该病史项被选中
  140 + if(i!=0){
  141 + sb.append("、");
  142 + }
  143 + sb.append(s2.getName());
  144 + }
  145 + }
  146 + }
  147 + }
  148 + txtMap.put(s1.getType(), sb.toString());
  149 + }
  150 + Map<String, String> data = new HashMap<>();
  151 + data.put("pastHistory", txtMap.get("JWS"));//既往史
  152 + data.put("familyHistory", txtMap.get("JZS"));//家族史
  153 + data.put("personalHistory", txtMap.get("GRS"));//个人史
  154 + data.put("ymjzHistory", txtMap.get("YMJZS"));//疫苗接种史
  155 + data.put("ywgmHistory", txtMap.get("YWGMS"));//药物过敏史
  156 + data.put("fksxHistory", txtMap.get("FKSSS"));//妇科手术史
  157 + data.put("ysfyHistory", txtMap.get("YSFY"));//叶酸服用
  158 + data.put("cestationInfo", txtMap.get("BCRSQK"));//本次妊娠情况
  159 +// data.put("aa", txtMap.get("ZFJKQK"));//丈夫健康情况
  160 + return data;
92 161 }
93 162 }
parent/hospital.web/src/main/java/com/lyms/hospital/controller/childbirth/ChildbirthController.java View file @ cc59b13
1 1 package com.lyms.hospital.controller.childbirth;
2 2  
3 3 import java.util.ArrayList;
  4 +import java.util.Date;
4 5 import java.util.HashMap;
5 6 import java.util.List;
6 7 import java.util.Map;
... ... @@ -16,6 +17,18 @@
16 17 import com.lyms.base.common.service.organ.OrganizationsService;
17 18 import com.lyms.hospital.entity.childbirth.ChildbirthInfo;
18 19 import com.lyms.hospital.entity.woman.WomanFetationRecord;
  20 +import com.lyms.hospital.enums.business.CfEnums;
  21 +import com.lyms.hospital.enums.business.CosEnums;
  22 +import com.lyms.hospital.enums.business.DeathCauseEnums;
  23 +import com.lyms.hospital.enums.business.FetalEnums;
  24 +import com.lyms.hospital.enums.business.FetalPositionEnums;
  25 +import com.lyms.hospital.enums.business.FmTypeEnums;
  26 +import com.lyms.hospital.enums.business.FmTypeEnums.FmScEnums;
  27 +import com.lyms.hospital.enums.business.QiDaiEnums;
  28 +import com.lyms.hospital.enums.business.RenShenJieJuEnums;
  29 +import com.lyms.hospital.enums.business.SXCauseEnums;
  30 +import com.lyms.hospital.enums.business.TaiShuEnums;
  31 +import com.lyms.hospital.enums.business.TpmcTypeEnums;
19 32 import com.lyms.hospital.request.exam.ChildbirthAddRequest;
20 33 import com.lyms.hospital.service.childbirth.ChildbirthInfoService;
21 34 import com.lyms.hospital.service.woman.WomanFetationRecordService;
... ... @@ -28,6 +41,8 @@
28 41 * <p>
29 42 * 分娩-前端控制器
30 43 * </p>
  44 + *
  45 + * []获取分娩页面的字典数据<br/>
31 46 * 保存分娩记录<br/>
32 47 * []依据cardNo或vcCardNo查询孕妇分娩记录<br/>
33 48 *
... ... @@ -46,6 +61,73 @@
46 61 private OrganizationsService orgService;
47 62  
48 63 /**
  64 + * <li>@Description:获取分娩页面的字典数据
  65 + * <li>@return
  66 + * <li>创建人:xujiahong
  67 + * <li>创建时间:2017年5月8日
  68 + * <li>修改人:
  69 + * <li>修改时间:
  70 + */
  71 + @SuppressWarnings("serial")
  72 + @RequestMapping(value = "/matdel/getenums", method = RequestMethod.GET)
  73 + @ResponseBody
  74 + public AjaxResult getDictionary() {
  75 + Map<String, Object> data = new HashMap<>();
  76 + // 枚举常量=======================================
  77 + // getFetal 胎先露
  78 + data.put("getFetal", FetalEnums.getList());
  79 + // getQidaiYc 脐带异常类型
  80 + data.put("getQidaiYc", QiDaiEnums.getList());
  81 + // getFmScEnums 分娩顺产方式枚举
  82 + data.put("getFmScEnums", FmScEnums.getList());
  83 + // getTpmcTypeEnums 胎盘娩出方式
  84 + data.put("getTpmcTypeEnums", TpmcTypeEnums.getList());
  85 + // getTaiPan 胎盘个数
  86 + data.put("getTaiPan", TaiShuEnums.TaiPanEnums.getList());
  87 + // getRenShenJieJuEnums 妊娠结局
  88 + data.put("getRenShenJieJuEnums", RenShenJieJuEnums.getList());
  89 + // getTaiShu 胎数
  90 + data.put("getTaiShu", TaiShuEnums.getList());
  91 + // getFetPosition 胎方位
  92 + data.put("getFetPosition", FetalPositionEnums.getList());
  93 + // getSXCauseEnums 失血原因
  94 + data.put("getSXCauseEnums", SXCauseEnums.getList());
  95 + // getFmType 分娩方式
  96 + data.put("getFmType", FmTypeEnums.getList());
  97 + // getDeathCauseEnums 死亡原因
  98 + data.put("getDeathCauseEnums", DeathCauseEnums.getList());
  99 + // getCosEnums
  100 + data.put("getCosEnums", CosEnums.getList());
  101 + // getCfType 产妇情况
  102 + data.put("getCfType", CfEnums.getList());
  103 +
  104 + // 字典常量=======================================
  105 + // organizations 组织机构-模拟数据 TODO
  106 + List<Map<String, Object>> organizations = new ArrayList<>();
  107 + Map<String, Object> organizations_map1 = new HashMap<String, Object>() {
  108 + {
  109 + put("id", "193");
  110 + put("name", "青龙妇幼保健院");
  111 + }
  112 + };
  113 + organizations.add(organizations_map1);
  114 + Map<String, Object> organizations_map2 = new HashMap<String, Object>() {
  115 + {
  116 + put("id", "195");
  117 + put("name", "昌黎妇幼保健院");
  118 + }
  119 + };
  120 + organizations.add(organizations_map2);
  121 + data.put("organizations", organizations);
  122 +
  123 + // cTime
  124 + data.put("cTime", DateUtil.getyyyy_MM_dd(new Date()));
  125 + // now
  126 + data.put("now", DateUtil.getyyyy_MM_dd(new Date()));
  127 + return AjaxResult.returnSuccess(data);
  128 + }
  129 +
  130 + /**
49 131 * <li>@Description:保存分娩记录
50 132 * <li>@param cardNo
51 133 * <li>@param vcCardNo
... ... @@ -58,6 +140,8 @@
58 140 @RequestMapping(value = "/matdel", method = RequestMethod.POST)
59 141 @ResponseBody
60 142 public AjaxResult saveChildbirthVo(ChildbirthAddRequest request) {
  143 +
  144 +
61 145 return AjaxResult.returnFail();
62 146 }
63 147  
parent/hospital.web/src/main/java/com/lyms/hospital/controller/woman/WomanExamController.java View file @ cc59b13
... ... @@ -15,6 +15,7 @@
15 15 import org.springframework.web.bind.annotation.RequestMethod;
16 16 import org.springframework.web.bind.annotation.ResponseBody;
17 17  
  18 +import com.baomidou.mybatisplus.mapper.EntityWrapper;
18 19 import com.lyms.base.common.entity.organ.Organizations;
19 20 import com.lyms.base.common.entity.user.Users;
20 21 import com.lyms.base.common.service.organ.OrganizationsService;
21 22  
... ... @@ -97,10 +98,8 @@
97 98 return AjaxResult.returnSuccess();
98 99 }
99 100 DiagnoseAssit assist = assistService.getDetailByDiagnoseInfo(info.getId(), DiagnoseAssit.DIAGNOSE_TYPE_BIRTH);// 诊断类型:1婚前检查,【2产检】,3儿保检查
100   - List<HistoryMaps> historyMapsList = historyMapsService.getListByTarget(info.getId(),
101   - HistoryMaps.TARGET_TYPE_EXAM);// 关联目标类型:1产检、2妇女建档
102 101 List<DiagnoseTai> diagnoseTaiList = diagnoseTaiService.getListByExamId(info.getId());
103   - ExamAddRequestWrapper wrapper = new ExamAddRequestWrapper(info, assist, historyMapsList, diagnoseTaiList);
  102 + ExamAddRequestWrapper wrapper = new ExamAddRequestWrapper(info, assist, null, diagnoseTaiList);
104 103 // 查询孕妇基本信息
105 104 WomanFetationRecord womanFetation = fetationService.selectById(info.getWomanId());
106 105  
107 106  
108 107  
... ... @@ -168,24 +167,28 @@
168 167 map.put("gonggao", UnitConstants.splice(result.getGonggao(), UnitConstants.CM));
169 168 map.put("fuwei", UnitConstants.splice(result.getFuwei(), UnitConstants.CM));
170 169  
171   - // 胎儿情况
172   -
173   -
174   - /* 辅助检查 */
175   - map.put("xhdb",UnitConstants.splice(result.getXhdb(),UnitConstants.GL));
176   - map.put("bxbjs",UnitConstants.splice(result.getBxbjs(),UnitConstants.TEN_LKG));
177   - map.put("platelet",UnitConstants.splice(result.getPlatelet(),UnitConstants.TEN_LKG));
  170 + /*
  171 + * 辅助检查
  172 + */
  173 + map.put("xhdb", UnitConstants.splice(result.getXhdb(), UnitConstants.GL));
  174 + map.put("bxbjs", UnitConstants.splice(result.getBxbjs(), UnitConstants.TEN_LKG));
  175 + map.put("platelet", UnitConstants.splice(result.getPlatelet(), UnitConstants.TEN_LKG));
178 176  
179   - map.put("bloodSugar",UnitConstants.splice(result.getBloodSugar(),UnitConstants.MMOLL));
180   - map.put("xqgbzam",UnitConstants.splice(result.getXqgbzam(), UnitConstants.UL));
181   - map.put("xqgczam",UnitConstants.splice(result.getXqgczam(), UnitConstants.UL));
182   - map.put("albumin",UnitConstants.splice(result.getAlbumin(), UnitConstants.GL));
183   - map.put("totalBilirubin",UnitConstants.splice(result.getTotalBilirubin(), UnitConstants.UMOLL));
184   - map.put("jhBilirubin",UnitConstants.splice(result.getJhBilirubin(), UnitConstants.UMOLL));
185   -
186   - map.put("xqjq",UnitConstants.splice(result.getXqjq(), UnitConstants.UL));
187   - map.put("xnsd",UnitConstants.splice(result.getXnsd(), UnitConstants.UL));
  177 + map.put("bloodSugar", UnitConstants.splice(result.getBloodSugar(), UnitConstants.MMOLL));
  178 + map.put("xqgbzam", UnitConstants.splice(result.getXqgbzam(), UnitConstants.UL));
  179 + map.put("xqgczam", UnitConstants.splice(result.getXqgczam(), UnitConstants.UL));
  180 + map.put("albumin", UnitConstants.splice(result.getAlbumin(), UnitConstants.GL));
  181 + map.put("totalBilirubin", UnitConstants.splice(result.getTotalBilirubin(), UnitConstants.UMOLL));
  182 + map.put("jhBilirubin", UnitConstants.splice(result.getJhBilirubin(), UnitConstants.UMOLL));
188 183  
  184 + map.put("xqjq", UnitConstants.splice(result.getXqjq(), UnitConstants.UL));
  185 + map.put("xnsd", UnitConstants.splice(result.getXnsd(), UnitConstants.UL));
  186 +
  187 + /*
  188 + * 病史信息
  189 + */
  190 + Map<String, String> showHistoryMap = historyMapsService.showHistory(info.getId(), HistoryMaps.TARGET_TYPE_EXAM);// 关联目标类型:1产检、2妇女建档
  191 + map.putAll(showHistoryMap);
189 192 return AjaxResult.returnSuccess(map);
190 193 }
191 194  
192 195  
193 196  
... ... @@ -413,10 +416,20 @@
413 416 @RequestMapping(value = "/antex", method = RequestMethod.POST)
414 417 @ResponseBody
415 418 public AjaxResult saveFirstExam(@RequestBody ExamAddRequest request) {
  419 + String womanId = request.getParentId();
  420 + if (StringUtils.isEmpty(womanId)) {
  421 + return AjaxResult.returnFail("入参错误:缺少孕妇ID");
  422 + }
416 423 /*
417   - * 同一产程不能新增两次初诊:(如果条件是新增,根据孕妇档案ID WOMAN_ID 查询产检记录列表) TODO
  424 + * 同一产程不能新增两次初诊:(如果条件是新增,根据孕妇档案ID WOMAN_ID 查询产检记录列表)
418 425 */
419   -
  426 + if (request.getId() == null) {
  427 + List<DiagnoseInfo> infoList = infoService.selectList(new EntityWrapper<DiagnoseInfo>()
  428 + .where("WOMAN_ID={0}", womanId).and("TYPE={0}", DiagnoseInfo.TYPE_FIRST));
  429 + if (infoList != null && !infoList.isEmpty()) {
  430 + return AjaxResult.returnFail("业务错误:同一产程不能新增两次初诊");
  431 + }
  432 + }
420 433 /*
421 434 * (1)保存产检基本信息 (2)保存辅助检查信息 (3)批量保存病史信息(4)多个胎儿信息(5) 多个诊断信息 TODO
422 435 */
... ... @@ -463,7 +476,7 @@
463 476 if (dataMap == null) {
464 477 return AjaxResult.returnSuccess(null);// 将基本的对象返回空
465 478 }
466   - WomanFetationRecord dbFetationRecord = (WomanFetationRecord)dataMap.get("dbFetationRecord");
  479 + WomanFetationRecord dbFetationRecord = (WomanFetationRecord) dataMap.get("dbFetationRecord");
467 480  
468 481 // 产检记录列表 TODO (此处需要查询当前产程中本院和外院的所有产检记录(包括分布建档的),之后对接方承)
469 482 List<Map<String, Object>> data = new ArrayList<>(); // data 系前端指定名称
... ... @@ -493,8 +506,8 @@
493 506 data.add(diagnoseInfoMap);
494 507 }
495 508 }
496   -
497   - dataMap.put("data", data);//产检记录列表
  509 +
  510 + dataMap.put("data", data);// 产检记录列表
498 511 dataMap.remove("dbFetationRecord");
499 512 return AjaxResult.returnSuccess(dataMap);
500 513 }
parent/hospital.web/src/main/java/com/lyms/hospital/request/OldNewWrapper.java View file @ cc59b13
  1 +package com.lyms.hospital.request;
  2 +
  3 +public class OldNewWrapper {
  4 +
  5 + protected String obj2Str(Object obj){
  6 + return obj==null?null:obj.toString();
  7 + }
  8 + protected Integer obj2Int(Object obj){
  9 + return obj==null?null:Integer.parseInt(obj.toString());
  10 + }
  11 +
  12 +}
parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ChildbirthAddRequestWrapper.java View file @ cc59b13
1 1 package com.lyms.hospital.request.exam;
2 2  
3 3 import java.util.List;
  4 +import java.util.Map;
4 5  
5 6 import com.lyms.hospital.entity.childbirth.ChildbirthInfo;
6 7 import com.lyms.hospital.entity.childbirth.ChildbirthInfoVo;
7 8 import com.lyms.hospital.entity.childbirth.ChildbirthNewborn;
8 9 import com.lyms.hospital.entity.childbirth.ChildbirthTai;
9 10 import com.lyms.hospital.entity.childbirth.ChildbirthTaipan;
  11 +import com.lyms.hospital.enums.business.FmTypeEnums;
  12 +import com.lyms.hospital.request.OldNewWrapper;
  13 +import com.lyms.hospital.util.trans.XjhMapUtil;
  14 +import com.lyms.util.DateUtil;
10 15  
11   -public class ChildbirthAddRequestWrapper {
  16 +public class ChildbirthAddRequestWrapper extends OldNewWrapper {
12 17  
13 18 private ChildbirthAddRequest request;
14 19 private ChildbirthInfoVo vo;
15 20  
16 21  
... ... @@ -20,16 +25,97 @@
20 25 public ChildbirthAddRequestWrapper() {
21 26 }
22 27  
  28 + @SuppressWarnings("unchecked")
23 29 public ChildbirthAddRequestWrapper(ChildbirthAddRequest req) {
24 30 this.request = req;
25 31 if(req!=null){
26   - String[] req_map = {"id","pid","parentId"};
27   - String[] info_map = {"id","personId","womanId"};
28   - info = new ChildbirthInfo();
29   -// info.setId(req.getId());
30   -// info.setPersonId(req.getPid());
  32 + //快速映射普通字段
  33 + //{ 分娩ID、居民ID、孕妇ID、分娩孕周、胎儿数、胎盘数 }
  34 + //{ (剖宫产)手术原因、 会阴撕裂、缝线针数、产妇情况、造成死亡的原因 }
  35 + //{ 呼吸、脉搏、产后1小时失血量、产后2小时失血量、产后24小时失血量、第三产程+产后2小时失血量 }
  36 + //{ 其他失血原因文本、 分娩医院、接生医生}
  37 + String[] req_map = {
  38 + "id","pid","parentId","dueWeek","tireNumber","placenta",
  39 + "operationCause","siLielevel","needleNum","maternalInfo","deathCause",
  40 + "breath","pulse","oHloseBloodL","tHloseBloodL","rHloseBloodL","sHloseBloodL",
  41 + "deathCauseText","fmHospital","deliverDoctor"
  42 + };
  43 + String[] info_map = {
  44 + "id","personId","womanId","childbirthTimeText","fetusNum","placentaNum",
  45 + "operationReason","perineumSplit","needleNum","womanSituation","otherDeathReasonText",
  46 + "breath","pulse","loseBloodA","loseBloodB","loseBloodC","loseBloodD",
  47 + "loseBloodOtherText","orgId","doctorId"
  48 + };
  49 + Map<String,Object> reqMap = XjhMapUtil.transBean2AliasMap(req, XjhMapUtil.getKeyMap(req_map, info_map));
  50 + info = (ChildbirthInfo) XjhMapUtil.transMap2Bean(reqMap, new ChildbirthInfo());
  51 + //特殊字段设置
  52 + info.setChildbirthTime(DateUtil.parseYMD(req.getDueDate()));//分娩日期
  53 + //分娩方式
  54 + Map<String,String> deliveryMode = (Map<String,String>)req.getDeliveryMode();
  55 + if(deliveryMode!=null && !deliveryMode.isEmpty()){
  56 + if(FmTypeEnums.O1.getId().equals(deliveryMode.get("fmfs"))){//剖宫产
  57 + info.setChildbirthType(Integer.parseInt(FmTypeEnums.O1.getId()));
  58 + }else if(FmTypeEnums.O.getId().equals(deliveryMode.get("fmfs"))){//顺产
  59 + if(deliveryMode.get("scfs")!=null){
  60 + info.setChildbirthType(Integer.parseInt(deliveryMode.get("scfs")));
  61 + }
  62 + }
  63 + }
  64 + //产程
  65 + Map<String,Object> prodprocess = (Map<String,Object>)req.getProdprocess();
  66 + if(prodprocess!=null && !prodprocess.isEmpty()){
  67 + Map<String,Object> one = (Map<String,Object>)prodprocess.get("one");
  68 + Map<String,Object> two = (Map<String,Object>)prodprocess.get("two");
  69 + Map<String,Object> three = (Map<String,Object>)prodprocess.get("three");
  70 + info.setProcessFirst(this.getProcessStr(one));
  71 + info.setProcessSecond(this.getProcessStr(two));
  72 + info.setProcessThird(this.getProcessStr(three));
  73 + }
  74 + Map<String,Object> totalprocess = (Map<String,Object>)req.getTotalprocess();
  75 + info.setProcessTotal(this.getProcessStr(totalprocess));
  76 + //会阴情况:1完整,2切开
  77 + String perinealCondition =req.getPerinealCondition();
  78 + if("whole".equals(perinealCondition)){
  79 + info.setPerineumSituation(ChildbirthInfo.PERINEUM_SITUATION_WHOLE);
  80 + }else if("split".equals(perinealCondition)){
  81 + info.setPerineumSituation(ChildbirthInfo.PERINEUM_SITUATION_SPLIT);
  82 + }
  83 + //产后血压
  84 + Map<String,Object> chBp = (Map<String,Object>)req.getChBp();
  85 + if(chBp!=null && !chBp.isEmpty()){
  86 + info.setBloodShrink(this.obj2Int(chBp.get("ssy")));//收缩压
  87 + info.setBloodDiastole(this.obj2Int(chBp.get("szy")));//舒张压
  88 + }
  89 + //产后两小时血压
  90 + Map<String,Object> ch2Bp = (Map<String,Object>)req.getCh2Bp();
  91 + if(ch2Bp!=null && !ch2Bp.isEmpty()){
  92 + info.setBloodShrinkLater(this.obj2Int(ch2Bp.get("ssy")));//收缩压
  93 + info.setBloodDiastoleLater(this.obj2Int(ch2Bp.get("szy")));//舒张压
  94 + }
  95 + //失血原因(枚举)
  96 + Map<String,Object> loseBloodCause = (Map<String,Object>)req.getLoseBloodCause();
  97 + if(loseBloodCause!=null && !loseBloodCause.isEmpty()){
  98 + info.setLoseBloodReason(this.obj2Int(loseBloodCause.get("select")));
  99 + info.setLoseBloodOtherText(this.obj2Str(loseBloodCause.get("other")));
  100 + }
  101 + //产科并发症
  102 +
  103 + //胎儿列表
  104 + //胎盘娩出方式
  105 + //新生儿
  106 +
31 107 }
32 108  
  109 + }
  110 +
  111 + private String getProcessStr(Map<String,Object> map){
  112 + String str = "";
  113 + if(map!=null && !map.isEmpty()){
  114 + str += map.get("h")==null?"":map.get("h").toString();
  115 + str += "-";
  116 + str += map.get("m")==null?"":map.get("m").toString();
  117 + }
  118 + return str;
33 119 }
34 120  
35 121 public ChildbirthAddRequest getRequest() {
parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ExamAddRequestWrapper.java View file @ cc59b13
... ... @@ -9,8 +9,12 @@
9 9 import com.lyms.hospital.entity.diagnose.DiagnoseInfo;
10 10 import com.lyms.hospital.entity.diagnose.DiagnoseTai;
11 11 import com.lyms.hospital.entity.history.HistoryMaps;
  12 +import com.lyms.hospital.enums.business.FetalEnums;
  13 +import com.lyms.hospital.enums.business.FetalPositionEnums;
  14 +import com.lyms.hospital.enums.business.JoinEnums;
12 15 import com.lyms.hospital.response.keymap.DiagnoseAssistKeymap;
13 16 import com.lyms.hospital.response.keymap.WomanExamKeymap;
  17 +import com.lyms.hospital.util.UnitConstants;
14 18 import com.lyms.hospital.util.trans.XjhMapUtil;
15 19  
16 20 public class ExamAddRequestWrapper {
... ... @@ -51,8 +55,7 @@
51 55 Map<String, Object> assistMap = XjhMapUtil.transBean2FormatAliasMap(assist,
52 56 XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias));
53 57 infoMap.putAll(assistMap);
54   - examAddRequest = (ExamAddRequest) XjhMapUtil.transMap2AliasBean(infoMap, new ExamAddRequest(),
55   - XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias));
  58 + examAddRequest = (ExamAddRequest) XjhMapUtil.transMap2Bean(infoMap, new ExamAddRequest());
56 59 examAddRequest.setParentId(info.getWomanId());// 孕妇档案ID
57 60 examAddRequest.setPid(info.getPersonId());// 女性居民
58 61 // 血压
... ... @@ -62,9 +65,9 @@
62 65 examAddRequest.setBp(bp);
63 66 // 处理辅助检查,"yin","ruoyang","yang"字段
64 67 Map<Integer,String> keyMap = new HashMap<>();
65   - keyMap.put(DiagnoseAssit.YIN,"yin");
66   - keyMap.put(DiagnoseAssit.YANG,"yang");
67   - keyMap.put(DiagnoseAssit.RUOYANG,"ruoyang");
  68 + keyMap.put(DiagnoseAssit.YIN,"-");
  69 + keyMap.put(DiagnoseAssit.YANG,"+");
  70 + keyMap.put(DiagnoseAssit.RUOYANG,"±");
68 71 keyMap.put(null,null);
69 72 examAddRequest.setBg(keyMap.get(assist.getLiverBg()));//丙肝
70 73 examAddRequest.setRh(keyMap.get(assist.getBloodtypeRh()));//RH血型
... ... @@ -102,10 +105,10 @@
102 105 if(diagnoseTaiList!=null && !diagnoseTaiList.isEmpty()){
103 106 for(DiagnoseTai tai : diagnoseTaiList){
104 107 Map<String,Object> taiMap = new HashMap<>();
105   - taiMap.put("heartRate", tai.getHeartRate());
106   - taiMap.put("fetalPosition", tai.getPosition());
107   - taiMap.put("fetalPresentation", tai.getFirstExpose());
108   - taiMap.put("join", tai.getIsLink());
  108 + taiMap.put("heartRate", tai.getHeartRate()==null?"":UnitConstants.splice(tai.getHeartRate(), UnitConstants.CIFEN));
  109 + taiMap.put("fetalPosition", tai.getPosition()==null?"":FetalPositionEnums.getTitle(tai.getPosition()));
  110 + taiMap.put("fetalPresentation", tai.getFirstExpose()==null?"":FetalEnums.getTitle(tai.getFirstExpose()));
  111 + taiMap.put("join", tai.getIsLink()==null?"":JoinEnums.getTitle(tai.getIsLink()+""));
109 112 placentas.add(taiMap);
110 113 }
111 114 }
parent/hospital.web/src/main/resources/xml/app-shiro.xml View file @ cc59b13
... ... @@ -47,7 +47,7 @@
47 47 <value>
48 48 /login/tokens = anon
49 49 /** = user,forceLogout
50   - /commonApi/* = anon
  50 + /commonApi/** = anon
51 51 <!--
52 52 /logout = logout
53 53 /captcha/* = anon