Function: submitFacilityIntake()
submitFacilityIntake(
_prev,formData):Promise<FacilityIntakeState>
Defined in: src/server/actions/facilityIntake.ts:37
Submit a facility onboarding intake: validates the survey, then creates (or matches by name and
re-activates) the client facilities row as active, records the full intake, and seeds the
operational billing/admin/clinical facility_contacts. Admin-gated and company-scoped (the
service client bypasses RLS). Redirects to the facility on success, unless the form was submitted
inline (hidden inline=1, from the facility picker's "Add facility" dialog) — then it returns the
created facility so the caller can select it and stay where it was.
Parameters
_prev
formData
FormData
Returns
Promise<FacilityIntakeState>