Commit dcd61a74cc0e509ecd8428a249a56542d090e2f3
1 parent
2742c4cb5f
Exists in
master
and in
6 other branches
update code
Showing 1 changed file with 64 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntenatalExaminationFacade.java
View file @
dcd61a7
... | ... | @@ -16,6 +16,7 @@ |
16 | 16 | import com.lyms.platform.common.result.BaseObjectResponse; |
17 | 17 | import com.lyms.platform.common.result.BaseResponse; |
18 | 18 | import com.lyms.platform.common.utils.*; |
19 | +import com.lyms.platform.common.utils.BeanUtils; | |
19 | 20 | import com.lyms.platform.operate.web.request.*; |
20 | 21 | import com.lyms.platform.operate.web.result.*; |
21 | 22 | import com.lyms.platform.operate.web.service.ITrackDownService; |
22 | 23 | |
... | ... | @@ -37,8 +38,10 @@ |
37 | 38 | import org.apache.commons.collections.map.HashedMap; |
38 | 39 | import org.apache.commons.lang.StringUtils; |
39 | 40 | import org.apache.commons.lang.math.NumberUtils; |
41 | +import org.codehaus.jackson.map.util.BeanUtil; | |
40 | 42 | import org.slf4j.Logger; |
41 | 43 | import org.slf4j.LoggerFactory; |
44 | +import org.springframework.beans.*; | |
42 | 45 | import org.springframework.beans.factory.annotation.Autowired; |
43 | 46 | import org.springframework.beans.factory.annotation.Qualifier; |
44 | 47 | import org.springframework.data.domain.Sort; |
... | ... | @@ -384,7 +387,9 @@ |
384 | 387 | trackDownRecordService.updateTrackDownParent(trackDownRecord, antExAddRequest.getParentId()); |
385 | 388 | }*/ |
386 | 389 | antenatalExaminationService.addOneBabyAnt(model); |
387 | - | |
390 | + antExAddRequest.setId(model.getId()); | |
391 | + //自动诊断高危 | |
392 | + autoExRisk(antExAddRequest,patients); | |
388 | 393 | /** 验证产检券是否可用 可用就改为已使用状态 */ |
389 | 394 | if (StringUtils.isNotBlank(antExAddRequest.getCouponCode()) && antExAddRequest.getCouponType() != null) { |
390 | 395 | BaseObjectResponse resp = couponService.validate(antExAddRequest.getCouponCode(), antExAddRequest.getCouponType(), autoMatchFacade.getHospitalId(userId)); |
... | ... | @@ -708,6 +713,10 @@ |
708 | 713 | antenatalExaminationService.addOneAntEx(antExChuModel); |
709 | 714 | excAddRequest.setId(antExChuModel.getId()); |
710 | 715 | |
716 | + | |
717 | + autoExcRisk(excAddRequest, patients); | |
718 | + | |
719 | + | |
711 | 720 | // final String chuId = antExChuModel.getId(); |
712 | 721 | // final String chuParentId = antExChuModel.getParentId(); |
713 | 722 | |
... | ... | @@ -4134,6 +4143,60 @@ |
4134 | 4143 | saveAutoRisk(riskList,null,pat.getHospitalId(),pat.getPid(),pat.getId(),0); |
4135 | 4144 | } |
4136 | 4145 | |
4146 | + | |
4147 | + /** | |
4148 | + * 初诊自动诊断高危 | |
4149 | + * @param antExcAddRequest | |
4150 | + * @param pat | |
4151 | + */ | |
4152 | + public void autoExcRisk(final AntExcAddRequest antExcAddRequest,final Patients pat) | |
4153 | + { | |
4154 | + commonThreadPool.execute(new Runnable() { | |
4155 | + @Override | |
4156 | + public void run() { | |
4157 | + AutoRiskRequest autoRiskRequest = new AutoRiskRequest(); | |
4158 | + org.springframework.beans.BeanUtils.copyProperties(antExcAddRequest, autoRiskRequest); | |
4159 | + String fid = antExcAddRequest.getId(); | |
4160 | + System.out.println("autoExcRisk fid = "+fid); | |
4161 | + List<Map<String, String>> riskList = autoRisk(autoRiskRequest, pat.getHospitalId()); | |
4162 | + saveAutoRisk(riskList,fid,pat.getHospitalId(),pat.getPid(),pat.getId(),1); | |
4163 | + } | |
4164 | + }); | |
4165 | + } | |
4166 | + | |
4167 | + | |
4168 | + /** | |
4169 | + * 复诊自动诊断高危 | |
4170 | + * @param antExAddRequest | |
4171 | + * @param pat 档案信息 | |
4172 | + */ | |
4173 | + public void autoExRisk(final AntExAddRequest antExAddRequest,final Patients pat) | |
4174 | + { | |
4175 | + commonThreadPool.execute(new Runnable() { | |
4176 | + @Override | |
4177 | + public void run() { | |
4178 | + AutoRiskRequest autoRiskRequest = new AutoRiskRequest(); | |
4179 | + | |
4180 | + autoRiskRequest.setBp(antExAddRequest.getBp()); | |
4181 | + autoRiskRequest.setGonggao(antExAddRequest.getGongGao()); | |
4182 | + autoRiskRequest.setWeight(antExAddRequest.getWeight() == null ? null : String.valueOf(antExAddRequest.getWeight())); | |
4183 | + autoRiskRequest.setFuwei(antExAddRequest.getAbdominalCircumference()); | |
4184 | + autoRiskRequest.setFuwei(antExAddRequest.getAbdominalCircumference()); | |
4185 | + autoRiskRequest.setTireNumber(antExAddRequest.getTireNumber()); | |
4186 | + autoRiskRequest.setQuickenRemark(antExAddRequest.getQuickenRemark()); | |
4187 | + autoRiskRequest.setXhdb(antExAddRequest.getHemoglobin()); | |
4188 | + autoRiskRequest.setNdb(antExAddRequest.getUrineProtein()); | |
4189 | + autoRiskRequest.setbChao(antExAddRequest.getbChao()); | |
4190 | + autoRiskRequest.setBloodSugar(antExAddRequest.getBloodSugar()); | |
4191 | + | |
4192 | + String fid = antExAddRequest.getId(); | |
4193 | + System.out.println("autoExRisk fid = "+fid); | |
4194 | + List<Map<String, String>> riskList = autoRisk(autoRiskRequest, pat.getHospitalId()); | |
4195 | + saveAutoRisk(riskList,fid,pat.getHospitalId(),pat.getPid(),pat.getId(),2); | |
4196 | + } | |
4197 | + }); | |
4198 | + | |
4199 | + } | |
4137 | 4200 | |
4138 | 4201 | /** |
4139 | 4202 | * |