Commit 8e1ac2261f2676225f7f4882c7863e88b3c49b0c

Authored by yangfei
1 parent fdc8a5ec08

开通增值服务同步数据数据验证

Showing 1 changed file with 8 additions and 8 deletions

platform-biz-service/src/main/resources/mainOrm/master/PatientMarkHospital.xml View file @ 8e1ac22
... ... @@ -392,7 +392,7 @@
392 392 count(*) num,
393 393 sum(
394 394 CASE back_failure
395   - WHEN 1 THEN
  395 + WHEN 1 and back_result = 2 THEN
396 396 1
397 397 ELSE
398 398 0
... ... @@ -400,7 +400,7 @@
400 400 ) AS noPhoneNum,
401 401 sum(
402 402 CASE back_failure
403   - WHEN 2 THEN
  403 + WHEN 2 and back_result = 2 THEN
404 404 1
405 405 ELSE
406 406 0
... ... @@ -408,7 +408,7 @@
408 408 ) AS otherHospNum,
409 409 sum(
410 410 CASE back_failure
411   - WHEN 3 THEN
  411 + WHEN 3 and back_result = 2 THEN
412 412 1
413 413 ELSE
414 414 0
... ... @@ -416,7 +416,7 @@
416 416 ) AS indeterNum,
417 417 sum(
418 418 CASE back_failure
419   - WHEN 4 THEN
  419 + WHEN 4 and back_result = 2 THEN
420 420 1
421 421 ELSE
422 422 0
... ... @@ -432,7 +432,7 @@
432 432 count(*) num,
433 433 sum(
434 434 CASE in_hospit_failure
435   - WHEN 1 THEN
  435 + WHEN 1 and in_hospit_result = 2 THEN
436 436 1
437 437 ELSE
438 438 0
... ... @@ -440,7 +440,7 @@
440 440 ) AS 电话无人接听,
441 441 sum(
442 442 CASE in_hospit_failure
443   - WHEN 2 THEN
  443 + WHEN 2 and in_hospit_result = 2 THEN
444 444 1
445 445 ELSE
446 446 0
... ... @@ -448,7 +448,7 @@
448 448 ) AS 他院已办理住院,
449 449 sum(
450 450 CASE in_hospit_failure
451   - WHEN 3 THEN
  451 + WHEN 3 and in_hospit_result = 2 THEN
452 452 1
453 453 ELSE
454 454 0
... ... @@ -456,7 +456,7 @@
456 456 ) AS 暂时未确定,
457 457 sum(
458 458 CASE in_hospit_failure
459   - WHEN 4 THEN
  459 + WHEN 4 and in_hospit_result = 2 THEN
460 460 1
461 461 ELSE
462 462 0