264 lines
5.7 KiB
TypeScript
264 lines
5.7 KiB
TypeScript
export type StaffRole = 'doctor' | 'front_desk' | 'billing_admin';
|
|
|
|
export type ClinicalDiscipline = 'chiropractic' | 'physical_therapy' | 'acupuncture' | 'massage_therapy';
|
|
|
|
export interface ClinicTenant {
|
|
id: string;
|
|
name: string;
|
|
slug: string;
|
|
domain: string;
|
|
phone: string;
|
|
email: string;
|
|
address: string;
|
|
cityStateZip: string;
|
|
npi: string;
|
|
taxId: string;
|
|
logoText: string;
|
|
brandColor: string;
|
|
accentColor: string;
|
|
plan: 'Starter' | 'Pro Clinic' | 'Multi-Doc Enterprise';
|
|
mrr: number;
|
|
stripeConnected: boolean;
|
|
createdAt: string;
|
|
baaStatus?: 'executed' | 'pending';
|
|
baaSignedAt?: string;
|
|
baaSignerName?: string;
|
|
baaSignerTitle?: string;
|
|
baaAgreementId?: string;
|
|
}
|
|
|
|
export interface Provider {
|
|
id: string;
|
|
tenantId: string;
|
|
name: string;
|
|
title: string;
|
|
credentials: string;
|
|
specialty: string;
|
|
npi: string;
|
|
email: string;
|
|
phone: string;
|
|
avatarUrl: string;
|
|
color: string;
|
|
}
|
|
|
|
export interface CarePlan {
|
|
title: string;
|
|
totalVisits: number;
|
|
completedVisits: number;
|
|
frequency: string;
|
|
targetCondition: string;
|
|
startDate: string;
|
|
status: 'on_track' | 'lagging' | 'at_risk' | 'completed';
|
|
}
|
|
|
|
export interface PatientVitals {
|
|
bloodPressure: string;
|
|
heartRate: number;
|
|
temperature: string;
|
|
oxygenSat: number;
|
|
painLevel: number;
|
|
bmi: string;
|
|
allergies: string[];
|
|
contraindications: string[];
|
|
}
|
|
|
|
export interface Patient {
|
|
id: string;
|
|
tenantId: string;
|
|
firstName: string;
|
|
lastName: string;
|
|
email: string;
|
|
phone: string;
|
|
dob: string;
|
|
gender: string;
|
|
address: string;
|
|
insuranceName: string;
|
|
insuranceId: string;
|
|
carePlan: CarePlan;
|
|
lastVisitDate: string;
|
|
nextAppointmentDate?: string;
|
|
status: 'active' | 'dropout_risk' | 'reactivated' | 'discharged';
|
|
chiefComplaint: string;
|
|
daysSinceLastVisit: number;
|
|
activeMembership?: string;
|
|
packageCreditsRemaining?: number;
|
|
vitals?: PatientVitals;
|
|
}
|
|
|
|
export type AppointmentStatus = 'booked' | 'confirmed' | 'arrived' | 'in_room' | 'completed' | 'no_show';
|
|
|
|
export interface Appointment {
|
|
id: string;
|
|
tenantId: string;
|
|
patientId: string;
|
|
patientName: string;
|
|
patientPhone: string;
|
|
providerId: string;
|
|
providerName: string;
|
|
date: string;
|
|
time: string;
|
|
durationMinutes: number;
|
|
serviceType: string;
|
|
status: AppointmentStatus;
|
|
room: string;
|
|
notes?: string;
|
|
fee: number;
|
|
isTelehealth?: boolean;
|
|
}
|
|
|
|
export interface SpinalAdjustmentEntry {
|
|
vertebra: string;
|
|
region: 'Cervical' | 'Thoracic' | 'Lumbar' | 'Pelvis/Sacrum';
|
|
listing: string;
|
|
technique: 'Diversified' | 'Thompson Drop' | 'Activator' | 'Gonstead' | 'Webster' | 'Flexion-Distraction';
|
|
notes?: string;
|
|
}
|
|
|
|
export interface CptCodeItem {
|
|
code: string;
|
|
description: string;
|
|
fee: number;
|
|
}
|
|
|
|
export interface Icd10CodeItem {
|
|
code: string;
|
|
description: string;
|
|
}
|
|
|
|
export interface AuditTrailEvent {
|
|
id: string;
|
|
timestamp: string;
|
|
action: 'created' | 'viewed' | 'amended' | 'signed_locked' | 'subpoena_exported' | 'superbill_billed';
|
|
actorName: string;
|
|
actorRole: string;
|
|
actorIp: string;
|
|
hashSignature: string;
|
|
details: string;
|
|
}
|
|
|
|
export interface SoapNote {
|
|
id: string;
|
|
tenantId: string;
|
|
patientId: string;
|
|
patientName: string;
|
|
providerId: string;
|
|
providerName: string;
|
|
appointmentId?: string;
|
|
date: string;
|
|
status: 'draft' | 'signed';
|
|
discipline: ClinicalDiscipline;
|
|
subjective: string;
|
|
objective: string;
|
|
assessment: string;
|
|
plan: string;
|
|
spinalAdjustments: SpinalAdjustmentEntry[];
|
|
icd10Codes: Icd10CodeItem[];
|
|
cptCodes: CptCodeItem[];
|
|
vasScore: number;
|
|
signedAt?: string;
|
|
signedBy?: string;
|
|
cryptographicHash?: string;
|
|
auditTrail?: AuditTrailEvent[];
|
|
legalAffidavitId?: string;
|
|
licenseNumber?: string;
|
|
}
|
|
|
|
export interface SuperbillLineItem {
|
|
cptCode: string;
|
|
description: string;
|
|
units: number;
|
|
rate: number;
|
|
total: number;
|
|
}
|
|
|
|
export interface Superbill {
|
|
id: string;
|
|
tenantId: string;
|
|
invoiceNumber: string;
|
|
patientId: string;
|
|
patientName: string;
|
|
patientDob: string;
|
|
patientAddress: string;
|
|
providerName: string;
|
|
providerNpi: string;
|
|
clinicName: string;
|
|
clinicAddress: string;
|
|
clinicTaxId: string;
|
|
dateOfService: string;
|
|
posCode: string;
|
|
icd10Codes: Icd10CodeItem[];
|
|
items: SuperbillLineItem[];
|
|
totalAmount: number;
|
|
patientPaid: number;
|
|
balanceDue: number;
|
|
paymentMethod: 'Stripe Card' | 'HSA/FSA' | 'Cash' | 'Unpaid';
|
|
generatedAt: string;
|
|
}
|
|
|
|
export interface IntakeSubmission {
|
|
id: string;
|
|
tenantId: string;
|
|
patientName: string;
|
|
dob: string;
|
|
phone: string;
|
|
email: string;
|
|
chiefComplaints: string[];
|
|
painAreas: string[];
|
|
vasScore: number;
|
|
painNature: string[];
|
|
symptomsOnset: string;
|
|
medications: string;
|
|
priorChiropractic: boolean;
|
|
signatureName: string;
|
|
submittedAt: string;
|
|
status: 'pending_review' | 'imported_to_chart';
|
|
}
|
|
|
|
export interface RetailProduct {
|
|
id: string;
|
|
tenantId: string;
|
|
name: string;
|
|
sku: string;
|
|
category: 'Supplements' | 'Orthotics & Pillows' | 'Topical & Pain Relief' | 'Rehab Gear';
|
|
price: number;
|
|
cost: number;
|
|
stockQty: number;
|
|
reorderPoint: number;
|
|
supplier: string;
|
|
}
|
|
|
|
export interface WellnessMembership {
|
|
id: string;
|
|
tenantId: string;
|
|
name: string;
|
|
monthlyFee: number;
|
|
includedVisits: number;
|
|
additionalVisitDiscount: string;
|
|
activeMembers: number;
|
|
mrrContribution: number;
|
|
description: string;
|
|
}
|
|
|
|
export interface PrePaidPackage {
|
|
id: string;
|
|
tenantId: string;
|
|
name: string;
|
|
totalVisits: number;
|
|
price: number;
|
|
perVisitRate: number;
|
|
savings: string;
|
|
activeSold: number;
|
|
}
|
|
|
|
export interface WaitlistEntry {
|
|
id: string;
|
|
patientName: string;
|
|
phone: string;
|
|
providerName: string;
|
|
requestedService: string;
|
|
preferredDays: string;
|
|
preferredTimeRange: string;
|
|
notes: string;
|
|
status: 'waiting' | 'notified' | 'filled';
|
|
}
|