import { CSSResult } from 'lit';
import { DirectiveResult } from 'lit-html/directive';
import { DocumentTypeDecoration } from '@graphql-typed-document-node/core';
import { LitElement } from 'lit';
import { ResultOf } from '@graphql-typed-document-node/core';
import { TemplateResult } from 'lit-html';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { UntilDirective } from 'lit-html/directives/until';

/**
 * @fires {PointerEvent} click - button clicked
 * @fires {BundlesEvent} click-with-bundles - button clicked (with Bundles in event)
 *
 * @slot - Button content
 *
 * @cssproperty --bcb-primary-bg-color - Background color of the button
 * @cssproperty --bcb-primary-color - Text color of the button
 */
export declare class ActionButton extends LitElement {
    render(): TemplateResult<1>;
    static readonly styles: CSSResult[];
}

/**
 * @slot - Custom actions. Can be <bcb-action-button> or anything else.
 */
export declare class ActionsButtons extends LitElement {
    slot: string;
    render(): TemplateResult<1>;
    static readonly styles: CSSResult[];
}

/**  https://hl7.org/fhir/adverseevent.html  */
export declare type AdverseEvent = IResource & {
    __typename?: 'AdverseEvent';
    actuality: Scalars['String']['output'];
    code?: Maybe<CodeableConcept>;
    id?: Maybe<Scalars['String']['output']>;
    note?: Maybe<Array<Annotation>>;
    resourceType: ResourceType;
    status: Scalars['String']['output'];
    subject?: Maybe<Reference>;
    suspectEntity?: Maybe<Array<AdverseEventSuspectEntity>>;
};

export declare type AdverseEventFragmentFragment = {
    __typename?: 'AdverseEvent';
    id?: string | null;
    resourceType: ResourceType;
    status: string;
    actuality: string;
    code?: {
        __typename?: 'CodeableConcept';
        text?: string | null;
    } | null;
    note?: Array<{
        __typename?: 'Annotation';
        text: string;
    }> | null;
    subject?: {
        __typename?: 'Reference';
        reference?: string | null;
        type?: string | null;
    } | null;
    suspectEntity?: Array<{
        __typename?: 'AdverseEventSuspectEntity';
        instanceReference: {
            __typename?: 'Reference';
            reference?: string | null;
            type?: string | null;
        };
    }> | null;
} & {
    ' $fragmentName'?: 'AdverseEventFragmentFragment';
};

export declare const AdverseEventFragmentFragmentDoc: TypedDocumentNode<AdverseEventFragmentFragment, unknown>;

/**  https://hl7.org/fhir/adverseevent.html  */
export declare type AdverseEventInput = {
    actuality: Scalars['String']['input'];
    code?: InputMaybe<CodeableConceptInput>;
    id?: InputMaybe<Scalars['String']['input']>;
    note?: InputMaybe<Array<AnnotationInput>>;
    resourceType: ResourceType;
    status: Scalars['String']['input'];
    subject?: InputMaybe<ReferenceInput>;
    suspectEntity?: InputMaybe<Array<AdverseEventSuspectEntityInput>>;
};

/**  https://www.hl7.org/fhir/adverseevent-definitions.html#AdverseEvent.suspectEntity  */
export declare type AdverseEventSuspectEntity = {
    __typename?: 'AdverseEventSuspectEntity';
    instanceReference: Reference;
};

/**  https://www.hl7.org/fhir/adverseevent-definitions.html#AdverseEvent.suspectEntity  */
export declare type AdverseEventSuspectEntityInput = {
    instanceReference: ReferenceInput;
};

/**  https://hl7.org/fhir/datatypes.html#Annotation  */
export declare type Annotation = {
    __typename?: 'Annotation';
    authorReference?: Maybe<Reference>;
    text: Scalars['String']['output'];
    time?: Maybe<Scalars['dateTime']['output']>;
};

/**  https://hl7.org/fhir/datatypes.html#Annotation  */
export declare type AnnotationInput = {
    authorReference?: InputMaybe<ReferenceInput>;
    text: Scalars['String']['input'];
    time?: InputMaybe<Scalars['dateTime']['input']>;
};

/**  https://www.hl7.org/fhir/bundle.html  */
export declare type Bundle = IResource & {
    __typename?: 'Bundle';
    entry: Array<BundleEntry>;
    id: Scalars['String']['output'];
    identifier: Identifier;
    meta?: Maybe<Meta>;
    resourceType: ResourceType;
    timestamp?: Maybe<Scalars['instant']['output']>;
    type: BundleType;
};

/**  https://www.hl7.org/fhir/bundle-definitions.html#Bundle.entry  */
export declare type BundleEntry = {
    __typename?: 'BundleEntry';
    fullUrl: Scalars['String']['output'];
    resource: BundleEntryResource;
};

/**  Resources accepted in a bundle entry  */
export declare type BundleEntryResource = AdverseEvent | Composition | Medication | MedicationRequest | Observation | Patient | Practitioner;

export declare class BundleEvent extends Event {
    bundle: Bundle;
    constructor(type: string, bundle: Bundle);
}

export declare type BundleFragmentFragment = {
    __typename?: 'Bundle';
    resourceType: ResourceType;
    id: string;
    timestamp?: any | null;
    type: BundleType;
    identifier: {
        __typename?: 'Identifier';
        system?: any | null;
        value?: string | null;
    };
    meta?: {
        __typename?: 'Meta';
        versionId?: string | null;
    } | null;
    entry: Array<{
        __typename?: 'BundleEntry';
        fullUrl: string;
        resource: ({
            __typename?: 'AdverseEvent';
        } & {
            ' $fragmentRefs'?: {
                'AdverseEventFragmentFragment': AdverseEventFragmentFragment;
            };
        }) | ({
            __typename?: 'Composition';
        } & {
            ' $fragmentRefs'?: {
                'CompositionFragmentFragment': CompositionFragmentFragment;
            };
        }) | ({
            __typename?: 'Medication';
        } & {
            ' $fragmentRefs'?: {
                'MedicationFragmentFragment': MedicationFragmentFragment;
            };
        }) | ({
            __typename?: 'MedicationRequest';
        } & {
            ' $fragmentRefs'?: {
                'MedicationRequestFragmentFragment': MedicationRequestFragmentFragment;
            };
        }) | ({
            __typename?: 'Observation';
        } & {
            ' $fragmentRefs'?: {
                'ObservationFragmentFragment': ObservationFragmentFragment;
            };
        }) | ({
            __typename?: 'Patient';
        } & {
            ' $fragmentRefs'?: {
                'PatientFragmentFragment': PatientFragmentFragment;
            };
        }) | ({
            __typename?: 'Practitioner';
        } & {
            ' $fragmentRefs'?: {
                'PractitionerFragmentFragment': PractitionerFragmentFragment;
            };
        });
    }>;
} & {
    ' $fragmentName'?: 'BundleFragmentFragment';
};

export declare const BundleFragmentFragmentDoc: TypedDocumentNode<BundleFragmentFragment, unknown>;

export declare class BundlesEvent extends Event {
    bundles: Bundle[];
    constructor(type: string, bundles: Bundle[]);
}

/**  https://www.hl7.org/fhir/valueset-bundle-type.html  */
export declare enum BundleType {
    Collection = "collection",
    Document = "document"
}

/**  https://www.hl7.org/fhir/datatypes.html#CodeableConcept  */
export declare type CodeableConcept = {
    __typename?: 'CodeableConcept';
    coding?: Maybe<Array<Coding>>;
    text?: Maybe<Scalars['String']['output']>;
};

/**  https://www.hl7.org/fhir/datatypes.html#CodeableConcept  */
export declare type CodeableConceptInput = {
    coding?: InputMaybe<Array<CodingInput>>;
    text?: InputMaybe<Scalars['String']['input']>;
};

/**  https://www.hl7.org/fhir/references.html#CodeableReference  */
export declare type CodeableReference = {
    __typename?: 'CodeableReference';
    concept?: Maybe<CodeableConcept>;
    reference?: Maybe<Reference>;
};

/**  https://www.hl7.org/fhir/references.html#CodeableReference  */
export declare type CodeableReferenceInput = {
    concept?: InputMaybe<CodeableConceptInput>;
    reference?: InputMaybe<ReferenceInput>;
};

/**  https://www.hl7.org/fhir/datatypes.html#Coding  */
export declare type Coding = {
    __typename?: 'Coding';
    code?: Maybe<Scalars['code']['output']>;
    display?: Maybe<Scalars['String']['output']>;
    system?: Maybe<Scalars['uri']['output']>;
};

/**  https://www.hl7.org/fhir/datatypes.html#Coding  */
export declare type CodingInput = {
    code?: InputMaybe<Scalars['code']['input']>;
    display?: InputMaybe<Scalars['String']['input']>;
    system?: InputMaybe<Scalars['uri']['input']>;
};

/**  https://www.hl7.org/fhir/composition.html#Composition  */
export declare type Composition = IResource & {
    __typename?: 'Composition';
    author: Array<Reference>;
    date: Scalars['dateTime']['output'];
    id?: Maybe<Scalars['String']['output']>;
    resourceType: ResourceType;
    status: Scalars['String']['output'];
    title?: Maybe<Scalars['String']['output']>;
    type?: Maybe<CodeableConcept>;
};

export declare type CompositionFragmentFragment = {
    __typename?: 'Composition';
    id?: string | null;
    resourceType: ResourceType;
    title?: string | null;
    status: string;
    date: any;
    author: Array<{
        __typename?: 'Reference';
        reference?: string | null;
    }>;
    type?: {
        __typename?: 'CodeableConcept';
        coding?: Array<{
            __typename?: 'Coding';
            code?: any | null;
            display?: string | null;
            system?: any | null;
        }> | null;
    } | null;
} & {
    ' $fragmentName'?: 'CompositionFragmentFragment';
};

export declare const CompositionFragmentFragmentDoc: TypedDocumentNode<CompositionFragmentFragment, unknown>;

/**  https://www.hl7.org/fhir/composition.html#Composition  */
export declare type CompositionInput = {
    author: Array<ReferenceInput>;
    date?: InputMaybe<Scalars['dateTime']['input']>;
    id: Scalars['String']['input'];
    resourceType: ResourceType;
    status: Scalars['String']['input'];
    title?: InputMaybe<Scalars['String']['input']>;
    type?: InputMaybe<CodeableConceptInput>;
};

export declare const CreateBundleAsyncDocument: TypedDocumentNode<CreateBundleAsyncSubscription, CreateBundleAsyncSubscriptionVariables>;

export declare type CreateBundleAsyncSubscription = {
    __typename?: 'Subscription';
    createBundle: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    });
};

export declare type CreateBundleAsyncSubscriptionVariables = Exact<{
    resources: ResourcesInput;
    type: DocumentType_2;
}>;

export declare const CreateBundleDocument: TypedDocumentNode<CreateBundleMutation, CreateBundleMutationVariables>;

export declare type CreateBundleMutation = {
    __typename?: 'Mutation';
    createBundle: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    });
};

export declare type CreateBundleMutationVariables = Exact<{
    resources: ResourcesInput;
    type: DocumentType_2;
}>;

export declare const CreateDocumentBundleAsyncDocument: TypedDocumentNode<CreateDocumentBundleAsyncSubscription, CreateDocumentBundleAsyncSubscriptionVariables>;

export declare type CreateDocumentBundleAsyncSubscription = {
    __typename?: 'Subscription';
    createDocumentBundle: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    });
};

export declare type CreateDocumentBundleAsyncSubscriptionVariables = Exact<{
    document: DocumentInput;
    model?: InputMaybe<Model>;
}>;

export declare const CreateDocumentBundleDocument: TypedDocumentNode<CreateDocumentBundleMutation, CreateDocumentBundleMutationVariables>;

export declare type CreateDocumentBundleMutation = {
    __typename?: 'Mutation';
    createDocumentBundle: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    });
};

export declare type CreateDocumentBundleMutationVariables = Exact<{
    document: DocumentInput;
    model?: InputMaybe<Model>;
}>;

/**  https://www.hl7.org/fhir/valueset-days-of-week.html  */
export declare enum DayOfWeek {
    Fri = "fri",
    Mon = "mon",
    Sat = "sat",
    Sun = "sun",
    Thu = "thu",
    Tue = "tue",
    Wed = "wed"
}

export declare const DocumentBundleDocument: TypedDocumentNode<DocumentBundleQuery, DocumentBundleQueryVariables>;

export declare type DocumentBundleQuery = {
    __typename?: 'Query';
    documentBundle?: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    }) | null;
};

export declare type DocumentBundleQueryVariables = Exact<{
    id: Scalars['ID']['input'];
}>;

/**  Input which can have either a file id or a raw text  */
export declare type DocumentInput = {
    fileId?: InputMaybe<Scalars['String']['input']>;
    type: DocumentType_2;
};

/**  Functional type of document  */
declare enum DocumentType_2 {
    GeneralDocument = "GENERAL_DOCUMENT",
    PrescriptionDocument = "PRESCRIPTION_DOCUMENT"
}
export { DocumentType_2 as DocumentType }

/**  https://www.hl7.org/fhir/dosage.html#Dosage  */
export declare type Dosage = {
    __typename?: 'Dosage';
    asNeeded: Scalars['Boolean']['output'];
    asNeededFor: Array<CodeableConcept>;
    doseAndRate: Array<DoseAndRate>;
    maxDosePerPeriod: Array<Ratio>;
    route?: Maybe<CodeableConcept>;
    sequence: Scalars['Int']['output'];
    text?: Maybe<Scalars['String']['output']>;
    timing?: Maybe<Timing>;
};

/**  https://www.hl7.org/fhir/dosage.html#Dosage  */
export declare type DosageInput = {
    asNeeded: Scalars['Boolean']['input'];
    asNeededFor?: InputMaybe<Array<CodeableConceptInput>>;
    doseAndRate: Array<DoseAndRateInput>;
    maxDosePerPeriod?: InputMaybe<Array<RatioInput>>;
    route?: InputMaybe<CodeableConceptInput>;
    sequence: Scalars['Int']['input'];
    text?: InputMaybe<Scalars['String']['input']>;
    timing?: InputMaybe<TimingInput>;
};

/**  https://www.hl7.org/fhir/dosage-definitions.html#Dosage.doseAndRate  */
export declare type DoseAndRate = {
    __typename?: 'DoseAndRate';
    doseQuantity: Quantity;
    type: CodeableConcept;
};

/**  https://www.hl7.org/fhir/dosage-definitions.html#Dosage.doseAndRate  */
export declare type DoseAndRateInput = {
    doseQuantity: QuantityInput;
    type: CodeableConceptInput;
};

export declare type Exact<T extends {
    [key: string]: unknown;
}> = {
    [K in keyof T]: T[K];
};

/**  https://www.hl7.org/fhir/extensibility.html#Extension  */
export declare type Extension = {
    __typename?: 'Extension';
    extension?: Maybe<Array<Extension>>;
    url: Scalars['String']['output'];
    valueBase64Binary?: Maybe<Scalars['String']['output']>;
    valueBoolean?: Maybe<Scalars['Boolean']['output']>;
    valueCanonical?: Maybe<Scalars['String']['output']>;
    valueCode?: Maybe<Scalars['code']['output']>;
    valueDate?: Maybe<Scalars['date']['output']>;
    valueDateTime?: Maybe<Scalars['dateTime']['output']>;
    valueDecimal?: Maybe<Scalars['Float']['output']>;
    valueId?: Maybe<Scalars['String']['output']>;
    valueInstant?: Maybe<Scalars['instant']['output']>;
    valueInteger?: Maybe<Scalars['Int']['output']>;
    valueInteger64?: Maybe<Scalars['integer64']['output']>;
    valueMarkdown?: Maybe<Scalars['String']['output']>;
    valueOid?: Maybe<Scalars['String']['output']>;
    valuePositiveInt?: Maybe<Scalars['Int']['output']>;
    valueString?: Maybe<Scalars['String']['output']>;
    valueTime?: Maybe<Scalars['String']['output']>;
    valueUnsignedInt?: Maybe<Scalars['Int']['output']>;
    valueUri?: Maybe<Scalars['uri']['output']>;
    valueUrl?: Maybe<Scalars['String']['output']>;
    valueUuid?: Maybe<Scalars['String']['output']>;
};

/**  https://www.hl7.org/fhir/extensibility.html#Extension  */
export declare type ExtensionInput = {
    extension?: InputMaybe<Array<ExtensionInput>>;
    url: Scalars['String']['input'];
    valueBase64Binary?: InputMaybe<Scalars['String']['input']>;
    valueBoolean?: InputMaybe<Scalars['Boolean']['input']>;
    valueCanonical?: InputMaybe<Scalars['String']['input']>;
    valueCode?: InputMaybe<Scalars['code']['input']>;
    valueDate?: InputMaybe<Scalars['date']['input']>;
    valueDateTime?: InputMaybe<Scalars['dateTime']['input']>;
    valueDecimal?: InputMaybe<Scalars['Float']['input']>;
    valueId?: InputMaybe<Scalars['String']['input']>;
    valueInstant?: InputMaybe<Scalars['instant']['input']>;
    valueInteger?: InputMaybe<Scalars['Int']['input']>;
    valueInteger64?: InputMaybe<Scalars['String']['input']>;
    valueMarkdown?: InputMaybe<Scalars['String']['input']>;
    valueOid?: InputMaybe<Scalars['String']['input']>;
    valuePositiveInt?: InputMaybe<Scalars['Int']['input']>;
    valueString?: InputMaybe<Scalars['String']['input']>;
    valueTime?: InputMaybe<Scalars['String']['input']>;
    valueUnsignedInt?: InputMaybe<Scalars['Int']['input']>;
    valueUri?: InputMaybe<Scalars['uri']['input']>;
    valueUrl?: InputMaybe<Scalars['String']['input']>;
    valueUuid?: InputMaybe<Scalars['String']['input']>;
};

export declare const FindBundlesDocument: TypedDocumentNode<FindBundlesQuery, FindBundlesQueryVariables>;

export declare type FindBundlesQuery = {
    __typename?: 'Query';
    findBundles?: {
        __typename?: 'PageBundle';
        totalElements?: number | null;
        totalPages?: number | null;
        size?: number | null;
        number?: number | null;
        first?: boolean | null;
        last?: boolean | null;
        numberOfElements?: number | null;
        empty?: boolean | null;
        pageable?: {
            __typename?: 'Pageable';
            page?: number | null;
            size?: number | null;
        } | null;
        content?: Array<({
            __typename?: 'Bundle';
        } & {
            ' $fragmentRefs'?: {
                'BundleFragmentFragment': BundleFragmentFragment;
            };
        })> | null;
        sort?: {
            __typename?: 'Sort';
            empty?: boolean | null;
            sorted?: boolean | null;
            unsorted?: boolean | null;
        } | null;
    } | null;
};

export declare type FindBundlesQueryVariables = Exact<{
    pageable?: InputMaybe<PageableInput>;
}>;

export declare type FindMedicationFunction = (term: string) => Promise<Medication[]>;

export declare type FormatMedicationLabelFunction = (medication: Medication) => string | undefined;

export declare type FragmentType<TDocumentType extends DocumentTypeDecoration<any, any>> = TDocumentType extends DocumentTypeDecoration<infer TType, any> ? [TType] extends [{
    ' $fragmentName'?: infer TKey;
}] ? TKey extends string ? {
    ' $fragmentRefs'?: {
        [key in TKey]: TType;
    };
} : never : never : never;

export declare const getLocale: (() => string) & {
    _LIT_LOCALIZE_GET_LOCALE_?: never;
};

/**  https://www.hl7.org/fhir/datatypes.html#Identifier  */
export declare type Identifier = {
    __typename?: 'Identifier';
    system?: Maybe<Scalars['uri']['output']>;
    type?: Maybe<CodeableConcept>;
    use?: Maybe<Scalars['code']['output']>;
    value?: Maybe<Scalars['String']['output']>;
};

/**  https://www.hl7.org/fhir/datatypes.html#Identifier  */
export declare type IdentifierInput = {
    system?: InputMaybe<Scalars['uri']['input']>;
    type?: InputMaybe<CodeableConceptInput>;
    use?: InputMaybe<Scalars['code']['input']>;
    value?: InputMaybe<Scalars['String']['input']>;
};

export declare type Incremental<T> = T | {
    [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
};

export declare type InputMaybe<T> = Maybe<T>;

export declare type IPage = {
    empty?: Maybe<Scalars['Boolean']['output']>;
    first?: Maybe<Scalars['Boolean']['output']>;
    last?: Maybe<Scalars['Boolean']['output']>;
    number?: Maybe<Scalars['Int']['output']>;
    numberOfElements?: Maybe<Scalars['Int']['output']>;
    pageable?: Maybe<Pageable>;
    size?: Maybe<Scalars['Int']['output']>;
    sort?: Maybe<Sort>;
    totalElements?: Maybe<Scalars['Int']['output']>;
    totalPages?: Maybe<Scalars['Int']['output']>;
};

/**  https://www.hl7.org/fhir/resource.html#Resource  */
export declare type IResource = {
    id?: Maybe<Scalars['String']['output']>;
    resourceType: ResourceType;
};

export declare function isFragmentReady<TQuery, TFrag>(queryNode: DocumentTypeDecoration<TQuery, any>, fragmentNode: TypedDocumentNode<TFrag>, data: FragmentType<TypedDocumentNode<Incremental<TFrag>, any>> | null | undefined): data is FragmentType<typeof fragmentNode>;

export declare type MakeEmpty<T extends {
    [key: string]: unknown;
}, K extends keyof T> = {
    [_ in K]?: never;
};

export declare function makeFragmentData<F extends DocumentTypeDecoration<any, any>, FT extends ResultOf<F>>(data: FT, _fragment: F): FragmentType<F>;

export declare type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
    [SubKey in K]: Maybe<T[SubKey]>;
};

export declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
    [SubKey in K]?: Maybe<T[SubKey]>;
};

export declare type Maybe<T> = T | null;

/**  https://www.hl7.org/fhir/medication.html#Medication  */
export declare type Medication = IResource & {
    __typename?: 'Medication';
    code?: Maybe<CodeableConcept>;
    extension: Array<Extension>;
    id?: Maybe<Scalars['String']['output']>;
    resourceType: ResourceType;
};

export declare type MedicationFragmentFragment = {
    __typename?: 'Medication';
    id?: string | null;
    resourceType: ResourceType;
    code?: {
        __typename?: 'CodeableConcept';
        text?: string | null;
        coding?: Array<{
            __typename?: 'Coding';
            code?: any | null;
            display?: string | null;
            system?: any | null;
        }> | null;
    } | null;
    extension: Array<{
        __typename?: 'Extension';
        url: string;
        valueString?: string | null;
        extension?: Array<{
            __typename?: 'Extension';
            url: string;
            valueDecimal?: number | null;
            valueInteger?: number | null;
        }> | null;
    }>;
} & {
    ' $fragmentName'?: 'MedicationFragmentFragment';
};

export declare const MedicationFragmentFragmentDoc: TypedDocumentNode<MedicationFragmentFragment, unknown>;

/**  https://www.hl7.org/fhir/medication.html#Medication  */
export declare type MedicationInput = {
    code?: InputMaybe<CodeableConceptInput>;
    extension?: InputMaybe<Array<ExtensionInput>>;
    id: Scalars['String']['input'];
    resourceType: ResourceType;
};

/**  https://www.hl7.org/fhir/medicationrequest.html#MedicationRequest  */
export declare type MedicationRequest = IResource & {
    __typename?: 'MedicationRequest';
    dosageInstruction: Array<Dosage>;
    id?: Maybe<Scalars['String']['output']>;
    intent: Scalars['String']['output'];
    medication?: Maybe<CodeableReference>;
    reason: Array<CodeableReference>;
    resourceType: ResourceType;
    status: Scalars['String']['output'];
    subject: Reference;
};

export declare type MedicationRequestFragmentFragment = {
    __typename?: 'MedicationRequest';
    id?: string | null;
    resourceType: ResourceType;
    status: string;
    intent: string;
    patient: {
        __typename?: 'Reference';
        display?: string | null;
        reference?: string | null;
        type?: string | null;
    };
    medication?: {
        __typename?: 'CodeableReference';
        reference?: {
            __typename?: 'Reference';
            reference?: string | null;
            type?: string | null;
        } | null;
    } | null;
    dosageInstruction: Array<{
        __typename?: 'Dosage';
        text?: string | null;
        sequence: number;
        asNeeded: boolean;
        timing?: {
            __typename?: 'Timing';
            event?: Array<any> | null;
            code?: {
                __typename?: 'CodeableConcept';
                text?: string | null;
                coding?: Array<{
                    __typename?: 'Coding';
                    code?: any | null;
                    display?: string | null;
                    system?: any | null;
                }> | null;
            } | null;
            repeat?: {
                __typename?: 'TimingRepeat';
                dayOfWeek: Array<DayOfWeek>;
                frequency?: number | null;
                frequencyMax?: number | null;
                period?: number | null;
                periodMax?: number | null;
                periodUnit?: UnitsOfTime | null;
                count?: number | null;
                countMax?: number | null;
                timeOfDay: Array<string>;
                when: Array<string>;
                offset?: number | null;
                boundsDuration?: {
                    __typename?: 'Quantity';
                    code?: any | null;
                    system?: any | null;
                    unit?: string | null;
                    value?: number | null;
                } | null;
                boundsPeriod?: {
                    __typename?: 'Period';
                    end?: any | null;
                    start?: any | null;
                } | null;
                extension: Array<{
                    __typename?: 'Extension';
                    url: string;
                    valueString?: string | null;
                }>;
            } | null;
        } | null;
        doseAndRate: Array<{
            __typename?: 'DoseAndRate';
            doseQuantity: {
                __typename?: 'Quantity';
                code?: any | null;
                system?: any | null;
                unit?: string | null;
                value?: number | null;
            };
            type: {
                __typename?: 'CodeableConcept';
                text?: string | null;
                coding?: Array<{
                    __typename?: 'Coding';
                    code?: any | null;
                    display?: string | null;
                    system?: any | null;
                }> | null;
            };
        }>;
        asNeededFor: Array<{
            __typename?: 'CodeableConcept';
            text?: string | null;
        }>;
        maxDosePerPeriod: Array<{
            __typename?: 'Ratio';
            numerator: {
                __typename?: 'Quantity';
                code?: any | null;
                system?: any | null;
                unit?: string | null;
                value?: number | null;
            };
            denominator: {
                __typename?: 'Quantity';
                code?: any | null;
                system?: any | null;
                unit?: string | null;
                value?: number | null;
            };
        }>;
        route?: {
            __typename?: 'CodeableConcept';
            text?: string | null;
            coding?: Array<{
                __typename?: 'Coding';
                code?: any | null;
                display?: string | null;
                system?: any | null;
            }> | null;
        } | null;
    }>;
    reason: Array<{
        __typename?: 'CodeableReference';
        concept?: {
            __typename?: 'CodeableConcept';
            text?: string | null;
        } | null;
    }>;
} & {
    ' $fragmentName'?: 'MedicationRequestFragmentFragment';
};

export declare const MedicationRequestFragmentFragmentDoc: TypedDocumentNode<MedicationRequestFragmentFragment, unknown>;

/**  https://www.hl7.org/fhir/medicationrequest.html#MedicationRequest  */
export declare type MedicationRequestInput = {
    dosageInstruction: Array<DosageInput>;
    id: Scalars['String']['input'];
    intent: Scalars['String']['input'];
    medication?: InputMaybe<CodeableReferenceInput>;
    reason?: InputMaybe<Array<CodeableReferenceInput>>;
    resourceType: ResourceType;
    status: Scalars['String']['input'];
    subject: ReferenceInput;
};

/**  https://www.hl7.org/fhir/resource.html#Meta  */
export declare type Meta = {
    __typename?: 'Meta';
    versionId?: Maybe<Scalars['ID']['output']>;
};

export declare enum Model {
    /**  Model supported by phealing  */
    Phealing = "PHEALING",
    /**  Prototypes for demos  */
    Prototype = "PROTOTYPE"
}

export declare type Mutation = {
    __typename?: 'Mutation';
    /**  Create a bundle with a pre-defined set of resources  */
    createBundle: Bundle;
    /**  Process a document and return a bundle with the results  */
    createDocumentBundle: Bundle;
    /**  Update a bundle with a new set of resources  */
    updateBundleResources: Bundle;
};

export declare type MutationCreateBundleArgs = {
    resources: ResourcesInput;
    type: DocumentType_2;
};

export declare type MutationCreateDocumentBundleArgs = {
    document: DocumentInput;
    model?: InputMaybe<Model>;
};

export declare type MutationUpdateBundleResourcesArgs = {
    bundleId: Scalars['String']['input'];
    resources: ResourcesInput;
};

/**  https://hl7.org/fhir/observation.html  */
export declare type Observation = IResource & {
    __typename?: 'Observation';
    category: Array<CodeableConcept>;
    code?: Maybe<CodeableConcept>;
    effectiveDateTime?: Maybe<Scalars['dateTime']['output']>;
    id?: Maybe<Scalars['String']['output']>;
    resourceType: ResourceType;
    status: Scalars['String']['output'];
    subject?: Maybe<Reference>;
    valueQuantity?: Maybe<Quantity>;
};

export declare type ObservationFragmentFragment = {
    __typename?: 'Observation';
    id?: string | null;
    status: string;
    effectiveDateTime?: any | null;
    resourceType: ResourceType;
    code?: {
        __typename?: 'CodeableConcept';
        text?: string | null;
        coding?: Array<{
            __typename?: 'Coding';
            code?: any | null;
            display?: string | null;
            system?: any | null;
        }> | null;
    } | null;
    category: Array<{
        __typename?: 'CodeableConcept';
        text?: string | null;
        coding?: Array<{
            __typename?: 'Coding';
            code?: any | null;
            display?: string | null;
            system?: any | null;
        }> | null;
    }>;
    subject?: {
        __typename?: 'Reference';
        reference?: string | null;
        type?: string | null;
    } | null;
    valueQuantity?: {
        __typename?: 'Quantity';
        value?: number | null;
        unit?: string | null;
        code?: any | null;
        system?: any | null;
    } | null;
} & {
    ' $fragmentName'?: 'ObservationFragmentFragment';
};

export declare const ObservationFragmentFragmentDoc: TypedDocumentNode<ObservationFragmentFragment, unknown>;

/**  https://www.hl7.org/fhir/observation.html#Observation  */
export declare type ObservationInput = {
    category: Array<CodeableConceptInput>;
    code?: InputMaybe<CodeableConceptInput>;
    effectiveDateTime?: InputMaybe<Scalars['dateTime']['input']>;
    id?: InputMaybe<Scalars['String']['input']>;
    resourceType: ResourceType;
    status: Scalars['String']['input'];
    subject?: InputMaybe<ReferenceInput>;
    valueQuantity?: InputMaybe<QuantityInput>;
};

export declare type Pageable = {
    __typename?: 'Pageable';
    page?: Maybe<Scalars['Int']['output']>;
    size?: Maybe<Scalars['Int']['output']>;
};

export declare type PageableInput = {
    page?: InputMaybe<Scalars['Int']['input']>;
    size?: InputMaybe<Scalars['Int']['input']>;
};

export declare type PageBundle = IPage & {
    __typename?: 'PageBundle';
    content?: Maybe<Array<Bundle>>;
    empty?: Maybe<Scalars['Boolean']['output']>;
    first?: Maybe<Scalars['Boolean']['output']>;
    last?: Maybe<Scalars['Boolean']['output']>;
    number?: Maybe<Scalars['Int']['output']>;
    numberOfElements?: Maybe<Scalars['Int']['output']>;
    pageable?: Maybe<Pageable>;
    size?: Maybe<Scalars['Int']['output']>;
    sort?: Maybe<Sort>;
    totalElements?: Maybe<Scalars['Int']['output']>;
    totalPages?: Maybe<Scalars['Int']['output']>;
};

/**  https://www.hl7.org/fhir/patient.html  */
export declare type Patient = IResource & {
    __typename?: 'Patient';
    birthDate?: Maybe<Scalars['date']['output']>;
    gender?: Maybe<Scalars['String']['output']>;
    id?: Maybe<Scalars['String']['output']>;
    resourceType: ResourceType;
};

export declare type PatientFragmentFragment = {
    __typename?: 'Patient';
    id?: string | null;
    gender?: string | null;
    birthDate?: any | null;
    resourceType: ResourceType;
} & {
    ' $fragmentName'?: 'PatientFragmentFragment';
};

export declare const PatientFragmentFragmentDoc: TypedDocumentNode<PatientFragmentFragment, unknown>;

/**  https://www.hl7.org/fhir/patient.html#Patient  */
export declare type PatientInput = {
    birthDate?: InputMaybe<Scalars['date']['input']>;
    gender?: InputMaybe<Scalars['String']['input']>;
    id: Scalars['String']['input'];
    resourceType: ResourceType;
};

/**  https://www.hl7.org/fhir/datatypes.html#Period  */
export declare type Period = {
    __typename?: 'Period';
    end?: Maybe<Scalars['dateTime']['output']>;
    start?: Maybe<Scalars['dateTime']['output']>;
};

/**  https://www.hl7.org/fhir/datatypes.html#period  */
export declare type PeriodInput = {
    end?: InputMaybe<Scalars['dateTime']['input']>;
    start?: InputMaybe<Scalars['dateTime']['input']>;
};

/**  https://www.hl7.org/fhir/practitioner.html#Practitioner  */
export declare type Practitioner = IResource & {
    __typename?: 'Practitioner';
    id?: Maybe<Scalars['String']['output']>;
    identifier: Array<Identifier>;
    resourceType: ResourceType;
};

export declare type PractitionerFragmentFragment = {
    __typename?: 'Practitioner';
    id?: string | null;
    resourceType: ResourceType;
    identifier: Array<{
        __typename?: 'Identifier';
        use?: any | null;
        value?: string | null;
        system?: any | null;
        type?: {
            __typename?: 'CodeableConcept';
            coding?: Array<{
                __typename?: 'Coding';
                code?: any | null;
                system?: any | null;
            }> | null;
        } | null;
    }>;
} & {
    ' $fragmentName'?: 'PractitionerFragmentFragment';
};

export declare const PractitionerFragmentFragmentDoc: TypedDocumentNode<PractitionerFragmentFragment, unknown>;

/**  https://www.hl7.org/fhir/practitioner.html#Practitioner  */
export declare type PractitionerInput = {
    id?: InputMaybe<Scalars['String']['input']>;
    identifier: Array<IdentifierInput>;
    resourceType: ResourceType;
};

/**
 * An element providing a medical prescription scanner and analyzer.
 *
 * @slot actions-buttons - Custom actions. Better to directly use <bcb-actions-buttons> that already has the correct slot property.
 *
 * @fires {BundleEvent} new-bundle - new bundle analyzed
 * @fires {BundlesEvent} bundles-filtered - user selected or unselected some prescription items
 * @fires {BundlesEvent} bundles-updated - user edited the content of bundles
 */
export declare class PrescriptionScanner extends LitElement {
    apiUrl: string;
    apiKey: string | undefined;
    model: Model | undefined;
    fileUploadId: string | undefined;
    lang: string;
    selectionDisabled: boolean;
    dosageEditionDisabled: boolean;
    analysisFixingDisabled: boolean;
    prescriptionItemDeletionDisabled: boolean;
    findMedication: FindMedicationFunction;
    formatMedicationLabel: FormatMedicationLabelFunction;
    addMedicationButtonVisible?: boolean;
    highlightVisible?: boolean;
    private _onMobileInterface;
    private _activeMobileSection;
    private _boundIsUserOnMobileInterface;
    private selectedFileAnalysis;
    private analysis;
    private errorMessage;
    private highlightMedicationsList;
    private static _events;
    static readonly styles: CSSResult[];
    connectedCallback(): void;
    disconnectedCallback(): void;
    private _isUserOnMobileInterface;
    private updateHighlightMedicationsList;
    private removeHighlightMedicationsList;
    render(): DirectiveResult<UntilDirective>;
    get bundles(): Bundle[];
    handleMobileNavigation(event: CustomEvent): void;
    private _withLocale;
    private _renderErrorMessage;
    private _isAnalysisLoading;
    private _addPrescriptionItem;
    private _prescriptionItemDeleted;
    private _medicationRequestUpdated;
    private _medicationUpdated;
    private _mapBundleEntriesToInputResources;
    private _fileUploadIdProvided;
    private _filesUploaded;
    private _fileSelected;
    private _fileDeleted;
    private _updateSelectedPrescriptionItems;
    private _getFilteredBundles;
    dispatchEvent(event: Event): boolean;
    private _updateAnalysis;
    private _runAnalysis;
    private _extractReasons;
    static readonly apiUrlChanged: (value: string, oldValue: string) => boolean;
    static readonly apiKeyChanged: (value: string, oldValue: string) => boolean;
}

export declare interface PrescriptionScannerProps {
    apiUrl: string;
    apiKey?: string;
    model?: Model;
    fileUploadId?: string;
    lang?: string;
    selectionDisabled?: boolean;
    dosageEditionDisabled?: boolean;
    analysisFixingDisabled?: boolean;
    prescriptionItemDeletionDisabled?: boolean;
    addMedicationButtonVisible?: boolean;
    highlightVisible?: boolean;
}

/**  https://www.hl7.org/fhir/datatypes.html#quantity  */
export declare type Quantity = {
    __typename?: 'Quantity';
    code?: Maybe<Scalars['code']['output']>;
    system?: Maybe<Scalars['uri']['output']>;
    unit?: Maybe<Scalars['String']['output']>;
    value?: Maybe<Scalars['Float']['output']>;
};

/**  https://www.hl7.org/fhir/datatypes.html#quantity  */
export declare type QuantityInput = {
    code?: InputMaybe<Scalars['code']['input']>;
    system?: InputMaybe<Scalars['uri']['input']>;
    unit?: InputMaybe<Scalars['String']['input']>;
    value?: InputMaybe<Scalars['Float']['input']>;
};

export declare type Query = {
    __typename?: 'Query';
    /**  Get a bundle by its id  */
    documentBundle?: Maybe<Bundle>;
    /**  Find bundles  */
    findBundles?: Maybe<PageBundle>;
};

export declare type QueryDocumentBundleArgs = {
    id: Scalars['ID']['input'];
};

export declare type QueryFindBundlesArgs = {
    pageable?: InputMaybe<PageableInput>;
};

/**  https://www.hl7.org/fhir/datatypes.html#Ratio  */
export declare type Ratio = {
    __typename?: 'Ratio';
    denominator: Quantity;
    numerator: Quantity;
};

/**  https://www.hl7.org/fhir/datatypes.html#Ratio  */
export declare type RatioInput = {
    denominator: QuantityInput;
    numerator: QuantityInput;
};

/**  https://www.hl7.org/fhir/references.html#Reference  */
export declare type Reference = {
    __typename?: 'Reference';
    display?: Maybe<Scalars['String']['output']>;
    identifier?: Maybe<Identifier>;
    reference?: Maybe<Scalars['String']['output']>;
    type?: Maybe<Scalars['String']['output']>;
};

/**  https://www.hl7.org/fhir/references.html#Reference  */
export declare type ReferenceInput = {
    display?: InputMaybe<Scalars['String']['input']>;
    reference?: InputMaybe<Scalars['String']['input']>;
    type?: InputMaybe<Scalars['String']['input']>;
};

export declare function renderBundleRawText(bundle: Bundle): Promise<string>;

export declare function renderMedicationLabel(medication: Medication): string | undefined;

export declare function renderMedicationRequestLabel(medicationRequest: MedicationRequest): Promise<string | undefined>;

export declare type ResourcesInput = {
    adverseEvents?: InputMaybe<Array<AdverseEventInput>>;
    composition?: InputMaybe<CompositionInput>;
    medicationRequests?: InputMaybe<Array<MedicationRequestInput>>;
    medications?: InputMaybe<Array<MedicationInput>>;
    observations?: InputMaybe<Array<ObservationInput>>;
    patient?: InputMaybe<PatientInput>;
    practitioner?: InputMaybe<PractitionerInput>;
};

/**  https://www.hl7.org/fhir/valueset-resource-types.html  */
export declare enum ResourceType {
    AdverseEvent = "AdverseEvent",
    Bundle = "Bundle",
    Composition = "Composition",
    Medication = "Medication",
    MedicationRequest = "MedicationRequest",
    Observation = "Observation",
    Patient = "Patient",
    Practitioner = "Practitioner"
}

/** All built-in and custom scalars, mapped to their actual values */
export declare type Scalars = {
    ID: {
        input: string;
        output: string;
    };
    String: {
        input: string;
        output: string;
    };
    Boolean: {
        input: boolean;
        output: boolean;
    };
    Int: {
        input: number;
        output: number;
    };
    Float: {
        input: number;
        output: number;
    };
    /**  https://www.hl7.org/fhir/datatypes.html#code  */
    code: {
        input: any;
        output: any;
    };
    /**  https://www.hl7.org/fhir/datatypes.html#date  */
    date: {
        input: any;
        output: any;
    };
    /**  https://www.hl7.org/fhir/datatypes.html#dateTime  */
    dateTime: {
        input: any;
        output: any;
    };
    /**  https://www.hl7.org/fhir/datatypes.html#instant  */
    instant: {
        input: any;
        output: any;
    };
    /**  https://www.hl7.org/fhir/datatypes.html#integer64  */
    integer64: {
        input: any;
        output: any;
    };
    /**  https://www.hl7.org/fhir/datatypes.html#uri  */
    uri: {
        input: any;
        output: any;
    };
};

export declare const setLocale: ((newLocale: string) => Promise<void>) & {
    _LIT_LOCALIZE_SET_LOCALE_?: never;
};

export declare type Sort = {
    __typename?: 'Sort';
    empty?: Maybe<Scalars['Boolean']['output']>;
    sorted?: Maybe<Scalars['Boolean']['output']>;
    unsorted?: Maybe<Scalars['Boolean']['output']>;
};

export declare type Subscription = {
    __typename?: 'Subscription';
    /**  Create a bundle with a pre-defined set of resources  */
    createBundle: Bundle;
    /**  Process a document and return a bundle with the results  */
    createDocumentBundle: Bundle;
    /**  Update a bundle with a new set of resources  */
    updateBundleResources: Bundle;
};

export declare type SubscriptionCreateBundleArgs = {
    resources: ResourcesInput;
    type: DocumentType_2;
};

export declare type SubscriptionCreateDocumentBundleArgs = {
    document: DocumentInput;
    model?: InputMaybe<Model>;
};

export declare type SubscriptionUpdateBundleResourcesArgs = {
    bundleId: Scalars['String']['input'];
    resources: ResourcesInput;
};

/**  https://www.hl7.org/fhir/datatypes.html#Timing  */
export declare type Timing = {
    __typename?: 'Timing';
    code?: Maybe<CodeableConcept>;
    event?: Maybe<Array<Scalars['dateTime']['output']>>;
    repeat?: Maybe<TimingRepeat>;
};

/**  https://www.hl7.org/fhir/datatypes.html#Timing  */
export declare type TimingInput = {
    code?: InputMaybe<CodeableConceptInput>;
    event?: InputMaybe<Array<Scalars['dateTime']['input']>>;
    repeat?: InputMaybe<TimingRepeatInput>;
};

/**  https://www.hl7.org/fhir/datatypes-definitions.html#Timing.repeat  */
export declare type TimingRepeat = {
    __typename?: 'TimingRepeat';
    boundsDuration?: Maybe<Quantity>;
    boundsPeriod?: Maybe<Period>;
    count?: Maybe<Scalars['Int']['output']>;
    countMax?: Maybe<Scalars['Int']['output']>;
    dayOfWeek: Array<DayOfWeek>;
    extension: Array<Extension>;
    frequency?: Maybe<Scalars['Int']['output']>;
    frequencyMax?: Maybe<Scalars['Int']['output']>;
    offset?: Maybe<Scalars['Int']['output']>;
    period?: Maybe<Scalars['Float']['output']>;
    periodMax?: Maybe<Scalars['Float']['output']>;
    periodUnit?: Maybe<UnitsOfTime>;
    timeOfDay: Array<Scalars['String']['output']>;
    when: Array<Scalars['String']['output']>;
};

/**  https://www.hl7.org/fhir/datatypes-definitions.html#Timing.repeat  */
export declare type TimingRepeatInput = {
    boundsDuration?: InputMaybe<QuantityInput>;
    boundsPeriod?: InputMaybe<PeriodInput>;
    count?: InputMaybe<Scalars['Int']['input']>;
    countMax?: InputMaybe<Scalars['Int']['input']>;
    dayOfWeek?: InputMaybe<Array<DayOfWeek>>;
    extension?: InputMaybe<Array<ExtensionInput>>;
    frequency?: InputMaybe<Scalars['Int']['input']>;
    frequencyMax?: InputMaybe<Scalars['Int']['input']>;
    offset?: InputMaybe<Scalars['Int']['input']>;
    period?: InputMaybe<Scalars['Float']['input']>;
    periodMax?: InputMaybe<Scalars['Float']['input']>;
    periodUnit?: InputMaybe<UnitsOfTime>;
    timeOfDay?: InputMaybe<Array<Scalars['String']['input']>>;
    when?: InputMaybe<Array<Scalars['String']['input']>>;
};

/**  https://www.hl7.org/fhir/valueset-units-of-time.html  */
export declare enum UnitsOfTime {
    A = "a",
    D = "d",
    H = "h",
    Min = "min",
    Mo = "mo",
    S = "s",
    Wk = "wk"
}

export declare const UpdateBundleResourcesAsyncDocument: TypedDocumentNode<UpdateBundleResourcesAsyncSubscription, UpdateBundleResourcesAsyncSubscriptionVariables>;

export declare type UpdateBundleResourcesAsyncSubscription = {
    __typename?: 'Subscription';
    updateBundleResources: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    });
};

export declare type UpdateBundleResourcesAsyncSubscriptionVariables = Exact<{
    bundleId: Scalars['String']['input'];
    resources: ResourcesInput;
}>;

export declare const UpdateBundleResourcesDocument: TypedDocumentNode<UpdateBundleResourcesMutation, UpdateBundleResourcesMutationVariables>;

export declare type UpdateBundleResourcesMutation = {
    __typename?: 'Mutation';
    updateBundleResources: ({
        __typename?: 'Bundle';
    } & {
        ' $fragmentRefs'?: {
            'BundleFragmentFragment': BundleFragmentFragment;
        };
    });
};

export declare type UpdateBundleResourcesMutationVariables = Exact<{
    bundleId: Scalars['String']['input'];
    resources: ResourcesInput;
}>;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>): TType;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined): TType | undefined;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null): TType | null;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null | undefined): TType | null | undefined;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>): Array<TType>;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): Array<TType> | null | undefined;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>): ReadonlyArray<TType>;

export declare function useFragment<TType>(_documentNode: DocumentTypeDecoration<TType, any>, fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>> | null | undefined): ReadonlyArray<TType> | null | undefined;

export { }
