// src/services/healthcareServiceSearch.ts // Pure builder for the HealthcareService search query. The API forces the org scope server-side, so no // organization param is sent. `name` is a starts-with search - the single place to switch to // `name:contains` if HealthLake support is confirmed (see the infra plan's `:contains` note). export const buildHealthcareServiceSearchParams = ( { pageSize, pageParam, query }: { pageSize: number; pageParam?: string; query?: string }, ): URLSearchParams => { const params = new URLSearchParams(); params.set('_count', String(pageSize)); if (pageParam) params.set('page', pageParam); if (query && query.trim()) params.set('name', query.trim()); return params; };