Files
LAB_LINGKUNGAN/Backend Detailed Flow for Auto Verification and Validation System.md

2.5 KiB

Backend Detailed Flow for Auto Verification and Validation System

1. Auto Verification Flow (Auto_verif.php)

verification_job() → for each order → re_process(orderDetailID)
   |
   ├── 1. check panic values (re_panic_value)
   │      └── Compare with critical value limits
   │
   ├── 2. check pre-analytic requirements
   │      └── Check specimen conditions, timing, etc.
   │
   ├── 3. check AMR range
   │      └── Ensure result is within analytical measurement range
   │
   └── 4. perform trend analysis (uji_trend)
          └── Compare with historical daily averages

2. Auto Validation Flow (Auto_valid.php)

validation_job() → for each order → re_process/calculate(orderDetailID)
   |
   ├── 1. check auto verification status
   │      └── Only continue if verification is OK
   │
   ├── 2. check condition (low/normal/high)
   │      └── Determine result classification
   │
   ├── 3. check review range (for non-normal results)
   │      └── Verify if abnormal result is within acceptable limits
   │
   ├── 4. check inconsistencies (getInconsistensi)
   │      └── Verify related test results are consistent
   │
   ├── 5. check delta check (get_delta_check_is_ok)
   │      └── Compare with previous results
   │
   └── 6. check reflex tests (get_reflex_test_is_ok)
          └── Verify additional tests required by the result

3. Critical Value Handling (Amr_limit.php)

auto_update() → for each order detail
   |
   ├── 1. check if result is numeric
   │      └── Skip non-numeric results
   │
   ├── 2. get extreme low/high values
   │      └── From nat_multirule table
   │
   ├── 3. compare with result
   │      └── Check if result is outside limits
   │
   └── 4. insert critical value record if needed
          └── For later notification and follow-up

4. Status Reporting (Auto_verif_valid.php)

status(orderHeaderID)
   |
   ├── 1. get verification status for all tests in order
   │      └── From auto_verif or auto_verif_v2 tables
   │
   ├── 2. get validation status for all tests in order
   │      └── From auto_valid or auto_valid_v2 tables
   │
   └── 3. return combined status for UI display
          └── Showing which tests passed or failed verification/validation