Raven
Data model
Storage, schemas, and data ownership for Raven
Source of truth
- Cloud Spanner stores patient and household data queried by Raven.
- Bubble-derived tables in Spanner provide membership and benefits context.
Primary tables
Patients,Households,Contacts(search results + contact matches).bubble_organization(org id resolution).bubble_pet,bubble_subscriptions,bubble_wellnessPlans(membership).bubble_petBenefit,bubble_benefit,bubble_product(pet benefits).
Required search indexes
Raven relies on Spanner search indexes for fast patient lookup:
CREATE SEARCH INDEX PatientsCodeSearchIdx ON Patients(patient_code);
CREATE SEARCH INDEX PatientsPimsSearchIdx ON Patients(pims_patient_id);
CREATE SEARCH INDEX PatientsNameSearchIdx ON Patients(name);
CREATE SEARCH INDEX HouseholdsNameSearchIdx ON Households(name);
CREATE SEARCH INDEX HouseholdsCodeSearchIdx ON Households(household_code);Additional indexes referenced by query hints:
PatientsByPatientCodePatientsByPimsIdContactsByPhoneContactsByEmailIDX_bubble_pet_spanner_id(Bubble membership lookup)
Data ownership
- Raven does not own source data; it reads from Spanner and Bubble.
Last updated on