Commit 8f19b14457c92867e9b275fcc00d6737c8f4b138

Authored by yangfei

Merge remote-tracking branch 'origin/master'

Showing 3 changed files

platform-operate-api/src/main/java/com/lyms/hospitalapi/qhdfy/QhdfyFmService.java View file @ 8f19b14
... ... @@ -922,168 +922,346 @@
922 922 */
923 923 public MaternalDeliverResult queryFmPatient(String idCardNo)
924 924 {
  925 +
  926 + SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHH:mm:ss");
  927 + SimpleDateFormat fmt2 = new SimpleDateFormat("yyyyMMdd");
  928 + SimpleDateFormat fmt1 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
925 929 MaternalDeliverResult maternalDeliverResult = new MaternalDeliverResult();
926   - Connection conn = ConnTools.makeFmConnection();
927   - QueryRunner queryRunner = new QueryRunner();
  930 +// Connection conn = ConnTools.makeFmConnection();
  931 +// QueryRunner queryRunner = new QueryRunner();
928 932 if(idCardNo != null){
929 933 try{
930   - SimpleDateFormat fmt = new SimpleDateFormat("yyyyMMddHH:mm:ss");
931   - SimpleDateFormat fmt2 = new SimpleDateFormat("yyyyMMdd");
932   - SimpleDateFormat fmt1 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
933   - FmPatInfo patInfo = null;
934   - String sql = "SELECT syxh,hzxm as name,sfzh as cardNo,sex as sex,birth,lxrdh as phone, blh FROM THIS4_BASY WHERE sfzh = '"+idCardNo+"' ";
935   - List<FmPatInfo> infoList = queryRunner.query(conn,sql,new BeanListHandler<FmPatInfo>(FmPatInfo.class));
936   - if(CollectionUtils.isNotEmpty(infoList)){
937   - patInfo = infoList.get(0);
938 934  
939   - String cloumns = " SYXH as syxh,\n" +
940   - " YEXH as yexh,\n" +
941   - " JLRQ as jlrq,\n" +
942   - " CSRQ as csrq,\n" +
943   - " SSRQ as ssrq,\n" +
944   - "SSJ as ssj,\n" +
945   - "yexb as yexb,\n" +
946   - "RC as rc,\n" +
947   - "JTS as jts,\n" +
948   - "DJT as djt,\n" +
949   - "CJC as cjc,\n" +
950   - "ZX as zx,\n" +
951   - "TZ as tz,\n" +
952   - "SC as sc,\n" +
953   - "SH as sh,\n" +
954   - "JX as jx,\n" +
955   - "YFZ as yfz,\n" +
956   - "WFZ as wfz,\n" +
957   - "SFZ as sfz,\n" +
958   - "PFZ as pfz,\n" +
959   - "CCQK as ccqk,\n" +
960   - "FMFS as fmfs,\n" +
961   - "TPMCFS as tpmcfs,\n" +
962   - "YEQK as yeqk,\n" +
963   - "SW as sw,\n" +
964   - "SFFQ as sffq,\n" +
965   - "FQYY as fqyy,\n" +
966   - "HYQK as hyqk,\n" +
967   - "HYQK1 as hyqk1,\n" +
968   - "YC as yc,\n" +
969   - "SFGW as sfgw,\n" +
970   - "MCTPSLXL as mctpslxl,\n" +
971   - "CHEXXSXL as chexxsxl,\n" +
972   - " QJQK as qjqk,\n" +
973   - " SRKS as srks,\n" +
974   - " JSZ as jsz";
  935 +// FmPatInfo patInfo = null;
  936 +// String sql = "SELECT syxh,hzxm as name,sfzh as cardNo,sex as sex,birth,lxrdh as phone, blh FROM THIS4_BASY WHERE sfzh = '"+idCardNo+"' ";
  937 +// List<FmPatInfo> infoList = queryRunner.query(conn,sql,new BeanListHandler<FmPatInfo>(FmPatInfo.class));
  938 +// if(CollectionUtils.isNotEmpty(infoList)){
  939 +// patInfo = infoList.get(0);
  940 +//
  941 +// String cloumns = " SYXH as syxh,\n" +
  942 +// " YEXH as yexh,\n" +
  943 +// " JLRQ as jlrq,\n" +
  944 +// " CSRQ as csrq,\n" +
  945 +// " SSRQ as ssrq,\n" +
  946 +// "SSJ as ssj,\n" +
  947 +// "yexb as yexb,\n" +
  948 +// "RC as rc,\n" +
  949 +// "JTS as jts,\n" +
  950 +// "DJT as djt,\n" +
  951 +// "CJC as cjc,\n" +
  952 +// "ZX as zx,\n" +
  953 +// "TZ as tz,\n" +
  954 +// "SC as sc,\n" +
  955 +// "SH as sh,\n" +
  956 +// "JX as jx,\n" +
  957 +// "YFZ as yfz,\n" +
  958 +// "WFZ as wfz,\n" +
  959 +// "SFZ as sfz,\n" +
  960 +// "PFZ as pfz,\n" +
  961 +// "CCQK as ccqk,\n" +
  962 +// "FMFS as fmfs,\n" +
  963 +// "TPMCFS as tpmcfs,\n" +
  964 +// "YEQK as yeqk,\n" +
  965 +// "SW as sw,\n" +
  966 +// "SFFQ as sffq,\n" +
  967 +// "FQYY as fqyy,\n" +
  968 +// "HYQK as hyqk,\n" +
  969 +// "HYQK1 as hyqk1,\n" +
  970 +// "YC as yc,\n" +
  971 +// "SFGW as sfgw,\n" +
  972 +// "MCTPSLXL as mctpslxl,\n" +
  973 +// "CHEXXSXL as chexxsxl,\n" +
  974 +// " QJQK as qjqk,\n" +
  975 +// " SRKS as srks,\n" +
  976 +// " JSZ as jsz";
  977 +//
  978 +// String itemSql ="select "+cloumns+" from JHMK_FMJL_LYMS where " +
  979 +// " and SYXH not in (select SYXH from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and CCQK is not null and CCQK <> '' " +
  980 +// " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) and SYXH='"+patInfo.getSyxh()+"'";
  981 +//
  982 +// List<FmItem> itemList = queryRunner.query(conn, itemSql, new BeanListHandler<FmItem>(FmItem.class));
  983 +//
  984 +//
  985 +// //单胎
  986 +// if(CollectionUtils.isNotEmpty(itemList)){
  987 +// List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>();
  988 +// for(FmItem fmItem : itemList){
  989 +// System.out.println("单胎:"+fmItem);
  990 +// try{
  991 +//
  992 +// Map deliveryMode = new HashMap(); //分娩方式
  993 +// if (!("活产".equals(fmItem.getCcqk()) || "死胎".equals(fmItem.getCcqk())))
  994 +// {
  995 +// continue;
  996 +// }
  997 +// String cssj = fmItem.getCsrq().substring(0,3)+"-"+fmItem.getCsrq().substring(4,5)+"-"+fmItem.getCsrq().substring(6,7);
  998 +// maternalDeliverResult.setDueDate(cssj);
  999 +// maternalDeliverResult.setDueWeek(fmItem.getRc());
  1000 +// maternalDeliverResult.setTireNumber(Integer.parseInt(fmItem.getDjt()));
  1001 +// //没有胎盘默认为1
  1002 +// maternalDeliverResult.setPlacenta("1");
  1003 +// String fmfs = "";
  1004 +// if (fmItem.getFmfs() != null && "剖宫产".equals(fmItem.getFmfs()))
  1005 +// {
  1006 +// fmfs = FmTypeEnums.O1.getId();
  1007 +// }
  1008 +// else
  1009 +// {
  1010 +// fmfs = FmTypeEnums.O.getId();
  1011 +// }
  1012 +// deliveryMode.put("fmfs",fmfs);
  1013 +// maternalDeliverResult.setDeliveryMode(deliveryMode);
  1014 +//
  1015 +// if ("完好".equals(fmItem.getHyqk()) || "".equals(fmItem.getHyqk())) {
  1016 +// maternalDeliverResult.setPerinealCondition("full");
  1017 +// } else if ("会阴切开".equals(fmItem.getHyqk()) || "侧切".equals(fmItem.getHyqk())) {
  1018 +// maternalDeliverResult.setPerinealCondition("split");
  1019 +// }
  1020 +// if ("一度裂伤".equals(fmItem.getHyqk())) {
  1021 +// maternalDeliverResult.setSiLielevel(1);
  1022 +// } else if ("二度裂伤".equals(fmItem.getHyqk())) {
  1023 +// maternalDeliverResult.setSiLielevel(2);
  1024 +// } else if ("三度裂伤".equals(fmItem.getHyqk())) {
  1025 +// maternalDeliverResult.setSiLielevel(3);
  1026 +// }
  1027 +// if (StringUtils.isNotEmpty(fmItem.getChexxsxl())) {
  1028 +// maternalDeliverResult.settHloseBloodL(Double.parseDouble(fmItem.getChexxsxl()));
  1029 +// }
  1030 +//
  1031 +// //儿童
  1032 +// MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby();
  1033 +// Map<String, String> as = new HashMap<>();
  1034 +// String pf1 = fmItem.getYfz();
  1035 +// String pf5 = fmItem.getWfz();
  1036 +// String pf10 = fmItem.getSfz();
  1037 +// if(pf1!=null){
  1038 +// as.put("pf1", pf1);
  1039 +// }
  1040 +// if(pf5!=null){
  1041 +// as.put("pf5", pf5);
  1042 +// }
  1043 +// if(pf10!=null){
  1044 +// as.put("pf10", pf10);
  1045 +// }
  1046 +// baby.setApgarScore(as);
  1047 +// baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0");
  1048 +// String babyHeight = fmItem.getSc();
  1049 +// String babyWeight = fmItem.getTz();
  1050 +// String baby_Asphyxiam = fmItem.getZx();
  1051 +// if(babyHeight!=null){
  1052 +// baby.setBabyHeight(babyHeight);//新生儿生长
  1053 +// }
  1054 +// if(babyWeight!=null){
  1055 +// baby.setBabyWeight(babyWeight);//新生儿重量
  1056 +// }
  1057 +// if(baby_Asphyxiam!=null){
  1058 +// baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟
  1059 +// }
  1060 +// baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形
  1061 +//
  1062 +// String baby_Pregnancy_Out = fmItem.getCcqk();
  1063 +// if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){
  1064 +// baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局
  1065 +// }
  1066 +//
  1067 +// baby.setDueTime(cssj);//分娩时间
  1068 +// babys.add(baby);
  1069 +//
  1070 +//
  1071 +// }catch (Exception e){
  1072 +// e.printStackTrace();
  1073 +// continue;
  1074 +// }
  1075 +//
  1076 +//
  1077 +// }
  1078 +// maternalDeliverResult.setBabies(babys);
  1079 +// }
  1080 +// //多胎
  1081 +// else
  1082 +// {
  1083 +// String sql1="select "+cloumns+" from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and CCQK is not null and CCQK <> '' " +
  1084 +// " and SH is not null and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ') and SYXH='"+patInfo.getSyxh()+"'";
  1085 +//
  1086 +// List<FmItem> duoTaiList = queryRunner.query(conn,sql1
  1087 +// , new BeanListHandler<FmItem>(FmItem.class));
975 1088  
976   - String itemSql ="select "+cloumns+" from JHMK_FMJL_LYMS where " +
977   - " and SYXH not in (select SYXH from JHMK_FMJL_LYMS where JSZ is not null and SC is not null and TZ is not null and YFZ is not null and SH is not null and CCQK is not null and CCQK <> '' " +
978   - " and (SFFZRSTDT = ' 是 ' or SFSTDT = ' 是 ')) and SYXH="+patInfo.getSyxh()+"";
979 1089  
980   - List<FmItem> itemList = queryRunner.query(conn, itemSql, new BeanListHandler<FmItem>(FmItem.class));
981   - ExceptionUtils.catchException("size====" + itemList.size());
  1090 + List<FmItem> duoTaiList = new ArrayList<>();
982 1091  
983   - if(CollectionUtils.isNotEmpty(itemList)){
984   - List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>();
985   - for(FmItem fmItem : itemList){
  1092 + FmItem fmItem1 = new FmItem();
  1093 + fmItem1.setSyxh("10019988");
  1094 + fmItem1.setJlrq("2017011217:52:00");
  1095 + fmItem1.setSsj("2");
  1096 + fmItem1.setSsrq("20170112");
  1097 + fmItem1.setCsrq("2017011214:15:00");
  1098 + fmItem1.setSrks("产二科");
  1099 + fmItem1.setYexb("男");
  1100 + fmItem1.setRc("37");
  1101 + fmItem1.setDjt("2");
  1102 + fmItem1.setCjc("2");
  1103 + fmItem1.setJsz("王瑞华");
  1104 + fmItem1.setTz("2730");
  1105 + fmItem1.setSc("50");
  1106 + fmItem1.setYfz("9");
  1107 + fmItem1.setWfz("10");
  1108 + fmItem1.setSfz("10");
  1109 + fmItem1.setPfz("王瑞华");
  1110 + fmItem1.setCcqk("活产");
  1111 + fmItem1.setFmfs("剖宫产");
  1112 + fmItem1.setTpmcfs("自然产出");
  1113 + fmItem1.setYeqk("正常");
986 1114  
987   - try{
  1115 + duoTaiList.add(fmItem1);
988 1116  
989   - Map deliveryMode = new HashMap(); //分娩方式
990   - if (!("活产".equals(fmItem.getCcqk()) || "死胎".equals(fmItem.getCcqk())))
  1117 + FmItem fmItem2 = new FmItem();
  1118 + fmItem2.setSyxh("10019988");
  1119 + fmItem2.setJlrq("2017011217:52:00");
  1120 + fmItem2.setSsj("2");
  1121 + fmItem2.setSsrq("20170112");
  1122 + fmItem2.setCsrq("2017011214:15:00");
  1123 + fmItem2.setSrks("产二科");
  1124 + fmItem2.setYexb("女");
  1125 + fmItem2.setRc("37");
  1126 + fmItem2.setDjt("2");
  1127 + fmItem2.setCjc("2");
  1128 + fmItem2.setJsz("王瑞华");
  1129 + fmItem2.setTz("3400");
  1130 + fmItem2.setSc("50");
  1131 + fmItem2.setYfz("9");
  1132 + fmItem2.setWfz("10");
  1133 + fmItem2.setSfz("10");
  1134 + fmItem2.setPfz("王瑞华");
  1135 + fmItem2.setCcqk("活产");
  1136 + fmItem2.setFmfs("剖宫产");
  1137 + fmItem2.setTpmcfs("自然产出");
  1138 + fmItem2.setYeqk("正常");
  1139 +
  1140 + duoTaiList.add(fmItem2);
  1141 +
  1142 +
  1143 + if (CollectionUtils.isNotEmpty(duoTaiList)) {
  1144 + Map<String,List<FmItem>> maps = new HashMap<>();
  1145 + for(FmItem item : duoTaiList)
  1146 + {
  1147 + if (maps.containsKey(item.getSyxh()))
991 1148 {
992   - continue;
  1149 + maps.get(item.getSyxh()).add(item);
993 1150 }
994   - String cssj = fmItem.getCsrq().substring(0,3)+"-"+fmItem.getCsrq().substring(4,5)+"-"+fmItem.getCsrq().substring(6,7);
995   - maternalDeliverResult.setParentId(fmItem.getSyxh());
996   - maternalDeliverResult.setDueDate(cssj);
997   - maternalDeliverResult.setDueWeek(fmItem.getRc());
998   - maternalDeliverResult.setTireNumber(Integer.parseInt(fmItem.getDjt()));
999   - //没有胎盘默认为1
1000   - maternalDeliverResult.setPlacenta("1");
1001   - String fmfs = "";
1002   - if (fmItem.getFmfs() != null && "剖宫产".equals(fmItem.getFmfs()))
1003   - {
1004   - fmfs = FmTypeEnums.O1.getId();
1005   - }
1006 1151 else
1007 1152 {
1008   - fmfs = FmTypeEnums.O.getId();
  1153 + List items = new ArrayList<FmItem>();
  1154 + items.add(item);
  1155 + maps.put(item.getSyxh(),items);
1009 1156 }
1010   - deliveryMode.put("fmfs",fmfs);
1011   - maternalDeliverResult.setDeliveryMode(deliveryMode);
1012 1157  
1013   - if ("完好".equals(fmItem.getHyqk()) || "".equals(fmItem.getHyqk())) {
1014   - maternalDeliverResult.setPerinealCondition("full");
1015   - } else if ("会阴切开".equals(fmItem.getHyqk()) || "侧切".equals(fmItem.getHyqk())) {
1016   - maternalDeliverResult.setPerinealCondition("split");
1017   - }
1018   - if ("一度裂伤".equals(fmItem.getHyqk())) {
1019   - maternalDeliverResult.setSiLielevel(1);
1020   - } else if ("二度裂伤".equals(fmItem.getHyqk())) {
1021   - maternalDeliverResult.setSiLielevel(2);
1022   - } else if ("三度裂伤".equals(fmItem.getHyqk())) {
1023   - maternalDeliverResult.setSiLielevel(3);
1024   - }
1025   - if (StringUtils.isNotEmpty(fmItem.getChexxsxl())) {
1026   - maternalDeliverResult.settHloseBloodL(Double.parseDouble(fmItem.getChexxsxl()));
1027   - }
  1158 + }
  1159 + if (maps.size() > 0)
  1160 + {
  1161 + for(String key : maps.keySet())
  1162 + {
  1163 + List<MaternalDeliverResult.Baby> babys = new ArrayList<MaternalDeliverResult.Baby>();
1028 1164  
1029   - //儿童
1030   - MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby();
1031   - Map<String, String> as = new HashMap<>();
1032   - String pf1 = fmItem.getYfz();
1033   - String pf5 = fmItem.getWfz();
1034   - String pf10 = fmItem.getSfz();
1035   - if(pf1!=null){
1036   - as.put("pf1", pf1);
1037   - }
1038   - if(pf5!=null){
1039   - as.put("pf5", pf5);
1040   - }
1041   - if(pf10!=null){
1042   - as.put("pf10", pf10);
1043   - }
1044   - baby.setApgarScore(as);
1045   - baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0");
1046   - String babyHeight = fmItem.getSc();
1047   - String babyWeight = fmItem.getTz();
1048   - String baby_Asphyxiam = fmItem.getZx();
1049   - if(babyHeight!=null){
1050   - baby.setBabyHeight(babyHeight);//新生儿生长
1051   - }
1052   - if(babyWeight!=null){
1053   - baby.setBabyWeight(babyWeight);//新生儿重量
1054   - }
1055   - if(baby_Asphyxiam!=null){
1056   - baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟
1057   - }
1058   - baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形
  1165 + List<FmItem> items = maps.get(key);
  1166 + FmItem item = items.get(0);
1059 1167  
1060   - String baby_Pregnancy_Out = fmItem.getCcqk();
1061   - if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){
1062   - baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局
1063   - }
1064 1168  
1065   - baby.setDueTime(cssj);//分娩时间
1066   - babys.add(baby);
  1169 + Map deliveryMode = new HashMap(); //分娩方式
  1170 + if (!("活产".equals(item.getCcqk()) || "死胎".equals(item.getCcqk())))
  1171 + {
  1172 + continue;
  1173 + }
1067 1174  
  1175 + Date dueDate = fmt.parse(item.getCsrq());
  1176 + String dutTime = fmt1.format(dueDate);
1068 1177  
1069   - }catch (Exception e){
1070   - e.printStackTrace();
1071   - continue;
1072   - }
  1178 + maternalDeliverResult.setDueDate(fmt2.format(dueDate));
  1179 + maternalDeliverResult.setDueWeek(item.getRc());
  1180 + maternalDeliverResult.setTireNumber(Integer.parseInt(item.getDjt()));
  1181 + //没有胎盘默认为1
  1182 + maternalDeliverResult.setPlacenta("1");
  1183 + String fmfs = "";
  1184 + if (item.getFmfs() != null && "剖宫产".equals(item.getFmfs()))
  1185 + {
  1186 + fmfs = FmTypeEnums.O1.getId();
  1187 + }
  1188 + else
  1189 + {
  1190 + fmfs = FmTypeEnums.O.getId();
  1191 + }
  1192 + deliveryMode.put("fmfs",fmfs);
  1193 + maternalDeliverResult.setDeliveryMode(deliveryMode);
1073 1194  
  1195 + if ("完好".equals(item.getHyqk()) || "".equals(item.getHyqk())) {
  1196 + maternalDeliverResult.setPerinealCondition("full");
  1197 + } else if ("会阴切开".equals(item.getHyqk()) || "侧切".equals(item.getHyqk())) {
  1198 + maternalDeliverResult.setPerinealCondition("split");
  1199 + }
  1200 + if ("一度裂伤".equals(item.getHyqk())) {
  1201 + maternalDeliverResult.setSiLielevel(1);
  1202 + } else if ("二度裂伤".equals(item.getHyqk())) {
  1203 + maternalDeliverResult.setSiLielevel(2);
  1204 + } else if ("三度裂伤".equals(item.getHyqk())) {
  1205 + maternalDeliverResult.setSiLielevel(3);
  1206 + }
  1207 + if (StringUtils.isNotEmpty(item.getChexxsxl())) {
  1208 + maternalDeliverResult.settHloseBloodL(Double.parseDouble(item.getChexxsxl()));
  1209 + }
1074 1210  
1075   - }
1076   - maternalDeliverResult.setBabies(babys);
1077   - }
  1211 + for (FmItem fmItem : items)
  1212 + {
  1213 + System.out.println("多胎:"+fmItem);
1078 1214  
  1215 + //儿童
  1216 + MaternalDeliverResult.Baby baby = maternalDeliverResult.new Baby();
  1217 + Map<String, String> as = new HashMap<>();
  1218 + String pf1 = fmItem.getYfz();
  1219 + String pf5 = fmItem.getWfz();
  1220 + String pf10 = fmItem.getSfz();
  1221 + if(pf1!=null){
  1222 + as.put("pf1", pf1);
  1223 + }
  1224 + if(pf5!=null){
  1225 + as.put("pf5", pf5);
  1226 + }
  1227 + if(pf10!=null){
  1228 + as.put("pf10", pf10);
  1229 + }
  1230 + baby.setApgarScore(as);
  1231 + baby.setBabyGender("男".equals(fmItem.getYexb()) ? "1" : "0");
  1232 + String babyHeight = fmItem.getSc();
  1233 + String babyWeight = fmItem.getTz();
  1234 + String baby_Asphyxiam = fmItem.getZx();
  1235 + if(babyHeight!=null){
  1236 + baby.setBabyHeight(babyHeight);//新生儿生长
  1237 + }
  1238 + if(babyWeight!=null){
  1239 + baby.setBabyWeight(babyWeight);//新生儿重量
  1240 + }
  1241 + if(baby_Asphyxiam!=null){
  1242 + baby.setAsphyxiaM(baby_Asphyxiam); //窒息分钟
  1243 + }
  1244 + baby.setDeformity((fmItem.getJx()==null?0:1)); //畸形 0非畸形 1畸形
1079 1245  
1080   - }else {
1081   - return null;
1082   - }
1083   - }catch (SQLException e){
  1246 + String baby_Pregnancy_Out = fmItem.getCcqk();
  1247 + if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){
  1248 + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName(fmItem.getCcqk())); // 妊娠结局
  1249 + }
  1250 +
  1251 + baby.setDueTime(dutTime);//分娩时间
  1252 + babys.add(baby);
  1253 +
  1254 + }
  1255 + maternalDeliverResult.setBabies(babys);
  1256 + }
  1257 + }
  1258 + }
  1259 +// }
  1260 +// }
  1261 + }catch (Exception e){
1084 1262 e.printStackTrace();
1085 1263 }finally {
1086   - DbUtils.closeQuietly(conn);
  1264 +// DbUtils.closeQuietly(conn);
1087 1265 }
1088 1266  
1089 1267 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TestController.java View file @ 8f19b14
... ... @@ -1685,6 +1685,14 @@
1685 1685 }
1686 1686  
1687 1687  
  1688 + @RequestMapping("/qhdfm")
  1689 + @ResponseBody
  1690 + public MaternalDeliverResult qhdfm(String cardNo){
  1691 +
  1692 + return qhdfyFmService.queryFmPatient(cardNo);
  1693 + }
  1694 +
  1695 +
1688 1696 @RequestMapping("/test")
1689 1697 @ResponseBody
1690 1698 public String test(String code){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 8f19b14
... ... @@ -900,7 +900,11 @@
900 900 {
901 901 yunBookbuildingService.updateFilePath(filePath);
902 902 }
903   -
  903 + else if (filePath != null)
  904 + {
  905 + filePath.setPatientId(patient.getId());
  906 + yunBookbuildingService.addFilePath(filePath);
  907 + }
904 908  
905 909 if (yunRequest != null)
906 910 {