diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthInfo.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthInfo.java index fc650e0..f1ed837 100644 --- a/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthInfo.java +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/entity/childbirth/ChildbirthInfo.java @@ -18,6 +18,11 @@ import java.util.Date; public class ChildbirthInfo implements Serializable { private static final long serialVersionUID = 1L; + + //会阴情况:1完整,2切开 + public static final int PERINEUM_SITUATION_WHOLE = 1; + public static final int PERINEUM_SITUATION_SPLIT = 2; + /** * ID(分娩信息) diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CfEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CfEnums.java new file mode 100644 index 0000000..8bb3a20 --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CfEnums.java @@ -0,0 +1,62 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * 产妇情况 + * Created by Administrator on 2016/6/24 0024. + */ +public enum CfEnums { + O("良好","1"), + O1("死亡","2"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(CfEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private CfEnums(String name, String id){ + this.id=id; + this.name=name; + } + + public static String getTitle(String id){ + if (id==null){ + return ""; + } + for (CfEnums cfEnums:CfEnums.values()){ + if (id.equals(cfEnums.getId())){ + return cfEnums.getName(); + } + } + return ""; + } + + private String id; + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CosEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CosEnums.java new file mode 100644 index 0000000..1f6b44c --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/CosEnums.java @@ -0,0 +1,61 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * 产科并发症 + * + * Created by Administrator on 2016/6/24 0024. + */ +public enum CosEnums { + O("前置胎盘","1"), + + O1("胎盘早剥","2"), + O2("胎盘滞留","3"), + O3("胎膜早破","4"), + O4("产后出血","5"), + O5("妊娠期高血压","6"), + O6("子痫前期(轻)","7"), + O7("子痫前期(重)","8"), + + O8("子痫慢性高血压并发子痫前期","9"), + O9("妊娠合并慢性高血压","10"), + O10("其他","11"), + ; + + public static List> getList(){ + List> list = new ArrayList<>(); + for(CosEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private CosEnums(String name,String id){ + this.id=id; + this.name=name; + } + private String id;private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/DeathCauseEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/DeathCauseEnums.java new file mode 100644 index 0000000..ebdd256 --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/DeathCauseEnums.java @@ -0,0 +1,65 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; + +/** + * 死亡原因 + *

+ * Created by Administrator on 2016/6/24 0024. + */ +public enum DeathCauseEnums { + O("产科出血", "1"), O2("妊娠高血压疾病", "2"), O3("内科合并症", "3"), O4("羊水栓塞", "4"), O5("其他", "5"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(DeathCauseEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + + + private DeathCauseEnums(String name, String id) { + this.id = id; + this.name = name; + } + + private String id; + private String name; + + public static String getName(String id) { + if (StringUtils.isNotEmpty(id)) { + for (DeathCauseEnums deathCauseEnums : DeathCauseEnums.values()) { + if (deathCauseEnums.getId().equals(id)) { + return deathCauseEnums.getName(); + } + } + } + return ""; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/FmTypeEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/FmTypeEnums.java new file mode 100644 index 0000000..50d1d2d --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/FmTypeEnums.java @@ -0,0 +1,130 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * 分娩方式枚举 + *

+ * Created by Administrator on 2016/6/24 0024. + */ +public enum FmTypeEnums { + O("顺产", "0"), O1("剖宫产", "1"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(FmTypeEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private FmTypeEnums(String name, String id) { + this.id = id; + this.name = name; + } + + + public static String getIdByName(String name) + { + for (FmTypeEnums e : FmTypeEnums.values()) { + if (e.getName().equals(name)) + { + return e.getId(); + } + } + return null; + } + + public static String getFmNameById(String id) + { + for (FmTypeEnums e : FmTypeEnums.values()) { + if (e.getId().equals(id)) + { + return e.getName(); + } + } + return null; + } + + + public static String getFmScNameById(String id) + { + for (FmScEnums e : FmScEnums.values()) { + if (e.getId().equals(id)) + { + return e.getName(); + } + } + return null; + } + + private String id; + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public enum FmScEnums { + + O2("自然娩出", "2"), + O3("胎头吸引", "3"), + O4("产钳低位", "4"), + O5("产钳中位", "5"), + O6("臀位助产", "6"), + O7("臀位牵引", "7"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(FmScEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private FmScEnums(String name,String id) { + this.id = id; + this.name = name; + } + + private String id; + private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/QiDaiEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/QiDaiEnums.java new file mode 100644 index 0000000..e1cf127 --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/QiDaiEnums.java @@ -0,0 +1,51 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * 脐带异常类型 + *

+ * Created by Administrator on 2016/6/24 0024. + */ +public enum QiDaiEnums { + O2("脐带过长", "1"), O3("脐带过短", "2"), O4("脐带缠绕", "3"), O5("脐带打结", "4"), + O6("脐带扭转", "5"), O7("脐带脱垂", "6"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(QiDaiEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private QiDaiEnums(String name, String id) { + this.name = name; + this.id = id; + } + + private String name; + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/RenShenJieJuEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/RenShenJieJuEnums.java new file mode 100644 index 0000000..97610fa --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/RenShenJieJuEnums.java @@ -0,0 +1,65 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * Created by Administrator on 2016/6/24 0024. + */ +public enum RenShenJieJuEnums { + O("活产", "0"),O1("死胎", "1"),O2("浸软胎", "2"),O3("死产", "3"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(RenShenJieJuEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private RenShenJieJuEnums(String name, String id) { + this.name = name; + this.id = id; + } + + private String name; + private String id; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + public static String getTitle(String id){ + for(RenShenJieJuEnums enums:values()){ + if(id.equals(enums.getId())){ + return enums.getName(); + } + } + return null; + } + + public static String getIdByName(String name){ + for(RenShenJieJuEnums enums:values()){ + if(name.equals(enums.getName())){ + return enums.getId(); + } + } + return null; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/SXCauseEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/SXCauseEnums.java new file mode 100644 index 0000000..cf2bdfd --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/SXCauseEnums.java @@ -0,0 +1,49 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * + * 失血原因 + * Created by Administrator on 2016/6/24 0024. + */ +public enum SXCauseEnums { + + O("宫缩乏力","1"),O1("胎盘因素","2"),O2("产道损伤","3"), O3("凝血功能障碍","4"),O5("其他","5"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(SXCauseEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private SXCauseEnums(String name, String id){ + this.id=id; + this.name=name; + } + private String id;private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/TpmcTypeEnums.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/TpmcTypeEnums.java new file mode 100644 index 0000000..3fe2c50 --- /dev/null +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/enums/business/TpmcTypeEnums.java @@ -0,0 +1,48 @@ +package com.lyms.hospital.enums.business; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + * + * 胎盘娩出方式 + * Created by Administrator on 2016/6/24 0024. + */ +public enum TpmcTypeEnums { + O("自然娩出","1"),O2("手术娩出","2"); + + public static List> getList(){ + List> list = new ArrayList<>(); + for(TpmcTypeEnums e : values()){ + Map map = new LinkedHashMap<>(); + map.put("id", e.getId()); + map.put("name", e.getName()); + list.add(map); + } + return list; + } + + private TpmcTypeEnums(String name,String id){ + this.id=id; + this.name=name; + } + private String id;private String name; + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/HistoryMapsService.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/HistoryMapsService.java index 7565f7a..4d34ee7 100644 --- a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/HistoryMapsService.java +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/HistoryMapsService.java @@ -4,11 +4,14 @@ import com.lyms.hospital.entity.history.HistoryMaps; import com.lyms.web.service.BaseService; import java.io.Serializable; import java.util.List; +import java.util.Map; /** *

* 服务类 *

+ * + * 前端页面展示的病史信息
* * @author fangcheng * @since 2017-03-28 @@ -45,5 +48,17 @@ public interface HistoryMapsService extends BaseService { *
  • 修改时间: */ public List getListByTarget(String targetId,Integer targetType); + + /** + *
  • @Description:前端页面展示的病史信息 + *
  • @param targetId + *
  • @param targetType + *
  • @return + *
  • 创建人:xujiahong + *
  • 创建时间:2017年5月8日 + *
  • 修改人: + *
  • 修改时间: + */ + public Map showHistory(String targetId,Integer targetType); } diff --git a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistoryMapsServiceImpl.java b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistoryMapsServiceImpl.java index d3c8bcd..6abc01d 100644 --- a/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistoryMapsServiceImpl.java +++ b/parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistoryMapsServiceImpl.java @@ -1,7 +1,11 @@ package com.lyms.hospital.service.history.impl; import java.io.Serializable; +import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.Set; import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -14,10 +18,11 @@ import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.lyms.hospital.dao.history.HistoryMapsMapper; import com.lyms.hospital.entity.diagnose.DiagnoseInfo; import com.lyms.hospital.entity.history.HistoryMaps; +import com.lyms.hospital.entity.history.HistorySource; import com.lyms.hospital.entity.woman.WomanRecord; import com.lyms.hospital.service.diagnose.DiagnoseInfoService; import com.lyms.hospital.service.history.HistoryMapsService; -import com.lyms.hospital.service.woman.WomanFetationRecordService; +import com.lyms.hospital.service.history.HistorySourceService; import com.lyms.hospital.service.woman.WomanRecordService; import com.lyms.util.StrUtils; @@ -33,11 +38,11 @@ import com.lyms.util.StrUtils; public class HistoryMapsServiceImpl extends ServiceImpl implements HistoryMapsService { @Autowired - private WomanFetationRecordService fetationService; - @Autowired private DiagnoseInfoService infoService; @Autowired private WomanRecordService womanRecordService; + @Autowired + private HistorySourceService historySourceService; public Integer deleteLogicById(Serializable id){ return baseMapper.deleteLogicById(id); @@ -90,4 +95,68 @@ public class HistoryMapsServiceImpl extends ServiceImpl showHistory(String targetId, Integer targetType) { + List sourceList = historySourceService.selectStructureByType(); + List mapsList = this.getListByTarget(targetId, targetType); + if(sourceList==null || sourceList.isEmpty() || mapsList == null || mapsList.isEmpty() + ){ + return null; + } + Set mapsIdSet = new HashSet<>(); + for(HistoryMaps m : mapsList){//实际病史信息 + mapsIdSet.add(m.getId()); + } + //各种病史 + Map txtMap = new HashMap<>(); + //病史配置信息 + for(HistorySource s1 : sourceList){//1级 + StringBuffer sb = new StringBuffer(); + List children2 = s1.getChildren();//2级 + if(children2!=null && !children2.isEmpty()){ + for(int i=0;i children3 = s2.getChildren();//3级 + if(children3!=null && !children3.isEmpty()){ + for(int j=0;j data = new HashMap<>(); + data.put("pastHistory", txtMap.get("JWS"));//既往史 + data.put("familyHistory", txtMap.get("JZS"));//家族史 + data.put("personalHistory", txtMap.get("GRS"));//个人史 + data.put("ymjzHistory", txtMap.get("YMJZS"));//疫苗接种史 + data.put("ywgmHistory", txtMap.get("YWGMS"));//药物过敏史 + data.put("fksxHistory", txtMap.get("FKSSS"));//妇科手术史 + data.put("ysfyHistory", txtMap.get("YSFY"));//叶酸服用 + data.put("cestationInfo", txtMap.get("BCRSQK"));//本次妊娠情况 +// data.put("aa", txtMap.get("ZFJKQK"));//丈夫健康情况 + return data; + } } diff --git a/parent/hospital.web/src/main/java/com/lyms/hospital/controller/childbirth/ChildbirthController.java b/parent/hospital.web/src/main/java/com/lyms/hospital/controller/childbirth/ChildbirthController.java index fc26b13..2a376d4 100644 --- a/parent/hospital.web/src/main/java/com/lyms/hospital/controller/childbirth/ChildbirthController.java +++ b/parent/hospital.web/src/main/java/com/lyms/hospital/controller/childbirth/ChildbirthController.java @@ -1,6 +1,7 @@ package com.lyms.hospital.controller.childbirth; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -16,6 +17,18 @@ import com.lyms.base.common.entity.user.Users; import com.lyms.base.common.service.organ.OrganizationsService; import com.lyms.hospital.entity.childbirth.ChildbirthInfo; import com.lyms.hospital.entity.woman.WomanFetationRecord; +import com.lyms.hospital.enums.business.CfEnums; +import com.lyms.hospital.enums.business.CosEnums; +import com.lyms.hospital.enums.business.DeathCauseEnums; +import com.lyms.hospital.enums.business.FetalEnums; +import com.lyms.hospital.enums.business.FetalPositionEnums; +import com.lyms.hospital.enums.business.FmTypeEnums; +import com.lyms.hospital.enums.business.FmTypeEnums.FmScEnums; +import com.lyms.hospital.enums.business.QiDaiEnums; +import com.lyms.hospital.enums.business.RenShenJieJuEnums; +import com.lyms.hospital.enums.business.SXCauseEnums; +import com.lyms.hospital.enums.business.TaiShuEnums; +import com.lyms.hospital.enums.business.TpmcTypeEnums; import com.lyms.hospital.request.exam.ChildbirthAddRequest; import com.lyms.hospital.service.childbirth.ChildbirthInfoService; import com.lyms.hospital.service.woman.WomanFetationRecordService; @@ -28,6 +41,8 @@ import com.lyms.web.controller.BaseController; *

    * 分娩-前端控制器 *

    + * + * []获取分娩页面的字典数据
    * 保存分娩记录
    * []依据cardNo或vcCardNo查询孕妇分娩记录
    * @@ -46,6 +61,73 @@ public class ChildbirthController extends BaseController { private OrganizationsService orgService; /** + *
  • @Description:获取分娩页面的字典数据 + *
  • @return + *
  • 创建人:xujiahong + *
  • 创建时间:2017年5月8日 + *
  • 修改人: + *
  • 修改时间: + */ + @SuppressWarnings("serial") + @RequestMapping(value = "/matdel/getenums", method = RequestMethod.GET) + @ResponseBody + public AjaxResult getDictionary() { + Map data = new HashMap<>(); + // 枚举常量======================================= + // getFetal 胎先露 + data.put("getFetal", FetalEnums.getList()); + // getQidaiYc 脐带异常类型 + data.put("getQidaiYc", QiDaiEnums.getList()); + // getFmScEnums 分娩顺产方式枚举 + data.put("getFmScEnums", FmScEnums.getList()); + // getTpmcTypeEnums 胎盘娩出方式 + data.put("getTpmcTypeEnums", TpmcTypeEnums.getList()); + // getTaiPan 胎盘个数 + data.put("getTaiPan", TaiShuEnums.TaiPanEnums.getList()); + // getRenShenJieJuEnums 妊娠结局 + data.put("getRenShenJieJuEnums", RenShenJieJuEnums.getList()); + // getTaiShu 胎数 + data.put("getTaiShu", TaiShuEnums.getList()); + // getFetPosition 胎方位 + data.put("getFetPosition", FetalPositionEnums.getList()); + // getSXCauseEnums 失血原因 + data.put("getSXCauseEnums", SXCauseEnums.getList()); + // getFmType 分娩方式 + data.put("getFmType", FmTypeEnums.getList()); + // getDeathCauseEnums 死亡原因 + data.put("getDeathCauseEnums", DeathCauseEnums.getList()); + // getCosEnums + data.put("getCosEnums", CosEnums.getList()); + // getCfType 产妇情况 + data.put("getCfType", CfEnums.getList()); + + // 字典常量======================================= + // organizations 组织机构-模拟数据 TODO + List> organizations = new ArrayList<>(); + Map organizations_map1 = new HashMap() { + { + put("id", "193"); + put("name", "青龙妇幼保健院"); + } + }; + organizations.add(organizations_map1); + Map organizations_map2 = new HashMap() { + { + put("id", "195"); + put("name", "昌黎妇幼保健院"); + } + }; + organizations.add(organizations_map2); + data.put("organizations", organizations); + + // cTime + data.put("cTime", DateUtil.getyyyy_MM_dd(new Date())); + // now + data.put("now", DateUtil.getyyyy_MM_dd(new Date())); + return AjaxResult.returnSuccess(data); + } + + /** *
  • @Description:保存分娩记录 *
  • @param cardNo *
  • @param vcCardNo @@ -58,6 +140,8 @@ public class ChildbirthController extends BaseController { @RequestMapping(value = "/matdel", method = RequestMethod.POST) @ResponseBody public AjaxResult saveChildbirthVo(ChildbirthAddRequest request) { + + return AjaxResult.returnFail(); } diff --git a/parent/hospital.web/src/main/java/com/lyms/hospital/controller/woman/WomanExamController.java b/parent/hospital.web/src/main/java/com/lyms/hospital/controller/woman/WomanExamController.java index a6e1e97..e12fba2 100644 --- a/parent/hospital.web/src/main/java/com/lyms/hospital/controller/woman/WomanExamController.java +++ b/parent/hospital.web/src/main/java/com/lyms/hospital/controller/woman/WomanExamController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; +import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.lyms.base.common.entity.organ.Organizations; import com.lyms.base.common.entity.user.Users; import com.lyms.base.common.service.organ.OrganizationsService; @@ -97,10 +98,8 @@ public class WomanExamController extends BaseController { return AjaxResult.returnSuccess(); } DiagnoseAssit assist = assistService.getDetailByDiagnoseInfo(info.getId(), DiagnoseAssit.DIAGNOSE_TYPE_BIRTH);// 诊断类型:1婚前检查,【2产检】,3儿保检查 - List historyMapsList = historyMapsService.getListByTarget(info.getId(), - HistoryMaps.TARGET_TYPE_EXAM);// 关联目标类型:1产检、2妇女建档 List diagnoseTaiList = diagnoseTaiService.getListByExamId(info.getId()); - ExamAddRequestWrapper wrapper = new ExamAddRequestWrapper(info, assist, historyMapsList, diagnoseTaiList); + ExamAddRequestWrapper wrapper = new ExamAddRequestWrapper(info, assist, null, diagnoseTaiList); // 查询孕妇基本信息 WomanFetationRecord womanFetation = fetationService.selectById(info.getWomanId()); @@ -168,24 +167,28 @@ public class WomanExamController extends BaseController { map.put("gonggao", UnitConstants.splice(result.getGonggao(), UnitConstants.CM)); map.put("fuwei", UnitConstants.splice(result.getFuwei(), UnitConstants.CM)); - // 胎儿情况 - - - /* 辅助检查 */ - map.put("xhdb",UnitConstants.splice(result.getXhdb(),UnitConstants.GL)); - map.put("bxbjs",UnitConstants.splice(result.getBxbjs(),UnitConstants.TEN_LKG)); - map.put("platelet",UnitConstants.splice(result.getPlatelet(),UnitConstants.TEN_LKG)); + /* + * 辅助检查 + */ + map.put("xhdb", UnitConstants.splice(result.getXhdb(), UnitConstants.GL)); + map.put("bxbjs", UnitConstants.splice(result.getBxbjs(), UnitConstants.TEN_LKG)); + map.put("platelet", UnitConstants.splice(result.getPlatelet(), UnitConstants.TEN_LKG)); + + map.put("bloodSugar", UnitConstants.splice(result.getBloodSugar(), UnitConstants.MMOLL)); + map.put("xqgbzam", UnitConstants.splice(result.getXqgbzam(), UnitConstants.UL)); + map.put("xqgczam", UnitConstants.splice(result.getXqgczam(), UnitConstants.UL)); + map.put("albumin", UnitConstants.splice(result.getAlbumin(), UnitConstants.GL)); + map.put("totalBilirubin", UnitConstants.splice(result.getTotalBilirubin(), UnitConstants.UMOLL)); + map.put("jhBilirubin", UnitConstants.splice(result.getJhBilirubin(), UnitConstants.UMOLL)); - map.put("bloodSugar",UnitConstants.splice(result.getBloodSugar(),UnitConstants.MMOLL)); - map.put("xqgbzam",UnitConstants.splice(result.getXqgbzam(), UnitConstants.UL)); - map.put("xqgczam",UnitConstants.splice(result.getXqgczam(), UnitConstants.UL)); - map.put("albumin",UnitConstants.splice(result.getAlbumin(), UnitConstants.GL)); - map.put("totalBilirubin",UnitConstants.splice(result.getTotalBilirubin(), UnitConstants.UMOLL)); - map.put("jhBilirubin",UnitConstants.splice(result.getJhBilirubin(), UnitConstants.UMOLL)); - - map.put("xqjq",UnitConstants.splice(result.getXqjq(), UnitConstants.UL)); - map.put("xnsd",UnitConstants.splice(result.getXnsd(), UnitConstants.UL)); + map.put("xqjq", UnitConstants.splice(result.getXqjq(), UnitConstants.UL)); + map.put("xnsd", UnitConstants.splice(result.getXnsd(), UnitConstants.UL)); + /* + * 病史信息 + */ + Map showHistoryMap = historyMapsService.showHistory(info.getId(), HistoryMaps.TARGET_TYPE_EXAM);// 关联目标类型:1产检、2妇女建档 + map.putAll(showHistoryMap); return AjaxResult.returnSuccess(map); } @@ -413,10 +416,20 @@ public class WomanExamController extends BaseController { @RequestMapping(value = "/antex", method = RequestMethod.POST) @ResponseBody public AjaxResult saveFirstExam(@RequestBody ExamAddRequest request) { + String womanId = request.getParentId(); + if (StringUtils.isEmpty(womanId)) { + return AjaxResult.returnFail("入参错误:缺少孕妇ID"); + } /* - * 同一产程不能新增两次初诊:(如果条件是新增,根据孕妇档案ID WOMAN_ID 查询产检记录列表) TODO + * 同一产程不能新增两次初诊:(如果条件是新增,根据孕妇档案ID WOMAN_ID 查询产检记录列表) */ - + if (request.getId() == null) { + List infoList = infoService.selectList(new EntityWrapper() + .where("WOMAN_ID={0}", womanId).and("TYPE={0}", DiagnoseInfo.TYPE_FIRST)); + if (infoList != null && !infoList.isEmpty()) { + return AjaxResult.returnFail("业务错误:同一产程不能新增两次初诊"); + } + } /* * (1)保存产检基本信息 (2)保存辅助检查信息 (3)批量保存病史信息(4)多个胎儿信息(5) 多个诊断信息 TODO */ @@ -463,7 +476,7 @@ public class WomanExamController extends BaseController { if (dataMap == null) { return AjaxResult.returnSuccess(null);// 将基本的对象返回空 } - WomanFetationRecord dbFetationRecord = (WomanFetationRecord)dataMap.get("dbFetationRecord"); + WomanFetationRecord dbFetationRecord = (WomanFetationRecord) dataMap.get("dbFetationRecord"); // 产检记录列表 TODO (此处需要查询当前产程中本院和外院的所有产检记录(包括分布建档的),之后对接方承) List> data = new ArrayList<>(); // data 系前端指定名称 @@ -493,8 +506,8 @@ public class WomanExamController extends BaseController { data.add(diagnoseInfoMap); } } - - dataMap.put("data", data);//产检记录列表 + + dataMap.put("data", data);// 产检记录列表 dataMap.remove("dbFetationRecord"); return AjaxResult.returnSuccess(dataMap); } diff --git a/parent/hospital.web/src/main/java/com/lyms/hospital/request/OldNewWrapper.java b/parent/hospital.web/src/main/java/com/lyms/hospital/request/OldNewWrapper.java new file mode 100644 index 0000000..72f27b7 --- /dev/null +++ b/parent/hospital.web/src/main/java/com/lyms/hospital/request/OldNewWrapper.java @@ -0,0 +1,12 @@ +package com.lyms.hospital.request; + +public class OldNewWrapper { + + protected String obj2Str(Object obj){ + return obj==null?null:obj.toString(); + } + protected Integer obj2Int(Object obj){ + return obj==null?null:Integer.parseInt(obj.toString()); + } + +} diff --git a/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ChildbirthAddRequestWrapper.java b/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ChildbirthAddRequestWrapper.java index eacf663..03c9d70 100644 --- a/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ChildbirthAddRequestWrapper.java +++ b/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ChildbirthAddRequestWrapper.java @@ -1,14 +1,19 @@ package com.lyms.hospital.request.exam; import java.util.List; +import java.util.Map; import com.lyms.hospital.entity.childbirth.ChildbirthInfo; import com.lyms.hospital.entity.childbirth.ChildbirthInfoVo; import com.lyms.hospital.entity.childbirth.ChildbirthNewborn; import com.lyms.hospital.entity.childbirth.ChildbirthTai; import com.lyms.hospital.entity.childbirth.ChildbirthTaipan; +import com.lyms.hospital.enums.business.FmTypeEnums; +import com.lyms.hospital.request.OldNewWrapper; +import com.lyms.hospital.util.trans.XjhMapUtil; +import com.lyms.util.DateUtil; -public class ChildbirthAddRequestWrapper { +public class ChildbirthAddRequestWrapper extends OldNewWrapper { private ChildbirthAddRequest request; private ChildbirthInfoVo vo; @@ -20,17 +25,98 @@ public class ChildbirthAddRequestWrapper { public ChildbirthAddRequestWrapper() { } + @SuppressWarnings("unchecked") public ChildbirthAddRequestWrapper(ChildbirthAddRequest req) { this.request = req; if(req!=null){ - String[] req_map = {"id","pid","parentId"}; - String[] info_map = {"id","personId","womanId"}; - info = new ChildbirthInfo(); -// info.setId(req.getId()); -// info.setPersonId(req.getPid()); + //快速映射普通字段 + //{ 分娩ID、居民ID、孕妇ID、分娩孕周、胎儿数、胎盘数 } + //{ (剖宫产)手术原因、 会阴撕裂、缝线针数、产妇情况、造成死亡的原因 } + //{ 呼吸、脉搏、产后1小时失血量、产后2小时失血量、产后24小时失血量、第三产程+产后2小时失血量 } + //{ 其他失血原因文本、 分娩医院、接生医生} + String[] req_map = { + "id","pid","parentId","dueWeek","tireNumber","placenta", + "operationCause","siLielevel","needleNum","maternalInfo","deathCause", + "breath","pulse","oHloseBloodL","tHloseBloodL","rHloseBloodL","sHloseBloodL", + "deathCauseText","fmHospital","deliverDoctor" + }; + String[] info_map = { + "id","personId","womanId","childbirthTimeText","fetusNum","placentaNum", + "operationReason","perineumSplit","needleNum","womanSituation","otherDeathReasonText", + "breath","pulse","loseBloodA","loseBloodB","loseBloodC","loseBloodD", + "loseBloodOtherText","orgId","doctorId" + }; + Map reqMap = XjhMapUtil.transBean2AliasMap(req, XjhMapUtil.getKeyMap(req_map, info_map)); + info = (ChildbirthInfo) XjhMapUtil.transMap2Bean(reqMap, new ChildbirthInfo()); + //特殊字段设置 + info.setChildbirthTime(DateUtil.parseYMD(req.getDueDate()));//分娩日期 + //分娩方式 + Map deliveryMode = (Map)req.getDeliveryMode(); + if(deliveryMode!=null && !deliveryMode.isEmpty()){ + if(FmTypeEnums.O1.getId().equals(deliveryMode.get("fmfs"))){//剖宫产 + info.setChildbirthType(Integer.parseInt(FmTypeEnums.O1.getId())); + }else if(FmTypeEnums.O.getId().equals(deliveryMode.get("fmfs"))){//顺产 + if(deliveryMode.get("scfs")!=null){ + info.setChildbirthType(Integer.parseInt(deliveryMode.get("scfs"))); + } + } + } + //产程 + Map prodprocess = (Map)req.getProdprocess(); + if(prodprocess!=null && !prodprocess.isEmpty()){ + Map one = (Map)prodprocess.get("one"); + Map two = (Map)prodprocess.get("two"); + Map three = (Map)prodprocess.get("three"); + info.setProcessFirst(this.getProcessStr(one)); + info.setProcessSecond(this.getProcessStr(two)); + info.setProcessThird(this.getProcessStr(three)); + } + Map totalprocess = (Map)req.getTotalprocess(); + info.setProcessTotal(this.getProcessStr(totalprocess)); + //会阴情况:1完整,2切开 + String perinealCondition =req.getPerinealCondition(); + if("whole".equals(perinealCondition)){ + info.setPerineumSituation(ChildbirthInfo.PERINEUM_SITUATION_WHOLE); + }else if("split".equals(perinealCondition)){ + info.setPerineumSituation(ChildbirthInfo.PERINEUM_SITUATION_SPLIT); + } + //产后血压 + Map chBp = (Map)req.getChBp(); + if(chBp!=null && !chBp.isEmpty()){ + info.setBloodShrink(this.obj2Int(chBp.get("ssy")));//收缩压 + info.setBloodDiastole(this.obj2Int(chBp.get("szy")));//舒张压 + } + //产后两小时血压 + Map ch2Bp = (Map)req.getCh2Bp(); + if(ch2Bp!=null && !ch2Bp.isEmpty()){ + info.setBloodShrinkLater(this.obj2Int(ch2Bp.get("ssy")));//收缩压 + info.setBloodDiastoleLater(this.obj2Int(ch2Bp.get("szy")));//舒张压 + } + //失血原因(枚举) + Map loseBloodCause = (Map)req.getLoseBloodCause(); + if(loseBloodCause!=null && !loseBloodCause.isEmpty()){ + info.setLoseBloodReason(this.obj2Int(loseBloodCause.get("select"))); + info.setLoseBloodOtherText(this.obj2Str(loseBloodCause.get("other"))); + } + //产科并发症 + + //胎儿列表 + //胎盘娩出方式 + //新生儿 + } } + + private String getProcessStr(Map map){ + String str = ""; + if(map!=null && !map.isEmpty()){ + str += map.get("h")==null?"":map.get("h").toString(); + str += "-"; + str += map.get("m")==null?"":map.get("m").toString(); + } + return str; + } public ChildbirthAddRequest getRequest() { return request; diff --git a/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ExamAddRequestWrapper.java b/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ExamAddRequestWrapper.java index 5ec0385..b456900 100644 --- a/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ExamAddRequestWrapper.java +++ b/parent/hospital.web/src/main/java/com/lyms/hospital/request/exam/ExamAddRequestWrapper.java @@ -9,8 +9,12 @@ import com.lyms.hospital.entity.assist.DiagnoseAssit; import com.lyms.hospital.entity.diagnose.DiagnoseInfo; import com.lyms.hospital.entity.diagnose.DiagnoseTai; import com.lyms.hospital.entity.history.HistoryMaps; +import com.lyms.hospital.enums.business.FetalEnums; +import com.lyms.hospital.enums.business.FetalPositionEnums; +import com.lyms.hospital.enums.business.JoinEnums; import com.lyms.hospital.response.keymap.DiagnoseAssistKeymap; import com.lyms.hospital.response.keymap.WomanExamKeymap; +import com.lyms.hospital.util.UnitConstants; import com.lyms.hospital.util.trans.XjhMapUtil; public class ExamAddRequestWrapper { @@ -51,8 +55,7 @@ public class ExamAddRequestWrapper { Map assistMap = XjhMapUtil.transBean2FormatAliasMap(assist, XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias)); infoMap.putAll(assistMap); - examAddRequest = (ExamAddRequest) XjhMapUtil.transMap2AliasBean(infoMap, new ExamAddRequest(), - XjhMapUtil.getKeyMap(WomanExamKeymap.original, WomanExamKeymap.alias)); + examAddRequest = (ExamAddRequest) XjhMapUtil.transMap2Bean(infoMap, new ExamAddRequest()); examAddRequest.setParentId(info.getWomanId());// 孕妇档案ID examAddRequest.setPid(info.getPersonId());// 女性居民 // 血压 @@ -62,9 +65,9 @@ public class ExamAddRequestWrapper { examAddRequest.setBp(bp); // 处理辅助检查,"yin","ruoyang","yang"字段 Map keyMap = new HashMap<>(); - keyMap.put(DiagnoseAssit.YIN,"yin"); - keyMap.put(DiagnoseAssit.YANG,"yang"); - keyMap.put(DiagnoseAssit.RUOYANG,"ruoyang"); + keyMap.put(DiagnoseAssit.YIN,"-"); + keyMap.put(DiagnoseAssit.YANG,"+"); + keyMap.put(DiagnoseAssit.RUOYANG,"±"); keyMap.put(null,null); examAddRequest.setBg(keyMap.get(assist.getLiverBg()));//丙肝 examAddRequest.setRh(keyMap.get(assist.getBloodtypeRh()));//RH血型 @@ -102,10 +105,10 @@ public class ExamAddRequestWrapper { if(diagnoseTaiList!=null && !diagnoseTaiList.isEmpty()){ for(DiagnoseTai tai : diagnoseTaiList){ Map taiMap = new HashMap<>(); - taiMap.put("heartRate", tai.getHeartRate()); - taiMap.put("fetalPosition", tai.getPosition()); - taiMap.put("fetalPresentation", tai.getFirstExpose()); - taiMap.put("join", tai.getIsLink()); + taiMap.put("heartRate", tai.getHeartRate()==null?"":UnitConstants.splice(tai.getHeartRate(), UnitConstants.CIFEN)); + taiMap.put("fetalPosition", tai.getPosition()==null?"":FetalPositionEnums.getTitle(tai.getPosition())); + taiMap.put("fetalPresentation", tai.getFirstExpose()==null?"":FetalEnums.getTitle(tai.getFirstExpose())); + taiMap.put("join", tai.getIsLink()==null?"":JoinEnums.getTitle(tai.getIsLink()+"")); placentas.add(taiMap); } } diff --git a/parent/hospital.web/src/main/resources/xml/app-shiro.xml b/parent/hospital.web/src/main/resources/xml/app-shiro.xml index 66aaaaa..c48bee0 100644 --- a/parent/hospital.web/src/main/resources/xml/app-shiro.xml +++ b/parent/hospital.web/src/main/resources/xml/app-shiro.xml @@ -47,7 +47,7 @@ /login/tokens = anon /** = user,forceLogout - /commonApi/* = anon + /commonApi/** = anon