Dental Clinic

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.

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 StateTarget StateTriggering Event / ActionGuard ConditionsPrimary ActorDomain Event Emitted
ScheduledPatientArrivedPatient checks in at reception deskScheduled time within acceptable early/late windowReceptionistDentalPatientArrived
PatientArrivedPatientSeatedAssistant escorts patient into assigned operatoryTarget operatory is in RoomSanitized stateDental AssistantDentalPatientSeated
PatientSeatedMedicalClearedDentist reviews systemic anamnesis and vital signsBlood pressure recorded; allergies confirmed; antibiotic pre-medication validatedAttending DentistMedicalAlertVerified
MedicalClearedInProgressLocal anesthesia administered; sterile cassette openedActive signed consent on file; valid unexpired sterile cassette scannedAttending DentistDentalEncounterInProgress
InProgressClinicianSignedDentist finalizes treatment notes and confirms completionAll executed procedures mapped to CDT codes; material lots recordedAttending DentistDentalEncounterSigned
ClinicianSignedSealedFinancial checkout complete; patient dismissedClinician signature present; zero unresolved execution itemsFront Desk ClerkDentalEncounterSealed
SealedRoomSanitizedDental assistant completes room turnover disinfection protocolMandatory turnover buffer elapsed; biohazard waste removed; fresh barrier film appliedDental AssistantOperatorySanitized

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 StateTarget StateTrigger / ActionGuard ConditionsPrimary ActorDomain Event Emitted
DraftPresentedTreatment proposal generated with phased CDT codesValid anatomical teeth; tooth-surface validation checks passAttending DentistTreatmentPlanPresented
PresentedAcceptedPatient accepts clinical plan and financial termsWritten or electronic informed consent signed by patient or guardianPatient & Treatment CoordinatorTreatmentPlanAccepted
PresentedModifiedScope adjusted based on patient preference or insurance budgetPhase 1 (Urgent/Pain) cannot be removed if acute infection existsAttending DentistTreatmentPlanModified
AcceptedInExecutionEncounter opened referencing a planned procedure itemConsent token verified; clinical clearance activeAttending DentistTreatmentPlanExecutionStarted
InExecutionCompletedAll planned procedure items transition to CompletedAll phase gates passed; no pending restorative itemsAttending DentistTreatmentPlanCompleted
InExecutionAbandonedPatient terminates treatment or fails to attend for 180+ daysClinical summary exported; formal notice sent to patientPractice ManagerTreatmentPlanAbandoned

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 StateTarget StateTrigger / ActionGuard ConditionsPrimary ActorDomain Event Emitted
PrescriptionDraftDispatchedClinic dispatches digital intraoral scan or analog courierShade recipe specified; target tooth specified; margin clearly visible in scanAttending DentistDentalLabOrderDispatched
DispatchedInFabricationLab confirms order intake and validates mesh integrityDigital STL file non-corrupted; margin lines readableLab TechnicianDentalLabOrderAcknowledged
InFabricationTryInDeliveredLab ships interim framework, coping, or unglazed biscuit unitDelivery tracking number attachedLab TechnicianDentalLabTryInReceived
TryInDeliveredTryInEvaluatedClinician evaluates fit, margin, and bite intraorallyTry-in encounter activeAttending DentistDentalLabTryInEvaluated
InFabricationFinalDeliveredLab delivers finished prosthesis to clinicFinal delivery package received at front deskReceiving StaffDentalLabRestorationReceived
FinalDeliveredInspectedClinic assistant or dentist verifies shade, margins, and integrityRestoration free of fractures; shade matches prescription recipeDental Assistant / DentistDentalLabRestorationInspected
InspectedSeatedAndCementedDentist permanently bonds or cements prosthesisTooth preparation cleaned; isolation maintained; bite adjustedAttending DentistDentalLabRestorationSeated

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.

Our Premium Sponsors

Obelaw is proudly open-source. Continued development, bug fixes, and community support are made possible by the generosity of our sponsors.

Sponsor Obelaw