Dental API Reference & Cheat Sheet

v0.1.0

Complete reference guide for all ium()->dental() services, DTOs, Enums, Value Objects, and Domain Events.

Dental API Reference & Cheat Sheet

A comprehensive quick-reference index of all domain services, methods, Data Transfer Objects (DTOs), Enums, Value Objects, and Domain Events exposed by ium()->dental().


Domain Gateway: ium()->dental()

All interactions flow through the central fluent domain gateway:

ium()->dental()->{service}()->{method}();

Domain Services & Method Signatures

1. patients(): PatientService

public function create(CreatePatientDto $dto): Patient;
public function update(string|int $patientId, UpdatePatientDto $dto): Patient;
public function addMedicalAlert(string|int $patientId, CreateMedicalAlertDto $dto): MedicalAlert;
public function addEmergencyContact(string|int $patientId, CreateEmergencyContactDto $dto): EmergencyContact;
public function recordConsent(string|int $patientId, RecordConsentDto $dto): ConsentRecord;
public function hasActiveConsent(string|int $patientId, ConsentType $type): bool;
public function withdrawConsent(string|int $consentId, ?string $actorId = null): void;
public function find(string|int $patientId): ?Patient;

2. odontograms(): OdontogramService

public function createChart(
    string|int $patientId,
    ToothNotationSystem $system = ToothNotationSystem::UNIVERSAL,
    DentitionType $type = DentitionType::PERMANENT
): OdontogramChart;

public function markSurface(
    string|int $chartId,
    ToothNumber $tooth,
    SurfaceSet $surfaces,
    ?ToothCondition $condition = null,
    ?string $notes = null
): OdontogramTooth;

public function recordProbing(
    string|int $chartId,
    ToothNumber $tooth,
    PeriodontalProbingMatrix $matrix,
    array $recession = [],
    ?int $furcation = null,
    ?int $mobility = null,
    ?string $notes = null
): PeriodontalPoint;

public function getLatestChart(string|int $patientId): ?OdontogramChart;

3. treatmentPlans(): TreatmentPlanService

public function create(CreateTreatmentPlanDto $dto): TreatmentPlan;
public function addProcedure(AddPlanProcedureDto $dto): PlannedProcedure;
public function approve(string|int $planId, SignConsentDto $consent): TreatmentPlan;
public function completeProcedure(string|int $procedureId): PlannedProcedure;
public function find(string|int $planId): ?TreatmentPlan;

4. appointments(): AppointmentService

public function book(
    string|int $patientId,
    DateTimeInterface $start,
    DateTimeInterface $end,
    ?string $reason = null,
    ?string $operatoryId = null,
    ?string $dentistId = null
): Appointment;

public function confirm(string|int $appointmentId): Appointment;
public function checkIn(string|int $appointmentId): Appointment;
public function start(string|int $appointmentId, ?AutoclaveBarcode $cassetteBarcode = null): Appointment;
public function complete(string|int $appointmentId): Appointment;
public function cancel(string|int $appointmentId): Appointment;
public function find(string|int $appointmentId): ?Appointment;

5. scheduling(): SchedulingService

public function bookAppointment(BookAppointmentDto $dto): Appointment;

public function blockSlot(
    string|int $resourceId,
    string $resourceType,
    DateTimeInterface $start,
    DateTimeInterface $end,
    string $reason
): ResourceBlock;

public function releaseSlot(string|int $blockId): void;
public function availableResources(DateTimeInterface $start, DateTimeInterface $end): array;

6. procedures(): ProcedureService

public function schedule(
    string|int $patientId,
    AdacdtCode $code,
    null|string|int $appointmentId = null,
    null|string|int $planId = null,
    null|string|int $phaseId = null
): PlannedProcedure;

public function start(string|int $procedureId): PlannedProcedure;
public function complete(string|int $procedureId): PlannedProcedure;
public function cancel(string|int $procedureId): PlannedProcedure;
public function find(string|int $procedureId): ?PlannedProcedure;

7. imaging(): ImagingService

public function registerStudy(RegisterDicomStudyDto $dto): DicomStudy;
public function linkToProcedure(string|int $studyId, string|int $procedureId): DicomStudy;
public function getStudiesForPatient(string|int $patientId): array;
public function deidentify(string|int $studyId): DicomStudy;

8. ledgers(): LedgerService

public function calculateDualPayerCopay(CalculateCopayDto $dto): CopayBreakdown;
public function charge(ChargeProcedureDto $dto): DentalInvoice;
public function postPayment(PostPaymentDto $dto): LedgerPayment;
public function balance(string|int $patientId): Money;
public function statement(string|int $patientId, DateTimeInterface $from, DateTimeInterface $to): array;

9. quickBooks(): QuickBooksSyncService

public function syncInvoice(SyncQuickBooksInvoiceDto $dto): QuickBooksSyncJob;
public function syncPayment(string|int $paymentId, ?string $actorId = null): QuickBooksSyncJob;
public function getSyncHistory(string $resourceType, string|int $resourceId): array;

10. labOrders(): LabOrderService

public function createOrder(CreateLabOrderDto $dto): LabOrder;
public function submit(string|int $orderId): LabOrder;
public function receive(string|int $orderId): LabOrder;
public function complete(string|int $orderId): LabOrder;
public function find(string|int $orderId): ?LabOrder;

11. infectionControl(): InfectionControlService

public function logCycle(
    AutoclaveBarcode $barcode,
    DateTimeInterface $completedAt,
    bool $passed,
    ?string $unitId = null,
    bool $indicatorVerified = true,
    ?DateTimeInterface $expiresAt = null,
    ?string $notes = null
): AutoclaveCycle;

public function validateCassette(ValidateAutoclaveCassetteDto $dto): AutoclaveCycle;
public function raiseAlert(AlertSeverity $severity, string $message, ?AutoclaveBarcode $barcode = null): mixed;
public function compliantSince(DateTimeInterface $since): array;

12. audit(): AuditService

public function log(
    AuditAction $action,
    ?string $patientId = null,
    ?string $resourceType = null,
    ?string $resourceId = null,
    ?string $actorId = null,
    array $details = []
): AuditLog;

public function verifyTamperEvidence(): bool;

Data Transfer Objects (DTOs)

All DTOs reside in the Obelaw\Ium\Dental\Data\ namespace and provide a static from(array $data) constructor:

DTO ClassPrimary ConsumerPurpose
CreatePatientDtopatients()->create()Encrypted demographics, MRN, phone, address
UpdatePatientDtopatients()->update()Mutable patient profile fields
CreateMedicalAlertDtopatients()->addMedicalAlert()Allergies, antibiotic prophylaxis, anticoagulants
CreateEmergencyContactDtopatients()->addEmergencyContact()Emergency contact names, relations, phones
RecordConsentDtopatients()->recordConsent()Digital signature tokens, IP address, device
SignConsentDtotreatmentPlans()->approve()Chairside informed consent signature for treatment plans
CreateTreatmentPlanDtotreatmentPlans()->create()Plan title, notes, phased treatment initialization
AddPlanProcedureDtotreatmentPlans()->addProcedure()Tooth number, CDT code, estimated fee
BookAppointmentDtoscheduling()->bookAppointment()Chair, dentist, assistant, times, aerosol buffer
CalculateCopayDtoledgers()->calculateDualPayerCopay()Fee, primary/secondary insurance coverage percentages
ChargeProcedureDtoledgers()->charge()Itemized CDT procedure invoicing, insurance splits
PostPaymentDtoledgers()->postPayment()Patient copay or insurance EFT remittance
RegisterDicomStudyDtoimaging()->registerStudy()DICOM study UID, imaging modality, file path
CreateLabOrderDtolabOrders()->createOrder()Restoration type, shade, STL scan file, lab name
ValidateAutoclaveCassetteDtoinfectionControl()->validateCassette()Cassette barcode scan, operatory ID, assistant
SyncQuickBooksInvoiceDtoquickBooks()->syncInvoice()Invoice ID, idempotency key, QBO vs QWC flag

Value Objects Catalog

Located in Obelaw\Ium\Dental\ValueObjects\:

Value ObjectKey Methods & PropertiesUsage
ToothNumberfromUniversal(), fromFdi(), toUniversal(), toFdi(), isAnterior(), isMaxillary()Type-safe tooth identification with automatic notation conversion
SurfaceSetfrom(), toArray(), validateForTooth(ToothNumber $tooth)5-surface anatomical findings with morphological anterior/posterior invariants
AdacdtCodefrom(), category(), isDiagnostic(), isSurgical()Type-safe ADA/CDT dental procedure code validation
PeriodontalProbingMatrixdepthAt(), hasBop(), toArray()6-point probing depth and Bleeding on Probing matrix (MB, B, DB, ML, L, DL)
MoneyfromMinor(), toMinor(), formatted()Zero-rounding monetary arithmetic stored in minor units
CopayBreakdowntotalFee, primaryPaid, secondaryPaid, patientCopayCoordination of benefits output model
ShadeMatchbodyShade, stumpShade, cervicalShade, incisalShadeVITA Classical and 3D-Master prosthetic shade matching
AutoclaveBarcodefrom(), toString()Scannable surgical cassette and pouch batch barcodes
InformedConsentSignaturesignatureBlob, ipAddress, device, signedAtChairside tablet digital signature token
DicomStudyReferencestudyInstanceUid, modality, seriesCountOpaque radiological study identifier

Backed Enums Catalog

Located in Obelaw\Ium\Dental\Enums\:

  • ToothNotationSystem: UNIVERSAL, FDI, PALMER
  • DentitionType: PERMANENT, DECIDUOUS
  • ToothSurface: MESIAL, DISTAL, OCCLUSAL, BUCCAL, LINGUAL, INCISAL
  • ToothCondition: HEALTHY, CARIES, RESTORATION, CROWN, ENDO, IMPLANT, MISSING, EXTRACTED, FRACTURED, IMPACTED
  • ProbingPoint: MESIOBUCCAL, BUCCAL, DISTOBUCCAL, MESIOLINGUAL, LINGUAL, DISTOLINGUAL
  • ConsentType: TREATMENT, BILLING, IMAGING_CLOUD_SYNC, THIRD_PARTY_PAYMENT
  • TreatmentPhase: URGENT, DISEASE_CONTROL, RESTORATIVE, SURGICAL, MAINTENANCE
  • TreatmentPhaseStatus: PENDING, APPROVED, IN_PROGRESS, COMPLETED, SKIPPED
  • TreatmentPlanStatus: DRAFT, PROPOSED, APPROVED, IN_PROGRESS, COMPLETED, DECLINED
  • AppointmentStatus: SCHEDULED, CONFIRMED, CHECKED_IN, IN_PROGRESS, COMPLETED, CANCELLED, NO_SHOW
  • AlertSeverity: LOW, MEDIUM, HIGH, CRITICAL
  • ImagingType: CBCT_3D, PANORAMIC_OPG, BITEWING_2D, PERIAPICAL_2D, CEPHALOMETRIC, INTRAORAL_CAMERA, STL_OPTICAL_SCAN
  • LabOrderStatus: CREATED, IMPRESSION_TAKEN, SENT_TO_LAB, IN_FABRICATION, RECEIVED, DELIVERED, CANCELLED
  • RestorationType: CROWN, BRIDGE, VENEER, INLAY_ONLAY, IMPLANT_ABUTMENT, DENTURE_COMPLETE, DENTURE_PARTIAL, NIGHTGUARD, ALIGNER
  • PayerType: PATIENT, PRIMARY_INSURANCE, SECONDARY_INSURANCE, THIRD_PARTY
  • QuickBooksSyncStatus: PENDING, SYNCING, SYNCED, BLOCKED_BY_CONSENT, FAILED
  • AuditAction: CREATE, READ, UPDATE, DELETE, AUTOCLAVE_VALIDATED, QUICKBOOKS_SYNC

Domain Events Catalog

Located in Obelaw\Ium\Dental\Events\:

Event ClassEmitted WhenPrimary Properties
PatientRegisteredNew patient master record createdPatient $patient, ?string $actorId
MedicalAlertAddedSystemic alert or allergy attachedMedicalAlert $alert, ?string $actorId
ConsentGrantedPatient signs chairside digital consentConsentRecord $consent, ?string $actorId
ConsentWithdrawnConsent record is legally revokedConsentRecord $consent, ?string $actorId
ToothChartedOdontogram condition/surfaces updatedOdontogramTooth $tooth
PerioExamRecorded6-point periodontal probing recordedPeriodontalPoint $point
TreatmentPlanApprovedPatient signs treatment plan consentTreatmentPlan $plan, ConsentRecord $consent
ProcedureCompletedChairside clinical procedure finalizedPlannedProcedure $procedure
AppointmentScheduledOperatory, dentist, assistant bookedAppointment $appointment
AppointmentCancelledBooking cancelled and slots releasedAppointment $appointment
AutoclaveValidatedCassette barcode passes sterility checkAutoclaveCycle $cycle
InvoiceGeneratedProcedure charged to patient ledgerDentalInvoice $invoice
QuickBooksInvoiceSyncedInvoice successfully pushed to IntuitQuickBooksSyncJob $job
DicomStudyReceivedDiagnostic radiograph or scan ingestedDicomStudy $study