Agency & Configuration (orchid/models/agency.py)
| Model | Purpose |
|---|
Agency | Root record. One per database. Name, subdomain, subscription. |
AgencyPreferences | Feature flags — which programs (ED, GC, SD) are enabled, operational settings. |
AgencyColors | Branding: primary/secondary colors, logo S3 key. |
AgencyDQSettings | Disqualification rules: age ranges, BMI thresholds, boolean flags. |
MatchingFilterPreferences | Which matching filters are available and their defaults. |
NotificationPreferences | Which notifications are sent, to whom, and when. |
AgencyCustomResponses | Custom text overrides for standard messages. |
AgencyCustomCopy | Custom copy overrides for UI text. |
ProfileFooterSettings | Footer content shown on printed profiles. |
AgencyTeam | Groups of admin users. Used for confidential case access. |
AgencyTeamAdmin | Join table: admin ↔ team. |
AgencyDocument | Documents uploaded at the agency level (not case-specific). |
AgencyDocumentFolder | Folders for organizing agency documents. |
AgencyContactTypes | Custom contact type labels for this agency. |
ProfileAppearance | Controls which sections show on each profile type per agency. |
Users & Admins (orchid/models/user.py)
| Model | Purpose |
|---|
Admin | Agency staff member. Has user_type (admin, company_admin, etc.). |
User | Client — IP, ED, GC, or SD. Has user_type (‘IP’, ‘donor’, ‘surrogate’, ‘sperm_donor’). |
NonParticipatingUser | Read-only access user tied to a case. |
ThirdPartyUser | External user with limited case visibility. |
DashboardSettings | Which widgets appear on an admin’s dashboard. |
DashboardWidget | Individual dashboard widget with type and position. |
AdminEmailSyncStatus | Tracks admin email sync connection state. |
Authentication (orchid/models/auth.py)
| Model | Purpose |
|---|
CSRFToken | CSRF protection tokens for form submissions. |
ExternalUser | External API user identity. |
GurgleToken | Authentication token for the Gurgle messaging platform. |
Cases (orchid/models/case.py)
| Model | Purpose |
|---|
Case | The core journey record. Links to all other case-scoped data. |
CaseParty | Join table: User ↔ Case with a party_type role. |
CaseDocument | A document uploaded to a case (S3-referenced). |
CaseEmail | A manually-logged email association to a case. |
CaseLog | Audit trail entry for a case action. |
CaseNote | A staff note on a case, optionally pinned. |
GCCase | GC-specific supplement for gestational carrier cases. |
CaseClosingDetails | Final outcome and closing information. |
Family | Family information record for the IP. |
JourneyPhoto | Milestone photo uploaded by the IP. |
Medical Cycles (orchid/models/cycle.py)
| Model | Purpose |
|---|
Transfer | Embryo transfer procedure record. |
Retrieval | Egg retrieval procedure record. |
RetrievalBatch | A batch within a multi-batch retrieval. |
SDRetrieval | Sperm retrieval record. |
SDRetrievalDate | Date records for SD retrievals. |
SDRetrievalBatch | Batch within an SD retrieval. |
Lab | Lab test result attached to a cycle event. |
Pregnancy | Confirmed pregnancy record. |
Delivery | Birth/delivery record. |
| Model | Purpose |
|---|
Contact | A reviewed applicant before they become a User. |
ContactDocument | Document uploaded for a contact. |
ContactEmail | Manually-logged email for a contact. |
ContactLog | Audit trail for a contact record. |
ContactNote | Staff note on a contact. |
ContactLead | Initial inquiry — lightest-weight pre-contact record. |
ContactLeadRequest | Full data from a lead’s initial inquiry form. |
Profiles (orchid/models/profile.py)
| Model | Purpose |
|---|
ProfileBase | Base profile record (is_approved, is_visible). |
EDProfile | Egg donor profile — personal details, education, ethnicity, medical. |
EDEducation | Education history records for an ED. |
EDEthnicity | Ethnicity entries for an ED (can be multi-ethnic). |
EDFamilyMember | Family member health records for an ED. |
EDFamilyMemberEthnicity | Ethnicity for a family member. |
EDFamilyMemberBuiltinRelation | Standard relationship types. |
EDTestResult | Genetic / medical test results for an ED. |
EDProfileDocument | Documents attached to an ED profile. |
EDProfileImage | Photos for an ED profile. |
EDProfileVideo | Videos for an ED profile. |
SDProfileDocument | Documents for an SD profile. |
SDProfileImage | Photos for an SD profile. |
SDProfileVideo | Videos for an SD profile. |
GCProfileDelivery | Previous delivery records for a GC. |
GCProfileDocument | Documents for a GC profile. |
GCProfileImage | Photos for a GC profile. |
GCProfileVideo | Videos for a GC profile. |
IPProfileDocument | Documents for an IP profile. |
IPProfileImage | Photos for an IP profile. |
IPProfileVideo | Videos for an IP profile. |
DeliveryBaby | Baby information record from a GC delivery. |
ProfileKey | Per-agency field visibility/required settings. |
ProfileQuestion | Custom questions for a profile section. |
UserCustomProfile | A user’s custom profile section instance. |
UserCustomProfileAnswer | An answer to a custom profile question. |
UserCustomProfileSection | Definition of a custom profile section. |
Matching (orchid/models/matching.py, matchsheet.py)
| Model | Purpose |
|---|
MatchingQueue | Ordered list of candidates for an IP’s review. |
Favorite | An IP’s favorited candidate. |
MatchBreakDetails | Why a match proposal was declined. |
MatchingPreferences | IP’s matching preferences (stored as JSON). |
MatchSheet | A completed match sheet document. |
MatchSheetTemplate | Template defining a match sheet structure. |
MatchSheetHeader | Section header in a match sheet template. |
MatchSheetQuestion | A question in a match sheet template. |
CaseMatchSheetAnswer | An answer to a match sheet question for a specific case. |
| Model | Purpose |
|---|
Form | A form definition (questions, type, agency). |
FormQuestion | A question in a form (type, text, options). |
UserForm | An instance of a form assigned to a user/case. |
UserFormAnswer | A user’s answer to a form question. |
MedicalReleaseForm | Specialized model for medical release forms. |
IntakeFormSubmission | Tracks intake form submission (creates user). |
GeneralFormSubmission | Public/external form submission (no user created). |
RecaptchaSubmission | Tracks reCAPTCHA results for intake forms. |
Workflow & Tasks (orchid/models/workflow.py, tood.py, date_tood.py, milestone.py)
| Model | Purpose |
|---|
TemplateBase | A workflow template (top-level container). |
TemplateStage | A stage within a workflow template. |
TemplateSubStage | A sub-stage within a stage. |
TemplateTask | A task definition within a sub-stage. |
TemplateTaskDocument | A document requirement attached to a task. |
CustomSubStage | Ad-hoc sub-stage added to a template. |
CustomTask | Ad-hoc task added outside the template structure. |
CaseTask | An instance of a task on a specific case. |
ContactTask | A task on a contact record. |
ClinicTask | A task related to a clinic. |
GeneralTask | A general admin to-do not tied to a case. |
DateBasedToDoTemplate | Template for date-triggered tasks. |
DateBasedToDoSnippetTemplate | A snippet within a date-based template. |
CaseDateBasedToDoSnippet | An instantiated date-triggered task on a case. |
MileStoneBase | Base milestone definition. |
MileStone | A specific milestone type. |
CaseMilestone | A milestone achieved on a specific case. |
Email & Messaging (orchid/models/email_sync.py, general.py)
| Model | Purpose |
|---|
EmailSync | Email sync state for an admin (status, last sync time). |
EmailSyncStatus | Enum-like: active, paused, error, disconnected. |
EmailSyncType | Enum-like: gmail, microsoft. |
EmailSyncErrorType | Types of transient sync errors. |
EmailSyncDisconnectReason | Why a sync was permanently disconnected. |
EmailMessage | A synced email message (body, from, to, linked case/contact). |
Email | A sent transactional email record. |
EmailTemplate | A reusable email template with Jinja2 body. |
MassEmail | A bulk email send job. |
OAuthToken | Gmail or Outlook OAuth access/refresh tokens. |
OAuthTokenType | Enum-like: gmail, microsoft. |
SMSTemplate | A reusable SMS template. |
Provider Network (orchid/models/provider.py, clinic.py)
| Model | Purpose |
|---|
Provider | An external provider organization (clinic, attorney, etc.). |
ProviderUser | A person at a provider org who has portal access. |
CaseProvider | Assignment: this Provider works on this Case. |
CaseProviderExternal | API-based provider assignment. |
CaseProviderExternalDocument | Document shared via external API. |
CaseProviderExternalMatchsheet | Match sheet shared externally. |
CaseProviderExternalMatchsheetList | List of shared match sheets. |
CaseProviderExternalMatchsheetShare | Share record for a match sheet. |
CaseProviderExternalFlags | Feature flags for an external provider. |
CaseProviderExternalCycleShare | Cycle data shared with an external provider. |
ProviderNote | A note on a provider record. |
ProviderContactNote | A note on a provider contact. |
ProviderDocument | A document attached to a provider. |
Clinic | A specific clinic record (IVF clinic details). |
ClinicContact | A contact person at a clinic. |
ClinicDocument | A document at the clinic level. |
Contracts (orchid/models/contract.py)
| Model | Purpose |
|---|
Contract | Contract type definition for an agency. |
ContractRelationship | Which parties sign which contracts. |
CaseContract | A contract instance on a specific case. |
HelloSignTemplate | HelloSign template linked by hs_template_id. |
HelloSignParent | A signature request created in HelloSign. |
SignedContract | Completed signed document (S3 reference). |
Campaigns (orchid/models/campaign.py)
| Model | Purpose |
|---|
Campaign | A recruitment email campaign. |
CampaignFlow | A step in a drip campaign sequence. |
CaseCampaign | A case/contact enrolled in a campaign. |
CaseCampaignFlow | Tracking record for each flow step. |
Reporting (orchid/models/report.py)
| Model | Purpose |
|---|
CustomReport | A saved custom report definition. |
FormQuestionReport | Aggregate report on form question answers. |
MatchingDaysReport | How many days cases spend in matching stages. |
Activity & Audit (orchid/models/activity.py)
| Model | Purpose |
|---|
ActivityFeed | Activity feed items for a case/contact. |
ActivityNote | Notes within the activity feed. |
ChangeLog | Low-level change tracking for model updates. |
General / Miscellaneous (orchid/models/general.py)
| Model | Purpose |
|---|
ArchiveReason | Reasons for archiving a case or contact. |
CalendarEvent | Calendar events displayed in the admin UI. |
DefaultChannel | Default communication channel settings. |
Event | General event log record. |
Notification | System notification for an admin or user. |
Program | Agency program definitions. |
ServiceLevel | Service tier definitions. |
Status | Status label definitions (some cases use this). |
SubscriptionInfo | Agency billing subscription details. |
Error Tracking (orchid/models/__init__.py)
| Model | Purpose |
|---|
Errors | General application error records (content-deduplicated). |
ErrAPI | API-specific error records. |
Err400 | HTTP 400-series error records. |
IPAddress | IP address tracking for rate limiting. |
IPAddressErr | Error records by IP address. |
Model mixins (orchid/models/mixins.py)
These are not standalone models — they are mixed into other models:
| Mixin | Adds |
|---|
AddressMixin | street, city, state, zip, country columns |
DocumentMixin | S3 file reference columns |
FlagsMixin | Boolean flag columns |
TaskMixin | Task completion tracking columns |
EncryptedSsnMixin | Encrypted SSN storage |
TimeZoneMixin | Timezone-aware datetime handling |
UserMixin | Common user fields |
CaseMixin | Common case reference fields |