Commit e3e47e6c2fbae0a85f87bea2136b5e5805aaad65
1 parent
9b0bf253c0
Exists in
master
and in
8 other branches
修改产检删除
Showing 1 changed file with 26 additions and 2 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
e3e47e6
... | ... | @@ -102,9 +102,7 @@ |
102 | 102 | /** |
103 | 103 | * 修改最后一次产检时间 |
104 | 104 | * |
105 | - * @param hospitalId | |
106 | 105 | * @param id |
107 | - * @param type 1 初诊 2 复诊 | |
108 | 106 | */ |
109 | 107 | private void setLashCTimes(String id) { |
110 | 108 | |
111 | 109 | |
... | ... | @@ -132,7 +130,28 @@ |
132 | 130 | patientsService.updatePatient(patients1); |
133 | 131 | } |
134 | 132 | } |
133 | + //当非建档医院修改初诊信息时,需要同步给建档医院 | |
134 | + private void syncMaster(String parentId){ | |
135 | 135 | |
136 | + //当前非建档医院最新的状态 | |
137 | + Patients patients = patientsService.findOnePatientById(parentId); | |
138 | + | |
139 | + if(StringUtils.isNotEmpty(patients.getSource())){ | |
140 | + Patients masterPatients =patientsService.findOnePatientById(patients.getSource()); | |
141 | + | |
142 | + masterPatients.setoRiskFactor(patients.getoRiskFactor()); | |
143 | + masterPatients.setLastCTime(patients.getLastCTime()); | |
144 | + masterPatients.setPostViewTimes(patients.getPostViewTimes()); | |
145 | + masterPatients.setLastRhTime(patients.getLastRhTime()); | |
146 | + masterPatients.setRiskFactorId(patients.getRiskFactorId()); | |
147 | + masterPatients.setRiskLevelId(patients.getRiskLevelId()); | |
148 | + masterPatients.setRiskScore(patients.getRiskScore()); | |
149 | + | |
150 | + patientsService.updatePatient(masterPatients); | |
151 | + } | |
152 | + } | |
153 | + | |
154 | + | |
136 | 155 | /** |
137 | 156 | * 增加一条产前检查 |
138 | 157 | * |
... | ... | @@ -161,6 +180,8 @@ |
161 | 180 | updateLastRhTime(patients.getId(), hospitalId); |
162 | 181 | //修改最后一次检查时间 |
163 | 182 | setLashCTimes(antExAddRequest.getParentId()); |
183 | + //修改数据 | |
184 | + syncMaster(antExAddRequest.getParentId()); | |
164 | 185 | |
165 | 186 | //复诊,修改产检管理 |
166 | 187 | antenatalExaminationService.updateAntExRecord(antExAddRequest.getId(), 2); |
... | ... | @@ -200,6 +221,9 @@ |
200 | 221 | |
201 | 222 | //修改本院最后一次定义高危 |
202 | 223 | updateLastRhTime(patients.getId(), hospitalId); |
224 | + | |
225 | + //修改数据 | |
226 | + syncMaster(antExAddRequest.getParentId()); | |
203 | 227 | //复诊,修改产检管理 |
204 | 228 | antenatalExaminationService.updateAntExRecord(model.getId(),2); |
205 | 229 | if (null != patients.getBuildType() && patients.getBuildType() == 3) { |