Commit eb1589cabd5cab5097e66552203661fc477118fa

Authored by wtt
1 parent 67b9b2ce49

update

Showing 1 changed file with 141 additions and 128 deletions

platform-biz-service/src/main/java/com/lyms/platform/permission/service/impl/LisServiceImpl.java View file @ eb1589c
... ... @@ -37,7 +37,7 @@
37 37  
38 38  
39 39 @Service("lisService")
40   -public class LisServiceImpl implements LisService {
  40 +public class LisServiceImpl implements LisService {
41 41  
42 42 private static final int BATCH_SIZE = 10;
43 43  
44 44  
45 45  
... ... @@ -49,14 +49,13 @@
49 49 private PatientsService patientsService;
50 50  
51 51 @Override
52   - public BaseResponse saveLisData(final List<LisReportModel> lisList,ThreadPoolTaskExecutor commonThreadPool) {
  52 + public BaseResponse saveLisData(final List<LisReportModel> lisList, ThreadPoolTaskExecutor commonThreadPool) {
53 53 try {
54   - System.out.println("saveLis data size = "+ lisList.size());
55   - if (CollectionUtils.isNotEmpty(lisList))
56   - {
  54 + System.out.println("saveLis data size = " + lisList.size());
  55 + if (CollectionUtils.isNotEmpty(lisList)) {
57 56 //线程数
58   - int threadCount = lisList.size()%BATCH_SIZE == 0 ? lisList.size()/BATCH_SIZE : lisList.size()/BATCH_SIZE+1;
59   - System.out.println("threadCount = "+ threadCount);
  57 + int threadCount = lisList.size() % BATCH_SIZE == 0 ? lisList.size() / BATCH_SIZE : lisList.size() / BATCH_SIZE + 1;
  58 + System.out.println("threadCount = " + threadCount);
60 59 CountDownLatch countDownLatch = new CountDownLatch(threadCount);
61 60 int end = 0;
62 61 for (int i = 0; i < lisList.size(); i += BATCH_SIZE) {
63 62  
64 63  
... ... @@ -65,21 +64,19 @@
65 64 end = lisList.size();
66 65 }
67 66 List<LisReportModel> models = lisList.subList(i, end);
68   - commonThreadPool.execute(new LisSaveTask(countDownLatch,masterLisMapper,models));
  67 + commonThreadPool.execute(new LisSaveTask(countDownLatch, masterLisMapper, models));
69 68 }
70 69 countDownLatch.await(20, TimeUnit.SECONDS);
71 70 }
72 71 return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功");
73   - }
74   - catch (Exception e)
75   - {
  72 + } catch (Exception e) {
76 73 return new BaseResponse().setErrorcode(ErrorCodeConstants.SYSTEM_ERROR).setErrormsg(ErrorCodeConstants.SYSTEM_ERROR_DESCRIPTION);
77 74 }
78 75 }
79 76  
80 77 @Override
81 78 public List<LisReportModel> queryLisDataByModel(LisReportQuery model) {
82   - return masterLisMapper.queryLisDataByModel(model);
  79 + return masterLisMapper.queryLisDataByModel(model);
83 80 }
84 81  
85 82 @Override
... ... @@ -96,7 +93,7 @@
96 93 @Override
97 94 public List<LisReportModel> queryLisDataByQuery(LisReportQuery query) {
98 95 if (query.getNeed() != null) {
99   - query.mysqlBuild( masterLisMapper.queryLisCount(query));
  96 + query.mysqlBuild(masterLisMapper.queryLisCount(query));
100 97 }
101 98 return masterLisMapper.queryLisDataByQuery(query);
102 99 }
103 100  
104 101  
... ... @@ -125,15 +122,15 @@
125 122 }
126 123  
127 124  
128   - public class LisSaveTask implements Runnable {
  125 + public class LisSaveTask implements Runnable {
129 126  
130 127 private CountDownLatch countDownLatch;
131 128 private MasterLisMapper masterLisMapper;
132 129 private List<LisReportModel> lisList;
  130 +
133 131 private LisSaveTask(CountDownLatch countDownLatch,
134 132 MasterLisMapper masterLisMapper,
135   - List<LisReportModel> lisList)
136   - {
  133 + List<LisReportModel> lisList) {
137 134 this.lisList = lisList;
138 135 this.masterLisMapper = masterLisMapper;
139 136 this.countDownLatch = countDownLatch;
... ... @@ -161,9 +158,7 @@
161 158 }
162 159  
163 160 }
164   - }
165   - finally
166   - {
  161 + } finally {
167 162 countDownLatch.countDown();
168 163 }
169 164  
170 165  
171 166  
172 167  
173 168  
174 169  
... ... @@ -172,25 +167,38 @@
172 167  
173 168 /**
174 169 * 根据孕妇,修改检查项为空,检查项结果
  170 + *
175 171 * @param model
176 172 */
177 173 private void saveLisUpdateData(LisReportModel model) {
178 174  
179 175 //1获取孕妇pid
  176 + Patients patients = null;
  177 + List<Patients> list= null;
180 178 PatientsQuery patientsQuery = new PatientsQuery();
181 179 patientsQuery.setHospitalId(model.getHospitalId());
182   - patientsQuery.setVcCardNo(model.getVcCardNo());
183 180 patientsQuery.setName(model.getName());
184 181 patientsQuery.setSort("created");
185   - List<Patients> list = patientsService.queryPatient(patientsQuery);
186   - Patients patients = list.get(list.size()-1);
  182 + patientsQuery.setVcCardNo(model.getVcCardNo());
  183 + list = patientsService.queryPatient(patientsQuery);
  184 + if (list != null && list.size() > 0) {
  185 + patients = list.get(list.size() - 1);
  186 + System.out.println("就诊卡号获取:"+model.getVcCardNo());
  187 + } else {
  188 + patientsQuery.setPhone(model.getPhone());
  189 + patientsQuery.setVcCardNo(null);
  190 + list = patientsService.queryPatient(patientsQuery);
  191 + patients = list.get(list.size() - 1);
  192 + System.out.println("手机号获取:"+model.getPhone());
  193 + }
187 194  
  195 +
188 196 //2 判断更新初诊还是复诊
189 197 AntExQuery antExQuery = new AntExQuery();
190 198 antExQuery.setYn(YnEnums.YES.getId());
191 199 antExQuery.setParentId(patients.getId());
192 200 List<AntenatalExaminationModel> AntenatalExaminationModels = antExService.queryAntenatalExamination(antExQuery.convertToQuery()); //复诊记录
193   - if (CollectionUtils.isEmpty(AntenatalExaminationModels)){
  201 + if (CollectionUtils.isEmpty(AntenatalExaminationModels)) {
194 202 AntExChuQuery antExChuQuery = new AntExChuQuery();
195 203 antExChuQuery.setYn(YnEnums.YES.getId());
196 204 antExChuQuery.setParentId(patients.getId());
197 205  
198 206  
199 207  
200 208  
201 209  
202 210  
203 211  
204 212  
205 213  
206 214  
207 215  
208 216  
209 217  
210 218  
211 219  
212 220  
213 221  
214 222  
215 223  
216 224  
217 225  
218 226  
219 227  
220 228  
221 229  
222 230  
223 231  
224 232  
225 233  
226 234  
... ... @@ -199,106 +207,109 @@
199 207 AntExChuModel antExChuModel = antExChuModels.get(antExChuModels.size() - 1);
200 208 AntExChuModel antExChuModel1 = new AntExChuModel();
201 209 //3 更新初诊记录
202   - if("2100001291".equals(antExChuModel.getHospitalId())){
  210 + if ("2100001291".equals(antExChuModel.getHospitalId())) {
203 211 antExChuModelUpadte(model, antExChuModel, antExChuModel1);
204   - }else if("216".equals(antExChuModel.getHospitalId())){
  212 + } else if ("216".equals(antExChuModel.getHospitalId())) {
205 213 antExChuModelQHDUpadte(model, antExChuModel, antExChuModel1);
206 214 }
207   - antExService.updateAntExChu(antExChuModel1,antExChuModel.getId());
  215 + antExService.updateAntExChu(antExChuModel1, antExChuModel.getId());
208 216 }
209   - }else {
210   - AntenatalExaminationModel antenatalExaminationModel= AntenatalExaminationModels.get(AntenatalExaminationModels.size() - 1);
  217 + } else {
  218 + AntenatalExaminationModel antenatalExaminationModel = AntenatalExaminationModels.get(AntenatalExaminationModels.size() - 1);
211 219 AntenatalExaminationModel antenatalExaminationModel1 = new AntenatalExaminationModel();
212 220 //3 更新复诊记录
213   - if("2100001291".equals(antenatalExaminationModel.getHospitalId())){
  221 + if ("2100001291".equals(antenatalExaminationModel.getHospitalId())) {
214 222 fuZhenUpdate(model, antenatalExaminationModel, antenatalExaminationModel1);
215   - }else if("216".equals(antenatalExaminationModel.getHospitalId())){
  223 + } else if ("216".equals(antenatalExaminationModel.getHospitalId())) {
216 224 fuZhenQHDUpdate(model, antenatalExaminationModel, antenatalExaminationModel1);
217 225 }
218   - antExService.updateOneAnt(antenatalExaminationModel1,antenatalExaminationModel.getId());
  226 + antExService.updateOneAnt(antenatalExaminationModel1, antenatalExaminationModel.getId());
219 227 }
220 228 }
221 229  
222 230 /**
223 231 * 承德妇幼更新复诊记录
  232 + *
224 233 * @param model
225 234 * @param antenatalExaminationModel
226 235 * @param antenatalExaminationModel1
227 236 */
228 237 private void fuZhenUpdate(LisReportModel model, AntenatalExaminationModel antenatalExaminationModel, AntenatalExaminationModel antenatalExaminationModel1) {
229   - if("".equals(antenatalExaminationModel.getHemoglobin()) || antenatalExaminationModel.getHemoglobin()==null){
  238 + if ("".equals(antenatalExaminationModel.getHemoglobin()) || antenatalExaminationModel.getHemoglobin() == null) {
230 239 antenatalExaminationModel1.setHemoglobin(getCodeValue(model, "HGB")); //血红蛋白
231 240 }
232   - if("".equals(antenatalExaminationModel.getUrineProtein()) || antenatalExaminationModel.getUrineProtein()==null){
  241 + if ("".equals(antenatalExaminationModel.getUrineProtein()) || antenatalExaminationModel.getUrineProtein() == null) {
233 242 antenatalExaminationModel1.setUrineProtein(getCodeValue(model, "PRO")); //尿蛋白
234 243 }
235 244  
236   - if("".equals(antenatalExaminationModel.getTtita()) || antenatalExaminationModel.getTtita()==null){
  245 + if ("".equals(antenatalExaminationModel.getTtita()) || antenatalExaminationModel.getTtita() == null) {
237 246 antenatalExaminationModel1.setTtita(getCodeValue(model, "T3")); // 总三碘甲状腺原氨酸(TT3)
238 247 }
239   - if("".equals(antenatalExaminationModel.getTotalThy()) || antenatalExaminationModel.getTotalThy()==null){
  248 + if ("".equals(antenatalExaminationModel.getTotalThy()) || antenatalExaminationModel.getTotalThy() == null) {
240 249 antenatalExaminationModel1.setTotalThy(getCodeValue(model, "T4")); // //总甲状腺素(TT4)
241 250 }
242   - if("".equals(antenatalExaminationModel.getFtita()) || antenatalExaminationModel.getFtita()==null){
  251 + if ("".equals(antenatalExaminationModel.getFtita()) || antenatalExaminationModel.getFtita() == null) {
243 252 antenatalExaminationModel1.setFtita(getCodeValue(model, "FT3")); // //游离三碘甲状腺原氨酸(FT3)
244 253 }
245   - if("".equals(antenatalExaminationModel.getFreeThy()) || antenatalExaminationModel.getFreeThy()==null){
  254 + if ("".equals(antenatalExaminationModel.getFreeThy()) || antenatalExaminationModel.getFreeThy() == null) {
246 255 antenatalExaminationModel1.setFreeThy(getCodeValue(model, "FT4")); //游离甲状腺素(FT4)
247 256 }
248   - if("".equals(antenatalExaminationModel.getPta()) || antenatalExaminationModel.getPta()==null){
  257 + if ("".equals(antenatalExaminationModel.getPta()) || antenatalExaminationModel.getPta() == null) {
249 258 antenatalExaminationModel1.setPta(getCodeValue(model, "PT")); //凝血酶原活动度(PT%)
250 259 }
251   - if("".equals(antenatalExaminationModel.getActPar()) || antenatalExaminationModel.getActPar()==null){
  260 + if ("".equals(antenatalExaminationModel.getActPar()) || antenatalExaminationModel.getActPar() == null) {
252 261 antenatalExaminationModel1.setActPar(getCodeValue(model, "APTT")); //活化部分凝血活酶时间(APTT)
253 262 }
254   - if("".equals(antenatalExaminationModel.getThrTime()) || antenatalExaminationModel.getThrTime()==null){
  263 + if ("".equals(antenatalExaminationModel.getThrTime()) || antenatalExaminationModel.getThrTime() == null) {
255 264 antenatalExaminationModel1.setThrTime(getCodeValue(model, "TT")); //凝血酶时间(TT)
256 265 }
257   - if("".equals(antenatalExaminationModel.getFibrin()) || antenatalExaminationModel.getFibrin()==null){
  266 + if ("".equals(antenatalExaminationModel.getFibrin()) || antenatalExaminationModel.getFibrin() == null) {
258 267 antenatalExaminationModel1.setFibrin(getCodeValue(model, "FIB")); //纤维蛋白原(FIB)
259 268 }
260 269  
261   - if("".equals(antenatalExaminationModel.getDimer()) || antenatalExaminationModel.getDimer()==null){
  270 + if ("".equals(antenatalExaminationModel.getDimer()) || antenatalExaminationModel.getDimer() == null) {
262 271 antenatalExaminationModel1.setDimer(getCodeValue(model, "D-Dimer")); //D-二聚体(D-Dimer)
263 272 }
264 273  
265   - if("".equals(antenatalExaminationModel.getTotalChol()) || antenatalExaminationModel.getTotalChol()==null){
  274 + if ("".equals(antenatalExaminationModel.getTotalChol()) || antenatalExaminationModel.getTotalChol() == null) {
266 275 antenatalExaminationModel1.setTotalChol(getCodeValue(model, "TC")); //总胆固醇(TC)
267 276 }
268   - if("".equals(antenatalExaminationModel.getTricer()) || antenatalExaminationModel.getTricer()==null){
  277 + if ("".equals(antenatalExaminationModel.getTricer()) || antenatalExaminationModel.getTricer() == null) {
269 278 antenatalExaminationModel1.setTricer(getCodeValue(model, "TG")); //甘油三酯(TG)
270 279 }
271   - if("".equals(antenatalExaminationModel.getHighDens()) || antenatalExaminationModel.getHighDens()==null){
  280 + if ("".equals(antenatalExaminationModel.getHighDens()) || antenatalExaminationModel.getHighDens() == null) {
272 281 antenatalExaminationModel1.setHighDens(getCodeValue(model, "HDL-C")); //高密度脂蛋白胆固醇(HDL-C)
273 282 }
274   - if("".equals(antenatalExaminationModel.getLowDens()) || antenatalExaminationModel.getLowDens()==null){
  283 + if ("".equals(antenatalExaminationModel.getLowDens()) || antenatalExaminationModel.getLowDens() == null) {
275 284 antenatalExaminationModel1.setLowDens(getCodeValue(model, "LDL-C")); //低密度脂蛋白胆固醇(LDL-C)
276 285 }
277 286  
278 287 }
  288 +
279 289 /**
280 290 * 秦皇岛妇幼更新复诊记录
  291 + *
281 292 * @param model
282 293 * @param antenatalExaminationModel
283 294 * @param antenatalExaminationModel1
284 295 */
285 296 private void fuZhenQHDUpdate(LisReportModel model, AntenatalExaminationModel antenatalExaminationModel, AntenatalExaminationModel antenatalExaminationModel1) {
286   - if("".equals(antenatalExaminationModel.getHemoglobin()) || antenatalExaminationModel.getHemoglobin()==null){
  297 + if ("".equals(antenatalExaminationModel.getHemoglobin()) || antenatalExaminationModel.getHemoglobin() == null) {
287 298 antenatalExaminationModel1.setHemoglobin(getCodeValue(model, "HGB")); //血红蛋白
288 299 }
289   - if("".equals(antenatalExaminationModel.getUrineProtein()) || antenatalExaminationModel.getUrineProtein()==null){
  300 + if ("".equals(antenatalExaminationModel.getUrineProtein()) || antenatalExaminationModel.getUrineProtein() == null) {
290 301 antenatalExaminationModel1.setUrineProtein(getCodeValue(model, "PRO-U")); //尿蛋白
291 302 }
292   - if("".equals(antenatalExaminationModel.getBloodSugar()) || antenatalExaminationModel.getBloodSugar()==null){
  303 + if ("".equals(antenatalExaminationModel.getBloodSugar()) || antenatalExaminationModel.getBloodSugar() == null) {
293 304 antenatalExaminationModel1.setBloodSugar(getCodeValue(model, "GLUK")); //血糖
294 305 }
295   - if("".equals(antenatalExaminationModel.getBloodSugar2()) || antenatalExaminationModel.getBloodSugar2()==null){
  306 + if ("".equals(antenatalExaminationModel.getBloodSugar2()) || antenatalExaminationModel.getBloodSugar2() == null) {
296 307 antenatalExaminationModel1.setBloodSugar2(getCodeValue(model, "GLU1h")); // 血糖2
297 308 }
298   - if("".equals(antenatalExaminationModel.getBloodSugar3()) || antenatalExaminationModel.getBloodSugar3()==null){
  309 + if ("".equals(antenatalExaminationModel.getBloodSugar3()) || antenatalExaminationModel.getBloodSugar3() == null) {
299 310 antenatalExaminationModel1.setBloodSugar3(getCodeValue(model, "GLU2h")); // 血糖3
300 311 }
301   - if("".equals(antenatalExaminationModel.getBloodSugar4()) || antenatalExaminationModel.getBloodSugar4()==null){
  312 + if ("".equals(antenatalExaminationModel.getBloodSugar4()) || antenatalExaminationModel.getBloodSugar4() == null) {
302 313 antenatalExaminationModel1.setBloodSugar4(getCodeValue(model, "GLU3h")); // 血糖4
303 314 }
304 315  
305 316  
306 317  
307 318  
308 319  
309 320  
310 321  
311 322  
312 323  
313 324  
314 325  
315 326  
316 327  
317 328  
318 329  
319 330  
320 331  
321 332  
322 333  
323 334  
324 335  
325 336  
326 337  
327 338  
328 339  
329 340  
330 341  
331 342  
332 343  
333 344  
334 345  
335 346  
336 347  
337 348  
338 349  
339 350  
340 351  
341 352  
342 353  
343 354  
344 355  
345 356  
346 357  
347 358  
348 359  
349 360  
350 361  
351 362  
352 363  
353 364  
354 365  
355 366  
356 367  
357 368  
358 369  
359 370  
360 371  
361 372  
362 373  
363 374  
364 375  
365 376  
366 377  
367 378  
368 379  
369 380  
370 381  
371 382  
372 383  
373 384  
374 385  
375 386  
376 387  
... ... @@ -307,248 +318,250 @@
307 318  
308 319 /**
309 320 * 承德妇幼更新初诊记录
  321 + *
310 322 * @param model
311 323 * @param antExChuModel
312 324 * @param antExChuModel1
313 325 */
314 326 private void antExChuModelUpadte(LisReportModel model, AntExChuModel antExChuModel, AntExChuModel antExChuModel1) {
315   - if("".equals(antExChuModel.getXhdb()) || antExChuModel.getXhdb()==null){//血红蛋白
  327 + if ("".equals(antExChuModel.getXhdb()) || antExChuModel.getXhdb() == null) {//血红蛋白
316 328 antExChuModel1.setXhdb(getCodeValue(model, "HGB"));
317 329 }
318   - if("".equals(antExChuModel.getBxbjs()) || antExChuModel.getBxbjs()==null){//白细胞计数
  330 + if ("".equals(antExChuModel.getBxbjs()) || antExChuModel.getBxbjs() == null) {//白细胞计数
319 331 antExChuModel1.setBxbjs(getCodeValue(model, "WBC"));
320 332 }
321   - if("".equals(antExChuModel.getPlatelet()) || antExChuModel.getPlatelet()==null){//血小板
  333 + if ("".equals(antExChuModel.getPlatelet()) || antExChuModel.getPlatelet() == null) {//血小板
322 334 antExChuModel1.setPlatelet(getCodeValue(model, "PLT"));
323 335 }
324   - if("".equals(antExChuModel.getNdb()) || antExChuModel.getNdb()==null){//尿蛋白
  336 + if ("".equals(antExChuModel.getNdb()) || antExChuModel.getNdb() == null) {//尿蛋白
325 337 antExChuModel1.setNdb(getCodeValue(model, "PRO"));
326 338 }
327 339  
328   - if("".equals(antExChuModel.getUrineKetone()) || antExChuModel.getUrineKetone()==null){//尿酮体
  340 + if ("".equals(antExChuModel.getUrineKetone()) || antExChuModel.getUrineKetone() == null) {//尿酮体
329 341 antExChuModel1.setUrineKetone(getCodeValue(model, "KET"));
330 342 }
331   - if("".equals(antExChuModel.getBld()) || antExChuModel.getBld()==null){//尿潜血
  343 + if ("".equals(antExChuModel.getBld()) || antExChuModel.getBld() == null) {//尿潜血
332 344 antExChuModel1.setBld(getCodeValue(model, "BLD"));
333 345 }
334   - if("".equals(antExChuModel.getAbo()) || antExChuModel.getAbo()==null){//血型
  346 + if ("".equals(antExChuModel.getAbo()) || antExChuModel.getAbo() == null) {//血型
335 347 antExChuModel1.setAbo(getCodeValue(model, "ABO"));
336 348 }
337   - if("".equals(antExChuModel.getRh()) || antExChuModel.getRh()==null){//RH血型
  349 + if ("".equals(antExChuModel.getRh()) || antExChuModel.getRh() == null) {//RH血型
338 350 antExChuModel1.setRh(getCodeValue(model, "RH"));
339 351 }
340   - if("".equals(antExChuModel.getBloodSugar()) || antExChuModel.getBloodSugar()==null){//血糖
  352 + if ("".equals(antExChuModel.getBloodSugar()) || antExChuModel.getBloodSugar() == null) {//血糖
341 353 antExChuModel1.setBloodSugar(getCodeValue(model, "GLU"));
342 354 }
343   - if("".equals(antExChuModel.getXqgbzam()) || antExChuModel.getXqgbzam()==null){//血清谷丙转氨酶
  355 + if ("".equals(antExChuModel.getXqgbzam()) || antExChuModel.getXqgbzam() == null) {//血清谷丙转氨酶
344 356 antExChuModel1.setXqgbzam(getCodeValue(model, "ALT"));
345 357 }
346   - if("".equals(antExChuModel.getXqgczam()) || antExChuModel.getXqgczam()==null){//血清谷草转氨酶
  358 + if ("".equals(antExChuModel.getXqgczam()) || antExChuModel.getXqgczam() == null) {//血清谷草转氨酶
347 359 antExChuModel1.setXqgczam(getCodeValue(model, "AST"));
348 360 }
349 361  
350   - if("".equals(antExChuModel.getAlbumin()) || antExChuModel.getAlbumin()==null){//白蛋白
  362 + if ("".equals(antExChuModel.getAlbumin()) || antExChuModel.getAlbumin() == null) {//白蛋白
351 363 antExChuModel1.setAlbumin(getCodeValue(model, "ALB"));
352 364 }
353   - if("".equals(antExChuModel.getTotalBilirubin()) || antExChuModel.getTotalBilirubin()==null){//总胆红素
  365 + if ("".equals(antExChuModel.getTotalBilirubin()) || antExChuModel.getTotalBilirubin() == null) {//总胆红素
354 366 antExChuModel1.setTotalBilirubin(getCodeValue(model, "TBIL"));
355 367 }
356   - if("".equals(antExChuModel.getJhBilirubin()) || antExChuModel.getJhBilirubin()==null){//结合胆红素
  368 + if ("".equals(antExChuModel.getJhBilirubin()) || antExChuModel.getJhBilirubin() == null) {//结合胆红素
357 369 antExChuModel1.setJhBilirubin(getCodeValue(model, "DBIL"));
358 370 }
359   - if("".equals(antExChuModel.getBg()) || antExChuModel.getBg()==null){//丙肝
  371 + if ("".equals(antExChuModel.getBg()) || antExChuModel.getBg() == null) {//丙肝
360 372 antExChuModel1.setBg(getCodeValue(model, "HCV"));
361 373 }
362   - if("".equals(antExChuModel.getYgbmky()) || antExChuModel.getYgbmky()==null){//乙肝表面抗原
  374 + if ("".equals(antExChuModel.getYgbmky()) || antExChuModel.getYgbmky() == null) {//乙肝表面抗原
363 375 antExChuModel1.setYgbmky(getCodeValue(model, "HBsAg"));
364 376 }
365   - if("".equals(antExChuModel.getYgbmkt()) || antExChuModel.getYgbmkt()==null){//乙肝表面抗体
  377 + if ("".equals(antExChuModel.getYgbmkt()) || antExChuModel.getYgbmkt() == null) {//乙肝表面抗体
366 378 antExChuModel1.setYgbmkt(getCodeValue(model, "HBsAb"));
367 379 }
368   - if("".equals(antExChuModel.getYgeky()) || antExChuModel.getYgeky()==null){//乙肝e抗原
  380 + if ("".equals(antExChuModel.getYgeky()) || antExChuModel.getYgeky() == null) {//乙肝e抗原
369 381 antExChuModel1.setYgeky(getCodeValue(model, "HBeAg"));
370 382 }
371   - if("".equals(antExChuModel.getYgekt()) || antExChuModel.getYgekt()==null){//乙肝e抗体
  383 + if ("".equals(antExChuModel.getYgekt()) || antExChuModel.getYgekt() == null) {//乙肝e抗体
372 384 antExChuModel1.setYgekt(getCodeValue(model, "HBeAb"));
373 385 }
374   - if("".equals(antExChuModel.getYghxkt()) || antExChuModel.getYghxkt()==null){//乙肝核心抗体
  386 + if ("".equals(antExChuModel.getYghxkt()) || antExChuModel.getYghxkt() == null) {//乙肝核心抗体
375 387 antExChuModel1.setYghxkt(getCodeValue(model, "HBcAb"));
376 388 }
377   - if("".equals(antExChuModel.getXqjq()) || antExChuModel.getXqjq()==null){//血清肌
  389 + if ("".equals(antExChuModel.getXqjq()) || antExChuModel.getXqjq() == null) {//血清肌
378 390 antExChuModel1.setXqjq(getCodeValue(model, "CRE"));
379 391 }
380   - if("".equals(antExChuModel.getXnsd()) || antExChuModel.getXnsd()==null){//血尿素氮
  392 + if ("".equals(antExChuModel.getXnsd()) || antExChuModel.getXnsd() == null) {//血尿素氮
381 393 antExChuModel1.setXnsd(getCodeValue(model, "UREA"));
382 394 }
383   - if("".equals(antExChuModel.getSyjg()) || antExChuModel.getSyjg()==null){//实验结果
  395 + if ("".equals(antExChuModel.getSyjg()) || antExChuModel.getSyjg() == null) {//实验结果
384 396 antExChuModel1.setSyjg(getCodeValue(model, "TP1"));
385 397 }
386   - if("".equals(antExChuModel.getHivkt()) || antExChuModel.getHivkt()==null){//hit抗体检测
  398 + if ("".equals(antExChuModel.getHivkt()) || antExChuModel.getHivkt() == null) {//hit抗体检测
387 399 antExChuModel1.setHivkt(getCodeValue(model, "HIV1"));
388 400 }
389 401  
390   - if("".equals(antExChuModel.getYdqjd()) || antExChuModel.getYdqjd()==null){//阴道清洁度
  402 + if ("".equals(antExChuModel.getYdqjd()) || antExChuModel.getYdqjd() == null) {//阴道清洁度
391 403 antExChuModel1.setYdqjd(getCodeValue(model, "QJD"));
392 404 }
393   - if("".equals(antExChuModel.getTtita()) || antExChuModel.getTtita()==null){
  405 + if ("".equals(antExChuModel.getTtita()) || antExChuModel.getTtita() == null) {
394 406 antExChuModel1.setTtita(getCodeValue(model, "T3")); // 总三碘甲状腺原氨酸(TT3)
395 407 }
396   - if("".equals(antExChuModel.getTotalThy()) || antExChuModel.getTotalThy()==null){
  408 + if ("".equals(antExChuModel.getTotalThy()) || antExChuModel.getTotalThy() == null) {
397 409 antExChuModel1.setTotalThy(getCodeValue(model, "T4")); //总甲状腺素(TT4)
398 410 }
399   - if("".equals(antExChuModel.getFtita()) || antExChuModel.getFtita()==null){
  411 + if ("".equals(antExChuModel.getFtita()) || antExChuModel.getFtita() == null) {
400 412 antExChuModel1.setFtita(getCodeValue(model, "FT3")); // //游离三碘甲状腺原氨酸(FT3)
401 413 }
402   - if("".equals(antExChuModel.getFreeThy()) || antExChuModel.getFreeThy()==null){
  414 + if ("".equals(antExChuModel.getFreeThy()) || antExChuModel.getFreeThy() == null) {
403 415 antExChuModel1.setFreeThy(getCodeValue(model, "FT4")); //游离甲状腺素(FT4)
404 416 }
405   - if("".equals(antExChuModel.getPta()) || antExChuModel.getPta()==null){
  417 + if ("".equals(antExChuModel.getPta()) || antExChuModel.getPta() == null) {
406 418 antExChuModel1.setPta(getCodeValue(model, "PT")); //凝血酶原活动度(PT%)
407 419 }
408   - if("".equals(antExChuModel.getActPar()) || antExChuModel.getActPar()==null){
  420 + if ("".equals(antExChuModel.getActPar()) || antExChuModel.getActPar() == null) {
409 421 antExChuModel1.setActPar(getCodeValue(model, "APTT")); //活化部分凝血活酶时间(APTT)
410 422 }
411   - if("".equals(antExChuModel.getThrTime()) || antExChuModel.getThrTime()==null){
  423 + if ("".equals(antExChuModel.getThrTime()) || antExChuModel.getThrTime() == null) {
412 424 antExChuModel1.setThrTime(getCodeValue(model, "TT")); //凝血酶时间(TT)
413 425 }
414   - if("".equals(antExChuModel.getFibrin()) || antExChuModel.getFibrin()==null){
  426 + if ("".equals(antExChuModel.getFibrin()) || antExChuModel.getFibrin() == null) {
415 427 antExChuModel1.setFibrin(getCodeValue(model, "FIB")); //纤维蛋白原(FIB)
416 428 }
417 429  
418   - if("".equals(antExChuModel.getDimer()) || antExChuModel.getDimer()==null){
  430 + if ("".equals(antExChuModel.getDimer()) || antExChuModel.getDimer() == null) {
419 431 antExChuModel1.setDimer(getCodeValue(model, "D-Dimer")); //D-二聚体(D-Dimer)
420 432 }
421 433  
422   - if("".equals(antExChuModel.getTotalChol()) || antExChuModel.getTotalChol()==null){
  434 + if ("".equals(antExChuModel.getTotalChol()) || antExChuModel.getTotalChol() == null) {
423 435 antExChuModel1.setTotalChol(getCodeValue(model, "TC")); //总胆固醇(TC)
424 436 }
425   - if("".equals(antExChuModel.getTricer()) || antExChuModel.getTricer()==null){
  437 + if ("".equals(antExChuModel.getTricer()) || antExChuModel.getTricer() == null) {
426 438 antExChuModel1.setTricer(getCodeValue(model, "TG")); //甘油三酯(TG)
427 439 }
428   - if("".equals(antExChuModel.getHighDens()) || antExChuModel.getHighDens()==null){
  440 + if ("".equals(antExChuModel.getHighDens()) || antExChuModel.getHighDens() == null) {
429 441 antExChuModel1.setHighDens(getCodeValue(model, "HDL-C")); //高密度脂蛋白胆固醇(HDL-C)
430 442 }
431   - if("".equals(antExChuModel.getLowDens()) || antExChuModel.getLowDens()==null){
  443 + if ("".equals(antExChuModel.getLowDens()) || antExChuModel.getLowDens() == null) {
432 444 antExChuModel1.setLowDens(getCodeValue(model, "LDL-C")); //低密度脂蛋白胆固醇(LDL-C)
433 445 }
434 446  
435 447 }
  448 +
436 449 /**
437 450 * 秦皇岛妇幼更新初诊记录
  451 + *
438 452 * @param model
439 453 * @param antExChuModel
440 454 * @param antExChuModel1
441 455 */
442 456 private void antExChuModelQHDUpadte(LisReportModel model, AntExChuModel antExChuModel, AntExChuModel antExChuModel1) {
443   - if("".equals(antExChuModel.getXhdb()) || antExChuModel.getXhdb()==null){//血红蛋白
  457 + if ("".equals(antExChuModel.getXhdb()) || antExChuModel.getXhdb() == null) {//血红蛋白
444 458 antExChuModel1.setXhdb(getCodeValue(model, "HGB"));
445 459 }
446   - if("".equals(antExChuModel.getBxbjs()) || antExChuModel.getBxbjs()==null){//白细胞计数
  460 + if ("".equals(antExChuModel.getBxbjs()) || antExChuModel.getBxbjs() == null) {//白细胞计数
447 461 antExChuModel1.setBxbjs(getCodeValue(model, "WBC"));
448 462 }
449   - if("".equals(antExChuModel.getPlatelet()) || antExChuModel.getPlatelet()==null){//血小板
  463 + if ("".equals(antExChuModel.getPlatelet()) || antExChuModel.getPlatelet() == null) {//血小板
450 464 antExChuModel1.setPlatelet(getCodeValue(model, "PLT"));
451 465 }
452 466  
453   - if("".equals(antExChuModel.getNdb()) || antExChuModel.getNdb()==null){//尿蛋白
  467 + if ("".equals(antExChuModel.getNdb()) || antExChuModel.getNdb() == null) {//尿蛋白
454 468 antExChuModel1.setNdb(getCodeValue(model, "PRO-U"));
455 469 }
456   - if("".equals(antExChuModel.getNt()) || antExChuModel.getNt()==null){ //尿糖
  470 + if ("".equals(antExChuModel.getNt()) || antExChuModel.getNt() == null) { //尿糖
457 471 antExChuModel1.setNt(getCodeValue(model, "GLU-U"));
458 472 }
459   - if("".equals(antExChuModel.getUrineKetone()) || antExChuModel.getUrineKetone()==null){//尿酮体
  473 + if ("".equals(antExChuModel.getUrineKetone()) || antExChuModel.getUrineKetone() == null) {//尿酮体
460 474 antExChuModel1.setUrineKetone(getCodeValue(model, "KET-U"));
461 475 }
462   - if("".equals(antExChuModel.getBld()) || antExChuModel.getBld()==null){//尿潜血
  476 + if ("".equals(antExChuModel.getBld()) || antExChuModel.getBld() == null) {//尿潜血
463 477 antExChuModel1.setBld(getCodeValue(model, "ERY"));
464 478 }
465 479  
466   - if("".equals(antExChuModel.getAbo()) || antExChuModel.getAbo()==null){//血型
  480 + if ("".equals(antExChuModel.getAbo()) || antExChuModel.getAbo() == null) {//血型
467 481 antExChuModel1.setAbo(getCodeValue(model, "ABOType"));
468 482 }
469   - if("".equals(antExChuModel.getRh()) || antExChuModel.getRh()==null){//RH血型
  483 + if ("".equals(antExChuModel.getRh()) || antExChuModel.getRh() == null) {//RH血型
470 484 antExChuModel1.setRh(getCodeValue(model, "RHDType"));
471 485 }
472   - if("".equals(antExChuModel.getBloodSugar()) || antExChuModel.getBloodSugar()==null){//血糖
  486 + if ("".equals(antExChuModel.getBloodSugar()) || antExChuModel.getBloodSugar() == null) {//血糖
473 487 antExChuModel1.setBloodSugar(getCodeValue(model, "GLU"));
474 488 }
475 489  
476   - if("".equals(antExChuModel.getXqgbzam()) || antExChuModel.getXqgbzam()==null){//血清谷丙转氨酶
  490 + if ("".equals(antExChuModel.getXqgbzam()) || antExChuModel.getXqgbzam() == null) {//血清谷丙转氨酶
477 491 antExChuModel1.setXqgbzam(getCodeValue(model, "ALT."));
478 492 }
479   - if("".equals(antExChuModel.getXqgczam()) || antExChuModel.getXqgczam()==null){//血清谷草转氨酶
  493 + if ("".equals(antExChuModel.getXqgczam()) || antExChuModel.getXqgczam() == null) {//血清谷草转氨酶
480 494 antExChuModel1.setXqgczam(getCodeValue(model, "AST."));
481 495 }
482 496  
483   - if("".equals(antExChuModel.getAlbumin()) || antExChuModel.getAlbumin()==null){//白蛋白
  497 + if ("".equals(antExChuModel.getAlbumin()) || antExChuModel.getAlbumin() == null) {//白蛋白
484 498 antExChuModel1.setAlbumin(getCodeValue(model, "ALB"));
485 499 }
486   - if("".equals(antExChuModel.getTotalBilirubin()) || antExChuModel.getTotalBilirubin()==null){//总胆红素
  500 + if ("".equals(antExChuModel.getTotalBilirubin()) || antExChuModel.getTotalBilirubin() == null) {//总胆红素
487 501 antExChuModel1.setTotalBilirubin(getCodeValue(model, "TBil"));
488 502 }
489   - if("".equals(antExChuModel.getJhBilirubin()) || antExChuModel.getJhBilirubin()==null){//结合胆红素
  503 + if ("".equals(antExChuModel.getJhBilirubin()) || antExChuModel.getJhBilirubin() == null) {//结合胆红素
490 504 antExChuModel1.setJhBilirubin(getCodeValue(model, "DBIL"));
491 505 }
492   - if("".equals(antExChuModel.getBg()) || antExChuModel.getBg()==null){//丙肝
  506 + if ("".equals(antExChuModel.getBg()) || antExChuModel.getBg() == null) {//丙肝
493 507 antExChuModel1.setBg(getCodeValue(model, "HCV"));
494 508 }
495 509  
496   - if("".equals(antExChuModel.getYgbmky()) || antExChuModel.getYgbmky()==null){//乙肝表面抗原
  510 + if ("".equals(antExChuModel.getYgbmky()) || antExChuModel.getYgbmky() == null) {//乙肝表面抗原
497 511 antExChuModel1.setYgbmky(getCodeValue(model, "HBsAg.."));
498 512 }
499   - if("".equals(antExChuModel.getYgbmkt()) || antExChuModel.getYgbmkt()==null){//乙肝表面抗体
  513 + if ("".equals(antExChuModel.getYgbmkt()) || antExChuModel.getYgbmkt() == null) {//乙肝表面抗体
500 514 antExChuModel1.setYgbmkt(getCodeValue(model, "HBsAb."));
501 515 }
502   - if("".equals(antExChuModel.getYgeky()) || antExChuModel.getYgeky()==null){//乙肝e抗原
  516 + if ("".equals(antExChuModel.getYgeky()) || antExChuModel.getYgeky() == null) {//乙肝e抗原
503 517 antExChuModel1.setYgeky(getCodeValue(model, "HBeAg."));
504 518 }
505   - if("".equals(antExChuModel.getYgekt()) || antExChuModel.getYgekt()==null){//乙肝e抗体
  519 + if ("".equals(antExChuModel.getYgekt()) || antExChuModel.getYgekt() == null) {//乙肝e抗体
506 520 antExChuModel1.setYgekt(getCodeValue(model, "HBEAB"));
507 521 }
508   - if("".equals(antExChuModel.getYghxkt()) || antExChuModel.getYghxkt()==null){//乙肝核心抗体
  522 + if ("".equals(antExChuModel.getYghxkt()) || antExChuModel.getYghxkt() == null) {//乙肝核心抗体
509 523 antExChuModel1.setYghxkt(getCodeValue(model, "HBcAb."));
510 524 }
511 525  
512   - if("".equals(antExChuModel.getXqjq()) || antExChuModel.getXqjq()==null){//血清肌
  526 + if ("".equals(antExChuModel.getXqjq()) || antExChuModel.getXqjq() == null) {//血清肌
513 527 antExChuModel1.setXqjq(getCodeValue(model, "Cr"));
514 528 }
515   - if("".equals(antExChuModel.getXnsd()) || antExChuModel.getXnsd()==null){//血尿素氮
  529 + if ("".equals(antExChuModel.getXnsd()) || antExChuModel.getXnsd() == null) {//血尿素氮
516 530 antExChuModel1.setXnsd(getCodeValue(model, "BUN"));
517 531 }
518 532  
519   - if("".equals(antExChuModel.getSyjg()) || antExChuModel.getSyjg()==null){//实验结果
  533 + if ("".equals(antExChuModel.getSyjg()) || antExChuModel.getSyjg() == null) {//实验结果
520 534 antExChuModel1.setSyjg(getCodeValue(model, "TPAb"));
521 535 }
522   - if("".equals(antExChuModel.getHivkt()) || antExChuModel.getHivkt()==null){//hit抗体检测
  536 + if ("".equals(antExChuModel.getHivkt()) || antExChuModel.getHivkt() == null) {//hit抗体检测
523 537 antExChuModel1.setHivkt(getCodeValue(model, "HIV."));
524 538 }
525 539  
526 540 //阴道分泌物
527   - if("".equals(antExChuModel.getYdqjd()) || antExChuModel.getYdqjd()==null){//阴道清洁度
  541 + if ("".equals(antExChuModel.getYdqjd()) || antExChuModel.getYdqjd() == null) {//阴道清洁度
528 542 antExChuModel1.setYdqjd(getCodeValue(model, "QJD"));
529 543 }
530 544  
531   - //甲状腺功能 FT3 FT4 TSH TpaAb TgAb A-TSHR 辅助检查没有该内容code
  545 + //甲状腺功能 FT3 FT4 TSH TpaAb TgAb A-TSHR 辅助检查没有该内容code
532 546  
533 547 }
534 548  
535 549  
536   -
537 550 private String getCodeValue(LisReportModel model, String codeStr) {
538   - if("".equals(model.getItemJson())|| model.getItemJson()==null){
  551 + if ("".equals(model.getItemJson()) || model.getItemJson() == null) {
539 552 return null;
540 553 }
541   - JSONArray jsonArray=JSONArray.fromObject(model.getItemJson());
  554 + JSONArray jsonArray = JSONArray.fromObject(model.getItemJson());
542 555 for (int i = 0; i < jsonArray.size(); i++) {
543   - Object o=jsonArray.get(i);
544   - JSONObject jsonObject2=JSONObject.fromObject(o);
545   - String code = (String)jsonObject2.get("code");
  556 + Object o = jsonArray.get(i);
  557 + JSONObject jsonObject2 = JSONObject.fromObject(o);
  558 + String code = (String) jsonObject2.get("code");
546 559 code = code.trim();
547   - if (code.equals(codeStr)){
548   - if("".equals((String)jsonObject2.get("result"))){
549   - return (String)jsonObject2.get("numberResult");
550   - }else {
551   - return (String)jsonObject2.get("result");
  560 + if (code.equals(codeStr)) {
  561 + if ("".equals((String) jsonObject2.get("result"))) {
  562 + return (String) jsonObject2.get("numberResult");
  563 + } else {
  564 + return (String) jsonObject2.get("result");
552 565 }
553 566 }
554 567 }