import { Organization } from "fhir/r4"; /** FHIR extension URL carrying an Organization's logo (valueAttachment). Single source of truth - was previously * copy-pasted as a private literal in OrganizationService, FhirOrganizationDisplay, and MessagesPage. */ export const ORG_LOGO_EXTENSION_URL = "https://akashichealthrecords.com/fhir/extensions/organization-logo"; /* * THE HEADER BANNER AND ITS BACKGROUND TREATMENT ARE GONE. Spencer, 2026-09-04: "maybe we just get rid of * the option for orgs to upload their own custom banners and backgrounds. not really worth the rabbit hole * on how to design around it." * * What went: a second uploadable image for the header, three switches deciding whether the logo, that * image and the practice name each appeared, and a treatment choosing between a lockup beside the name or * a scrimmed photo behind the whole header. * * What stays: the logo above, which was never part of the rabbit hole. It is read by eight surfaces - the * login page, the printable invoice, the appointment card, the messages surface, the org display and both * My Providers surfaces - and a small mark beside a name cannot break a layout or make text unreadable. * * WHY IT WAS WORTH REMOVING RATHER THAN DESIGNING AROUND. The header is on every patient screen, so every * other screen was being drawn under a header whose contents were a per-practice variable. The banner also * REPLACED the practice name by default, which meant a practice could end up with a portal header that * never said whose practice it was. The name is now unconditional text, which is what every approved deck * draws, and the header is the same component for everybody. * * The server may still write these extensions on an organization. Nothing reads them, so a stored value is * inert rather than wrong - and that is the reason this note exists instead of the constants. */ // Phase 2 (clinical-authorization gate), client Task 11 - mirrors the server's // organization-require-signed-auth-form extension (valueBoolean): whether this org requires a // signed paper/PDF authorization form (not just an in-app attest) before staff can record a // patient's clinical authorization in RecordAuthorizationDialog. The server WRITES this exact URL, // the plugin READS it back here - the literal MUST match byte for byte. export const ORG_REQUIRE_SIGNED_AUTH_FORM_EXTENSION_URL = "https://akashichealthrecords.com/fhir/extensions/organization-require-signed-auth-form"; // Pure reader - whether the org requires a signed form before an in-office authorization attest. // Default when absent = false (the in-app attest alone is sufficient), matching the server default. export const getOrgRequireSignedAuthForm = (org?: Organization | null): boolean => org?.extension?.find((e) => e.url === ORG_REQUIRE_SIGNED_AUTH_FORM_EXTENSION_URL)?.valueBoolean ?? false;