Dental Clinic - Operational Workflows & State Machines
Chairside clinical lifecycle, treatment plan progression, operatory turnover, dental lab state machines, and state transition tables for the Dental Clinic domain.
Operational Workflows & State Machines
Clinical dental care and operatory management follow deterministic, state-driven lifecycles. Every patient visit, treatment plan phase, dental laboratory fabrication, and sterilization cycle executes through controlled state transitions guarded by domain invariants.
1. End-to-End Patient Clinical Journey
The clinical journey orchestrates administrative intake, chairside operatory care, infection control, and downstream financial settlement:
flowchart TD
A["Patient Check-In at Reception"] --> B["Operatory Assigned & Verified Clean"]
B --> C["Patient Seated in Dental Chair"]
C --> D["Medical Health Alerts Verified by Dentist"]
D --> E["Clinical Exam, Odontogram & Perio Charting"]
E --> F{"Active Treatment Required?"}
F -->|No: Clean Maintenance| M["Perform Routine Prophylaxis"]
F -->|Yes: Treatment Needed| G["Formulate & Sequence Treatment Plan"]
G --> H["Present Estimates & Obtain Informed Consent"]
H --> I["Administer Local Anesthesia & Record Carpules"]
I --> J["Scan Sterile Cassette Barcode at Chairside"]
J --> K["Execute Procedure & Log Material Lots"]
K --> L["Attending Dentist Digitally Signs Encounter"]
M --> L
L --> N["Encounter Sealed & Locked"]
N --> O["Patient Dismissed to Checkout"]
O --> P["Mandatory Room Turnover Aerosol & Disinfection"]
P --> Q["Room Ready for Next Patient"]
N -.->|Asynchronous Event Emission| Downstream["Post Billing (FMS) / Decrement Stock (SCM) / Schedule Recare (CRM)"]
2. Operatory Encounter State Machine
The OperatoryEncounter aggregate enforces a strict operational lifecycle ensuring clinical safety and infection control compliance:
stateDiagram-v2
[*] --> Scheduled
Scheduled --> PatientArrived: Front Desk Check-in
PatientArrived --> PatientSeated: Assistant Escorts to Chair
PatientSeated --> MedicalCleared: Dentist Reviews Allergies & Vitals
MedicalCleared --> InProgress: Anesthesia Given & Cassette Scanned
InProgress --> ClinicianSigned: Procedures Completed & Lots Logged
ClinicianSigned --> Sealed: Front Desk Checkout & Co-pay Hand-off
Sealed --> RoomSanitized: Turnover Disinfection Completed
RoomSanitized --> [*]
Operatory Encounter State Transition Table
| Current State | Target State | Triggering Event / Action | Guard Conditions | Primary Actor | Domain Event Emitted |
|---|---|---|---|---|---|
Scheduled | PatientArrived | Patient checks in at reception desk | Scheduled time within acceptable early/late window | Receptionist | DentalPatientArrived |
PatientArrived | PatientSeated | Assistant escorts patient into assigned operatory | Target operatory is in RoomSanitized state | Dental Assistant | DentalPatientSeated |
PatientSeated | MedicalCleared | Dentist reviews systemic anamnesis and vital signs | Blood pressure recorded; allergies confirmed; antibiotic pre-medication validated | Attending Dentist | MedicalAlertVerified |
MedicalCleared | InProgress | Local anesthesia administered; sterile cassette opened | Active signed consent on file; valid unexpired sterile cassette scanned | Attending Dentist | DentalEncounterInProgress |
InProgress | ClinicianSigned | Dentist finalizes treatment notes and confirms completion | All executed procedures mapped to CDT codes; material lots recorded | Attending Dentist | DentalEncounterSigned |
ClinicianSigned | Sealed | Financial checkout complete; patient dismissed | Clinician signature present; zero unresolved execution items | Front Desk Clerk | DentalEncounterSealed |
Sealed | RoomSanitized | Dental assistant completes room turnover disinfection protocol | Mandatory turnover buffer elapsed; biohazard waste removed; fresh barrier film applied | Dental Assistant | OperatorySanitized |
3. Treatment Plan State Machine
The TreatmentPlan aggregate governs long-term clinical care and financial sequencing:
stateDiagram-v2
[*] --> Draft: Dentist Charts Diagnoses
Draft --> Presented: Clinical Estimate & Sequencing Prepared
Presented --> Accepted: Patient Signs Informed Consent
Presented --> Modified: Patient Declines Elective Items
Modified --> Presented: Dentist Adjusts Phasing & Scope
Accepted --> InExecution: First Phase Scheduled & Underway
InExecution --> Completed: Final Restoration / Hygiene Seated
InExecution --> Abandoned: Patient Relocates or Ceases Care
Completed --> [*]
Abandoned --> [*]
Treatment Plan State Transition Table
| Current State | Target State | Trigger / Action | Guard Conditions | Primary Actor | Domain Event Emitted |
|---|---|---|---|---|---|
Draft | Presented | Treatment proposal generated with phased CDT codes | Valid anatomical teeth; tooth-surface validation checks pass | Attending Dentist | TreatmentPlanPresented |
Presented | Accepted | Patient accepts clinical plan and financial terms | Written or electronic informed consent signed by patient or guardian | Patient & Treatment Coordinator | TreatmentPlanAccepted |
Presented | Modified | Scope adjusted based on patient preference or insurance budget | Phase 1 (Urgent/Pain) cannot be removed if acute infection exists | Attending Dentist | TreatmentPlanModified |
Accepted | InExecution | Encounter opened referencing a planned procedure item | Consent token verified; clinical clearance active | Attending Dentist | TreatmentPlanExecutionStarted |
InExecution | Completed | All planned procedure items transition to Completed | All phase gates passed; no pending restorative items | Attending Dentist | TreatmentPlanCompleted |
InExecution | Abandoned | Patient terminates treatment or fails to attend for 180+ days | Clinical summary exported; formal notice sent to patient | Practice Manager | TreatmentPlanAbandoned |
4. Dental Laboratory Prosthetic State Machine
The DentalLabOrder aggregate ensures indirect restorations are fabricated, inspected, and ready prior to chairside cementation:
stateDiagram-v2
[*] --> PrescriptionDraft: Preparation Completed Chairside
PrescriptionDraft --> Dispatched: Scan STL Exported & Sent to Lab
Dispatched --> InFabrication: Lab Acknowledges Receipt
InFabrication --> TryInDelivered: Interim Framework / Biscuit Bake Sent
TryInDelivered --> TryInEvaluated: Chairside Try-In Encounter
TryInEvaluated --> InFabrication: Adjustment / Regaze Requested
TryInEvaluated --> FinalDelivered: Framework Approved & Finished
InFabrication --> FinalDelivered: Direct Monolithic Crown Finished
FinalDelivered --> Inspected: Clinic Quality Inspection Passed
Inspected --> SeatedAndCemented: Permanent Seating Encounter Complete
SeatedAndCemented --> [*]
Dental Laboratory Transition Table
| Current State | Target State | Trigger / Action | Guard Conditions | Primary Actor | Domain Event Emitted |
|---|---|---|---|---|---|
PrescriptionDraft | Dispatched | Clinic dispatches digital intraoral scan or analog courier | Shade recipe specified; target tooth specified; margin clearly visible in scan | Attending Dentist | DentalLabOrderDispatched |
Dispatched | InFabrication | Lab confirms order intake and validates mesh integrity | Digital STL file non-corrupted; margin lines readable | Lab Technician | DentalLabOrderAcknowledged |
InFabrication | TryInDelivered | Lab ships interim framework, coping, or unglazed biscuit unit | Delivery tracking number attached | Lab Technician | DentalLabTryInReceived |
TryInDelivered | TryInEvaluated | Clinician evaluates fit, margin, and bite intraorally | Try-in encounter active | Attending Dentist | DentalLabTryInEvaluated |
InFabrication | FinalDelivered | Lab delivers finished prosthesis to clinic | Final delivery package received at front desk | Receiving Staff | DentalLabRestorationReceived |
FinalDelivered | Inspected | Clinic assistant or dentist verifies shade, margins, and integrity | Restoration free of fractures; shade matches prescription recipe | Dental Assistant / Dentist | DentalLabRestorationInspected |
Inspected | SeatedAndCemented | Dentist permanently bonds or cements prosthesis | Tooth preparation cleaned; isolation maintained; bite adjusted | Attending Dentist | DentalLabRestorationSeated |
5. Sterilization Batch & Cassette Lifecycle
The SterilizationCycleBatch aggregate enforces infection control safety:
stateDiagram-v2
[*] --> Decontamination: Contaminated Instruments Washed
Decontamination --> PackagedAndWrapped: Cassette Sealed & Barcoded
PackagedAndWrapped --> ChamberLoaded: Placed in Autoclave
ChamberLoaded --> CycleRunning: Saturated Steam Cycle Initiated
CycleRunning --> CyclePassed: Physical Benchmarks Satisfied (134°C, 2.1 bar, 4m)
CycleRunning --> CycleFailed: Pressure Drop or Thermal Failure
CyclePassed --> SporeIncubation: Biological Indicator Tested (Weekly/Daily)
SporeIncubation --> ActiveInventory: Spore Test Negative (Clear)
SporeIncubation --> Quarantined: Spore Test Positive (Bacterial Growth)
CycleFailed --> Quarantined: Reprocess Entire Batch
ActiveInventory --> ChairsideConsumed: Barcode Scanned in Encounter
ChairsideConsumed --> Decontamination: Post-Treatment Return
Sterilization Batch Rules
- Immediate Quarantine: If an autoclave cycle aborts due to a vacuum leak or heater failure, or if a biological spore indicator culture tests positive for bacterial growth, the entire batch is flagged
Quarantined. - Automated Revocation: All sterile cassette barcodes generated in a quarantined cycle are immediately blacklisted in the system. Any attempt to scan them at chairside produces an urgent red validation halt.