Dental Clinic

Dental Clinic - Domain Invariants & Business Rules

The immutable clinical, anatomical, procedural, and infection control laws governing the Dental Clinic bounded context.

Domain Invariants & Business Rules (“The Law”)

The Dental Clinic domain enforces a strict set of business and clinical invariants. In oral healthcare, domain invariants protect patient safety, enforce ethical and legal consent, maintain anatomical validity, ensure sterile infection control, and guarantee clinical record immutability.


1. Summary Matrix of Dental Invariants

#Invariant LawTarget AggregateEnforcement PointConsequence of Violation
1The Informed Consent LawTreatmentPlan & OperatoryEncounterProcedure initiation chairsideImmediate block on procedure execution; cannot record procedure as in-progress.
2The Medical Clearance LawOperatoryEncounterAnesthesia & incision initiationAnesthesia and surgical tools cannot be documented or billed; encounter locked.
3Anatomical Surface Topology LawPatientDentalRecordTooth charting & procedure line item entryRejection of impossible surface combinations (e.g., occlusal on an incisor).
4The Phased Treatment Sequence LawTreatmentPlanTreatment phase advancementElective cosmetic or final crown phases blocked until active disease control is verified.
5Operatory Chair & Turnover Buffer LawOperatoryScheduleBlockAppointment slot bookingRejection of overlapping chair bookings; rejection of bookings lacking turnover buffers.
6Prosthetic Delivery Prerequisite LawDentalLabOrder & OperatoryEncounterCrown/bridge seating appointment check-inAppointment blocked or flagged as invalid if lab order is not in verified delivered state.
7Infection Control Cassette LawSterilizationCycleBatch & OperatoryEncounterEncounter closure & clinician signatureClinical encounter cannot be finalized without a valid, unexpired, passed sterile cassette token.
8Clinical Record Immutability LawOperatoryEncounter & PatientDentalRecordPost-signature record editingAbsolute prevention of retroactive edits; modifications permitted only via signed addenda.

2. In-Depth Invariant Specifications

An invasive dental procedure—defined as any surgical incision, irreversible hard tissue reduction, endodontic pulp extirpation, dental implant placement, or administration of general/intravenous sedation—cannot transition to execution or completion without an active, cryptographically signed InformedConsentRecord linked directly to the corresponding PlannedProcedureItem.

Rules

  • A general practice consent form is insufficient for invasive procedures; tooth-specific or procedure-specific risks must be explicitly consented to (e.g., inferior alveolar nerve paresthesia risks for mandibular third molar extractions).
  • The consent record must be signed by the patient (or legal guardian for minors) prior to local anesthesia administration.
  • Emergency pain-relief interventions may bypass informed consent only under a documented EmergencyLifeOrAcuteSepsisException token signed by two licensed clinicians.

2. The Medical Clearance Law

Zero clinical encounters involving local anesthesia, subgingival scaling, or surgical interventions can proceed past the check-in stage without a formal MedicalAlertClearance verified by the attending licensed dentist during the current encounter.

Rules

  • Anticoagulant & Antiplatelet Therapy: Patients on systemic anticoagulants must have current INR (International Normalized Ratio) metrics recorded within acceptable surgical limits ($INR \le 3.0$) before oral surgical extractions.
  • Infective Endocarditis Prophylaxis: Patients with prosthetic cardiac valves or documented previous endocarditis must have confirmed administration of prophylactic antibiotics (e.g., Amoxicillin 2g orally or Clindamycin/Azithromycin for penicillin-allergic patients) 30 to 60 minutes prior to tissue manipulation.
  • Severe Allergies: Verified systemic allergies to amide local anesthetics or latex trigger hard system halts on non-compliant material selection.

3. Anatomical Surface Topology Law

Every dental procedure targeted at tooth surfaces must strictly adhere to human dental morphology:

flowchart TD
    Tooth[Target Tooth Number] --> Classification{Tooth Anatomical Class}

    Classification -->|Anterior: Incisors & Canines<br/>FDI 11-13, 21-23, 31-33, 41-43| AnteriorAllowed["Valid Surfaces:<br/>Mesial (M), Distal (D), Incisal (I),<br/>Facial/Labial (F), Lingual/Palatal (L)"]
    Classification -->|Posterior: Premolars & Molars<br/>FDI 14-18, 24-28, 34-38, 44-48| PosteriorAllowed["Valid Surfaces:<br/>Mesial (M), Distal (D), Occlusal (O),<br/>Buccal (B), Lingual/Palatal (L)"]

    AnteriorAllowed -.-> InvariantCheck["Invariant Validation Engine"]
    PosteriorAllowed -.-> InvariantCheck

    InvariantCheck -->|Occlusal on Anterior Tooth| Reject["REJECT: Anatomical Impossibility"]
    InvariantCheck -->|Incisal on Posterior Tooth| Reject
    InvariantCheck -->|Both Occlusal AND Incisal| Reject
    InvariantCheck -->|Valid Surface Combination| Accept["ACCEPT: Morphologically Valid"]

Rules

  • Anterior Exclusion: Teeth 11–13, 21–23, 31–33, and 41–43 cannot have an Occlusal (O) surface. Any procedure line item requesting an occlusal restoration on an anterior tooth is rejected.
  • Posterior Exclusion: Teeth 14–18, 24–28, 34–38, and 44–48 cannot have an Incisal (I) surface.
  • Missing Tooth Constraint: Restorative procedures (fillings, inlays, root canals) cannot be planned or performed on a tooth currently recorded as Missing, Extracted, or CongenitallyAbsent, unless preceded by an ImplantPlacement or modeled as a Pontic spanning an edentulous space.

4. The Phased Treatment Sequence Law

Complex comprehensive oral rehabilitation must execute according to biological and clinical disease priorities:

$$\text{Phase 1 (Urgent/Pain)} \rightarrow \text{Phase 2 (Disease/Perio)} \rightarrow \text{Phase 3 (Restorative/Endo)} \rightarrow \text{Phase 4 (Prosthetic/Surgical)} \rightarrow \text{Phase 5 (Recall)}$$

Rules

  • Disease Control Gate: Elective cosmetic interventions (e.g., porcelain veneers, tooth whitening) and definitive indirect prosthetics (e.g., multi-unit crowns, fixed bridges) cannot transition to scheduled or executed states while the patient has unresolved Phase 1 acute dental abscesses or untreated deep active periodontal pocketing ($PPD \ge 6\text{ mm}$ with BOP).
  • Provisional Crown Gate: A final permanent crown seating procedure cannot be executed on a tooth undergoing root canal therapy until the endodontic obturation is formally completed and signed off.

5. Operatory Chair & Turnover Buffer Law

A dental operatory chair represents a single, non-divisible physical resource:

$$\text{Appointment}_A.\text{EndTime} + \text{TurnoverBufferDuration} \le \text{Appointment}_B.\text{StartTime}$$

Rules

  • Zero Concurrent Bookings: Under no circumstances may two patients be scheduled concurrently in the same physical operatory room.
  • Mandatory Disinfection Turnover: Every appointment slot must automatically reserve a mandatory TurnoverDisinfectionBuffer (minimum 10 minutes, default 15 minutes) immediately following patient dismissal. The scheduler prohibits contiguous bookings that infringe on this turnover buffer, guaranteeing adequate time for aerosol evacuation and surface wipe-down.

6. Prosthetic Delivery Prerequisite Law

A clinical appointment for permanent crown seating, bridge delivery, or surgical guide placement cannot be initiated unless the linked DentalLabOrder has achieved verified Delivered status.

Rules

  • When the patient checks in for a scheduled seating appointment, the system evaluates the state of the associated DentalLabOrder.
  • If the lab order remains in Dispatched, Milling, or InTransit, the scheduling engine alerts the front desk and operatory team, preventing patient chair seating and prompting immediate lab courier escalation or appointment rescheduling.
  • The physical restoration must have an acknowledged internal quality inspection (verifying shade, margin integrity, and absence of ceramic fractures) logged by clinic staff prior to patient seating.

7. Infection Control Sterile Cassette Law

A chairside clinical encounter cannot be sealed, signed, or closed by the attending dentist without linking at least one verified, non-expired SterileCassettePack barcode.

Rules

  • Cycle Validity: The scanned cassette barcode must resolve to a SterilizationCycleBatch whose physical autoclave parameters met sterilization benchmarks ($Temperature \ge 134^\circ\text{C}$, $Pressure \ge 2.1\text{ bar}$, $Time \ge 4.0\text{ minutes}$).
  • Spore Test Clearance: If the cycle was selected for biological indicator evaluation, the spore test result must be recorded as Negative / Pass. An active Positive / Fail spore test automatically revokes all associated cassette barcodes.
  • Packaging Shelf-Life: Wrapped sterile cassettes have a defined shelf-life (e.g., 30 to 60 days depending on clinic protocol). A cassette scanned past its expiration date is rejected, halting procedure finalization until a freshly sterilized cassette is substituted.

8. Clinical Record Immutability & Addendum Law

Once a licensed dentist appends their digital signature to close an OperatoryEncounter, the clinical encounter record, completed procedure execution items, and the resulting Odontogram state are permanently sealed against modification or deletion.

Rules

  • No In-Place Edits: Clinicians, administrators, and database engineers cannot alter clinical narrative notes, tooth diagnoses, or administered drug dosages after encounter closure.
  • The Addendum Mechanism: Clinical corrections or supplemental observations discovered after closure must be recorded as a discrete ClinicalRecordAddendum. The addendum contains:
    1. Immutable reference to the original closed encounter ID.
    2. Exact reason code for the amendment (e.g., DiagnosticClarification, BillingCodeAdjustment, DelayedPatientComplicationReport).
    3. Digital signature of the amending clinician with a UTC timestamp.
  • The original encounter text remains visible and completely unmodified in all clinical views and legal audit exports.

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