Dental Clinic - Domain Events & Integration Contracts
Domain events emitted by the Dental Clinic context, integration contracts, and asynchronous downstream reactions across enterprise systems.
Domain Events & Integration Contracts
The Dental Clinic bounded context communicates with the broader Obelaw enterprise ecosystem exclusively via state-altering, immutable domain events and formal integration contracts. This decoupled, event-driven pattern allows downstream domains (Accounting, Inventory, CRM, Medical Imaging) to react to clinical facts without impeding chairside operatory workflows or introducing synchronous network dependencies.
1. Domain Events Emitted
The following table catalogs the core domain events emitted by the Dental Clinic bounded context:
| Event Name | Source Aggregate | Emitted When | Conceptual Payload Highlights |
|---|---|---|---|
DentalPatientEncounterStarted | OperatoryEncounter | Patient is seated in the operatory chair and session initiates. | EncounterId, PatientId, OperatoryId, AttendingDentistId, AssistantId, StartTime. |
MedicalAlertVerified | OperatoryEncounter | Attending dentist completes and signs off on systemic health checks. | EncounterId, PatientId, DentistId, AllergiesConfirmed, AntibioticProphylaxisTaken, InrValue. |
OdontogramConditionCharted | PatientDentalRecord | A new tooth diagnosis, existing restoration, or pathology is recorded. | PatientId, ToothNumber, Surfaces, PathologyCode, DentistId, ChartTimestamp. |
PeriodontalExamCompleted | PatientDentalRecord | Full-mouth periodontal probing measurements are finalized. | PatientId, ExamDate, ExaminerId, BleedingOnProbingPercent, SitesWithPocketsGe4mm, BopSitesCount. |
DentalTreatmentPlanCreated | TreatmentPlan | Dentist formulates and sequences a multi-phase treatment plan. | TreatmentPlanId, PatientId, DiagnosingDentistId, PhaseCount, TotalEstimatedCost. |
DentalTreatmentPlanAccepted | TreatmentPlan | Patient formally agrees to the treatment plan and payment structure. | TreatmentPlanId, PatientId, AcceptedPhases, PatientSignedTimestamp, CoordinatorId. |
PatientInformedConsentSigned | TreatmentPlan | Patient or guardian signs legal consent for an invasive procedure. | ConsentToken, PatientId, PlannedProcedureItemId, ToothNumber, RisksAcknowledged, SignatureHash. |
DentalAnesthesiaAdministered | OperatoryEncounter | Local anesthesia is delivered chairside to the patient. | EncounterId, AnestheticAgent, VasoconstrictorRatio, CarpuleVolumeTotal, InjectionTechnique. |
DentalMaterialLotConsumed | OperatoryEncounter | An implant, bone graft, membrane, or specialized resin is deployed. | EncounterId, MaterialCategory, Manufacturer, LotNumber, SerialNumber, QuantityConsumed. |
SterileCassetteConsumed | OperatoryEncounter | A wrapped sterile cassette pack barcode is scanned and verified at chairside. | EncounterId, OperatoryId, CassetteBarcode, SterilizationBatchId, ScanTimestamp. |
DentalProcedureCompleted | OperatoryEncounter | A clinical procedure is successfully finished chairside. | EncounterId, PatientId, DentistId, CdtCode, ToothNumber, Surfaces, CompletionTimestamp. |
DentalEncounterSignedAndSealed | OperatoryEncounter | Attending dentist signs clinical notes; encounter permanently locked. | EncounterId, PatientId, DentistSignatureToken, ProceduresSummary, SealedTimestamp. |
DentalClinicalAddendumAppended | OperatoryEncounter | An amending note or correction is attached to a sealed encounter. | AddendumId, EncounterId, DentistId, ReasonCode, AmendedTextHash, Timestamp. |
DentalLabOrderDispatched | DentalLabOrder | Indirect prosthetic prescription and digital scans sent to lab. | LabOrderId, ExternalLabId, ToothNumber, RestorationType, Shade, ScanMeshHash, DueDate. |
DentalLabRestorationReceived | DentalLabOrder | Commercial lab delivers fabricated prosthesis to the clinic. | LabOrderId, DeliveryTrackingCode, ReceivedTimestamp, InternalInspectorId. |
DentalLabRestorationSeated | DentalLabOrder | Dentist permanently bonds or cements the laboratory prosthesis. | LabOrderId, EncounterId, CementType, OcclusionChecked, FinalSeatingTimestamp. |
SterilizationCycleBatchCompleted | SterilizationCycleBatch | Autoclave finishes cycle meeting physical temperature and pressure bars. | BatchId, AutoclaveId, CycleNumber, PeakTemperature, PeakPressure, HoldDurationMinutes. |
BiologicalIndicatorResultRecorded | SterilizationCycleBatch | Bacterial spore test incubation completes with verified result. | BatchId, IncubatorId, SporeTestResult (Pass or Fail), VerifiedTimestamp. |
SterilizationBatchQuarantined | SterilizationCycleBatch | Physical parameters or spore tests fail; cassette barcodes revoked. | BatchId, AutoclaveId, FailureReason, QuarantinedCassetteBarcodes. |
DentalRecallScheduled | OperatoryEncounter | Clinical recare interval generated based on patient risk profile. | PatientId, RecallType (PeriodontalMaintenance or RoutineProphylaxis), TargetRecallDate. |
2. Integration Contracts & Downstream System Reactions
Downstream enterprise systems subscribe to Dental Clinic domain events through asynchronous message brokers:
flowchart TD
DENTAL["Dental Clinic Domain"]
E1["DentalProcedureCompleted"]
E2["DentalMaterialLotConsumed"]
E3["DentalEncounterSignedAndSealed"]
E4["DentalRecallScheduled"]
E5["SterilizationBatchQuarantined"]
DENTAL --> E1
DENTAL --> E2
DENTAL --> E3
DENTAL --> E4
DENTAL --> E5
E1 -->|Generate Insurance Claim & Bill Copay| FMS["Accounting & FMS"]
E2 -->|Decrement Operatory Point-of-Use Stock| SCM["Inventory & SCM"]
E3 -->|Record Patient Clinical History Milestone| CRM["CRM / Patient Master"]
E4 -->|Schedule Automated Recall Reminders| RECARE["Recall / Outreach Engine"]
E5 -->|Lock Cassette Inventories & Alert Staff| INFECTION["Infection Control Safety Dashboard"]
1. Accounting / FMS Integration Contract
- Subscribed Event:
DentalProcedureCompleted - Reaction:
- Creates an Accounts Receivable line item referencing the standardized
CdtCode, attending provider license, and target tooth/surface geometry. - Submits an electronic dental insurance claim (EDI 837D transaction) to the designated insurance clearinghouse, appending mandatory tooth indicators.
- Prepares the patient copayment invoice for collection at reception checkout.
- Creates an Accounts Receivable line item referencing the standardized
- Responsibility Boundary: The Dental Clinic context publishes the clinical procedure facts; Accounting owns revenue recognition, ledger posting, insurance payment remittances (EDI 835), and write-offs.
2. Inventory / SCM Integration Contract
- Subscribed Events:
DentalMaterialLotConsumed,DentalAnesthesiaAdministered - Reaction:
- Decrements point-of-use inventory from the specific operatory room stock bucket (e.g., deducting one titanium implant fixture from Operatory 2 surgical cart).
- Updates lot tracking registers, maintaining complete backward-traceability from implant lot number to patient record for regulatory implant registry reporting.
- Evaluates reorder thresholds; if stock for a specific composite shade or anesthetic carpule falls below par levels, triggers an automated purchase requisition.
- Responsibility Boundary: Dental Clinic records clinical consumption; Inventory manages supplier orders, unit costs, and warehouse bin locations.
3. CRM & Recare Integration Contract
- Subscribed Events:
DentalEncounterSignedAndSealed,DentalRecallScheduled - Reaction:
- Updates the patient profile with their most recent clinical visit date and primary attending clinician.
- Schedules automated patient reminders (SMS/email) timed to their clinical risk interval:
- High-risk periodontal patients receive reminders at 3-month intervals for periodontal maintenance.
- Low-risk restorative patients receive reminders at 6-month intervals for routine dental prophylaxis and bitewing radiographs.
- Responsibility Boundary: Dental Clinic establishes clinical recare intervals; CRM orchestrates communication channels, delivery timings, and patient engagement tracking.
4. Infection Control Safety Dashboard Reaction
- Subscribed Event:
SterilizationBatchQuarantined - Reaction:
- Broadcasts an urgent high-priority alert across all clinical workstation displays in the facility.
- Automatically blacklists every
CassetteBarcodetied to the failed autoclave batch, preventing them from being verified at chairside. - Queries historical encounters: if any cassette from the quarantined batch was erroneously scanned prior to spore incubation completion, an immediate regulatory patient notification audit protocol is triggered.