Commit ac74524512eddfb0ba8e37925f2793303babb8ce

Authored by wtt
1 parent 641ae57ba0

update

Showing 2 changed files with 194 additions and 0 deletions

platform-common/src/main/java/com/lyms/platform/common/enums/XsescEnums.java View file @ ac74524
  1 +package com.lyms.platform.common.enums;
  2 +
  3 +import com.lyms.platform.common.utils.StringUtils;
  4 +
  5 +import java.util.ArrayList;
  6 +import java.util.HashMap;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +/**
  11 + * 新生儿筛查机构映射
  12 + */
  13 +public enum XsescEnums {
  14 +
  15 + dcydy("216","秦皇岛市妇幼保健院", "1553","秦皇岛市妇幼保健院"),
  16 + wyjsxmjb("2100001579", "秦皇岛市第一医院","1557","秦皇岛市第一医院"),
  17 + xjxydb("2100001583", "秦皇岛军工医院","1558","秦皇岛军工医院"),
  18 + qlxfubj("", "","1559","青龙县妇幼保健院"),
  19 + lshyy("1000000031", "青龙满族自治县凉水河中心卫生院","1560", "凉水河医院"),
  20 + lwmws("1000000024", "青龙满族自治县龙王庙中心卫生院","1562", "龙王庙卫生院"),
  21 + lzzws("1000000048", "青龙满族自治县娄丈子镇卫生院","1563", "娄丈子卫生院"),
  22 + szzws("", "","1564", "双山子卫生院"),
  23 + zsws("1000000025", "青龙满族自治县祖山镇卫生院","1565", "祖山卫生院"),
  24 + mutdws("1000000029", "青龙满族自治县木头凳中心卫生院","1566", "木头凳卫生院"),
  25 + sbzws("1000000049", "青龙满族自治县三拨子乡卫生院","1568", "三拨子卫生院"),
  26 + bdzws("1000000030", "青龙满族自治县八道河中心卫生院","1569", "八道子卫生院"),
  27 + hgyy("2100000000", "秦皇岛市海港医院","1570", "海港医院"),
  28 + qhdgk("2100001580", "河北港口集团有限公司港口医院","1571", "秦皇岛市港口医院"),
  29 + qhdbdhqy("248", "秦皇岛市北戴河医院","1572", "秦皇岛市北戴河区医院"),
  30 + jfjerbay("2100001764", "中国人民解放军第二八一医院","1573", "解放军二八一医院"),
  31 + qhdshgrm("1000000004", "秦皇岛市山海关人民医院","1574", "秦皇岛山海关人民医院"),
  32 + shggryy("", "","1575", "山海关工人医院"),
  33 + qlzxyy("204", "青龙满族自治县医院","1576", "青龙县医院"),
  34 + qlxzy("1000000033", "青龙满族自治县中医院","1577", "青龙县中医院"),
  35 + llxyy("1000000091", "河北省卢龙县医院","1578", "卢龙县医院"),
  36 + llxfybjy("1000000015", "卢龙县妇幼保健院","1579", "卢龙县妇幼保健院"),
  37 + llxzy("1000000090", "卢龙县中医院","1580", "卢龙县中医院"),
  38 + fnxrm("2100001604", "秦皇岛市抚宁区人民医院","1581", "抚宁县人民医院"),
  39 + fnxbjy("197", "秦皇岛市抚宁区妇幼保健院","1582", "抚宁县妇幼保健院"),
  40 + fnxz("", "","1583", "抚宁县中医院"),
  41 + clxyy("", "","1584", "昌黎县医院"),
  42 + clxfybjy("195", "昌黎县妇幼保健院","1585", "昌黎县妇幼保健院"),
  43 + clxz("1000000017", "昌黎县中医院","1586", "昌黎县中医院"),
  44 + qhdder("1000000016", "秦皇岛市第二医院","1587", "秦皇岛市第二医院"),
  45 + qhdkf("2100000073", "秦皇岛经济技术开发区医院","1588", "秦皇岛开发区医院"),
  46 + ljyy("2100001581", "秦皇岛柳江医院","1589", "柳江医院"),
  47 + ndhyy("2100001298", "秦皇岛北戴河新区南戴河医院","1590", "南戴河医院"),
  48 + zzyy("2100001752", "秦皇岛卓众医院","1591", "卓众医院"),
  49 + yyyy("1000000002", "秦皇岛友谊医院","1592", "友谊医院"),
  50 + qhdfy("", "","1593", "秦皇岛妇幼"), //??(秦皇岛市妇幼保健院)
  51 + qhdcanyi("", "","1594", "秦皇岛妇幼产一科"),
  52 + qhdcsan("", "","1595", "秦皇岛妇幼产三科"),
  53 + qhdyc("", "","1596", "秦皇岛妇幼遗传实验室"),
  54 + qhdchyi("", "","1597", "秦皇岛妇幼产后休疗一区"),
  55 + qhdcher("", "","1598", "秦皇岛妇幼产后休疗二区"),
  56 + qhdxsr("", "","1599", "秦皇岛妇幼新生儿科"),
  57 + qjdvip("", "","1600", "秦皇岛妇幼VIP病区"),
  58 + bdh("2100001303", "秦皇岛北戴河新区顺德医院","1618", "北戴河新区顺德医院"),
  59 + cl("", "","1619", "昌黎镇医院"),
  60 + ssz("1000000027", "青龙满族自治县双山子中心卫生院","1620", "双山子中心卫生院"),
  61 + cs("", "","1623", "测试机构");
  62 +
  63 +
  64 +
  65 + private String ychospitalId; //孕产婴机构id
  66 + private String ychospitalName;//孕产婴机构名称
  67 + private String dshospitalId;//第三方机构id
  68 + private String dshospitalName;//第三方机构名称
  69 +
  70 + /**
  71 + * 通过孕产婴机构id获取 XsescEnums
  72 + *
  73 + * @param ychospitalId
  74 + * @Author: 武涛涛
  75 + * @Date: 2020/11/10 14:10
  76 + */
  77 + public static XsescEnums getYchospitalId(String ychospitalId) {
  78 + XsescEnums[] values = XsescEnums.values();
  79 + for (XsescEnums value : values) {
  80 + if (value.getYchospitalId().equals(ychospitalId)) {
  81 + return value;
  82 + }
  83 + }
  84 + return null;
  85 + }
  86 +
  87 + /**
  88 + * 通过第三方机构id获取 XsescEnums
  89 + *
  90 + * @param dshospitalId
  91 + * @Author: 武涛涛
  92 + * @Date: 2020/11/10 14:10
  93 + */
  94 + public static XsescEnums getDshospitalId(String dshospitalId) {
  95 + XsescEnums[] values = XsescEnums.values();
  96 + for (XsescEnums value : values) {
  97 + if (value.getDshospitalId().equals(dshospitalId)) {
  98 + return value;
  99 + }
  100 + }
  101 + return null;
  102 + }
  103 +
  104 + /**
  105 + * 通过孕产婴机构id获取 第三方机构id
  106 + *
  107 + * @param ychospitalId
  108 + * @Author: 武涛涛
  109 + * @Date: 2020/11/10 14:11
  110 + */
  111 + public static String getYchospitalIdOrDshospitalId(String ychospitalId) {
  112 + if(StringUtils.isEmpty(ychospitalId)) {
  113 + return null;
  114 + }
  115 + XsescEnums[] values = XsescEnums.values();
  116 + for (XsescEnums value : values) {
  117 + if (value.ychospitalId.equals(ychospitalId)) {
  118 + return value.dshospitalId;
  119 + }
  120 + }
  121 + return null;
  122 + }
  123 + /**
  124 + * 初始化机构 列表
  125 + *
  126 + * @Author: 武涛涛
  127 + * @Date: 2020/11/10 14:13
  128 + */
  129 + public static List <Map> init() {
  130 + List<Map> list = new ArrayList <>();
  131 + for (XsescEnums e : XsescEnums.values()) {
  132 + Map rootMap = new HashMap();
  133 + rootMap.put("ychospitalId", e.getYchospitalId());
  134 + rootMap.put("ychospitalName", e.getYchospitalName());
  135 + rootMap.put("dshospitalId", e.getDshospitalId());
  136 + rootMap.put("dshospitalName", e.getDshospitalName());
  137 + list.add(rootMap);
  138 + }
  139 + return list;
  140 + }
  141 +
  142 +
  143 + XsescEnums(String ychospitalId, String ychospitalName, String dshospitalId, String dshospitalName) {
  144 + this.ychospitalId = ychospitalId;
  145 + this.ychospitalName = ychospitalName;
  146 + this.dshospitalId = dshospitalId;
  147 + this.dshospitalName = dshospitalName;
  148 + }
  149 +
  150 + public String getYchospitalId() {
  151 + return ychospitalId;
  152 + }
  153 +
  154 + public void setYchospitalId(String ychospitalId) {
  155 + this.ychospitalId = ychospitalId;
  156 + }
  157 +
  158 + public String getYchospitalName() {
  159 + return ychospitalName;
  160 + }
  161 +
  162 + public void setYchospitalName(String ychospitalName) {
  163 + this.ychospitalName = ychospitalName;
  164 + }
  165 +
  166 + public String getDshospitalId() {
  167 + return dshospitalId;
  168 + }
  169 +
  170 + public void setDshospitalId(String dshospitalId) {
  171 + this.dshospitalId = dshospitalId;
  172 + }
  173 +
  174 + public String getDshospitalName() {
  175 + return dshospitalName;
  176 + }
  177 +
  178 + public void setDshospitalName(String dshospitalName) {
  179 + this.dshospitalName = dshospitalName;
  180 + }}
  181 +
  182 + /* class ss{
  183 + public static void main(String[] args) {
  184 + List <Map> init = XsescEnums.init();
  185 + for (int i = 0; i < init.size(); i++) {
  186 + System.out.println(init.get(i).get("ychospitalId")+"--"+ init.get(i).get("ychospitalName")+"--"+ init.get(i).get("dshospitalId")+"--"+init.get(i).get("dshospitalName") );
  187 + }
  188 +
  189 + System.out.println(XsescEnums.getYchospitalId("216").getDshospitalId());
  190 + System.out.println(XsescEnums.getYchospitalIdOrDshospitalId("216"));
  191 + }
  192 + }*/
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ ac74524
... ... @@ -322,6 +322,7 @@
322 322 }
323 323  
324 324 Patients patient = getPatientsData(yunRequest);
  325 + patient.setYyzyfmHospitalId(yunRequest.getYyzyfmHospitalId());
325 326  
326 327  
327 328 //承德市妇幼通过就诊卡号查询到病人id保存下来
... ... @@ -1159,6 +1160,7 @@
1159 1160  
1160 1161  
1161 1162 Patients patient = getPatientsData(yunRequest);
  1163 + patient.setYyzyfmHospitalId(yunRequest.getYyzyfmHospitalId());
1162 1164 patient.setModified(new Date());
1163 1165 patient.setBuildDays(DateUtil.getDays(DateUtil.parseYMD(yunRequest.getLastMenstrualPeriod()), DateUtil.parseYMD(yunRequest.getBookbuildingDate())));
1164 1166