/** * Whether a staff chart must wait before drawing anything. On a switch the URL names the new patient a * render before the context lets go of the old one, and every section reads that context, so for that * render the old patient's lists would paint under the new patient's URL. */ export const chartWaitsForRoutePatient = ({ isPatient, isNew, routeId, patientId }: { isPatient: boolean; isNew: boolean; routeId: string | undefined; patientId: string | undefined; }): boolean => !isPatient && !isNew && Boolean(routeId) && patientId !== routeId;