Commit 51997a84453fcbf480be37d6bdcd307f0f88890c

Authored by wtt
1 parent 2f55ad6c44

update

Showing 5 changed files with 564 additions and 3 deletions

platform-operate-api/src/main/java/com/lyms/hospitalapi/linchengfy/IlcFyFmService.java View file @ 51997a8
  1 +package com.lyms.hospitalapi.linchengfy;
  2 +
  3 +import com.lyms.hospitalapi.dzfy.Fm;
  4 +
  5 +import java.util.List;
  6 +
  7 +/**
  8 + * @Author: 武涛涛
  9 + * @Date: 2020/12/29 15:50
  10 + */
  11 +public interface IlcFyFmService {
  12 +
  13 + public void queryFmPatient(List <Fm> list);
  14 +
  15 +}
platform-operate-api/src/main/java/com/lyms/hospitalapi/linchengfy/LcfyFmService.java View file @ 51997a8
  1 +package com.lyms.hospitalapi.linchengfy;
  2 +
  3 +import com.lyms.hospitalapi.dzfy.Fm;
  4 +import com.lyms.hospitalapi.qhdfy.FmItem;
  5 +import com.lyms.platform.biz.service.PatientsService;
  6 +import com.lyms.platform.common.enums.FmTypeEnums;
  7 +import com.lyms.platform.common.enums.RenShenJieJuEnums;
  8 +import com.lyms.platform.common.enums.TpmcTypeEnums;
  9 +import com.lyms.platform.common.enums.YnEnums;
  10 +import com.lyms.platform.common.utils.DateUtil;
  11 +import com.lyms.platform.common.utils.ExceptionUtils;
  12 +import com.lyms.platform.common.utils.StringUtils;
  13 +import com.lyms.platform.operate.web.facade.BabyBookbuildingFacade;
  14 +import com.lyms.platform.operate.web.facade.MatDeliverFacade;
  15 +import com.lyms.platform.operate.web.facade.PatientServiceFacade;
  16 +import com.lyms.platform.operate.web.request.BabyBookbuildingAddRequest;
  17 +import com.lyms.platform.operate.web.request.MatDeliverAddRequest;
  18 +import com.lyms.platform.permission.model.Users;
  19 +import com.lyms.platform.permission.model.UsersQuery;
  20 +import com.lyms.platform.permission.service.UsersService;
  21 +import com.lyms.platform.pojo.MaternalDeliverModel;
  22 +import com.lyms.platform.pojo.Patients;
  23 +import com.lyms.platform.query.PatientsQuery;
  24 +import org.apache.commons.collections.CollectionUtils;
  25 +import org.springframework.beans.factory.annotation.Autowired;
  26 +import org.springframework.stereotype.Service;
  27 +
  28 +import java.text.DecimalFormat;
  29 +import java.text.ParseException;
  30 +import java.text.SimpleDateFormat;
  31 +import java.util.*;
  32 +
  33 +/**
  34 + * @Author: 武涛涛
  35 + * @Date: 2020/12/29 15:50
  36 + */
  37 +@Service("llcFyFmService")
  38 +public class LcfyFmService implements IlcFyFmService {
  39 +
  40 + @Autowired
  41 + private PatientsService patientsService;
  42 +
  43 + @Autowired
  44 + private MatDeliverFacade matDeliverFacade;
  45 +
  46 + @Autowired
  47 + private UsersService usersService;
  48 +
  49 + @Autowired
  50 + private BabyBookbuildingFacade babyBookbuildingFacade;
  51 +
  52 + @Autowired
  53 + private PatientServiceFacade patientServiceFacade;
  54 +
  55 + private static Map<Integer, String> ONE_ENUMS = new HashMap<>();
  56 +
  57 + private static Map<String, List> babyMap = new HashMap<>();
  58 +
  59 + private static final String HOSPITALID = "2100001296";
  60 + static {
  61 + ONE_ENUMS.put(0, "长");
  62 + ONE_ENUMS.put(1, "次");
  63 + ONE_ENUMS.put(2, "三");
  64 + ONE_ENUMS.put(3, "四");
  65 + ONE_ENUMS.put(4, "五");
  66 + ONE_ENUMS.put(5, "六");
  67 + ONE_ENUMS.put(6, "七");
  68 +
  69 +
  70 + List<String> b1 = new ArrayList<>();
  71 + b1.add("长女");
  72 + b1.add("次女");
  73 + babyMap.put("00", b1);
  74 +
  75 + List<String> b2 = new ArrayList<>();
  76 + b2.add("长子");
  77 + b2.add("次子");
  78 + babyMap.put("11", b2);
  79 +
  80 + List<String> b3 = new ArrayList<>();
  81 + b3.add("之子");
  82 + b3.add("之女");
  83 +
  84 + List<String> b4 = new ArrayList<>();
  85 + b4.add("之女");
  86 + b4.add("之子");
  87 + babyMap.put("01", b4);
  88 + babyMap.put("10", b3);
  89 + List<String> b5 = new ArrayList<>();
  90 + b5.add("之子");
  91 + List<String> b6 = new ArrayList<>();
  92 + b6.add("之女");
  93 +
  94 + babyMap.put("1", b5);
  95 + babyMap.put("0", b6);
  96 + }
  97 +
  98 + public void fmTimerWork() {
  99 + SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  100 + Date end = new Date(new Date().getTime()-1000*60*60);
  101 + Date start = new Date(end.getTime()-1000*60*60*2);
  102 + String startStr = fmt.format(start);
  103 + String endStr = fmt.format(end);
  104 + System.out.println("start=" + startStr + "end=" + endStr);
  105 +// queryFmPatient(startStr, endStr, null);
  106 + }
  107 +
  108 + public void syncByPhone(List<Fm> list) {
  109 + queryFmPatient(list);
  110 + }
  111 +
  112 +
  113 +
  114 + public void queryFmPatient(List<Fm> allList) {
  115 +
  116 + saveFm sfm = new saveFm(allList);
  117 + Thread t = new Thread(sfm);
  118 + t.start();
  119 +
  120 + }
  121 +
  122 + private List buildBabyName(List<Fm> items) {
  123 + String id = "";
  124 + if (items.size() > 2) {
  125 + int boyCount = 0;
  126 + int girlCount = 0;
  127 + List<String> l = new ArrayList<>();
  128 + for (int i = 0; i < items.size(); i++) {
  129 + Fm item = items.get(i);
  130 + if (org.apache.commons.lang.StringUtils.isNotEmpty(item.getBABY_SEX())) {
  131 + if ("男".equals(item.getBABY_SEX())) {
  132 + l.add(ONE_ENUMS.get(boyCount) + "子");
  133 + boyCount++;
  134 + } else if ("女".equals(item.getBABY_SEX())) {
  135 + l.add(ONE_ENUMS.get(girlCount) + "女");
  136 + girlCount++;
  137 + }
  138 + }
  139 + }
  140 + return l;
  141 + } else {
  142 + for (int i = 0; i < items.size(); i++) {
  143 + Fm item = items.get(i);
  144 + if (org.apache.commons.lang.StringUtils.isNotEmpty(item.getBABY_SEX())) {
  145 + if ("男".equals(item.getBABY_SEX()))
  146 + {
  147 + id += "1";
  148 + }
  149 + else if ("女".equals(item.getBABY_SEX()))
  150 + {
  151 + id += "0";
  152 + }
  153 +
  154 + }
  155 + }
  156 + return babyMap.get(id);
  157 + }
  158 + }
  159 +
  160 + public void buildBaby(FmItem item,Patients patInfo,Fm fm, Date dueDate, String babyName)
  161 + {
  162 + try{
  163 +
  164 + ExceptionUtils.catchException("buildBaby====");
  165 +
  166 + if ("死产".equals(fm.getBABY_PREGNANCY_OUT()))
  167 + {
  168 + return;
  169 + }
  170 +
  171 + UsersQuery usersQuery = new UsersQuery();
  172 + usersQuery.setYn(YnEnums.YES.getId());
  173 + usersQuery.setName("产科");
  174 + usersQuery.setOrgId(new Integer(Integer.parseInt(HOSPITALID)));
  175 + List<Users> users = usersService.queryUsers(usersQuery);
  176 +
  177 + BabyBookbuildingAddRequest request = new BabyBookbuildingAddRequest();
  178 + request.setHospitalId(HOSPITALID);
  179 +
  180 + request.setMommyName(fm.getNAME()); //母亲姓名
  181 + Date bir = patInfo.getBirth();
  182 + if(bir!=null){
  183 + try {
  184 + SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
  185 + Date birth = format.parse(bir.toString());
  186 + format = new SimpleDateFormat("yyyy-MM-dd");
  187 + request.setMommyBirthday(format.format(birth));
  188 + }catch (ParseException e)
  189 + {
  190 + ExceptionUtils.catchException(e,"孕妇生日解析异常");
  191 + }
  192 + }
  193 +
  194 + if (org.apache.commons.lang.StringUtils.isNotEmpty(fm.getIDCARD()))
  195 + {
  196 + request.setMommyCertificateTypeId("70ae1d93-2964-46bc-83fa-bec9ff605b1c"); //证件类型 (身份证号码)
  197 + request.setMommyCertificateNum(fm.getIDCARD()); //证件号
  198 + }
  199 + else if (StringUtils.isNotEmpty(fm.getPHONE()))
  200 + {
  201 + request.setMommyCertificateTypeId("57e1dcd3f0f02e7ca519d6c6"); //证件类型 (手机号码)
  202 + request.setMommyCertificateNum(fm.getPHONE()); //证件号
  203 + }
  204 +
  205 + request.setMommyPhone(fm.getPHONE());
  206 +
  207 + request.setBabyName(babyName);
  208 + request.setSex("男".equals(item.getYexb()) ? 1 : 0);
  209 +
  210 + request.setBabyBirthday(DateUtil.getyyyy_MM_dd(dueDate)); //生日
  211 +
  212 + if (StringUtils.isNotEmpty(fm.getDUE_WEEK())) {
  213 + String week = fm.getDUE_WEEK();
  214 +
  215 + try {
  216 + request.setDueWeek(Integer.parseInt(week)); //分娩孕周
  217 + }catch (Exception e)
  218 + {
  219 +
  220 + }
  221 + }
  222 +
  223 + String fmfs = "";
  224 + if (fm.getDELIVERY_MODE() != null && "剖宫产".equals(fm.getDELIVERY_MODE()))
  225 + {
  226 + fmfs = FmTypeEnums.O1.getId();
  227 + }
  228 + else
  229 + {
  230 + fmfs = FmTypeEnums.O.getId();
  231 + }
  232 +
  233 + request.setDueType(fmfs);//分娩方式
  234 + //request.setFetusCount(item.getDjt()); //第几胎
  235 + //request.setDueCount(item.getCjc());//第几产
  236 + String weight = fm.getSBABY_WEIGHT();
  237 + String height = fm.getSBABY_HEIGHT();
  238 + if(weight!=null){
  239 + DecimalFormat df = new DecimalFormat("#.00");
  240 + double w = Double.parseDouble(weight);
  241 + request.setBabyWeight(df.format(w/1000)); //体重
  242 + }
  243 + if(height!=null){
  244 + request.setBabyHeight(height); //身长
  245 + }
  246 +
  247 + Map<String,String> map = new HashMap<>();
  248 + String pf1 = fm.getSBABY_APGAR_SCORE_ONE();
  249 + String pf5 = fm.getSBABY_APGAR_SCORE_FIVE();
  250 + String pf10 = fm.getSBABY_APGAR_SCORE_TEN();
  251 + if(pf1!=null){
  252 + map.put("pf1", pf1);
  253 + }
  254 + if(pf5!=null){
  255 + map.put("pf5", pf5);
  256 + }
  257 + if(pf10!=null){
  258 + map.put("pf10", pf10);
  259 + }
  260 +
  261 + request.setApgarScore(map);
  262 + request.setDeliverOrg(HOSPITALID);
  263 +
  264 + request.setBuildDoctor(users.get(0).getId() + "");
  265 + request.setBuildDate(DateUtil.getyyyy_MM_dd(dueDate));
  266 + //request.setHighRisk("是".equals(item.getSfgw()) ? 1 : 0); ////是否高危 0 非高危 1高危
  267 + request.setMalformation((fm.getBABY_DEFORMITY() == null ? 0 : 1)); //畸形 0非畸形 1畸形
  268 + //request.setMalformation("无".equals(item.getJx()) ? 0 : 1); //畸形 0非畸形 1畸形
  269 +
  270 +// request.setServiceType(ServiceTypeEnums.STANDARD_SERVICE.getId()); //标准服务
  271 +// request.setServiceStatus(ServiceStatusEnums.STANDARD_OPEN.getId()); //开通
  272 +
  273 + /*if (patInfo != null && StringUtils.isNotEmpty(fm.getBHNUM()))
  274 + {
  275 + Map<String,Object> diags = dzfyHisService.queryHisBabyDiagnosis(fm.getBHNUM());
  276 + if (diags != null && diags.size() > 0)
  277 + {
  278 + request.setBlNo(fm.getBHNUM());
  279 + request.setBabyDiagnosis(diags.get("diagnosisItem") == null ? "" : diags.get("diagnosisItem").toString());
  280 + }
  281 + }*/
  282 +
  283 + //标准服务开通
  284 + request.setSerInfos(patientServiceFacade.defaultServiceOpen());
  285 +
  286 + babyBookbuildingFacade.addBabyBookbuilding(request, users.get(0).getId());
  287 +
  288 + }catch (Exception e)
  289 + {
  290 + ExceptionUtils.catchException(e, "buildBaby exception");
  291 + e.printStackTrace();
  292 + }
  293 + }
  294 +
  295 + public class saveFm implements Runnable{
  296 +
  297 + private List<Fm> allList;
  298 +
  299 + public saveFm(List<Fm> list){
  300 + this.allList=list;
  301 + }
  302 +
  303 + public void run(){
  304 +
  305 + SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  306 + try {
  307 +
  308 + System.out.println("fm=" + allList.toString());
  309 + int a =0;//用来判断是否建了儿童档案,如果建了儿童档案就不保存分娩记录
  310 + int count = 0;
  311 + List<Users> users = new ArrayList<Users>();
  312 +
  313 + Date dueDate = null;
  314 + List<MatDeliverAddRequest.Baby> babies = new ArrayList<>();
  315 + MatDeliverAddRequest deliverAddRequest = new MatDeliverAddRequest();
  316 + for(Fm allFm:allList){
  317 + a=0;
  318 + count=0;
  319 + System.out.println("0-------------"+allFm.getBABY_PREGNANCY_OUT());
  320 + if (!"1".equals(allFm.getBABY_PREGNANCY_OUT()))
  321 + {
  322 + continue;
  323 + }
  324 + if (StringUtils.isEmpty(allFm.getPHONE()) && StringUtils.isEmpty(allFm.getIDCARD()))
  325 + {
  326 + continue;
  327 + }
  328 +
  329 + PatientsQuery query = new PatientsQuery();
  330 + query.setYn(YnEnums.YES.getId());
  331 + query.setType(1); //孕妇
  332 + query.setDueStatus(0); //未终止妊娠
  333 + String[] strs = new String[]{allFm.getPHONE(),allFm.getIDCARD()};
  334 + System.out.println("1----------"+strs);
  335 + query.setPc(strs);
  336 +
  337 + //查询该孕妇是否在孕产婴系统中建档
  338 + List<Patients> patientses = patientsService.queryPatient(query);
  339 + System.out.println("2----------"+patientses.size());
  340 +
  341 + Patients patient = new Patients();
  342 + if(CollectionUtils.isNotEmpty(patientses)){
  343 + ExceptionUtils.catchException("patientses"+patientses);
  344 + patient = patientses.get(0);
  345 + UsersQuery usersQuery = new UsersQuery();
  346 + usersQuery.setYn(YnEnums.YES.getId());
  347 + usersQuery.setOrgId(new Integer(Integer.parseInt(HOSPITALID)));
  348 + usersQuery.setName("产科");
  349 + users = usersService.queryUsers(usersQuery);
  350 + System.out.println("3----------"+users.size());
  351 +
  352 + if (CollectionUtils.isNotEmpty(users) && users.get(0).getId() != null) {
  353 +
  354 + Date dateTime = fmt.parse(allFm.getBABY_DELIVERY_TIME());
  355 + if(dateTime!=null){
  356 + if (!StringUtils.isNotEmpty(allFm.getBABY_DELIVERY_TIME().toString())) {
  357 + continue;
  358 + }else{
  359 + dueDate = dateTime;
  360 + }
  361 + }else{
  362 + continue;
  363 + }
  364 +
  365 + Map<String, Map<String,String>> map = new HashMap<>();
  366 + Map<String, String> map1 = new HashMap<>();
  367 + Map<String, String> map2 = new HashMap<>();
  368 + Map<String, String> map3 = new HashMap<>();
  369 + Map<String, String> totalMap = new HashMap<>();
  370 +
  371 + Integer prod_Process_One = allFm.getPROD_PROCESS_ONE();
  372 + Integer prod_Process_Two = allFm.getPROD_PROCESS_TWO();
  373 + Integer prod_Process_Three = allFm.getPROD_PROCESS_THREE();
  374 + if(prod_Process_One!=null){
  375 + map1.put("h",String.valueOf(prod_Process_One.intValue()/60));
  376 + map1.put("m",String.valueOf(prod_Process_One.intValue()%60));
  377 + map.put("one", map1);
  378 + }
  379 + if(prod_Process_Two!=null){
  380 + map2.put("h",String.valueOf(prod_Process_Two.intValue()/60));
  381 + map2.put("m",String.valueOf(prod_Process_Two.intValue()%60));
  382 + map.put("two",map2);
  383 + }
  384 + if(prod_Process_Three!=null){
  385 + map3.put("h",String.valueOf(prod_Process_Three.intValue()/60));
  386 + map3.put("m",String.valueOf(prod_Process_Three.intValue()%60));
  387 + map.put("three",map3);
  388 + }
  389 +
  390 + /* int hProcess = Integer.parseInt(allFm.getTOTAL_PROCESS())/60;//总产程小时数
  391 + int mProcess = Integer.parseInt(allFm.getTOTAL_PROCESS())%60;//总产程分钟数
  392 + totalMap.put("h",String.valueOf(hProcess));
  393 + totalMap.put("m",String.valueOf(mProcess));*/
  394 +
  395 + deliverAddRequest.setProdprocess(map);
  396 + deliverAddRequest.setTotalprocess(totalMap);
  397 + System.out.println("4----------"+allFm.getDELIVER_DOCTOR());
  398 +
  399 + deliverAddRequest.setDeliverDoctor(allFm.getDELIVER_DOCTOR());
  400 + deliverAddRequest.setDueDate(DateUtil.getyyyy_MM_dd(dueDate));
  401 + deliverAddRequest.setParentId(patient.getId());
  402 + deliverAddRequest.setPid(patient.getPid());
  403 + deliverAddRequest.setOperationCause("-");
  404 + String week = "";
  405 + if (StringUtils.isNotEmpty(allFm.getDUE_WEEK())) {
  406 +
  407 + week = allFm.getDUE_WEEK() + "周";
  408 + if (StringUtils.isNotEmpty(allFm.getDUE_WEEK()) && StringUtils.isNotEmpty(allFm.getDUE_DAY()))
  409 + {
  410 + week += allFm.getDUE_DAY() + "天";
  411 + }
  412 +
  413 + deliverAddRequest.setDueWeek(week);
  414 + }
  415 +
  416 + deliverAddRequest.setTireNumber(allFm.getFETUS_NUM());// 胎数(之前赋值为死值1)
  417 + Integer placenta_Num = allFm.getPLACENTA_NUM();
  418 + if(placenta_Num!=null){
  419 + deliverAddRequest.setPlacenta(allFm.getPLACENTA_NUM().toString());// 胎盘(之前赋值为死值1)
  420 + }
  421 + if ("完好".equals(allFm.getPERINEAL_CONDITION()) || "".equals(allFm.getPERINEAL_CONDITION())) {
  422 + deliverAddRequest.setPerinealCondition("full");
  423 + } else if ("会阴切开".equals(allFm.getPERINEAL_CONDITION()) || "侧切".equals(allFm.getPERINEAL_CONDITION())) {
  424 + deliverAddRequest.setPerinealCondition("split");
  425 + }
  426 +
  427 + if ("一度裂伤".equals(allFm.getPERINEAL_CONDITION())) {
  428 + deliverAddRequest.setSiLielevel(1);
  429 + } else if ("二度裂伤".equals(allFm.getPERINEAL_CONDITION())) {
  430 + deliverAddRequest.setSiLielevel(2);
  431 + } else if ("三度裂伤".equals(allFm.getPERINEAL_CONDITION())) {
  432 + deliverAddRequest.setSiLielevel(3);
  433 + }
  434 +
  435 + Integer th_Lose = allFm.getTH_LOSE_BLOOD();
  436 + if(th_Lose!=null){
  437 + if (StringUtils.isNotEmpty(allFm.getTH_LOSE_BLOOD().toString())) {
  438 + deliverAddRequest.settHloseBloodL(Double.parseDouble(allFm.getTH_LOSE_BLOOD().toString()));
  439 + }
  440 + }
  441 +
  442 + Map deliveryMode = new HashMap(); //分娩方式
  443 +
  444 + String fmfs = "";
  445 + if (allFm.getDELIVERY_MODE() != null && "手术产".equals(allFm.getDELIVERY_MODE()))
  446 + {
  447 + fmfs = FmTypeEnums.O1.getId();
  448 + }
  449 + else
  450 + {
  451 + fmfs = FmTypeEnums.O.getId();
  452 + }
  453 + deliveryMode.put("fmfs",fmfs);
  454 + deliverAddRequest.setDeliveryMode(deliveryMode);
  455 + //胎盘信息
  456 + List<MaternalDeliverModel.ExtPlacenta> extPlacentas = new ArrayList<>();
  457 + MaternalDeliverModel.ExtPlacenta extPlacenta = new MaternalDeliverModel.ExtPlacenta();
  458 + String tpmcType = ""; //胎盘娩出方式
  459 + if ("手术产".equals(allFm.getTMCTYPE()) || "手取胎盘".equals(allFm.getTMCTYPE())) {
  460 + tpmcType = TpmcTypeEnums.O2.getId();
  461 + } else if ("自然产出".equals(allFm.getTMCTYPE()) || "自然娩出".equals(allFm.getTMCTYPE())) {
  462 + tpmcType = TpmcTypeEnums.O.getId();
  463 + }
  464 + extPlacenta.setTpmcType(tpmcType);
  465 + extPlacentas.add(extPlacenta);
  466 + deliverAddRequest.setExtPlacentas(extPlacentas);
  467 +
  468 +
  469 + //儿童
  470 + MatDeliverAddRequest.Baby baby = new MatDeliverAddRequest.Baby();
  471 + baby.setBabyWeight(allFm.getBABY_WEIGHT()==null?null:allFm.getBABY_WEIGHT().toString());
  472 + Map<String, String> as = new HashMap<>();
  473 + String pf1 = allFm.getSBABY_APGAR_SCORE_ONE();
  474 + String pf5 = allFm.getSBABY_APGAR_SCORE_FIVE();
  475 + String pf10 = allFm.getSBABY_APGAR_SCORE_TEN();
  476 + if(pf1!=null){
  477 + as.put("pf1", allFm.getSBABY_APGAR_SCORE_ONE());
  478 + }
  479 + if(pf5!=null){
  480 + as.put("pf5", allFm.getSBABY_APGAR_SCORE_FIVE());
  481 + }
  482 + if(pf10!=null){
  483 + as.put("pf10", allFm.getSBABY_APGAR_SCORE_TEN());
  484 + }
  485 +
  486 +
  487 + baby.setApgarScore(as);
  488 + baby.setBabyGender("男".equals(allFm.getBABY_SEX()) ? "1" : "0");
  489 + String babyHeight = allFm.getSBABY_HEIGHT();
  490 + String babyWeight = allFm.getSBABY_WEIGHT();
  491 + Integer baby_Asphyxiam = allFm.getBABY_ASPHYXIAM();
  492 + if(babyHeight!=null){
  493 + baby.setBabyHeight(allFm.getSBABY_HEIGHT());//新生儿生长
  494 + }
  495 + if(babyWeight!=null){
  496 + baby.setBabyWeight(allFm.getSBABY_WEIGHT());//新生儿重量
  497 + }
  498 + if(baby_Asphyxiam!=null){
  499 + baby.setAsphyxiaM(allFm.getBABY_ASPHYXIAM().toString()); //窒息分钟
  500 + }
  501 +
  502 + baby.setDeformity((allFm.getBABY_DEFORMITY()==null?0:1)); //畸形 0非畸形 1畸形
  503 +
  504 + /* String baby_Pregnancy_Out = allFm.getBABY_PREGNANCY_OUT()=="1"?"活产":"";
  505 + if(baby_Pregnancy_Out!=null && StringUtils.isNotEmpty(baby_Pregnancy_Out)){
  506 + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName("活产")); // 妊娠结局
  507 + }*/
  508 +
  509 + System.out.println("5-------------"+allFm.getBABY_PREGNANCY_OUT()=="1"?"活产":"");
  510 + baby.setPregnancyOut(RenShenJieJuEnums.getIdByName("活产")); // 妊娠结局
  511 +
  512 + baby.setDueTime(fmt.format(dueDate));//分娩时间
  513 + babies.add(baby);
  514 +
  515 + }
  516 + }
  517 + }
  518 +
  519 + if(a==0){
  520 + deliverAddRequest.setBabies(babies);
  521 + deliverAddRequest.setFmHospital(HOSPITALID); //设置为临城
  522 + ExceptionUtils.catchException("deliverAddRequest===" + deliverAddRequest);
  523 + if(users!=null && users.size()>0){
  524 + matDeliverFacade.addOrUpdateMatDeliver(deliverAddRequest, users.get(0).getId());
  525 + }
  526 + }
  527 +
  528 + } catch (Exception e) {
  529 + ExceptionUtils.catchException(e, "sql执行异常");
  530 + e.printStackTrace();
  531 + }
  532 +
  533 + }
  534 + }
  535 +
  536 +
  537 +
  538 +}
platform-operate-api/src/main/java/com/lyms/hospitalapi/nanhe/NhfyFmService.java View file @ 51997a8
... ... @@ -467,6 +467,7 @@
467 467  
468 468 //儿童
469 469 MatDeliverAddRequest.Baby baby = new MatDeliverAddRequest.Baby();
  470 + baby.setBabyWeight(allFm.getBABY_WEIGHT()==null?null:allFm.getBABY_WEIGHT().toString());
470 471 Map<String, String> as = new HashMap<>();
471 472 String pf1 = allFm.getSBABY_APGAR_SCORE_ONE();
472 473 String pf5 = allFm.getSBABY_APGAR_SCORE_FIVE();
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/FmController.java View file @ 51997a8
1 1 package com.lyms.platform.operate.web.controller;
2 2  
3 3 import com.lyms.hospitalapi.dzfy.Fm;
  4 +import com.lyms.hospitalapi.linchengfy.LcfyFmService;
4 5 import com.lyms.hospitalapi.lpfy.IlpFyFmService;
5 6 import com.lyms.hospitalapi.nanhe.InhFyFmService;
6   -import com.lyms.platform.common.result.BaseResponse;
7 7 import org.springframework.beans.factory.annotation.Autowired;
8 8 import org.springframework.stereotype.Controller;
9 9 import org.springframework.web.bind.annotation.RequestBody;
... ... @@ -27,6 +27,11 @@
27 27 @Autowired
28 28 private InhFyFmService lnhFyFmService;
29 29  
  30 + @Autowired
  31 + private LcfyFmService llcFyFmService;
  32 +
  33 +
  34 +
30 35 @RequestMapping(method = RequestMethod.POST, value = "/saveFmData")
31 36 @ResponseBody
32 37 public String saveFmData(@Valid @RequestBody List<Fm> models, HttpServletRequest httpServletRequest){
... ... @@ -35,6 +40,8 @@
35 40 lpfyFmService.queryFmPatient(models);
36 41 }if("41".equals(models.get(0).getVision())){
37 42 lnhFyFmService.queryFmPatient(models);
  43 + }if("43".equals(models.get(0).getVision())){
  44 + llcFyFmService.queryFmPatient(models);
38 45 }
39 46  
40 47  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabySieveFacede.java View file @ 51997a8
... ... @@ -499,7 +499,7 @@
499 499 map.put("pid", "1553");
500 500 String dshospitalId = XsescEnums.getYchospitalId(babySieveQhdModel.getSsHospital()).getDshospitalId();
501 501 map.put("ssHospital",dshospitalId);
502   - map.put("ssHospital","1623");//测试使用1623
  502 +// map.put("ssHospital","1623");//测试使用1623
503 503 try {
504 504 //新筛四病
505 505 if(StringUtils.isNotEmpty(babySieveQhdModel.getTestItem())){
... ... @@ -589,7 +589,7 @@
589 589 map.put("momName", babySieveQhdModel.getMomName());
590 590 String dshospitalId = XsescEnums.getYchospitalId(babySieveQhdModel.getSsHospital()).getDshospitalId();
591 591 map.put("ssHospital",dshospitalId);
592   - map.put("ssHospital","1623");//测试使用1623
  592 +// map.put("ssHospital","1623");//测试使用1623
593 593 map.put("phone",babySieveQhdModel.getPhone());
594 594 map.put("zhuYuanNum", babySieveQhdModel.getZhuYuanNum());
595 595 map.put("buruSum", babySieveQhdModel.getBuruSum());