KMCH HIS Wiki
สแกนเพื่อเปิดบนมือถือ

Generate Bill Screen

Screen Verified Wed Apr 29 2026 00:00:00 GMT+0000 (Coordinated Universal Time) For: AdminSystemFinanceAccounting Source: live UAT 2026-04-29, 5.MEDHIS Manual_Billing V.1.docx Updated Wed Apr 29 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

Generate Bill Screen (หน้าจอออกบิล)

The bill construction + settlement screen. For OPD self-pay this is the single atomic action point that emits Bill + Payment + Receipt + Financial Discharge in one call. Verified during TCK-001 UAT walkthrough (uat-recon/agent-uat-handoff) Phase 5c–5e.

Access Path

Modes

ModeWhenAtomic?
Receipt (self-pay)Payor ชำระเงินเองYes — Bill + Payment + Receipt + Financial Discharge in one POST
Invoice (payor-mix)Agreement payors / TPA / insuranceNo — operator manages allocation per-payor

Key UI elements

UAT-verified behavior (2026-04-29)

Auto-attached service charge

Every OPD visit gets ค่าบริการผู้ป่วยนอก ในเวลาราชการ automatically:

FieldValue
Charge code55020
Item UID6833e0e7c7a8b1000176354a
Amount150.00 baht
TriggerAttached at visit creation, regardless of orders placed

Implication: even a fake patient that walked the OP loop with zero orders will have a 150-baht line on the bill.

Endpoints

EndpointPurpose
GET /billing/generatebillcriterias/<patientuid>/<visituid>/trueBill criteria fetch
GET /billing/generatebill/usabledeposits/<patientuid>Deposit lookup
POST /billing/generatebill/usablecreditnotes/Credit note lookup
POST /billing/generatebill/billablechargecodesAllocate bill items per payor
POST /billing/generatebill/verifyGLcoverageexceedsGL coverage check (no-op for self-pay)
POST /billing/generatebill/settleAtomic Bill+Payment+Receipt+Financial-Discharge

Common pitfalls

SymptomCauseFix
150 baht “from nowhere”Auto charge code 55020Document with patient; see OP Billing Workflow
Settle fails with GL errorPayor has limited GL coverageSwitch to Invoice mode or adjust allocation
Receipt number not generatedSettle endpoint failureCheck network tab; see MEDHIS Server-Side Gates

เนื้อหาที่เกี่ยวข้อง / Related