Commit e5c4f7ba5a6ad19507e90a39601d39e545a3b56c
1 parent
cab56d9617
Exists in
master
and in
6 other branches
update
Showing 4 changed files with 406 additions and 406 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DiagnosisFacaed.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/diagnosisFacaed.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DiagnosisResult.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/diagnosisResult.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/DiagnosisFacaed.java
View file @
e5c4f7b
| 1 | +package com.lyms.platform.operate.web.facade; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.service.*; | |
| 4 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 5 | +import com.lyms.platform.common.enums.YnEnums; | |
| 6 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 7 | +import com.lyms.platform.common.result.BaseResponse; | |
| 8 | +import com.lyms.platform.common.utils.JsonUtil; | |
| 9 | +import com.lyms.platform.operate.web.result.DiagnosisResult; | |
| 10 | +import com.lyms.platform.operate.web.result.HighScoreResult; | |
| 11 | +import com.lyms.platform.permission.model.PatientService; | |
| 12 | +import com.lyms.platform.pojo.AntExChuModel; | |
| 13 | +import com.lyms.platform.pojo.Patients; | |
| 14 | +import com.lyms.platform.pojo.SieveApplyOrderModel; | |
| 15 | +import com.lyms.platform.pojo.SieveModel; | |
| 16 | +import com.lyms.platform.query.AntExChuQuery; | |
| 17 | +import com.lyms.platform.query.PatientsQuery; | |
| 18 | +import com.lyms.platform.query.SieveApplyOrderQuery; | |
| 19 | +import com.lyms.platform.query.SieveQuery; | |
| 20 | +import org.apache.commons.collections.CollectionUtils; | |
| 21 | +import org.apache.commons.lang.StringUtils; | |
| 22 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 23 | +import org.springframework.stereotype.Component; | |
| 24 | + | |
| 25 | +import java.util.ArrayList; | |
| 26 | +import java.util.List; | |
| 27 | + | |
| 28 | +/** | |
| 29 | + * Created by Administrator on 2018/9/11. | |
| 30 | + */ | |
| 31 | +@Component | |
| 32 | +public class DiagnosisFacaed { | |
| 33 | + | |
| 34 | + @Autowired | |
| 35 | + private DiagnosisService diagnosisService; | |
| 36 | + @Autowired | |
| 37 | + private AutoMatchFacade autoMatchFacade; | |
| 38 | + @Autowired | |
| 39 | + private PatientsService patientsService; | |
| 40 | + @Autowired | |
| 41 | + private OrganizationGroupsFacade groupsFacade; | |
| 42 | + @Autowired | |
| 43 | + private AntenatalExaminationFacade antenatalExaminationFacade; | |
| 44 | + @Autowired | |
| 45 | + private ApplyOrderService applyOrderService; | |
| 46 | + @Autowired | |
| 47 | + private SieveService sieveService; | |
| 48 | + @Autowired | |
| 49 | + private AntenatalExaminationService antenatalExaminationService; | |
| 50 | + | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * 产前诊断申请 | |
| 54 | + * @param cardNo | |
| 55 | + * @param vcCardNo | |
| 56 | + * @param userId | |
| 57 | + * @return | |
| 58 | + */ | |
| 59 | + public BaseResponse queryDiagnosis(String cardNo, String vcCardNo, Integer userId){ | |
| 60 | + | |
| 61 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 62 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
| 63 | + patientsQuery.setHospitalId(hospitalId); | |
| 64 | + patientsQuery.setYn(YnEnums.YES.getId()); | |
| 65 | + if (StringUtils.isNotEmpty(cardNo)) { | |
| 66 | + patientsQuery.setPhoneOrCert(cardNo); | |
| 67 | + } else if (StringUtils.isNotEmpty(vcCardNo)) { | |
| 68 | + patientsQuery.setVcCardNo(vcCardNo); | |
| 69 | + } | |
| 70 | + List<Patients> localPatients = patientsService.queryPatient(patientsQuery); | |
| 71 | + Patients pat = null; | |
| 72 | + if (CollectionUtils.isNotEmpty(localPatients)) { | |
| 73 | + pat = localPatients.get(0); | |
| 74 | + } else { | |
| 75 | + patientsQuery.setHospitalId(null); | |
| 76 | + List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); | |
| 77 | + if (CollectionUtils.isNotEmpty(areaPatients)) { | |
| 78 | + pat = areaPatients.get(0); | |
| 79 | + if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
| 80 | + //建立隐藏档案 | |
| 81 | + String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); | |
| 82 | + | |
| 83 | + pat = patientsService.findOnePatientById(id); | |
| 84 | + } else { | |
| 85 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
| 86 | + } | |
| 87 | + }else{ | |
| 88 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
| 89 | + } | |
| 90 | + } | |
| 91 | + | |
| 92 | + HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
| 93 | + DiagnosisResult diagnosisResult = new DiagnosisResult(); | |
| 94 | + if(null != pat){ | |
| 95 | + SieveQuery sieveQuery = new SieveQuery(); | |
| 96 | + sieveQuery.setParentId(pat.getId()); | |
| 97 | + //查询产筛list | |
| 98 | + List<SieveModel> list = sieveService.queryList1(sieveQuery, "order"); | |
| 99 | + if(list != null && list.size() > 0){ | |
| 100 | + SieveModel sieveModel = list.get(0); | |
| 101 | + if(!"-".equals(sieveModel.getZtfx())) { | |
| 102 | + diagnosisResult.setIsCqSieve("1");//已筛查 | |
| 103 | + SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
| 104 | + sieveApplyOrderQuery.setParentId(pat.getId()); | |
| 105 | + sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); | |
| 106 | + List<SieveApplyOrderModel> applyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
| 107 | + List sList = new ArrayList(); | |
| 108 | + if(applyOrderModels != null && applyOrderModels.size() > 0){ | |
| 109 | + SieveApplyOrderModel sieveAppModel = applyOrderModels.get(0); | |
| 110 | + if (StringUtils.isNotEmpty(sieveAppModel.getCheckItem())) { | |
| 111 | + sList = JsonUtil.jkstr2Obj(sieveAppModel.getCheckItem(), List.class); | |
| 112 | + } | |
| 113 | + } | |
| 114 | + diagnosisResult.setSieveProject(sList); | |
| 115 | + if("0".equals(sieveModel.getZtfx())){ | |
| 116 | + diagnosisResult.setZtfx("0"); | |
| 117 | + diagnosisResult.setZtfeText("低风险"); | |
| 118 | + } | |
| 119 | + if("1".equals(sieveModel.getZtfx())){ | |
| 120 | + diagnosisResult.setZtfx("1"); | |
| 121 | + diagnosisResult.setZtfeText("临界值"); | |
| 122 | + } | |
| 123 | + if("2".equals(sieveModel.getZtfx())){ | |
| 124 | + diagnosisResult.setZtfx("2"); | |
| 125 | + diagnosisResult.setZtfeText("高风险"); | |
| 126 | + } | |
| 127 | + } | |
| 128 | + }else{ | |
| 129 | + diagnosisResult.setIsCqSieve("0");//未筛查 | |
| 130 | + } | |
| 131 | + diagnosisResult.convertToResult(pat); | |
| 132 | + diagnosisResult.setRiskFactor(highScoreResult.getHighRisk()); | |
| 133 | + diagnosisResult.setRiskScore(highScoreResult.getScoreStr()); | |
| 134 | + AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 135 | + antExChuQuery.setParentId(pat.getId()); | |
| 136 | + antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 137 | + | |
| 138 | + List<AntExChuModel> aList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 139 | + if (CollectionUtils.isNotEmpty(aList)) { | |
| 140 | + AntExChuModel chuModel = aList.get(0); | |
| 141 | + diagnosisResult.setWeight(chuModel.getYqWeight()); | |
| 142 | + } | |
| 143 | + | |
| 144 | + } | |
| 145 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(diagnosisResult); | |
| 146 | + } | |
| 147 | + | |
| 148 | + | |
| 149 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/diagnosisFacaed.java
View file @
e5c4f7b
| 1 | -package com.lyms.platform.operate.web.facade; | |
| 2 | - | |
| 3 | -import com.lyms.platform.biz.service.*; | |
| 4 | -import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 5 | -import com.lyms.platform.common.enums.YnEnums; | |
| 6 | -import com.lyms.platform.common.result.BaseObjectResponse; | |
| 7 | -import com.lyms.platform.common.result.BaseResponse; | |
| 8 | -import com.lyms.platform.common.utils.JsonUtil; | |
| 9 | -import com.lyms.platform.operate.web.result.DiagnosisResult; | |
| 10 | -import com.lyms.platform.operate.web.result.HighScoreResult; | |
| 11 | -import com.lyms.platform.permission.model.PatientService; | |
| 12 | -import com.lyms.platform.pojo.AntExChuModel; | |
| 13 | -import com.lyms.platform.pojo.Patients; | |
| 14 | -import com.lyms.platform.pojo.SieveApplyOrderModel; | |
| 15 | -import com.lyms.platform.pojo.SieveModel; | |
| 16 | -import com.lyms.platform.query.AntExChuQuery; | |
| 17 | -import com.lyms.platform.query.PatientsQuery; | |
| 18 | -import com.lyms.platform.query.SieveApplyOrderQuery; | |
| 19 | -import com.lyms.platform.query.SieveQuery; | |
| 20 | -import org.apache.commons.collections.CollectionUtils; | |
| 21 | -import org.apache.commons.lang.StringUtils; | |
| 22 | -import org.springframework.beans.factory.annotation.Autowired; | |
| 23 | -import org.springframework.stereotype.Component; | |
| 24 | - | |
| 25 | -import java.util.ArrayList; | |
| 26 | -import java.util.List; | |
| 27 | - | |
| 28 | -/** | |
| 29 | - * Created by Administrator on 2018/9/11. | |
| 30 | - */ | |
| 31 | -@Component | |
| 32 | -public class DiagnosisFacaed { | |
| 33 | - | |
| 34 | - @Autowired | |
| 35 | - private DiagnosisService diagnosisService; | |
| 36 | - @Autowired | |
| 37 | - private AutoMatchFacade autoMatchFacade; | |
| 38 | - @Autowired | |
| 39 | - private PatientsService patientsService; | |
| 40 | - @Autowired | |
| 41 | - private OrganizationGroupsFacade groupsFacade; | |
| 42 | - @Autowired | |
| 43 | - private AntenatalExaminationFacade antenatalExaminationFacade; | |
| 44 | - @Autowired | |
| 45 | - private ApplyOrderService applyOrderService; | |
| 46 | - @Autowired | |
| 47 | - private SieveService sieveService; | |
| 48 | - @Autowired | |
| 49 | - private AntenatalExaminationService antenatalExaminationService; | |
| 50 | - | |
| 51 | - | |
| 52 | - /** | |
| 53 | - * 产前诊断申请 | |
| 54 | - * @param cardNo | |
| 55 | - * @param vcCardNo | |
| 56 | - * @param userId | |
| 57 | - * @return | |
| 58 | - */ | |
| 59 | - public BaseResponse queryDiagnosis(String cardNo, String vcCardNo, Integer userId){ | |
| 60 | - | |
| 61 | - String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 62 | - PatientsQuery patientsQuery = new PatientsQuery(); | |
| 63 | - patientsQuery.setHospitalId(hospitalId); | |
| 64 | - patientsQuery.setYn(YnEnums.YES.getId()); | |
| 65 | - if (StringUtils.isNotEmpty(cardNo)) { | |
| 66 | - patientsQuery.setPhoneOrCert(cardNo); | |
| 67 | - } else if (StringUtils.isNotEmpty(vcCardNo)) { | |
| 68 | - patientsQuery.setVcCardNo(vcCardNo); | |
| 69 | - } | |
| 70 | - List<Patients> localPatients = patientsService.queryPatient(patientsQuery); | |
| 71 | - Patients pat = null; | |
| 72 | - if (CollectionUtils.isNotEmpty(localPatients)) { | |
| 73 | - pat = localPatients.get(0); | |
| 74 | - } else { | |
| 75 | - patientsQuery.setHospitalId(null); | |
| 76 | - List<Patients> areaPatients = patientsService.queryPatient(patientsQuery); | |
| 77 | - if (CollectionUtils.isNotEmpty(areaPatients)) { | |
| 78 | - pat = areaPatients.get(0); | |
| 79 | - if (StringUtils.isNotEmpty(groupsFacade.findByCurrentUserId(hospitalId))) { | |
| 80 | - //建立隐藏档案 | |
| 81 | - String id = antenatalExaminationFacade.handHideBuild(pat.getPid(), pat.getId(), userId, 1); | |
| 82 | - | |
| 83 | - pat = patientsService.findOnePatientById(id); | |
| 84 | - } else { | |
| 85 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
| 86 | - } | |
| 87 | - }else{ | |
| 88 | - return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有档案,请建档后申请产筛"); | |
| 89 | - } | |
| 90 | - } | |
| 91 | - | |
| 92 | - HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(pat.getPid(), false); | |
| 93 | - DiagnosisResult diagnosisResult = new DiagnosisResult(); | |
| 94 | - if(null != pat){ | |
| 95 | - SieveQuery sieveQuery = new SieveQuery(); | |
| 96 | - sieveQuery.setParentId(pat.getId()); | |
| 97 | - //查询产筛list | |
| 98 | - List<SieveModel> list = sieveService.queryList1(sieveQuery, "order"); | |
| 99 | - if(list != null && list.size() > 0){ | |
| 100 | - SieveModel sieveModel = list.get(0); | |
| 101 | - if(!"-".equals(sieveModel.getZtfx())) { | |
| 102 | - diagnosisResult.setIsCqSieve("1");//已筛查 | |
| 103 | - SieveApplyOrderQuery sieveApplyOrderQuery = new SieveApplyOrderQuery(); | |
| 104 | - sieveApplyOrderQuery.setParentId(pat.getId()); | |
| 105 | - sieveApplyOrderQuery.setYn(YnEnums.YES.getId()); | |
| 106 | - List<SieveApplyOrderModel> applyOrderModels = applyOrderService.querySieveApplyOrderWithQuery(sieveApplyOrderQuery); | |
| 107 | - List sList = new ArrayList(); | |
| 108 | - if(applyOrderModels != null && applyOrderModels.size() > 0){ | |
| 109 | - SieveApplyOrderModel sieveAppModel = applyOrderModels.get(0); | |
| 110 | - if (StringUtils.isNotEmpty(sieveAppModel.getCheckItem())) { | |
| 111 | - sList = JsonUtil.jkstr2Obj(sieveAppModel.getCheckItem(), List.class); | |
| 112 | - } | |
| 113 | - } | |
| 114 | - diagnosisResult.setSieveProject(sList); | |
| 115 | - if("0".equals(sieveModel.getZtfx())){ | |
| 116 | - diagnosisResult.setZtfx("0"); | |
| 117 | - diagnosisResult.setZtfeText("低风险"); | |
| 118 | - } | |
| 119 | - if("1".equals(sieveModel.getZtfx())){ | |
| 120 | - diagnosisResult.setZtfx("1"); | |
| 121 | - diagnosisResult.setZtfeText("临界值"); | |
| 122 | - } | |
| 123 | - if("2".equals(sieveModel.getZtfx())){ | |
| 124 | - diagnosisResult.setZtfx("2"); | |
| 125 | - diagnosisResult.setZtfeText("高风险"); | |
| 126 | - } | |
| 127 | - } | |
| 128 | - }else{ | |
| 129 | - diagnosisResult.setIsCqSieve("0");//未筛查 | |
| 130 | - } | |
| 131 | - diagnosisResult.convertToResult(pat); | |
| 132 | - diagnosisResult.setRiskFactor(highScoreResult.getHighRisk()); | |
| 133 | - diagnosisResult.setRiskScore(highScoreResult.getScoreStr()); | |
| 134 | - AntExChuQuery antExChuQuery = new AntExChuQuery(); | |
| 135 | - antExChuQuery.setParentId(pat.getId()); | |
| 136 | - antExChuQuery.setYn(YnEnums.YES.getId()); | |
| 137 | - | |
| 138 | - List<AntExChuModel> aList = antenatalExaminationService.queryAntExChu(antExChuQuery); | |
| 139 | - if (CollectionUtils.isNotEmpty(aList)) { | |
| 140 | - AntExChuModel chuModel = aList.get(0); | |
| 141 | - diagnosisResult.setWeight(chuModel.getYqWeight()); | |
| 142 | - } | |
| 143 | - | |
| 144 | - } | |
| 145 | - return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(diagnosisResult); | |
| 146 | - } | |
| 147 | - | |
| 148 | - | |
| 149 | -} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/DiagnosisResult.java
View file @
e5c4f7b
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.utils.DateUtil; | |
| 4 | +import com.lyms.platform.common.utils.StringUtils; | |
| 5 | +import com.lyms.platform.pojo.Patients; | |
| 6 | + | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.List; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * Created by Administrator on 2018/9/11. | |
| 12 | + */ | |
| 13 | +public class DiagnosisResult { | |
| 14 | + | |
| 15 | + private String id; | |
| 16 | + private String parentId;//孕妇ID | |
| 17 | + private String name;//姓名 | |
| 18 | + private Integer age;//年龄 | |
| 19 | + private String dueWeek;//孕周 | |
| 20 | + private String yChanQi;//预产期 | |
| 21 | + private String phone;//手机号 | |
| 22 | + private List riskFactor;//高危因素 | |
| 23 | + private String riskScore;//高危评分 | |
| 24 | + private String remarks;//备注 | |
| 25 | + private String lastMenses;//末次月经 | |
| 26 | + private String weight;//体重 | |
| 27 | + private String birth;//出生日期 | |
| 28 | + private String mensStartDay;//月经周期开始天数 | |
| 29 | + private String mensEndDay;//月经周期结束天数 | |
| 30 | + private String mensStopStartDay;//月经停留开始天数 | |
| 31 | + private String mensStopEndDay;//月经停留结束天数 | |
| 32 | + private String collectDocterId;//采集医生 | |
| 33 | + private String sendDocterId;//送检医生 | |
| 34 | + private String collectHospitalId;//申请医院 | |
| 35 | + private String isCqSieve;//是否申请了产前筛查(0,未产筛;1,已产筛) | |
| 36 | + private List sieveProject;//筛查项目 | |
| 37 | + private String ztfx;//整体风险 | |
| 38 | + private String ztfeText;//整体风险中文 | |
| 39 | + | |
| 40 | + public String getId() { | |
| 41 | + return id; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setId(String id) { | |
| 45 | + this.id = id; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public String getParentId() { | |
| 49 | + return parentId; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setParentId(String parentId) { | |
| 53 | + this.parentId = parentId; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public String getName() { | |
| 57 | + return name; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setName(String name) { | |
| 61 | + this.name = name; | |
| 62 | + } | |
| 63 | + | |
| 64 | + public Integer getAge() { | |
| 65 | + return age; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setAge(Integer age) { | |
| 69 | + this.age = age; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public String getDueWeek() { | |
| 73 | + return dueWeek; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setDueWeek(String dueWeek) { | |
| 77 | + this.dueWeek = dueWeek; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getyChanQi() { | |
| 81 | + return yChanQi; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setyChanQi(String yChanQi) { | |
| 85 | + this.yChanQi = yChanQi; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getPhone() { | |
| 89 | + return phone; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setPhone(String phone) { | |
| 93 | + this.phone = phone; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public List getRiskFactor() { | |
| 97 | + return riskFactor; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setRiskFactor(List riskFactor) { | |
| 101 | + this.riskFactor = riskFactor; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public String getRiskScore() { | |
| 105 | + return riskScore; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setRiskScore(String riskScore) { | |
| 109 | + this.riskScore = riskScore; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public String getRemarks() { | |
| 113 | + return remarks; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setRemarks(String remarks) { | |
| 117 | + this.remarks = remarks; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getLastMenses() { | |
| 121 | + return lastMenses; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setLastMenses(String lastMenses) { | |
| 125 | + this.lastMenses = lastMenses; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public String getWeight() { | |
| 129 | + return weight; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setWeight(String weight) { | |
| 133 | + this.weight = weight; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public String getBirth() { | |
| 137 | + return birth; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setBirth(String birth) { | |
| 141 | + this.birth = birth; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public String getMensStartDay() { | |
| 145 | + return mensStartDay; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public void setMensStartDay(String mensStartDay) { | |
| 149 | + this.mensStartDay = mensStartDay; | |
| 150 | + } | |
| 151 | + | |
| 152 | + public String getMensEndDay() { | |
| 153 | + return mensEndDay; | |
| 154 | + } | |
| 155 | + | |
| 156 | + public void setMensEndDay(String mensEndDay) { | |
| 157 | + this.mensEndDay = mensEndDay; | |
| 158 | + } | |
| 159 | + | |
| 160 | + public String getMensStopStartDay() { | |
| 161 | + return mensStopStartDay; | |
| 162 | + } | |
| 163 | + | |
| 164 | + public void setMensStopStartDay(String mensStopStartDay) { | |
| 165 | + this.mensStopStartDay = mensStopStartDay; | |
| 166 | + } | |
| 167 | + | |
| 168 | + public String getMensStopEndDay() { | |
| 169 | + return mensStopEndDay; | |
| 170 | + } | |
| 171 | + | |
| 172 | + public void setMensStopEndDay(String mensStopEndDay) { | |
| 173 | + this.mensStopEndDay = mensStopEndDay; | |
| 174 | + } | |
| 175 | + | |
| 176 | + public String getCollectDocterId() { | |
| 177 | + return collectDocterId; | |
| 178 | + } | |
| 179 | + | |
| 180 | + public void setCollectDocterId(String collectDocterId) { | |
| 181 | + this.collectDocterId = collectDocterId; | |
| 182 | + } | |
| 183 | + | |
| 184 | + public String getSendDocterId() { | |
| 185 | + return sendDocterId; | |
| 186 | + } | |
| 187 | + | |
| 188 | + public void setSendDocterId(String sendDocterId) { | |
| 189 | + this.sendDocterId = sendDocterId; | |
| 190 | + } | |
| 191 | + | |
| 192 | + public String getCollectHospitalId() { | |
| 193 | + return collectHospitalId; | |
| 194 | + } | |
| 195 | + | |
| 196 | + public void setCollectHospitalId(String collectHospitalId) { | |
| 197 | + this.collectHospitalId = collectHospitalId; | |
| 198 | + } | |
| 199 | + | |
| 200 | + public String getIsCqSieve() { | |
| 201 | + return isCqSieve; | |
| 202 | + } | |
| 203 | + | |
| 204 | + public void setIsCqSieve(String isCqSieve) { | |
| 205 | + this.isCqSieve = isCqSieve; | |
| 206 | + } | |
| 207 | + | |
| 208 | + public List getSieveProject() { | |
| 209 | + return sieveProject; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void setSieveProject(List sieveProject) { | |
| 213 | + this.sieveProject = sieveProject; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public String getZtfx() { | |
| 217 | + return ztfx; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public void setZtfx(String ztfx) { | |
| 221 | + this.ztfx = ztfx; | |
| 222 | + } | |
| 223 | + | |
| 224 | + public String getZtfeText() { | |
| 225 | + return ztfeText; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public void setZtfeText(String ztfeText) { | |
| 229 | + this.ztfeText = ztfeText; | |
| 230 | + } | |
| 231 | + | |
| 232 | + public DiagnosisResult convertToResult(Patients patient){ | |
| 233 | + setName(patient.getUsername()); | |
| 234 | + try{ | |
| 235 | + if (null != patient.getBirth()) { | |
| 236 | + setAge(DateUtil.getAge(patient.getBirth())); | |
| 237 | + } | |
| 238 | + }catch (Exception e){ | |
| 239 | + e.printStackTrace(); | |
| 240 | + } | |
| 241 | + if (null != patient.getDueDate()) { | |
| 242 | + setyChanQi(DateUtil.getyyyy_MM_dd(patient.getDueDate())); | |
| 243 | + } | |
| 244 | + if (null != patient.getLastMenses()) { | |
| 245 | + int days = DateUtil.daysBetween(patient.getLastMenses(), new Date()); | |
| 246 | + this.dueWeek = StringUtils.dueWeek(days); | |
| 247 | + | |
| 248 | + setLastMenses(DateUtil.getyyyy_MM_dd(patient.getLastMenses())); | |
| 249 | + } | |
| 250 | + setMensStartDay(patient.getMensStartDay()); | |
| 251 | + setMensEndDay(patient.getMensEndDay()); | |
| 252 | + setMensStopStartDay(patient.getMensStopStartDay()); | |
| 253 | + setMensStopEndDay(patient.getMensStopEndDay()); | |
| 254 | + | |
| 255 | + return this; | |
| 256 | + } | |
| 257 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/diagnosisResult.java
View file @
e5c4f7b
| 1 | -package com.lyms.platform.operate.web.result; | |
| 2 | - | |
| 3 | -import com.lyms.platform.common.utils.DateUtil; | |
| 4 | -import com.lyms.platform.common.utils.StringUtils; | |
| 5 | -import com.lyms.platform.pojo.Patients; | |
| 6 | - | |
| 7 | -import java.util.Date; | |
| 8 | -import java.util.List; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * Created by Administrator on 2018/9/11. | |
| 12 | - */ | |
| 13 | -public class DiagnosisResult { | |
| 14 | - | |
| 15 | - private String id; | |
| 16 | - private String parentId;//孕妇ID | |
| 17 | - private String name;//姓名 | |
| 18 | - private Integer age;//年龄 | |
| 19 | - private String dueWeek;//孕周 | |
| 20 | - private String yChanQi;//预产期 | |
| 21 | - private String phone;//手机号 | |
| 22 | - private List riskFactor;//高危因素 | |
| 23 | - private String riskScore;//高危评分 | |
| 24 | - private String remarks;//备注 | |
| 25 | - private String lastMenses;//末次月经 | |
| 26 | - private String weight;//体重 | |
| 27 | - private String birth;//出生日期 | |
| 28 | - private String mensStartDay;//月经周期开始天数 | |
| 29 | - private String mensEndDay;//月经周期结束天数 | |
| 30 | - private String mensStopStartDay;//月经停留开始天数 | |
| 31 | - private String mensStopEndDay;//月经停留结束天数 | |
| 32 | - private String collectDocterId;//采集医生 | |
| 33 | - private String sendDocterId;//送检医生 | |
| 34 | - private String collectHospitalId;//申请医院 | |
| 35 | - private String isCqSieve;//是否申请了产前筛查(0,未产筛;1,已产筛) | |
| 36 | - private List sieveProject;//筛查项目 | |
| 37 | - private String ztfx;//整体风险 | |
| 38 | - private String ztfeText;//整体风险中文 | |
| 39 | - | |
| 40 | - public String getId() { | |
| 41 | - return id; | |
| 42 | - } | |
| 43 | - | |
| 44 | - public void setId(String id) { | |
| 45 | - this.id = id; | |
| 46 | - } | |
| 47 | - | |
| 48 | - public String getParentId() { | |
| 49 | - return parentId; | |
| 50 | - } | |
| 51 | - | |
| 52 | - public void setParentId(String parentId) { | |
| 53 | - this.parentId = parentId; | |
| 54 | - } | |
| 55 | - | |
| 56 | - public String getName() { | |
| 57 | - return name; | |
| 58 | - } | |
| 59 | - | |
| 60 | - public void setName(String name) { | |
| 61 | - this.name = name; | |
| 62 | - } | |
| 63 | - | |
| 64 | - public Integer getAge() { | |
| 65 | - return age; | |
| 66 | - } | |
| 67 | - | |
| 68 | - public void setAge(Integer age) { | |
| 69 | - this.age = age; | |
| 70 | - } | |
| 71 | - | |
| 72 | - public String getDueWeek() { | |
| 73 | - return dueWeek; | |
| 74 | - } | |
| 75 | - | |
| 76 | - public void setDueWeek(String dueWeek) { | |
| 77 | - this.dueWeek = dueWeek; | |
| 78 | - } | |
| 79 | - | |
| 80 | - public String getyChanQi() { | |
| 81 | - return yChanQi; | |
| 82 | - } | |
| 83 | - | |
| 84 | - public void setyChanQi(String yChanQi) { | |
| 85 | - this.yChanQi = yChanQi; | |
| 86 | - } | |
| 87 | - | |
| 88 | - public String getPhone() { | |
| 89 | - return phone; | |
| 90 | - } | |
| 91 | - | |
| 92 | - public void setPhone(String phone) { | |
| 93 | - this.phone = phone; | |
| 94 | - } | |
| 95 | - | |
| 96 | - public List getRiskFactor() { | |
| 97 | - return riskFactor; | |
| 98 | - } | |
| 99 | - | |
| 100 | - public void setRiskFactor(List riskFactor) { | |
| 101 | - this.riskFactor = riskFactor; | |
| 102 | - } | |
| 103 | - | |
| 104 | - public String getRiskScore() { | |
| 105 | - return riskScore; | |
| 106 | - } | |
| 107 | - | |
| 108 | - public void setRiskScore(String riskScore) { | |
| 109 | - this.riskScore = riskScore; | |
| 110 | - } | |
| 111 | - | |
| 112 | - public String getRemarks() { | |
| 113 | - return remarks; | |
| 114 | - } | |
| 115 | - | |
| 116 | - public void setRemarks(String remarks) { | |
| 117 | - this.remarks = remarks; | |
| 118 | - } | |
| 119 | - | |
| 120 | - public String getLastMenses() { | |
| 121 | - return lastMenses; | |
| 122 | - } | |
| 123 | - | |
| 124 | - public void setLastMenses(String lastMenses) { | |
| 125 | - this.lastMenses = lastMenses; | |
| 126 | - } | |
| 127 | - | |
| 128 | - public String getWeight() { | |
| 129 | - return weight; | |
| 130 | - } | |
| 131 | - | |
| 132 | - public void setWeight(String weight) { | |
| 133 | - this.weight = weight; | |
| 134 | - } | |
| 135 | - | |
| 136 | - public String getBirth() { | |
| 137 | - return birth; | |
| 138 | - } | |
| 139 | - | |
| 140 | - public void setBirth(String birth) { | |
| 141 | - this.birth = birth; | |
| 142 | - } | |
| 143 | - | |
| 144 | - public String getMensStartDay() { | |
| 145 | - return mensStartDay; | |
| 146 | - } | |
| 147 | - | |
| 148 | - public void setMensStartDay(String mensStartDay) { | |
| 149 | - this.mensStartDay = mensStartDay; | |
| 150 | - } | |
| 151 | - | |
| 152 | - public String getMensEndDay() { | |
| 153 | - return mensEndDay; | |
| 154 | - } | |
| 155 | - | |
| 156 | - public void setMensEndDay(String mensEndDay) { | |
| 157 | - this.mensEndDay = mensEndDay; | |
| 158 | - } | |
| 159 | - | |
| 160 | - public String getMensStopStartDay() { | |
| 161 | - return mensStopStartDay; | |
| 162 | - } | |
| 163 | - | |
| 164 | - public void setMensStopStartDay(String mensStopStartDay) { | |
| 165 | - this.mensStopStartDay = mensStopStartDay; | |
| 166 | - } | |
| 167 | - | |
| 168 | - public String getMensStopEndDay() { | |
| 169 | - return mensStopEndDay; | |
| 170 | - } | |
| 171 | - | |
| 172 | - public void setMensStopEndDay(String mensStopEndDay) { | |
| 173 | - this.mensStopEndDay = mensStopEndDay; | |
| 174 | - } | |
| 175 | - | |
| 176 | - public String getCollectDocterId() { | |
| 177 | - return collectDocterId; | |
| 178 | - } | |
| 179 | - | |
| 180 | - public void setCollectDocterId(String collectDocterId) { | |
| 181 | - this.collectDocterId = collectDocterId; | |
| 182 | - } | |
| 183 | - | |
| 184 | - public String getSendDocterId() { | |
| 185 | - return sendDocterId; | |
| 186 | - } | |
| 187 | - | |
| 188 | - public void setSendDocterId(String sendDocterId) { | |
| 189 | - this.sendDocterId = sendDocterId; | |
| 190 | - } | |
| 191 | - | |
| 192 | - public String getCollectHospitalId() { | |
| 193 | - return collectHospitalId; | |
| 194 | - } | |
| 195 | - | |
| 196 | - public void setCollectHospitalId(String collectHospitalId) { | |
| 197 | - this.collectHospitalId = collectHospitalId; | |
| 198 | - } | |
| 199 | - | |
| 200 | - public String getIsCqSieve() { | |
| 201 | - return isCqSieve; | |
| 202 | - } | |
| 203 | - | |
| 204 | - public void setIsCqSieve(String isCqSieve) { | |
| 205 | - this.isCqSieve = isCqSieve; | |
| 206 | - } | |
| 207 | - | |
| 208 | - public List getSieveProject() { | |
| 209 | - return sieveProject; | |
| 210 | - } | |
| 211 | - | |
| 212 | - public void setSieveProject(List sieveProject) { | |
| 213 | - this.sieveProject = sieveProject; | |
| 214 | - } | |
| 215 | - | |
| 216 | - public String getZtfx() { | |
| 217 | - return ztfx; | |
| 218 | - } | |
| 219 | - | |
| 220 | - public void setZtfx(String ztfx) { | |
| 221 | - this.ztfx = ztfx; | |
| 222 | - } | |
| 223 | - | |
| 224 | - public String getZtfeText() { | |
| 225 | - return ztfeText; | |
| 226 | - } | |
| 227 | - | |
| 228 | - public void setZtfeText(String ztfeText) { | |
| 229 | - this.ztfeText = ztfeText; | |
| 230 | - } | |
| 231 | - | |
| 232 | - public DiagnosisResult convertToResult(Patients patient){ | |
| 233 | - setName(patient.getUsername()); | |
| 234 | - try{ | |
| 235 | - if (null != patient.getBirth()) { | |
| 236 | - setAge(DateUtil.getAge(patient.getBirth())); | |
| 237 | - } | |
| 238 | - }catch (Exception e){ | |
| 239 | - e.printStackTrace(); | |
| 240 | - } | |
| 241 | - if (null != patient.getDueDate()) { | |
| 242 | - setyChanQi(DateUtil.getyyyy_MM_dd(patient.getDueDate())); | |
| 243 | - } | |
| 244 | - if (null != patient.getLastMenses()) { | |
| 245 | - int days = DateUtil.daysBetween(patient.getLastMenses(), new Date()); | |
| 246 | - this.dueWeek = StringUtils.dueWeek(days); | |
| 247 | - | |
| 248 | - setLastMenses(DateUtil.getyyyy_MM_dd(patient.getLastMenses())); | |
| 249 | - } | |
| 250 | - setMensStartDay(patient.getMensStartDay()); | |
| 251 | - setMensEndDay(patient.getMensEndDay()); | |
| 252 | - setMensStopStartDay(patient.getMensStopStartDay()); | |
| 253 | - setMensStopEndDay(patient.getMensStopEndDay()); | |
| 254 | - | |
| 255 | - return this; | |
| 256 | - } | |
| 257 | -} |