Commit 60f8c5fb782eb0e43f50b79aedd55ad9a308f67c
1 parent
6ce307d810
Exists in
master
and in
6 other branches
产前诊断申请
Showing 2 changed files with 69 additions and 4 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/diagnosisFacaed.java
View file @
60f8c5f
| 1 | 1 | package com.lyms.platform.operate.web.facade; |
| 2 | 2 | |
| 3 | +import com.lyms.platform.biz.service.ApplyOrderService; | |
| 3 | 4 | import com.lyms.platform.biz.service.DiagnosisService; |
| 4 | 5 | import com.lyms.platform.biz.service.PatientsService; |
| 6 | +import com.lyms.platform.biz.service.SieveService; | |
| 5 | 7 | import com.lyms.platform.common.constants.ErrorCodeConstants; |
| 6 | 8 | import com.lyms.platform.common.enums.YnEnums; |
| 7 | 9 | import com.lyms.platform.common.result.BaseResponse; |
| 10 | +import com.lyms.platform.common.utils.JsonUtil; | |
| 8 | 11 | import com.lyms.platform.operate.web.result.DiagnosisResult; |
| 9 | 12 | import com.lyms.platform.operate.web.result.HighScoreResult; |
| 10 | 13 | import com.lyms.platform.permission.model.PatientService; |
| 11 | 14 | import com.lyms.platform.pojo.Patients; |
| 15 | +import com.lyms.platform.pojo.SieveApplyOrderModel; | |
| 16 | +import com.lyms.platform.pojo.SieveModel; | |
| 12 | 17 | import com.lyms.platform.query.PatientsQuery; |
| 18 | +import com.lyms.platform.query.SieveApplyOrderQuery; | |
| 19 | +import com.lyms.platform.query.SieveQuery; | |
| 13 | 20 | import org.apache.commons.collections.CollectionUtils; |
| 14 | 21 | import org.apache.commons.lang.StringUtils; |
| 15 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 16 | 23 | import org.springframework.stereotype.Component; |
| 17 | 24 | |
| 25 | +import java.util.ArrayList; | |
| 18 | 26 | import java.util.List; |
| 19 | 27 | |
| 20 | 28 | /** |
| ... | ... | @@ -33,6 +41,10 @@ |
| 33 | 41 | private OrganizationGroupsFacade groupsFacade; |
| 34 | 42 | @Autowired |
| 35 | 43 | private AntenatalExaminationFacade antenatalExaminationFacade; |
| 44 | + @Autowired | |
| 45 | + private ApplyOrderService applyOrderService; | |
| 46 | + @Autowired | |
| 47 | + private SieveService sieveService; | |
| 36 | 48 | |
| 37 | 49 | |
| 38 | 50 | /** |
| ... | ... | @@ -43,6 +55,7 @@ |
| 43 | 55 | * @return |
| 44 | 56 | */ |
| 45 | 57 | public BaseResponse queryDiagnosis(String cardNo, String vcCardNo, Integer userId){ |
| 58 | + | |
| 46 | 59 | String hospitalId = autoMatchFacade.getHospitalId(userId); |
| 47 | 60 | PatientsQuery patientsQuery = new PatientsQuery(); |
| 48 | 61 | patientsQuery.setHospitalId(hospitalId); |
| ... | ... | @@ -77,6 +90,44 @@ |
| 77 | 90 | HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); |
| 78 | 91 | DiagnosisResult diagnosisResult = new DiagnosisResult(); |
| 79 | 92 | if(null != pat){ |
| 93 | + SieveQuery sieveQuery = new SieveQuery(); | |
| 94 | + sieveQuery.setParentId(pat.getId()); | |
| 95 | + //查询产筛list | |
| 96 | + List<SieveModel> list = sieveService.queryList1(sieveQuery, "order"); | |
| 97 | + if(list != null && list.size() > 0){ | |
| 98 | + SieveModel sieveModel = list.get(0); | |
| 99 | + if(!"-".equals(sieveModel.getZtfx())) { | |
| 100 | + diagnosisResult.setIsCqSieve("1");//已筛查 | |
| 101 | + SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
| 102 | + sieveApplyOrderQuery.setParentId(pat.getId()); | |
| 103 | + sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); | |
| 104 | + List<SieveApplyOrderModel> applyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
| 105 | + List sList = new ArrayList(); | |
| 106 | + if(applyOrderModels != null && applyOrderModels.size() > 0){ | |
| 107 | + SieveApplyOrderModel sieveAppModel = applyOrderModels.get(0); | |
| 108 | + if (StringUtils.isNotEmpty(sieveAppModel.getCheckItem())) { | |
| 109 | + sList = JsonUtil.jkstr2Obj(sieveAppModel.getCheckItem(), List.class); | |
| 110 | + } | |
| 111 | + } | |
| 112 | + diagnosisResult.setSieveProject(sList); | |
| 113 | + if("0".equals(sieveModel.getZtfx())){ | |
| 114 | + diagnosisResult.setZtfx("0"); | |
| 115 | + diagnosisResult.setZtfeText("低风险"); | |
| 116 | + } | |
| 117 | + if("1".equals(sieveModel.getZtfx())){ | |
| 118 | + diagnosisResult.setZtfx("1"); | |
| 119 | + diagnosisResult.setZtfeText("临界值"); | |
| 120 | + } | |
| 121 | + if("2".equals(sieveModel.getZtfx())){ | |
| 122 | + diagnosisResult.setZtfx("2"); | |
| 123 | + diagnosisResult.setZtfeText("高风险"); | |
| 124 | + } | |
| 125 | + } | |
| 126 | + }else{ | |
| 127 | + diagnosisResult.setIsCqSieve("0");//未筛查 | |
| 128 | + } | |
| 129 | + | |
| 130 | + | |
| 80 | 131 | |
| 81 | 132 | } |
| 82 | 133 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/diagnosisResult.java
View file @
60f8c5f
| ... | ... | @@ -27,9 +27,10 @@ |
| 27 | 27 | private String collectDocterId;//采集医生 |
| 28 | 28 | private String sendDocterId;//送检医生 |
| 29 | 29 | private String collectHospitalId;//申请医院 |
| 30 | - private String isCqSieve;//是否申请了产前筛查 | |
| 31 | - private String sieveProject;//筛查项目 | |
| 30 | + private String isCqSieve;//是否申请了产前筛查(0,未产筛;1,已产筛) | |
| 31 | + private List sieveProject;//筛查项目 | |
| 32 | 32 | private String ztfx;//整体风险 |
| 33 | + private String ztfeText;//整体风险中文 | |
| 33 | 34 | |
| 34 | 35 | public String getId() { |
| 35 | 36 | return id; |
| 36 | 37 | |
| ... | ... | @@ -199,11 +200,11 @@ |
| 199 | 200 | this.isCqSieve = isCqSieve; |
| 200 | 201 | } |
| 201 | 202 | |
| 202 | - public String getSieveProject() { | |
| 203 | + public List getSieveProject() { | |
| 203 | 204 | return sieveProject; |
| 204 | 205 | } |
| 205 | 206 | |
| 206 | - public void setSieveProject(String sieveProject) { | |
| 207 | + public void setSieveProject(List sieveProject) { | |
| 207 | 208 | this.sieveProject = sieveProject; |
| 208 | 209 | } |
| 209 | 210 | |
| ... | ... | @@ -213,6 +214,19 @@ |
| 213 | 214 | |
| 214 | 215 | public void setZtfx(String ztfx) { |
| 215 | 216 | this.ztfx = ztfx; |
| 217 | + } | |
| 218 | + | |
| 219 | + public String getZtfeText() { | |
| 220 | + return ztfeText; | |
| 221 | + } | |
| 222 | + | |
| 223 | + public void setZtfeText(String ztfeText) { | |
| 224 | + this.ztfeText = ztfeText; | |
| 225 | + } | |
| 226 | + | |
| 227 | + public DiagnosisResult con(){ | |
| 228 | + | |
| 229 | + return this; | |
| 216 | 230 | } |
| 217 | 231 | } |