Commit 274e151dc31d39d08f1947042fd50595ab3b1a21

Authored by cfl
1 parent 54d5ece5bc
Exists in master and in 2 other branches dev, luanping

波妞录入产检调试

Showing 3 changed files with 161 additions and 5 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java View file @ 274e151
... ... @@ -218,6 +218,8 @@
218 218 antExChuModelUpadte(model, antExChuModel, antExChuModel1);
219 219 } else if ("216".equals(antExChuModel.getHospitalId())) {
220 220 antExChuModelQHDUpadte(model, antExChuModel, antExChuModel1);
  221 + }else if("1000000016".equals(antExChuModel.getHospitalId())){ //秦皇岛第二医院
  222 + antExChuModelQHDDeyyUpadte(model, antExChuModel, antExChuModel1);
221 223 }
222 224 antExService.updateAntExChu(antExChuModel1, antExChuModel.getId());
223 225 }
... ... @@ -231,6 +233,8 @@
231 233 fuZhenUpdate(model, antenatalExaminationModel, antenatalExaminationModel1);
232 234 } else if ("216".equals(antenatalExaminationModel.getHospitalId())) {
233 235 fuZhenQHDUpdate(model, antenatalExaminationModel, antenatalExaminationModel1);
  236 + }else if("1000000016".equals(antenatalExaminationModel.getHospitalId())){
  237 + fuZhenQHDDeyyUpdate(model, antenatalExaminationModel, antenatalExaminationModel1);
234 238 }
235 239 antExService.updateOneAnt(antenatalExaminationModel1, antenatalExaminationModel.getId());
236 240 }
237 241  
... ... @@ -325,7 +329,35 @@
325 329  
326 330 }
327 331  
  332 + /**
  333 + * 秦皇岛第二医院更新复诊记录
  334 + * @param model
  335 + * @param antenatalExaminationModel
  336 + * @param antenatalExaminationModel1
  337 + */
  338 + private void fuZhenQHDDeyyUpdate(LisReportModel model, AntenatalExaminationModel antenatalExaminationModel, AntenatalExaminationModel antenatalExaminationModel1) {
  339 + if ("".equals(antenatalExaminationModel.getHemoglobin()) || antenatalExaminationModel.getHemoglobin() == null) {
  340 + antenatalExaminationModel1.setHemoglobin(getCodeValue(model, "58")); //血红蛋白
  341 + }
  342 + if ("".equals(antenatalExaminationModel.getUrineProtein()) || antenatalExaminationModel.getUrineProtein() == null) {
  343 + antenatalExaminationModel1.setUrineProtein(getCodeValue(model, "77")); //尿蛋白
  344 + }
  345 + if ("".equals(antenatalExaminationModel.getBloodSugar()) || antenatalExaminationModel.getBloodSugar() == null) {
  346 + antenatalExaminationModel1.setBloodSugar(getCodeValue(model, "837")); //血糖
  347 + }
  348 + if ("".equals(antenatalExaminationModel.getBloodSugar2()) || antenatalExaminationModel.getBloodSugar2() == null) {
  349 + antenatalExaminationModel1.setBloodSugar2(getCodeValue(model, "839")); // 血糖2
  350 + }
  351 + if ("".equals(antenatalExaminationModel.getBloodSugar3()) || antenatalExaminationModel.getBloodSugar3() == null) {
  352 + antenatalExaminationModel1.setBloodSugar3(getCodeValue(model, "840")); // 血糖3
  353 + }
  354 + if ("".equals(antenatalExaminationModel.getBloodSugar4()) || antenatalExaminationModel.getBloodSugar4() == null) {
  355 + antenatalExaminationModel1.setBloodSugar4(getCodeValue(model, "841")); // 血糖4
  356 + }
328 357  
  358 + }
  359 +
  360 +
329 361 /**
330 362 * 承德妇幼更新初诊记录
331 363 *
... ... @@ -670,6 +702,120 @@
670 702 //阴道分泌物
671 703 if ("".equals(antExChuModel.getYdqjd()) || antExChuModel.getYdqjd() == null) {//阴道清洁度
672 704 antExChuModel1.setYdqjd(getCodeValue(model, "QJD"));
  705 + }
  706 +
  707 + //甲状腺功能 FT3 FT4 TSH TpaAb TgAb A-TSHR 辅助检查没有该内容code
  708 +
  709 + }
  710 +
  711 +
  712 + /**
  713 + * 秦皇岛第二医院更新初诊记录
  714 + * @param model
  715 + * @param antExChuModel
  716 + * @param antExChuModel1
  717 + */
  718 + private void antExChuModelQHDDeyyUpadte(LisReportModel model, AntExChuModel antExChuModel, AntExChuModel antExChuModel1) {
  719 + if ("".equals(antExChuModel.getXhdb()) || antExChuModel.getXhdb() == null) {//血红蛋白
  720 + antExChuModel1.setXhdb(getCodeValue(model, "58"));
  721 + }
  722 + if ("".equals(antExChuModel.getBxbjs()) || antExChuModel.getBxbjs() == null) {//白细胞计数
  723 + antExChuModel1.setBxbjs(getCodeValue(model, "141"));
  724 + }
  725 + if ("".equals(antExChuModel.getPlatelet()) || antExChuModel.getPlatelet() == null) {//血小板
  726 + antExChuModel1.setPlatelet(getCodeValue(model, "63"));
  727 + }
  728 +
  729 + if ("".equals(antExChuModel.getNdb()) || antExChuModel.getNdb() == null) {//尿蛋白
  730 + antExChuModel1.setNdb(getCodeValue(model, "77"));
  731 + }
  732 + if ("".equals(antExChuModel.getNt()) || antExChuModel.getNt() == null) { //尿糖
  733 + antExChuModel1.setNt(getCodeValue(model, "356"));
  734 + }
  735 + if ("".equals(antExChuModel.getUrineKetone()) || antExChuModel.getUrineKetone() == null) {//尿酮体
  736 + antExChuModel1.setUrineKetone(getCodeValue(model, "815"));
  737 + }
  738 + if ("".equals(antExChuModel.getBld()) || antExChuModel.getBld() == null) {//尿潜血
  739 + antExChuModel1.setBld(getCodeValue(model, "182"));
  740 + }
  741 +
  742 + if ("".equals(antExChuModel.getAbo()) || antExChuModel.getAbo() == null) {//血型
  743 + antExChuModel1.setAbo(getCodeValue(model, "1085"));
  744 + }
  745 + if ("".equals(antExChuModel.getRh()) || antExChuModel.getRh() == null) {//RH血型
  746 + antExChuModel1.setRh(getCodeValue(model, "1268"));
  747 +
  748 + if ("1000000016".equals(antExChuModel1.getHospitalId()) && "yin".equals(antExChuModel1.getRh()))
  749 + {
  750 + String risks = antExChuModel1.getHighrisk();
  751 + if ( StringUtils.isNotEmpty(risks) && !"[]".equals(risks)) {
  752 + List list2 = JsonUtil.toList(antExChuModel.getHighrisk(), List.class);
  753 + if (CollectionUtils.isNotEmpty(list2) && !list2.contains("5aab6d3d422b03d4ad2bf830"))
  754 + {
  755 + list2.add("5aab6d3d422b03d4ad2bf830");
  756 + antExChuModel1.setHighrisk(JsonUtil.array2JsonString(list2));
  757 + }
  758 + }
  759 +
  760 + }
  761 + }
  762 + if ("".equals(antExChuModel.getBloodSugar()) || antExChuModel.getBloodSugar() == null) {//血糖
  763 + antExChuModel1.setBloodSugar(getCodeValue(model, "837"));
  764 + }
  765 +
  766 + if ("".equals(antExChuModel.getXqgbzam()) || antExChuModel.getXqgbzam() == null) {//血清谷丙转氨酶
  767 + antExChuModel1.setXqgbzam(getCodeValue(model, "452"));
  768 + }
  769 + if ("".equals(antExChuModel.getXqgczam()) || antExChuModel.getXqgczam() == null) {//血清谷草转氨酶
  770 + antExChuModel1.setXqgczam(getCodeValue(model, "453"));
  771 + }
  772 +
  773 + if ("".equals(antExChuModel.getAlbumin()) || antExChuModel.getAlbumin() == null) {//白蛋白
  774 + antExChuModel1.setAlbumin(getCodeValue(model, "2"));
  775 + }
  776 + if ("".equals(antExChuModel.getTotalBilirubin()) || antExChuModel.getTotalBilirubin() == null) {//总胆红素
  777 + antExChuModel1.setTotalBilirubin(getCodeValue(model, "1331"));
  778 + }
  779 + if ("".equals(antExChuModel.getJhBilirubin()) || antExChuModel.getJhBilirubin() == null) {//结合胆红素
  780 + antExChuModel1.setJhBilirubin(getCodeValue(model, "6"));
  781 + }
  782 + if ("".equals(antExChuModel.getBg()) || antExChuModel.getBg() == null) {//丙肝
  783 + antExChuModel1.setBg(getCodeValue(model, "1079"));
  784 + }
  785 +
  786 + if ("".equals(antExChuModel.getYgbmky()) || antExChuModel.getYgbmky() == null) {//乙肝表面抗原
  787 + antExChuModel1.setYgbmky(getCodeValue(model, "1074"));
  788 + }
  789 + if ("".equals(antExChuModel.getYgbmkt()) || antExChuModel.getYgbmkt() == null) {//乙肝表面抗体
  790 + antExChuModel1.setYgbmkt(getCodeValue(model, "1075"));
  791 + }
  792 + if ("".equals(antExChuModel.getYgeky()) || antExChuModel.getYgeky() == null) {//乙肝e抗原
  793 + antExChuModel1.setYgeky(getCodeValue(model, "1076"));
  794 + }
  795 + if ("".equals(antExChuModel.getYgekt()) || antExChuModel.getYgekt() == null) {//乙肝e抗体
  796 + antExChuModel1.setYgekt(getCodeValue(model, "1077"));
  797 + }
  798 + if ("".equals(antExChuModel.getYghxkt()) || antExChuModel.getYghxkt() == null) {//乙肝核心抗体
  799 + antExChuModel1.setYghxkt(getCodeValue(model, "1078"));
  800 + }
  801 +
  802 + if ("".equals(antExChuModel.getXqjq()) || antExChuModel.getXqjq() == null) {//血清肌
  803 + antExChuModel1.setXqjq(getCodeValue(model, "1386"));
  804 + }
  805 + if ("".equals(antExChuModel.getXnsd()) || antExChuModel.getXnsd() == null) {//血尿素氮
  806 + antExChuModel1.setXnsd(getCodeValue(model, "187"));
  807 + }
  808 +
  809 + if ("".equals(antExChuModel.getSyjg()) || antExChuModel.getSyjg() == null) {//实验结果
  810 + antExChuModel1.setSyjg(getCodeValue(model, "TPAb"));
  811 + }
  812 + if ("".equals(antExChuModel.getHivkt()) || antExChuModel.getHivkt() == null) {//hit抗体检测
  813 + antExChuModel1.setHivkt(getCodeValue(model, "438"));
  814 + }
  815 +
  816 + //阴道分泌物
  817 + if ("".equals(antExChuModel.getYdqjd()) || antExChuModel.getYdqjd() == null) {//阴道清洁度
  818 + antExChuModel1.setYdqjd(getCodeValue(model, "696"));
673 819 }
674 820  
675 821 //甲状腺功能 FT3 FT4 TSH TpaAb TgAb A-TSHR 辅助检查没有该内容code
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/AntenatalExaminationController.java View file @ 274e151
... ... @@ -523,7 +523,7 @@
523 523 @RequestParam(value = "doctorId", required = false) String doctorId,
524 524 @RequestParam(value = "sieveType", required = false) String sieveType,
525 525 @RequestParam(value = "edema", required = false) String edema,
526   - @RequestParam(value = "riskFactor", required = false) List<String> riskFactor
  526 + @RequestParam(value = "riskFactor", required = false) String riskFactor
527 527 ) {
528 528 return antExRecordFacade.inputWxData(fuh, abdominalGirth, fhr,edema, pid, hospitalId, nextTime, doctorId,sieveType,riskFactor);
529 529 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ 274e151
... ... @@ -1760,13 +1760,15 @@
1760 1760 */
1761 1761 public BaseResponse inputWxData(String fuh, String abdominalGirth, String fhr,String edema, String pid,
1762 1762 String hospitalId, String nextTime, String doctorId,String sieveType,
1763   - List<String> riskFactor) {
  1763 + String riskFactor) {
1764 1764 WxMeasureInfoModel wxMeasureInfo = new WxMeasureInfoModel();
1765 1765 boolean falg = true;
1766 1766 if (StringUtils.isNotEmpty(pid) && StringUtils.isNotEmpty(hospitalId)) {
1767 1767 if (isOpenAutoSaveAntenatal(hospitalId) && !"216".equals(hospitalId)) {
  1768 + System.out.println("inputWxData enter 1");
1768 1769 List<AntenatalExaminationModel> examinationModel = mongoTemplate.find(Query.query(Criteria.where("pid").is(pid)), AntenatalExaminationModel.class);
1769 1770 if (CollectionUtils.isNotEmpty(examinationModel)) {
  1771 + System.out.println("inputWxData enter 2");
1770 1772 for (AntenatalExaminationModel model : examinationModel) {
1771 1773 if (StringUtils.isNotEmpty(DateUtil.getyyyy_MM_dd(model.getCheckDate())) &&
1772 1774 DateUtil.getyyyy_MM_dd(new Date()).equals(DateUtil.getyyyy_MM_dd(model.getCheckDate()))) {
... ... @@ -1790,7 +1792,7 @@
1790 1792 }
1791 1793 model.setCheckDoctor(doctorId);
1792 1794 model.setEdema(edema);
1793   - if(CollectionUtils.isNotEmpty(riskFactor)){
  1795 + if(StringUtils.isNotEmpty(riskFactor)){
1794 1796 model.setRiskFactor(JsonUtil.array2JsonString(riskFactor));
1795 1797 }
1796 1798 antenatalExaminationService.updateOneAnt(model, model.getId());
... ... @@ -1817,6 +1819,7 @@
1817 1819 }
1818 1820 }
1819 1821 if (falg) {
  1822 + System.out.println("inputWxData enter chuzhen");
1820 1823 //创建一条复诊记录
1821 1824 Patients patients = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(pid).and("hospitalId").is(hospitalId).and("type").is(1).and("yn").is(1)), Patients.class);
1822 1825 //当前医院没有档案,创建隐藏档案
... ... @@ -1835,6 +1838,7 @@
1835 1838 }
1836 1839 }
1837 1840 if (null != patients) {
  1841 + System.out.println("inputWxData enter patients");
1838 1842 AntExChuQuery antExChuQuery = new AntExChuQuery();
1839 1843 antExChuQuery.setYn(YnEnums.YES.getId());
1840 1844 antExChuQuery.setPid(patients.getPid());
... ... @@ -1842,6 +1846,7 @@
1842 1846 antExChuQuery.setCheckTimeEnd(DateUtil.addWeek(patients.getLastMenses(),42));
1843 1847 List<AntExChuModel> antExChuModels = antenatalExaminationService.queryAntExChu(antExChuQuery);
1844 1848 if (CollectionUtils.isNotEmpty(antExChuModels)) {
  1849 + System.out.println("inputWxData enter antExChuModels");
1845 1850 AntExChuModel antExChuModel = antExChuModels.get(0);
1846 1851  
1847 1852 AntExAddRequest antExAddRequest = new AntExAddRequest();
... ... @@ -1854,8 +1859,13 @@
1854 1859 antExAddRequest.setParentId(patients.getId());
1855 1860 antExAddRequest.setPid(pid);
1856 1861 //参数传过来高危因素,参数为准,否则先前的高危因素为准,否则档案上的高危因素为准
1857   - if(CollectionUtils.isNotEmpty(riskFactor)){
1858   - antExAddRequest.setRiskFactor(riskFactor);
  1862 + if(StringUtils.isNotEmpty(riskFactor)){
  1863 + String[] split = riskFactor.split(",");
  1864 + List<String> list = new ArrayList<>();
  1865 + for(String s : split){
  1866 + list.add(s);
  1867 + }
  1868 + antExAddRequest.setRiskFactor(list);
1859 1869 }else{
1860 1870 HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), true);
1861 1871 if (highScoreResult != null) {