import { UseQueryResult } from "@tanstack/react-query"; import { ReactNode } from "react"; import { CTWRequestContext } from "./ctw-context"; import { PatientState } from "./patient-context"; import { PatientFormData } from "../../content/forms/actions/patients"; import { PatientModel } from "../../../fhir/models/patient"; import { Tag } from "../../../fhir/types"; export type ThirdPartyID = { patientResourceID?: never; patientUPID?: never; patientID: string; systemURL: string; }; export type PatientUPIDSpecified = { patientResourceID?: never; patientUPID: string; patientID?: never; systemURL?: never; }; export type PatientResourceID = { patientResourceID: string; patientUPID?: never; patientID?: never; systemURL?: never; }; export type PatientProviderProps = { children: ReactNode; tags?: Tag[]; onPatientSave?: (data: PatientFormData) => void; onResourceSave?: (data: fhir4.Resource, action: "create" | "update") => void; } & (ThirdPartyID | PatientUPIDSpecified | PatientResourceID); export declare function PatientProvider({ children, patientResourceID, patientUPID, patientID, systemURL, tags, onPatientSave, onResourceSave, }: PatientProviderProps): JSX.Element; export declare function usePatientContext(): PatientState; export declare function usePatient(): UseQueryResult; export declare function usePatientPromise(): { context: PatientState; getPatient: () => Promise; }; export declare function useHandlePatientSave(patient?: PatientModel): (data: any) => Promise; export declare function useQueryWithPatient(queryKey: string, keys: T2[], query: (requestContext: CTWRequestContext, patient: PatientModel, keys?: T2[]) => Promise, enabled?: boolean): UseQueryResult; export declare function useTimingQueryWithPatient(queryKey: string, keys: T2[], query: (requestContext: CTWRequestContext, patient: PatientModel, keys?: T2[]) => Promise, enabled?: boolean): UseQueryResult; //# sourceMappingURL=patient-provider.d.ts.map