Files
rea/src/application/SetupRegistrationEnvironment.ts
T

13 lines
490 B
TypeScript
Raw Normal View History

2026-07-22 20:38:26 +08:00
import type { DoctorProviderInspection } from "./Doctor.js";
/** Preserve adapter-published settings independently of runtime readiness. */
2026-07-22 20:38:26 +08:00
export const providerRegistrationEnvironment = (
inspections: readonly DoctorProviderInspection[],
): Readonly<Record<string, string>> =>
Object.fromEntries(
inspections
.flatMap(({ registrationEnvironment }) =>
Object.entries(registrationEnvironment),
)
.sort(([left], [right]) => left.localeCompare(right)),
);