Parent: Jarvis
Entry Condition: A Deal becomes visible as a ReferralDeal when:
-
customer.terms_accepted = True -
product_typeis Aligners, Whitening, or Clear Braces -
cancelled = False
Flow Diagram (Mermaid):
flowchart TD subgraph entryPoint [Entry Point] A1[Sale Completed by Salesperson] A1 --> A2[Deal Created in Jarvis] A2 --> A3[Terms Email Sent to Customer] A3 --> A4{Customer Accepts Terms?} A4 -->|No| A5[Deal not visible to Dentist] A4 -->|Yes| A6[Deal appears as ReferralDeal] end subgraph dentistView [Dentist Portal - ReferralDeal Admin] A6 --> B1[Dentist sees new referral] B1 --> B2[View patient info and goals] B2 --> B3[Schedule Scan via Dentally] B3 --> B4[Patient attends scan] end subgraph caseAssessment [Case Assessment] B4 --> C1{Dentally Fit?} C1 -->|Fit - Needs Specialist| C2[Record: Needs Specialist] C1 -->|Unsuitable - Not Proceeding| C3[Record: Not Proceeding] C1 -->|Unfit - Proceeding Anyway| C4[Record: Proceeding with issues] C1 -->|Fit| C5[Create CasePickup] C2 --> C6[CasePickup with rejection reason] C3 --> C6 C4 --> C5 end subgraph alignerCreation [Aligner Case Management] C5 --> D1[Create Aligner Case] D1 --> D2[Select Practitioner for Provider] D2 --> D3[Case submitted to EON/Kline/ALS] D3 --> D4[Track manufacturing stages] D4 --> D5[Aligners shipped to practice] end subgraph completion [Fitment and Payment] D5 --> E1[Schedule Fitment Appointment] E1 --> E2[Patient attends fitment] E2 --> E3[Dentist confirms completion] E3 --> E4[Upload fitment image] E4 --> E5[DentistPayment marked as paid] end subgraph communication [Patient Communication] B1 -.-> F1[Chat with Patient] F1 -.-> F2[Unread message count shown] end
Key Actions Available to Dentists:
-
View referral details (patient info, goals, availability)
-
Manage appointments (Scan, Fitment)
-
Create aligner cases (Kline via
create_kline_alignersaction) -
Change assigned dentist (
refer_to_dentistaction) -
Chat with patients (
view_messagesaction) -
Confirm fitment and upload completion images