Mazecare Logo
Core Workflows

In-Person Walk-In Flow

Standard operating procedure for spontaneous clinic visits, from front-desk registration to pharmacy dispensing and checkout, governed by Workflow Definition state machines.

The In-Person Walk-In Flow is the primary operational sequence for unscheduled patients arriving at the clinic. This lifecycle is orchestrated by the system's underlying Workflow Definition state machine, which standardizes operations, evaluates transition conditions, and triggers automated integrations at each stage.


Detailed Step-by-Step Walkthrough

Step 1: Queue Check-In & Workflow Initialization (Reception)

When a walk-in patient arrives, register their visit and initialize their clinical pipeline:

  1. Navigate to the Queue Monitor (/queue) using the main layout view (queue-object-layout.vue).
  2. Click Create Ticket to open the Queue Check-in Wizard (queue-create-ticket-form.vue).
  3. Search for the patient's record by typing their HKID, passport number, or name:
    • Existing Patient: Select their profile to load active demographic details.
    • New Patient: Click Register Patient inside the search dropdown to open the registration form. Fill in the mandatory fields: First Name, Last Name, Sex, Date of Birth, ID Number, and Mobile Number. Click Save Profile.
  4. In the check-in modal, select the appropriate Queue Line (e.g., GP Clinic, Health Check).
  5. Under Workflow Definition, select the governing state machine blueprint (e.g., General Practitioner Template).
  6. Select the designated physician and click Register Visit.
    • System Automation: The system creates an Episode of Care (Case) entity, binds the chosen Workflow Definition, and generates a queue ticket (ticket-object-layout.vue).
    • Workflow Status: The workflow initializes at its Initial State (typically Registration), which automatically creates a ticket in the QMS.

Step 2: Vitals & Triage (Nursing Station)

Before the patient is seen by the physician, nursing staff perform triage assessments:

  1. Go to the Queue Monitor (/queue) and select the patient from the Triage Queue panel.
  2. Select the patient's name to open their detail view.
  3. Record their metrics: Blood Pressure (sys/dia), Heart Rate, Body Temperature, and Weight in the vitals form. These values are saved directly to the patient's EMR record.
  4. Open the Triage Priority card (triage-priority.vue) and select their clinical acuity level.
  5. In Travel History (triage-history-of-travel.vue), log any recent travel details or clinical alerts.
  6. Click Send to Doctor Queue.
    • Transition Gating: Moving the patient to the Doctor Queue triggers a transition from Registration to Triage (or Queue). The transition evaluates Ticket Conditions (ticketConditionsAsString) to ensure that mandatory triage metrics (such as acuity priority) have been populated.
    • Automated Actions: Upon transition, an entry HTTP Action automatically routes the ticket to the assigned physician's consultation line.

Step 3: Physician Consultation (Encounter Grid)

Once the patient is called, the physician documents the clinical encounter:

  1. In the Doctor Queue, select the patient's card and click Start Consult.
  2. The system executes a GraphQL mutation to initialize the encounter session using the Encounter Creation Form (create-encounter-form.vue).
  3. The EMR displays the Encounter Grid Layout (encounter-grid-layout.vue), where the physician documents findings using modular clinical widgets:
    • Chief Complaint (chief-complain.vue): Document primary symptoms.
    • Clinical Notes (clinical-notes.vue): Type SOAP notes or apply pre-configured templates (clinical-note-template-slideover.vue).
    • Diagnosis (diagnosis.vue): Search and bind ICD-11 codes.
    • Prescriptions (prescriptions.vue): Prescribe medications, specifying dosage, units, and reasons.
    • AI Clinical Assistant (clinical-assistant.vue): Review drug-drug interaction warnings and autocomplete recommendations based on the active notes.
  4. Click Complete Consult & Sign.
    • Digital Lock: The system uses attester.vue and actions/finish.vue to digitally sign and lock the encounter.
    • Transition Gating: The transition from Consultation to Dispensing/Checkout evaluates Encounter Conditions (encounterConditionsAsString) to verify that the encounter is signed and contains at least one diagnosis. The transition then automatically generates a draft invoice and a pharmacy dispensing order.

Step 4: Dispensing & Checkout (Pharmacy & Billing)

The visit concludes with pharmacy dispensing and payment collection:

  1. Navigate to Pharmacy Orders (/pharmacy) using the pharmacy order table (pharmacy-order-table.vue).
  2. Open the patient's order details (pharmacy-order-object-layout.vue).
  3. Click Start Dispense to launch the Dispense Stepper (dispense-stepper.vue):
    • Verify Items (dispense-items.vue): Cross-check prescribed items.
    • Select Batch (batch-slideover.vue): Allocate specific inventory batches using the Smart Dispense panel (smart-dispense/inventory.vue).
    • Print Labels (smart-dispense/label-management.vue): Print drug dosage labels.
  4. Navigate to Invoices (/billing/invoices/[invoiceId] using invoice-object-layout.vue):
    • Verify the total balance, including co-pays and insurance coverages.
    • Click Collect Payment and process the transaction (Cash, Card, or Stripe).
  5. Click Process Checkout.
    • Checkout Guard: The final transition to the workflow's Final State (e.g., Discharged) evaluates Invoice Conditions (invoiceConditionsAsString) to verify that the invoice is fully paid or authorized by a payor.
    • State Exit Action: On successful transition, an exit HTTP action terminates the active QMS ticket, records checkout metrics, and syncs the receipt.
Important Note
Always verify the patient's ID card during check-in to prevent creating duplicate records in the EMR and to ensure correct historical mapping.
Copyright © 2026