import type { Organization } from 'fhir/r4'; import type { DemoTabSession } from '../services/demoTab'; /** * The practice a demo tab works in: the clinic its visit was activated in, as the server confirmed it before * the app mounted. The demo origin's hostname names no practice, so it is never looked up; without a visit * there is no demo practice and ordinary resolution applies. */ export const demoClinicOrganization = (session: DemoTabSession | undefined): Organization | undefined => session?.clinicId ? ({ resourceType: 'Organization', id: session.clinicId } as Organization) : undefined;