import type { Encounter } from 'fhir/r4'; import { encounterIsVirtual } from './encounterClass'; // A video visit that has not started. The server starts it once clinician and patient are both // present in the video, so until then nothing clinical is written. const PREVISIT_STATUSES: Encounter['status'][] = ['planned', 'arrived', 'triaged']; export const isVideoPrevisit = (encounter: Encounter | undefined): boolean => Boolean(encounter && encounterIsVirtual(encounter) && PREVISIT_STATUSES.includes(encounter.status));