Commit e5a03f60811b3771e8d9278253bcd29f274577f9
1 parent
cfa3f00c17
Exists in
dev
产妇转诊功能
Showing 4 changed files with 138 additions and 4 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyScreeningController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyScreeningFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ApplyScreeningController.java
View file @
e5a03f6
| ... | ... | @@ -11,6 +11,7 @@ |
| 11 | 11 | import com.lyms.platform.operate.web.request.ApplyScreeningQueryRequest; |
| 12 | 12 | import com.lyms.platform.operate.web.request.ReferralApplyScreeningAddRequest; |
| 13 | 13 | import com.lyms.platform.operate.web.request.ScreeningReferralReceiptRequest; |
| 14 | +import com.lyms.platform.operate.web.result.PatientBaseResult; | |
| 14 | 15 | import org.springframework.beans.factory.annotation.Autowired; |
| 15 | 16 | import org.springframework.stereotype.Controller; |
| 16 | 17 | import org.springframework.web.bind.annotation.*; |
| ... | ... | @@ -53,6 +54,15 @@ |
| 53 | 54 | public BaseResponse queryApplyOrder(@Valid ApplyScreeningQueryRequest screeningQueryRequest, HttpServletRequest request) { |
| 54 | 55 | LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); |
| 55 | 56 | return applyScreeningFacade.queryApplyScreening(screeningQueryRequest, loginState.getId()); |
| 57 | + } | |
| 58 | + | |
| 59 | + /** | |
| 60 | + * 转诊保存 | |
| 61 | + */ | |
| 62 | + @RequestMapping(method = RequestMethod.POST, value = "/saveChange") | |
| 63 | + @ResponseBody | |
| 64 | + public BaseResponse saveChange(@Valid @RequestBody PatientBaseResult patientBaseResult) { | |
| 65 | + return applyScreeningFacade.saveChange(patientBaseResult); | |
| 56 | 66 | } |
| 57 | 67 | |
| 58 | 68 | /** |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ApplyScreeningFacade.java
View file @
e5a03f6
| ... | ... | @@ -516,6 +516,29 @@ |
| 516 | 516 | return new BaseListResponse().setData(data).setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setPageInfo(referralApplyScreeningQuery.getPageInfo()); |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | + public BaseResponse saveChange(PatientBaseResult patientBaseResult) { | |
| 520 | + | |
| 521 | + ReferralApplyScreeningQuery query = new ReferralApplyScreeningQuery(); | |
| 522 | + query.setParentId(patientBaseResult.getId()); | |
| 523 | + List<ReferralApplyScreeningModel> screeningModels = | |
| 524 | + applyScreeningService.queryReferralApplyScreeningWithQuery(query); | |
| 525 | + if(CollectionUtils.isNotEmpty(screeningModels)){ | |
| 526 | + ReferralApplyScreeningModel screeningModel = screeningModels.get(0); | |
| 527 | + ReferralApplyScreeningQuery screeningQuery = new ReferralApplyScreeningQuery(); | |
| 528 | + screeningQuery.setOutHospitalId(screeningModel.getHospitalId()); | |
| 529 | + screeningQuery.setTransferredHospital(screeningModel.getHospitalId()); | |
| 530 | + screeningQuery.setPid(screeningModel.getPid()); | |
| 531 | + screeningQuery.setId(screeningModel.getId()); | |
| 532 | + ReferralApplyScreeningModel referralApplyScreeningModel = new ReferralApplyScreeningModel(); | |
| 533 | + referralApplyScreeningModel.setOutDepartment(screeningModel.getTransferredDepartment()); | |
| 534 | + referralApplyScreeningModel.setTransferredDepartment(patientBaseResult.getChangeDepartment()); | |
| 535 | + referralApplyScreeningModel.setReason(patientBaseResult.getReason()); | |
| 536 | + referralApplyScreeningModel.setModified(new Date()); | |
| 537 | + applyScreeningService.updateByParentId(screeningQuery,referralApplyScreeningModel); | |
| 538 | + } | |
| 539 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功"); | |
| 540 | + } | |
| 541 | + | |
| 519 | 542 | |
| 520 | 543 | public BaseListResponse queryStatistics(ApplyQueryRequest applyQueryRequest,Integer userId) { |
| 521 | 544 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java
View file @
e5a03f6
| ... | ... | @@ -25,10 +25,8 @@ |
| 25 | 25 | import com.lyms.platform.operate.web.utils.JxlsUtils; |
| 26 | 26 | import com.lyms.platform.operate.web.worker.*; |
| 27 | 27 | import com.lyms.platform.permission.dao.master.CouponMapper; |
| 28 | -import com.lyms.platform.permission.model.Organization; | |
| 29 | -import com.lyms.platform.permission.model.OrganizationQuery; | |
| 30 | -import com.lyms.platform.permission.model.Users; | |
| 31 | -import com.lyms.platform.permission.model.UsersQuery; | |
| 28 | +import com.lyms.platform.permission.model.*; | |
| 29 | +import com.lyms.platform.permission.service.AppointmentService; | |
| 32 | 30 | import com.lyms.platform.permission.service.CouponService; |
| 33 | 31 | import com.lyms.platform.permission.service.OrganizationService; |
| 34 | 32 | import com.lyms.platform.permission.service.UsersService; |
| ... | ... | @@ -127,6 +125,9 @@ |
| 127 | 125 | @Autowired |
| 128 | 126 | private AntenatalExaminationService antenatalExaminationService; |
| 129 | 127 | |
| 128 | + @Autowired | |
| 129 | + private AppointmentService appointmentService; | |
| 130 | + | |
| 130 | 131 | /** |
| 131 | 132 | * 修改产妇的社区 |
| 132 | 133 | * |
| ... | ... | @@ -2149,6 +2150,35 @@ |
| 2149 | 2150 | patientBaseResult.convert(patients); |
| 2150 | 2151 | List <Map <String, Object>> screenList = antenatalExaminationFacade.getscreenResult(patients.getScreenResult()); |
| 2151 | 2152 | patientBaseResult.setScreenResult(screenList); |
| 2153 | + | |
| 2154 | + // 转诊时间 当前 | |
| 2155 | + Date now = new Date(); | |
| 2156 | + patientBaseResult.setChangeTime(DateUtil.gety_m_dhm(now)); | |
| 2157 | + | |
| 2158 | + // 住院号 | |
| 2159 | + patientBaseResult.setVcCardNo(patients.getVcCardNo()); | |
| 2160 | + | |
| 2161 | + // 地址 | |
| 2162 | + String register = CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
| 2163 | + patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService); | |
| 2164 | + patientBaseResult.setAddress(register); | |
| 2165 | + | |
| 2166 | + // 医生 | |
| 2167 | + Users users = usersService.getUsers(userId); | |
| 2168 | + if(users != null){ | |
| 2169 | + patientBaseResult.setDoctor(users.getName()); | |
| 2170 | + } | |
| 2171 | + // 原因 | |
| 2172 | +// patientBaseResult.setReason(""); | |
| 2173 | + // 获取病案信息 | |
| 2174 | + MedicalRecordVo query = new MedicalRecordVo(); | |
| 2175 | + query.setCardNo(patients.getCardNo()); | |
| 2176 | + List<MedicalRecordVo> medicalRecordVoList = appointmentService.queryList(query); | |
| 2177 | + if(CollectionUtils.isNotEmpty(medicalRecordVoList)){ | |
| 2178 | + MedicalRecordVo medicalRecordVo = medicalRecordVoList.get(0); | |
| 2179 | + // 科室 | |
| 2180 | + patientBaseResult.setDepartment(medicalRecordVo.getDepartment()); | |
| 2181 | + } | |
| 2152 | 2182 | } |
| 2153 | 2183 | try { |
| 2154 | 2184 | HighScoreResult highScoreResult = antenatalExaminationFacade.findLastRisk(patients.getPid(), false); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/PatientBaseResult.java
View file @
e5a03f6
| ... | ... | @@ -71,6 +71,77 @@ |
| 71 | 71 | private String maddress; |
| 72 | 72 | private String deliveryMode; |
| 73 | 73 | |
| 74 | + // 地址 | |
| 75 | + private String address; | |
| 76 | + // 住院号 | |
| 77 | + private String vcCardNo; | |
| 78 | + // 科室 | |
| 79 | + private String department; | |
| 80 | + // 转诊时间 | |
| 81 | + private String changeTime; | |
| 82 | + // 转诊原因 | |
| 83 | + private String reason; | |
| 84 | + // 主管医生 | |
| 85 | + private String doctor; | |
| 86 | + // 转入科室 | |
| 87 | + private String changeDepartment; | |
| 88 | + | |
| 89 | + public String getDoctor() { | |
| 90 | + return doctor; | |
| 91 | + } | |
| 92 | + | |
| 93 | + public void setDoctor(String doctor) { | |
| 94 | + this.doctor = doctor; | |
| 95 | + } | |
| 96 | + | |
| 97 | + public String getChangeDepartment() { | |
| 98 | + return changeDepartment; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setChangeDepartment(String changeDepartment) { | |
| 102 | + this.changeDepartment = changeDepartment; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getAddress() { | |
| 106 | + return address; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setAddress(String address) { | |
| 110 | + this.address = address; | |
| 111 | + } | |
| 112 | + | |
| 113 | + public String getVcCardNo() { | |
| 114 | + return vcCardNo; | |
| 115 | + } | |
| 116 | + | |
| 117 | + public void setVcCardNo(String vcCardNo) { | |
| 118 | + this.vcCardNo = vcCardNo; | |
| 119 | + } | |
| 120 | + | |
| 121 | + public String getDepartment() { | |
| 122 | + return department; | |
| 123 | + } | |
| 124 | + | |
| 125 | + public void setDepartment(String department) { | |
| 126 | + this.department = department; | |
| 127 | + } | |
| 128 | + | |
| 129 | + public String getChangeTime() { | |
| 130 | + return changeTime; | |
| 131 | + } | |
| 132 | + | |
| 133 | + public void setChangeTime(String changeTime) { | |
| 134 | + this.changeTime = changeTime; | |
| 135 | + } | |
| 136 | + | |
| 137 | + public String getReason() { | |
| 138 | + return reason; | |
| 139 | + } | |
| 140 | + | |
| 141 | + public void setReason(String reason) { | |
| 142 | + this.reason = reason; | |
| 143 | + } | |
| 144 | + | |
| 74 | 145 | public String getDeliveryMode() { |
| 75 | 146 | return deliveryMode; |
| 76 | 147 | } |