๐ฌ LIS Master Blueprint โ Sample ร Investigation Lifecycle
ุงูููุณูุฉ ุงูุฌุฏูุฏุฉ: ูู ุชุญููู (investigation) ุฏุงุฎู request ูู ุญุงูุฉ ู
ุณุชููุฉ ูู
ุณุงุฑ ุญูุงุฉ ู
ููุตู. ุงูู sample (ุงูุฃูุจูุจุฉ) ุจูุช ู
ุฌุฑุฏ "ุญุงููุฉ" ุชุญู
ู ุนุฏุฏ ู
ู ุงูุชุญุงููู ูู ูุญุธุฉ ู
ุนูููุฉ. ูู ุงุชุฃุฌู ุชุญููู ูุงุญุฏ ู
ู ุจููุ ูุชููู ูู sample ุขุฎุฑุ ููุณุฌููู ุงูุชุบููุฑ ูู ุณุฌู (log). ูู ุนู
ููุฉ ุจุชุณุฌู ุชูููุชูุง ูุงูู
ุณุชุฎุฏู
ุงููู ุนู
ููุง.
ูก. ุงูู Data Model ุงูู
ูุญููุฏ
ุงูุฌุฏูู ุงูู
ุญูุฑู ุงูุฌุฏูุฏ: lab_sample_investigations
lab_sample_investigations
โโโ id
โโโ lab_sample_id FK โ lab_samples (ุงูู sample ุงูุญุงูู)
โโโ lab_investigation_id FK โ lab_investigations (ุงูุชุญููู ุงููุฑุฏู โ ูู panel memberุ ุฏู ุงูู member ID)
โโโ lab_request_investigation_id FK โ lab_request_investigations (ุงูู pivot ุงูุฃุตูู)
โโโ lab_request_id FK โ lab_requests (denormalized for fast queries)
โโโ status ENUM (state machine ุจุงูุฃุณูู)
โโโ lab_external_lab_id FK โ lab_external_labs (ููู outsourced ููุท)
โโโ external_send_at TIMESTAMP NULL
โโโ external_received_at TIMESTAMP NULL
โโโ assigned_to_user_id FK โ users NULL (ู
ุณุคูู ุนู ุงูู outsourced)
โโโ retest_count INT DEFAULT 0
โโโ created_at, updated_at, deleted_at
โโโ UNIQUE(lab_sample_id, lab_investigation_id, deleted_at)
ุฌุฏูู ุงูุณุฌู (audit trail): lab_sample_investigation_logs
lab_sample_investigation_logs
โโโ id
โโโ lab_sample_investigation_id FK
โโโ lab_sample_id, lab_investigation_id (denormalized)
โโโ action ENUM('created','collected','received','rejected',
โ 'deferred','cancelled','outsourced','received_back',
โ 'result_entered','rerun','retracted','released',
โ 'printed','published')
โโโ from_status, to_status ENUM
โโโ reason_code STRING NULL (e.g. NOT_FAST, HEMOLYZED)
โโโ reason_text TEXT NULL (ุณุจุจ ูุตู ููู defer/cancel/reject)
โโโ result_value_before TEXT NULL (ููู rerun โ ููู
ุฉ ูุจู ุงูู
ุณุญ)
โโโ meta JSON NULL
โโโ user_id FK โ users
โโโ ip_address, user_agent
โโโ created_at
ุชุนุฏููุงุช ุนูู ุฌุฏุงูู ูุงุฆู
ุฉ
| ุงูุฌุฏูู | ุงูุฅุถุงูุฉ | ุงููุงูุฏุฉ |
lab_investigations |
tat_hours INT NULL |
ููุช ุงูุฅุฌุงุจุฉ ุงูู
ุชููุน ููุชุญููู ุฏุงุฎููุงู (TAT ุงูุงูุชุฑุงุถู) |
lab_external_lab_pricing |
tat_hours INT NULL |
TAT ููู
ุนู
ู ุงูุฎุงุฑุฌู ุฏู ููุชุญููู ุฏู (ูุทุบู ุนูู ุงูุงูุชุฑุงุถู) |
lab_results |
printable_comment, internal_note, defer_comment, entry_source |
ูุตู ุงูู ูฃ ุฃููุงุน ููู
ูุชุณ + ู
ู ููู ุฏุฎูุช ุงููุชูุฌุฉ |
lab_external_lab_referrals |
assigned_to_user_id FK |
ู
ุณุคูู ุฅุฑุณุงู/ุงุณุชูุงู
ุงูุชุญููู ุงูุฎุงุฑุฌู |
ูข. ุงูู State Machine ุงูู
ูุญููุฏ (ููู ุชุญููู)
ูู lab_sample_investigation ุจูู
ุฑ ุจุญุงูุฉ ู
ู ุงูุญุงูุงุช ุฏู. ุงูู state machine ุจูุชู
ุงููุงุฐู ุนูู ู
ุณุชูู ุงูุชุญููู ุงููุงุญุฏุ ู
ุด ุงูู sample ุจุงููุงู
ู.
| ุงูุญุงูุฉ | ุงููุตู | ุงูู Transitions ุงูู
ุณู
ูุญุฉ |
| pending | ุงูุชุญููู ุถู
ู sample ุจุงูุชุธุงุฑ ุงูุชุฌู
ูุน | โ collected, deferred, cancelled, outsourced |
| collected | ุงูู sample ุงุชุฌู
ุนุช ู
ู ุงูู
ุฑูุถ | โ received, rejected (ูู ุงูุงุณุชูุจุงู) |
| received | ุงูู sample ูุตูุช ุงูู
ุนู
ู (delivered) | โ in_progress, rejected, outsourced |
| in_progress | ุงุชุนู
ู ุนููู start ูู ุงููุงู ุจุงู | โ result_entered, rejected, outsourced |
| result_entered | ุงุชุฏุฎูุช ูุชูุฌุฉ (ุฃูู ู
ุฑุฉ) ู
ู ุฃู ู
ุตุฏุฑ (manual ุฃู machine โ ููุณ ุงูุญุงูุฉ) | โ validated, rerun, retracted, outsourced |
| validated | ุงูู
ุณุคูู ุงูููู ูุซููู ุงููุชูุฌุฉ | โ released, rerun, retracted |
| released | ุงุชุฃุฐู ุจุฅุตุฏุงุฑ ุงููุชูุฌุฉ ููู
ุฑูุถ | โ printed, published, retracted |
| printed | ุงูุชูุฑูุฑ ุงุชุทุจุน | โ published, retracted |
| published | ุงุชูุดุฑ ููู
ุฑูุถ ูู ุงูู portal | โ retracted (Unpublish) |
| deferred | ุงุชุฃุฌู ูู ุงูุชุฌู
ูุน (ูู
ุนุงุฏ ุชุงูู) | โ recollected (sample ุฌุฏูุฏ) |
| rejected | ุงุชุฑูุถ ูู ุงูุงุณุชูุจุงู (ุชุงูู) | โ recollected (sample ุฌุฏูุฏ) |
| cancelled | ุงุชูุบู ููุงุฆูุงู | (terminal โ ูุฑุฌุน ุจู "Recollect") |
| outsourced | ุงุชุจุนุช ูู
ุนู
ู ุฎุงุฑุฌู | โ external_in_progress โ result_entered |
| retracted | ุงุชุณุญุจุช ุงููุชูุฌุฉ (rerun ุฃู unpublish) โ ู
ูุชูุญุฉ ูุฃู ุนู
ููุฉ | โ result_entered (re-enter) / deferred / cancelled / outsourced / in_progress (rerun) / validated / released / published |
ุงูู Actions โ Status Transitions
| ุงูู Action | ุฅูู ุงููู ูุญุตู |
| Collect | ูู rows pending ุนูู ุงูู sample โ collected. ูู deferred ู
ูุฌูุฏุฉุ ุชุชุฌุงูู. |
| Defer (ูู ุงูุชุฌู
ูุน) | ุงุฎุชุงุฑ ุงูู testsุ sample ุฌุฏูุฏ is_deferred=trueุ rows ุชูุชูู ุฅููู ุจู status=deferred. |
| Cancel | ุงุฎุชุงุฑ ุงูู testsุ sample ุฌุฏูุฏุ rows status=cancelled. ู
ุด ูุชุฑุฌุน ุชููุงุฆูุงู. |
| Send Out | ุงุฎุชุงุฑ ุงูู tests + ู
ุนู
ู ุฎุงุฑุฌูุ sample ุฌุฏูุฏุ rows status=outsourced + external_lab_id. |
| Reject (ูู ุงูุงุณุชูุจุงู) | ุงุฎุชุงุฑ ุงูู testsุ rows ุนูู ููุณ sample โ rejected. ุงูู sample ู
ูุชุญุฑูุด. |
| Recollect | ู
ู deferred/rejected/cancelled โ sample ุฌุฏูุฏ pendingุ rows ุชูุชูู. |
| Receive | collected โ received. ูู rows ุนูู ุงูู sample โ received. |
| Start (ุงููุงู ุจุงู) | received โ in_progress (ููู row ูู ุงูู sample ุงููู ู
ุด outsourced/rejected). |
| Enter Result | in_progress โ result_entered + ููุดุฃ row ูู lab_results. ุงูู entry_source ุจูุชุญุฏุฏ ุญุณุจ ุงูู
ุตุฏุฑ (workflow/validation/external_lab/machine) โ ููุณ ุงูุญุงูุฉุ ููุณ ุงูู rowุ ุงุฎุชูุงู ุจุณ ูู metadata. |
| Rerun | result_entered/validated โ retracted (ุณุงุจูุงู) + result ุฌุฏูุฏ + log ููู ุงูููู
ุฉ ุงููุฏูู
ุฉ. |
| Validate / Release / Print / Publish | status progression normal. |
| Unpublish (Retract) | ุฃู ุญุงูุฉ ู
ู released / printed / published โ retracted. ุงููุชูุฌุฉ ุชุฎุชูู ู
ู ุจูุฑุชุงู ุงูู
ุฑูุถ ููุฑุงู. ุงูู test ููุฏุฑ ูุนู
ู ุจุนุฏูุง ุฃู ุนู
ููุฉ (defer / cancel / send out / rerun / re-validate / re-release / re-publish). |
ูฃ. ุงูุดุงุดุงุช (Mockups + Logic)
ูฃ.ูก ุดุงุดุฉ Collection /lab/samples
๐งช Collection Worklistูขูฆ ู
ุงูู ูขู ูขูฆ
๐ Pending 12
โฑ Deferred 3
๐ซ Cancelled 1
๐ค Sent Out 5
๐ History
Khalid Abdullah ยท MRN-000003LR-2026-00145 โ 2 tubes
Serum ยท BiochemistryCHOL, HDL, LDL, VLDL (TG deferred separately)2605266XHLQH-BIO
pending
deferred
cancelled
outsourced
ุงูู Logic
- ุงูู tube ุจูุนุฑุถ ุงูู test codes ุงููุฑุฏูุฉ (ู
ู
sample.investigations) โ ูุง panel parent ููุง inference.
- ุงูุชุญุงููู deferred/cancelled/outsourced ุนูู ููุณ ุงูู request ู
ุด ุจุชุธูุฑ ููุง (ูู ุชุงุจุงุชูู
).
- ูู ุนู
ููุฉ (Defer/Cancel/Send Out) ุจุชูุชุญ dialog ููู ูุงุฆู
ุฉ ุงูู tests ุจู panel structure (parent header + members).
- ุงูู Cancel ูุงูู Send Out ูู ูุงุญุฏ ุจูุงุฎุฏ ุณุจุจ + comment ุฏุงุฎูู.
- ุงูู "Sent Out" tab ูู ููุณ ุงูู referrals ููู ููุชุฑ ุจู status outsourced.
ูฃ.ูข ุดุงุดุฉ Reception /lab/reception (ุฌุฏูุฏุฉ)
๐ฅ ReceptionScan barcode...
๐ฅ To Receive 8
โ Rejected 2
๐ History
Khalid Abdullah ยท MRN-000003 โ LR-2026-00145Collected: 14:23
Serum ยท BiochemistryCHOL, HDL, LDL, VLDL2605266XHLQH-BIO
collected (in)โ
received (out) ุฃู rejected
ุงูู Logic
- ุงูุตูุญุฉ ุจุชุฌู
ุน ูู ุงูู samples ุงููู
status=collected ูู ุงูู
ุนู
ู (ุจุงูุชุธุงุฑ ุงูุงุณุชูุจุงู).
- Scan barcode โ ููุงูู ุงูู sample โ ูู highlight ููุนุฑุถ ุงูู tests.
- ุฒุฑ Reject ููุชุญ dialog ู
ุดุงุจู ููู defer dialog: select ุงูู tests + reason. ูููู ุงูู rows ูู status=rejected (ู
ุด sample ุฌุฏูุฏ โ ุนูู ููุณ ุงูู sampleุ ูุฃู ุงูู sample ุงุชุฑูุถ ุฌุฒุฆูุงู ุฃู ูููุงู).
- ุงูู "Rejected" tab ูู ุงููู ุจุชุทูุน ู
ููุง ุงูู tests ููู recollect (ุชุธูุฑ ูู ุตูุญุฉ ุงูู requests ุจุฃููููุฉ).
ูฃ.ูฃ ุดุงุดุฉ Workflow /lab/worklist (ุงููุงู ุจุงู ููู
ุนู
ู ุงูุฏุงุฎูู)
ุงูู component ุงููุนูู: dept-worklist.component.ts (ูกูขูฆู ุณุทุฑ). ุดุงุดุฉ ุงูููููู ุฏุงุฎู ุฃูุณุงู
ุงูู
ุนู
ู ุจูุฏุฎููุง ูููุง ุงููุชุงุฆุฌ. ุงูู actions ุงููู ุจุชู run ููุง ูู subset ู
ู ุงููู ุจุชู run ูู ุงูู validation screen.
๐งฌ Biochemistry Section9 received ยท 4 in-progress ยท 12 completed
๐ฅ Received (9)
Khalid ยท LR-145
CHOL, HDL, LDL, VLDL
โ In Progress (4)
Sara ยท LR-140 โ TG
Value: 152 mg/dL
โ Completed (12)
Ahmed ยท LR-138 โ HDL โปร1
Value: 48 mg/dL
ุงูู Logic ุงูุฌุฏูุฏุฉ
- Per-test actions: ุงููุงู ุจุงู ุจูุนุฑุถ ุงูู tests ุงููุฑุฏูุฉ ู
ุด ุงูู samples. ูู test ุจูุชู
ุชุชุจุนู ุจู status ูุฑุฏููุง.
- Rerun (ุฅุนุงุฏุฉ ุงูุชุณุช):
- ุงูู status ุงูุญุงูู ููุฎุฒู ูู
lab_sample_investigation_logs ู
ุน action=rerun ู result_value_before
- ุงูู
lab_result ุงูุญุงูู ุจู is_retracted=true (ุฃู ูููู ูู history table)
- ุชูุดุฃ
lab_result ุฌุฏูุฏุฉ ูุงุถูุฉ
retest_count++ ุนูู ุงูู sample_investigation
- ุงูู test ุจุชุฑุฌุน ูู
in_progress ูุญุฏ ุฅุฏุฎุงู ุงููุชูุฌุฉ ุงูุฌุฏูุฏุฉ
- ุนูุงู
ุฉ โปรN ุจุชุธูุฑ ูู ุงููุงุฑุฏ
- Cancel/Defer/Send Out: ููุณ ุงูู logic ุจุชุงุน ุงูู collection ููู ู
ู ุงููุงู ุจุงู.
- Panel: ู
ู
ูู defer/reject/send-out ูู ุงูุจูู ุฃู member ูุงุญุฏ. ุงูู dialog ุจูุนุฑุถูุง ุจู parent header + members.
ูฃ.ูค ุดุงุดุฉ Validation /lab/validation (superset ู
ู Workflow)
ุงูู component ุงููุนูู: validation-worklist.component.ts (ูกูจูฉูข ุณุทุฑ). ููุณ ูุฏุฑุงุช ุดุงุดุฉ ุงูู Workflow + ุฅุถุงูุงุช: validate / release / print / publish. ุงูููู ุงูู senior ุฃู ุงูู pathologist ูู ุงููู ุจูุดุชุบู ุนูููุง.
โ
ValidationFilter: All sections ยท Status: result_entered
| Test | Patient | Value | Reference | Flag | Sample Hist. | Patient Hist. | Actions |
| TG | Khalid (LR-145) | 152 | 0-150 | โ High |
โป x1 was: 168 |
3 results last: 134 (3 mo) |
|
| HDL | Sara (LR-140) EXT | 52 | 40-60 | Normal |
โ | 1 result |
|
ุจุนุฏ Validate โ ุฒุฑุงุฑ ุ ุจุนุฏ Release โ ู
ุจุนุฏ Publish โ ุฒุฑุงุฑ โ ูุฑุฌุน ุงูุชุญููู ูู retracted. ุงูู test ูุฎุชูู ู
ู ุจูุฑุชุงู ุงูู
ุฑูุถ ููุฑุงู ููุจูู ู
ูุชูุญ ูุฃู ุนู
ููุฉ: defer, cancel, send out, rerun, re-validate, re-publish.
ุงูู Logic
- ุงูุตูุญุฉ ุจุชุนุฑุถ ุงูู tests ุงููู ูู status:
result_entered ุฃู validated.
- ุนู
ูุฏูู ู
ููุตููู ููู history:
- Sample History โ rerun count + previous values ุนูู ููุณ ุงูู sample (ู
ู logs)
- Patient History โ ูุชุงุฆุฌ ุงูู
ุฑูุถ ุงูุณุงุจูุฉ ูููุณ ุงูุชุญููู ูู requests ูุฏูู
ุฉ
- ุงูุชุญุงููู ุงูุฎุงุฑุฌูุฉ ุชุธูุฑ ุจููู ู
ู
ูุฒ (EXT).
- ุงูุชุญุงููู ุงูู
ุคุฌูุฉ ุชุธูุฑ ุจู Deferred.
- ูู ุงูู actions ู
ูุฌูุฏุฉ ููุง ุฃูุถุงู (rerun, cancel, send out) ูู ุงุญุชูุฌ ููุฅุนุงุฏุฉ ุจุนุฏ ุฅุฏุฎุงู ุงููุชูุฌุฉ.
ูฃ.ูฅ ุดุงุดุฉ Referrals /lab/referrals
๐ External Referrals
โ Pending Send 3
๐ค Sent 5
๐ฅ Received 2
โ Completed
| Test | Patient/Req | External Lab | Price | TAT | Assigned To | Sent At | Actions |
| FT3 | Khalid ยท LR-145 | Mokattam Lab | 120 EGP | 4 hrs | Tech: Ahmed | โ | |
| FT4 | Sara ยท LR-140 | Mokattam Lab | 110 EGP | 4 hrs | Tech: Ahmed | 10:20 | |
ุงูู Logic
- ุงูู referrals ุจุชุทูุน ูู
ุง ูุญุตู Send Out ู
ู ุฃู ุดุงุดุฉ (collection/kanban/validation).
- ุงูู TAT ุจููุฌู ู
ู
lab_external_lab_pricing.tat_hours (ุฃู ุงูุงูุชุฑุงุถู ู
ู lab_investigations.tat_hours).
- ุงูู Assigned To โ ุญูู ุฌุฏูุฏ ูุญุฏุฏ ุงูู
ุณุคูู ุงูููู ุนู ุงูุฅุฑุณุงู/ุงูุงุณุชูุจุงู.
- ูู ู
ุฑุญูุฉ (Send/Receive/Enter Result) ุจุชุณุฌู ููุช ูู
ูู ุนู
ู + log.
- ุจุนุฏ ุฅุฏุฎุงู ุงููุชูุฌุฉ ููุงุ ุงูู test ุจูุธูุฑ ูู ุงูู Validation screen ุนุงุฏู.
ูฃ.ูฆ ู
ุตุงุฏุฑ ุงููุชุงุฆุฌ (Result Entry Sources)
ุงููุชูุฌุฉ ูุฃู ุชุญููู ู
ู
ูู ุชูุฌู ู
ู ูค ู
ุตุงุฏุฑ. ูู ู
ุตุฏุฑ ูุณุฌู ูู ุนู
ูุฏ lab_results.entry_source + ููุชุฌ log ูู lab_sample_investigation_logs.
| ุงูู
ุตุฏุฑ | ุงูู flow | ุงูู entry_source |
| 1. Workflow Screen Manual |
ุงูููู ูุฏุฎู ุงููุชูุฌุฉ ูู ุงููุงู ุจุงู ุฃุซูุงุก ุงูู
ุนุงูุฌุฉ |
workflow |
| 2. Validation Screen Manual |
ุงูููู ูุฏุฎู ุฃู ูุนุฏู ุงููุชูุฌุฉ ูู ุตูุญุฉ ุงูู validation |
validation |
| 3. External Lab EXT |
ุงูููู ุงูู
ุณุคูู ูุณุชูู
ุงููุชูุฌุฉ ู
ู ุงูู
ุนู
ู ุงูุฎุงุฑุฌู ููุฏุฎููุง |
external_lab |
| 4. Lab Analyzer (Machine API) AUTO |
ุงูุฌูุงุฒ ุจูุจุนุช ุงููุชูุฌุฉ ุจุงูู barcode โ matching ุชููุงุฆู โ ุฏูุชูุฑ ูู validate ุฃู ูุนู
ู rerun |
machine |
ุงูููุณูุฉ: Machine = Manual + Metadata
ุงูู machine result ูุงูู manual result ูู
ุง ููุณ ุงูููุงู โ ูู ุงููู ุจูุชุบูุฑ: ู
ุตุฏุฑ ุงูุฅุฏุฎุงู + ุจุนุถ ุงูู metadata.
ููุณ
lab_result rowุ ููุณ ุงูู status flow (
result_entered โ validated โ ...)ุ ููุณ ุงูู rerun/retract behavior. ุงููุฑู ููุท:
| Manual | Machine |
entry_source | workflow / validation / external_lab | machine |
entered_by | user_id | null (ุฃู machine_user_id) |
entered_at | ููุช ุงูุฅุฏุฎุงู | ููุช ุงุณุชูุงู
ู
ู ุงูุฌูุงุฒ |
machine_id | null | ุงูู
ุนุฑูู ููุฌูุงุฒ |
raw_data (JSON) | null | ุงูู raw payload ู
ู ุงูุฌูุงุฒ |
ุงููู ุจูุญุชุงุฌู: ูุถูู
machine_id +
raw_data ุนูู
lab_results (ุฃู ูุณูุจ ุงูู
lab_machine_results ู
ููุตู ููุนู
ู FK).
ุงูุชูุณุนุฉ ุงูู
ุณุชูุจููุฉ (ูุงุญูุงู):
- Real-time machine API integration (HL7/ASTM protocols)
- Auto-match by barcode ุญุชู ูู ุงูู test_code ู
ุฎุชูู ุจูู ุงูุฌูุงุฒ ูุงููุชุงููุฌ
- Auto-approve ูู values ุฏุงุฎู reference range ุงูุทุจูุนู
- QC integration โ machine readings ุชุนุฏูู ุงูู Levey-Jennings
- Delta check ุถุฏ ุขุฎุฑ ูุชูุฌุฉ ููู
ุฑูุถ
ู
ุญุทูุด ูู ุงูู scope ุงูุญุงูู โ ุจุณ ุงูู state machine ุจูุงุฎุฏูู
ูู ุงูุงุนุชุจุงุฑ.
ูฃ.ูง Smart Search + Bulk Operations
ูู ุดุงุดุงุช ุงูู
Workflow ู
Validation โ ุงูููู ููุฏุฑ ูุตูู ููุนู
ู ุงุฎุชูุงุฑ ุฌู
ุงุนู ุซู
action ูุงุญุฏุฉ ุนูู ูู ุงูู
ุฎุชุงุฑ:
- ุงุฎุชุงุฑ ุชุญููู ู
ุนููู (ู
ุซูุงู CBC) โ ูุทูุน ูู ุงููุชุงุฆุฌ ุจุชุงุนุช CBC ุงููู ุญุตูุช ุงูููู
ุฃู ูู ูุชุฑุฉ ุฒู
ููุฉ
- ุงุฎุชุงุฑ section (ู
ุซูุงู Biochemistry) โ ูู ุชุญุงููู ุงููุณู
- ุงุฎุชุงุฑ status (entered / validated / released) โ ูู ุงููู ูู ุงูุญุงูุฉ ุฏู
- ุงุฎุชุงุฑ specific patient / request
- filter ุจู date range (today / yesterday / last 7 days / custom)
- filter ุจู entry_source (manual / machine / external)
- filter ุจู flag (normal / abnormal / critical)
ุงูู Mockup
โ
Validation โ Bulk ModeFiltered: CBC ยท Today ยท entered
๐ Filters:
โ 24 selected
Clear selection
Showing 24 of 24 CBC results from today
ุงูู Use Cases ุงููุนููุฉ
| Use Case | Filter Applied | Bulk Action |
| ุงูู
ูุงููุฉ ุงูุฌู
ุงุนูุฉ ุนูู CBC ุงูููุงุฑุฏู |
Test: CBC ยท Status: entered ยท Date: Today |
Bulk Validate โ Bulk Release |
| ุทุจุงุนุฉ ูู ุชูุงุฑูุฑ ุงูููู
|
Status: released ยท Date: Today |
Bulk Print |
| ูุดุฑ ุงูุชูุงุฑูุฑ ุงููู ุงุชุทุจุนุช |
Status: printed ยท Date: Today |
Bulk Publish |
| QC review ููู CBC ุงูููู
|
Test: CBC ยท Date: Today ยท Flag: All |
(View Only โ ู
ูุงุฑูุฉ ุงูููู
ุจุฏูู action) |
| ุฅุนุงุฏุฉ ูุญุต ูู ุงููุชุงุฆุฌ ุงูุฎุงุฑุฌุฉ ุนู ุงูู range |
Date: Today ยท Flag: Critical |
Bulk Rerun (ุฃู Bulk Send Out) |
| ุฅูุบุงุก ูู ุชุญุงููู request ุงุชุงุฌู |
Patient: X ยท Status: entered |
Bulk Cancel |
ุงูู Backend
ูู action ุฌู
ุงุนูุฉ ุจุชุฑุณู ุทูุจ ูุงุญุฏ ุจู
investigation_ids[]:
POST /lis/sample-investigations/bulk-action
{
action: "validate" | "release" | "print" | "publish" | "unpublish" |
"rerun" | "send_out" | "cancel" | "defer",
sample_investigation_ids: [123, 124, 125, ...],
reason: "..." (ููู cancel/defer/send_out)
external_lab_id: 5 (ููู send_out)
}
ุงูู BE ุจูู wrap ูู transaction ููุฑุฌุน counts:
{ succeeded: 22, failed: 2, errors: [...] }.
QC / Precision Check Mode
ุฒุฑุงุฑ ุฎุงุต
"QC View" ูููุชุฑ ูู ุงููุชุงุฆุฌ ุจุชุงุนุช ุชุญููู ู
ุนูู ูู ูุชุฑุฉ + ูุนุฑุถูู
ูู:
- ุฌุฏูู ุจู box plot ุฃู histogram ููููู
- ู
ุชูุณุท + SD (standard deviation)
- ุชุญุฏูุฏ outliers ุชููุงุฆู
- ู
ูุงุฑูุฉ ู
ุน target mean ู
ู QC lot ูู ู
ูุฌูุฏ
ู
ู
ูู ูุถุน ุฏู ูู Phase ูค ูู
ูุฒุฉ ุฅุถุงููุฉ.
ูค. ุงูู Comments Architecture
| ุงูููุน | ุนู
ูุฏ | ุงูุงุณุชุฎุฏุงู
| ูุธูุฑ ูู |
| Printable Comment | lab_results.printable_comment | ุชุนููู ููู ุนูู ุงููุชูุฌุฉ ูุทุจุน ู
ุน ุงูุชูุฑูุฑ | ุงูุชูุฑูุฑ ุงูู
ุทุจูุน ููู
ุฑูุถ |
| Internal Note | lab_results.internal_note | ู
ูุงุญุธุฉ ุจูู ุงูููููู ููุท (ู
ุด ุจุชุธูุฑ ููู
ุฑูุถ) | ุดุงุดุฉ ุงูู workflow + validation |
| Action Reason | lab_sample_investigation_logs.reason_text | ุณุจุจ ุงูู defer/cancel/reject/rerun | ุณุฌู ุงูุนู
ููุงุช ุนูู ุงูุชุญููู |
ูฅ. ุงูู Audit Trail
ูู ุนู
ููุฉ = log row:
- ู
ุชู (timestamp)
- ู
ูู (user_id)
- ู
ู IP ุฅูู (ip_address) โ ููู compliance
- ุฅูู ุงูู status ุงููู ุงุชุบูุฑ ู
ู-ุฅูู
- ุงูุณุจุจ ูู ูู
- ุงูููู
ุฉ ุงููุฏูู
ุฉ (ููู rerun)
ูุนูู ุชูุฏุฑ ุชุทูุน ุชูุฑูุฑ:
"ุงูุชุญููู X ุงุชุฃุฌู ู
ุฑุชููุ ุงุชุฑูุถ ู
ุฑุฉุ ุงุชุนู
ู rerun ู
ุฑุฉุ ุฎุฏ ูค ุฃูุงู
ุนูุดุงู ูุฎูุต".
ูฆ. ุฎุทุฉ ุงูุชูููุฐ (5 Phases)
ูกDatabase + Models
- Migration:
lab_sample_investigations
- Migration:
lab_sample_investigation_logs
- Migration:
tat_hours ุนูู lab_investigations ู lab_external_lab_pricing
- Migration:
assigned_to_user_id ุนูู lab_external_lab_referrals
- Migration:
printable_comment, internal_note, defer_comment ุนูู lab_results
- Models + Relationships
- Truncate test data (requests/samples/results โ keep catalog)
ูขBE Writers
LabRequestController::store() โ ููุดุฆ sample + investigations rows
LabSampleService::aliquot() โ ูููู ุงูู rows ุนูู children
- Defer / Cancel / Send Out / Reject โ ูู ุนู
ููุฉ ุจุชููู rows ูู sample ุฌุฏูุฏ + ุชุถูู log
- Recollect โ ุจุชููู rows ู
ู deferred/rejected/cancelled ูู sample ุฌุฏูุฏ ุจู status=pending
- Collect / Receive / Start / Result entry โ ุชุญุฏูุซ status ุนูู ุงูู rows + ุชุถูู log
- Rerun โ ุชููู ุงูู result ููู historyุ ุชูุดุฆ result ุฌุฏูุฏุ ุชุถูู log
ูฃBE Readers + Listeners
LabSampleResource โ include investigations relation
GenerateResultsOnSampleReceived โ ูุฑุงุกุฉ ู
ู sample.investigations ู
ุจุงุดุฑุฉ
- Kanban controller โ ููุฑุฃ ู
ู sample_investigations + ูู ูู sections filter
- Validation/Results endpoints โ ูุณุชุฎุฏู
ูุง ุงูุฌุฏูู ุงูุฌุฏูุฏ
- Referrals endpoint โ ูุถู
ูู TAT + Assigned To
ูคFrontend
- Models:
LisSample.investigations: SampleInvestigation[]
- Collection: tubes ุชุนุฑุถ tests ูุฑุฏูุงู (ู
ุด panel parent)
- Reception: ุดุงุดุฉ ุฌุฏูุฏุฉ
/lab/reception
- Kanban: per-test cards + Cancel/Send Out actions ุฌุฏูุฏุฉ + Rerun
- Validation: ุนู
ูุฏูู history (sample/patient) + ูู ุงูู actions
- Referrals: TAT + Assigned To ุนู
ูุฏ ุฌุฏูุฏ
- Defer/Cancel/Send Out/Reject dialogs ู
ุดุชุฑูุฉ (component ู
ูุญุฏ)
- ุฅุฒุงูุฉ
filterBillableTests ู buildPanelMemberMap (ู
ุด ู
ุญุชุงุฌูู)
ูฅCleanup
- ุฅุฒุงูุฉ
is_deferred + deferred_investigation_ids ู
ู lab_samples
- ุฅุฒุงูุฉ
comment ุงููุฏูู
ู
ู lab_results (ูู ุงูู ูฃ comments ุงูุฌุฏุฏ ุงุชูุนููุช)
- ุฅุฒุงูุฉ ุงูู utilities ุงููุฏูู
ุฉ ูู ุงูู FE
ูง. ุงููู ููุณุชููุฏ ู
ูู ู
ู ุงูู
ูุฌูุฏ (ูุง ูุนูุฏ ูุชุงุจุชู)
| ุงููู ู
ูุฌูุฏ | ููู ูุณุชููุฏ ู
ูู |
LabResultAuditLog + retest_of | ุฃุณุงุณ ุงูู rerun history โ ููุณุนู ููููู lab_sample_investigation_logs |
| ุงูู Defer dialog ุงูุญุงูู ุจู panel members | ูุทูุฑู ููููู component ู
ุดุชุฑู ูุณุชุฎุฏู
ูู Defer/Cancel/Send Out/Reject |
dept-worklist.component.ts (ุงูู workflow) | ูุถูู ุงูู actions ุงูุฌุฏูุฏุฉ ููุท (rerun ูุฒุฑุ cancelุ send-out ูุฒุฑ) โ ุงูู structure ุงููุงุฆู
ุจูุจูู ุงูู rows ู
ู lab_resultsุ ููุฎูููุง ุชุจูู ู
ู lab_sample_investigations |
validation-worklist.component.ts | ููุณูุง ููู ู
ุน ุฅุถุงูุฉ ุนู
ูุฏูู history (sample rerun + patient longitudinal). ุงูู validate/release/print/publish ู
ูุฌูุฏูู ูุนูุงู. |
ุงูู Machine integration (LabMachineResult) | ู
ูุฌูุฏ ุจุงููุงู
ู (matching + approve/reject). ูุถูู ููุท: ุฑุจุทู ุจู lab_sample_investigations ุจุฏู ู
ุง ูุฑุจุท ุจู lab_results ู
ุจุงุดุฑุฉ ุนูุฏ ุงูู pending state. |
| Referrals component + service | ูุถูู TAT + Assigned To + UI tabs |
splitTestCodes / buildPanelMemberMap | ููุชูู ุนู
ุฑูู
โ ููุดูููู
ุจุนุฏ ู
ุง ุงูู FE ููุฑุฃ ู
ู sample.investigations |
ูจ. ู
ูุฒุงุช ููุญุตู ุนูููุง ู
ุฌุงูุงู
- Audit ุดุงู
ู: ูู ุชุญููู ุนูุฏู ุณุฌู ูุงู
ู ุจูู ุนู
ููุงุชู
- Reports ุฌุฏูุฏุฉ: "ูู
ุชุญููู ุงุชุฃุฌู ุงูููู
"ุ "ู
ุชูุณุท ุฒู
ู ุงูุงุณุชูุจุงู"ุ "TAT ุงููุนูู vs ุงูุงูุชุฑุงุถู"
- Per-test SLA tracking: ู
ู
ูู ุชููู "ุฏู ุชุญููู ุชุฃุฎุฑ ุนู ุงูู TAT ุจุชุงุนู"
- Sample history: ู
ู
ูู ุชุฑุฌุน ูุฃู sample ูุชุดูู ุฑุญูุชูุง ูุงู
ูุฉ
- Patient longitudinal: ูุชุงุฆุฌ ุงูู
ุฑูุถ ุนุจุฑ ุงูุฒู
ู ูููุณ ุงูุชุญููู
- No more "panel as one test": ูู member ูุชู
ุชุชุจุนู ุจุดูู ู
ุณุชูู
ูฉ. ุงููู ู
ุญุชุงุฌ ุชุฃููุฏู ุนููู
- ุงููู ุนุฑุถุชู ุจุงูู scope ุฏู ู
ูุจููุ ููุง ูู ุญุงุฌุฉ ุชุญุจ ุชุดูููุง ุฃู ุชุฒูุฏูุงุ
- ุงูู Reception screen ูู ุนุงูุฒูุง ู
ููุตูุฉ ุนู Collectionุ (Workflow ุตูุงุนุฉ ุงูู
ุนู
ู: collection ุจูุนู
ูู ุงูู phlebotomist ูู ุนูุงุฏุฉุ reception ุจูุนู
ูู ููู ุงูู lab โ ูู
ูุทูู ูุจููุง ู
ููุตููู).
- ุงูู Cancel ูู cancellation ููุงุฆูุฉ ุฃู
ูุณู
ุญ ุจู revivalุ
- ุงูู Comments โ ูฃ ูุงูููู (printable/internal/action_reason) ููุง ุชุญุชุงุฌ ุชูุตูู ุชุงููุ
- ุงูู TAT โ ุงูุชุญุฐูุฑ ูู
ุง sample ูุชุนุฏู ุงูู TAT ูููู ุนูู ุดุงุดุฉ ุงูู Kanbanุ ููุง ูู ุตูุญุฉ ู
ููุตูุฉุ
- Assigned To ููู referrals โ ูู ุงููู ูุณุชูู
ุงูุชุญููู ูู ููุณู ุงููู ุจุนุช ููุง ู
ุฎุชููุ
ุจุนุฏ ู
ุง ุชุฃูุฏุ ุฃุจุฏุฃ Phase 1 ุนูู ุงูู dev backend.