Adapter for syncing data from LightningStep to v2.
Mirrors the legacy adapter's three external touchpoints (admissions,
care team, documents) with the same filter shapes and mapping helpers.
Differences from legacy:
DB access goes through v2 repo singletons (patientsRepo,
patientAdmissionsRepo) rather than per-request Supabase clients.
Errors are typed (IntegrationConfigError / PatientConfigError)
instead of bare Error so the manager can surface them cleanly.
The level-of-care name comes from the inner-join on
patientAdmissionsRepo.listForPatientByIntegration (level_of_care_name)
rather than the legacy nested entity_levels_of_care.name shape.
Adapter for syncing data from LightningStep to v2.
Mirrors the legacy adapter's three external touchpoints (admissions, care team, documents) with the same filter shapes and mapping helpers. Differences from legacy:
patientsRepo,patientAdmissionsRepo) rather than per-request Supabase clients.IntegrationConfigError/PatientConfigError) instead of bareErrorso the manager can surface them cleanly.patientAdmissionsRepo.listForPatientByIntegration(level_of_care_name) rather than the legacy nestedentity_levels_of_care.nameshape.