@claudebernard/prescription-scanner-element
Version:
An element providing a medical prescription scanner and analyzer.
1,459 lines (1,325 loc) • 60.1 kB
TypeScript
import { CSSResult } from 'lit';
import { DirectiveResult } from 'lit-html/directive.js';
import { DocumentTypeDecoration } from '@graphql-typed-document-node/core';
import { LitElement } from 'lit';
import { PartInfo } from 'lit-html/directive.js';
import { ResultOf } from '@graphql-typed-document-node/core';
import { TemplateResult } from 'lit';
import { TemplateResult as TemplateResult_2 } from 'lit-html';
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
import { UntilDirective } from 'lit-html/directives/until.js';
/**
* @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_2<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_2<1>;
static readonly styles: CSSResult[];
}
export declare type Address = {
__typename?: 'Address';
city?: Maybe<Scalars['String']['output']>;
country?: Maybe<Scalars['String']['output']>;
district?: Maybe<Scalars['String']['output']>;
line?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
period?: Maybe<Period>;
postalCode?: Maybe<Scalars['String']['output']>;
state?: Maybe<Scalars['String']['output']>;
text?: Maybe<Scalars['String']['output']>;
type?: Maybe<Scalars['String']['output']>;
use?: Maybe<Scalars['String']['output']>;
};
export declare type AddressInput = {
city?: InputMaybe<Scalars['String']['input']>;
country?: InputMaybe<Scalars['String']['input']>;
district?: InputMaybe<Scalars['String']['input']>;
line?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
period?: InputMaybe<PeriodInput>;
postalCode?: InputMaybe<Scalars['String']['input']>;
state?: InputMaybe<Scalars['String']['input']>;
text?: InputMaybe<Scalars['String']['input']>;
type?: InputMaybe<Scalars['String']['input']>;
use?: InputMaybe<Scalars['String']['input']>;
};
/** 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']>;
};
export declare type Attachment = {
__typename?: 'Attachment';
contentType?: Maybe<Scalars['String']['output']>;
data?: Maybe<Scalars['String']['output']>;
title?: Maybe<Scalars['String']['output']>;
};
export declare type AttachmentInput = {
contentType?: InputMaybe<Scalars['String']['input']>;
data?: InputMaybe<Scalars['String']['input']>;
title?: InputMaybe<Scalars['String']['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 | DocumentReference | Medication | MedicationRequest | Observation | Organization | Patient | Practitioner | Provenance;
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?: 'DocumentReference';
resourceType: ResourceType;
status: string;
content: Array<{
__typename?: 'DocumentReferenceContent';
attachment?: {
__typename?: 'Attachment';
contentType?: string | null;
title?: string | null;
} | null;
}>;
} | ({
__typename?: 'Medication';
} & {
' $fragmentRefs'?: {
'MedicationFragmentFragment': MedicationFragmentFragment;
};
}) | ({
__typename?: 'MedicationRequest';
} & {
' $fragmentRefs'?: {
'MedicationRequestFragmentFragment': MedicationRequestFragmentFragment;
};
}) | ({
__typename?: 'Observation';
} & {
' $fragmentRefs'?: {
'ObservationFragmentFragment': ObservationFragmentFragment;
};
}) | ({
__typename?: 'Organization';
} & {
' $fragmentRefs'?: {
'OrganizationFragmentFragment': OrganizationFragmentFragment;
};
}) | ({
__typename?: 'Patient';
} & {
' $fragmentRefs'?: {
'PatientFragmentFragment': PatientFragmentFragment;
};
}) | ({
__typename?: 'Practitioner';
} & {
' $fragmentRefs'?: {
'PractitionerFragmentFragment': PractitionerFragmentFragment;
};
}) | ({
__typename?: 'Provenance';
} & {
' $fragmentRefs'?: {
'ProvenanceFragmentFragment': ProvenanceFragmentFragment;
};
});
}>;
} & {
' $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;
section?: Maybe<Array<CompositionSection>>;
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;
section?: Array<{
__typename?: 'CompositionSection';
entry: Array<{
__typename?: 'Reference';
reference?: string | 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 type CompositionSection = {
__typename?: 'CompositionSection';
entry: Array<Reference>;
};
export declare type ContactPoint = {
__typename?: 'ContactPoint';
period?: Maybe<Period>;
rank?: Maybe<Scalars['Int']['output']>;
system?: Maybe<Scalars['String']['output']>;
use?: Maybe<Scalars['String']['output']>;
value?: Maybe<Scalars['String']['output']>;
};
export declare type ContactPointInput = {
period?: InputMaybe<PeriodInput>;
rank?: InputMaybe<Scalars['Int']['input']>;
system?: InputMaybe<Scalars['String']['input']>;
use?: InputMaybe<Scalars['String']['input']>;
value?: InputMaybe<Scalars['String']['input']>;
};
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;
};
export declare type DocumentReference = {
__typename?: 'DocumentReference';
content: Array<DocumentReferenceContent>;
id?: Maybe<Scalars['String']['output']>;
resourceType: ResourceType;
status: Scalars['String']['output'];
};
export declare type DocumentReferenceContent = {
__typename?: 'DocumentReferenceContent';
attachment?: Maybe<Attachment>;
};
export declare type DocumentReferenceContentInput = {
attachment?: InputMaybe<AttachmentInput>;
};
export declare type DocumentReferenceInput = {
content: Array<DocumentReferenceContentInput>;
id: Scalars['String']['input'];
resourceType: ResourceType;
status: Scalars['String']['input'];
};
/** 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>;
patientInstruction?: Maybe<Scalars['String']['output']>;
route?: Maybe<CodeableConcept>;
sequence: Scalars['Int']['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>>;
patientInstruction?: InputMaybe<Scalars['String']['input']>;
route?: InputMaybe<CodeableConceptInput>;
sequence: Scalars['Int']['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];
};
export declare type ExtendedContactDetail = {
__typename?: 'ExtendedContactDetail';
address?: Maybe<Address>;
name?: Maybe<Array<Maybe<HumanName>>>;
organization?: Maybe<Reference>;
period?: Maybe<Period>;
purpose?: Maybe<CodeableConcept>;
telecom?: Maybe<Array<Maybe<ContactPoint>>>;
};
export declare type ExtendedContactDetailInput = {
address?: InputMaybe<AddressInput>;
name?: InputMaybe<Array<InputMaybe<HumanNameInput>>>;
organization?: InputMaybe<ReferenceInput>;
period?: InputMaybe<PeriodInput>;
purpose?: InputMaybe<CodeableConceptInput>;
telecom?: InputMaybe<Array<InputMaybe<ContactPointInput>>>;
};
/** 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;
};
export declare type HumanName = {
__typename?: 'HumanName';
family?: Maybe<Scalars['String']['output']>;
given?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
period?: Maybe<Period>;
prefix?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
suffix?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
text?: Maybe<Scalars['String']['output']>;
use?: Maybe<Scalars['String']['output']>;
};
export declare type HumanNameInput = {
family?: InputMaybe<Scalars['String']['input']>;
given?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
period?: InputMaybe<PeriodInput>;
prefix?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
suffix?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
text?: InputMaybe<Scalars['String']['input']>;
use?: InputMaybe<Scalars['String']['input']>;
};
/** 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;
valueCode?: any | 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';
patientInstruction?: 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>;
};
/** https://www.hl7.org/fhir/organization.html */
export declare type Organization = IResource & {
__typename?: 'Organization';
active?: Maybe<Scalars['Boolean']['output']>;
alias?: Maybe<Array<Maybe<Scalars['String']['output']>>>;
contact?: Maybe<Array<ExtendedContactDetail>>;
description?: Maybe<Scalars['String']['output']>;
endpoint?: Maybe<Array<Reference>>;
id?: Maybe<Scalars['String']['output']>;
identifier: Array<Identifier>;
name?: Maybe<Scalars['String']['output']>;
partOf?: Maybe<Reference>;
qualification?: Maybe<Array<Qualification>>;
resourceType: ResourceType;
type?: Maybe<Array<Maybe<CodeableConcept>>>;
};
export declare type OrganizationFragmentFragment = {
__typename?: 'Organization';
id?: string | null;
resourceType: ResourceType;
organizationName?: string | null;
identifier: Array<{
__typename?: 'Identifier';
system?: any | null;
value?: string | null;
}>;
} & {
' $fragmentName'?: 'OrganizationFragmentFragment';
};
export declare const OrganizationFragmentFragmentDoc: TypedDocumentNode<OrganizationFragmentFragment, unknown>;
/** https://www.hl7.org/fhir/organization.html#Organization */
export declare type OrganizationInput = {
active?: InputMaybe<Scalars['Boolean']['input']>;
alias?: InputMaybe<Array<InputMaybe<Scalars['String']['input']>>>;
contact?: InputMaybe<Array<InputMaybe<ExtendedContactDetailInput>>>;
description?: InputMaybe<Scalars['String']['input']>;
endpoint?: InputMaybe<Array<InputMaybe<ReferenceInput>>>;
id?: InputMaybe<Scalars['String']['input']>;
identifier: Array<IdentifierInput>;
name?: InputMaybe<Scalars['String']['input']>;
partOf?: InputMaybe<ReferenceInput>;
qualification?: InputMaybe<Array<InputMaybe<QualificationInput>>>;
resourceType: ResourceType;
type?: InputMaybe<Array<InputMaybe<CodeableConceptInput>>>;
};
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>;
name: Array<HumanName>;
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;
}>;
name: Array<{
__typename?: 'HumanName';
family?: string | null;
given?: Array<string | null> | null;
}>;
} & {
' $fragmentName'?: 'PractitionerFragmentFragment';
};
export declare const PractitionerFragmentFragmentDoc: TypedDocumentNode<PractitionerFragmentFragment, unknown>;
/** https://www.hl7.org/fhir/practitioner.html#Practitioner */
export declare type PractitionerInput = {
address: Array<AddressInput>;
id?: InputMaybe<Scalars['String']['input']>;
identifier: Array<IdentifierInput>;
name: Array<HumanNameInput>;
resourceType: ResourceType;
telecom?: InputMaybe<Array<ContactPointInput>>;
};
/**
* 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 {
static readonly apiUrlChanged: (value: string, oldValue: string) => boolean;
static readonly apiKeyChanged: (value: string, oldValue: string) => boolean;
apiUrl: string;
apiBcbUrl: string | undefined;
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;
webSocketDisabled?: boolean;
private _onMobileInterface;
private _activeMobileSection;
private _boundIsUserOnMobileInterface;
private selectedFileAnalysis;
private analysis;
private errorMessage;
private highlightMedicationsList;
private _hoveredMedicationId;
private static _events;
static readonly styles: CSSResult[];
connectedCallback(): void;
disconnectedCallback(): void;
private _isUserOnMobileInterface;
private updateHighlightMedicationsList;
private removeHighlightMedicationsList;
render(): DirectiveResult< {
new (_partInfo: PartInfo): UntilDirective<Promise<TemplateResult>>;
}>;
get bundles(): Bundle[];
handleMobileNavigation(event: CustomEvent): void;
private _withLocale;
private _renderErrorMessage;
private _isAnalysisLoading;
private _addPrescriptionItem;
private _prescriptionItemDeleted;
private _medicationRequestUpdated;
private _medicationUpdated;
private _sanitizePractitioner;
private _sanitizeComposition;
private _sanitizeMedicationRequest;
private _sanitizeDosageInstruction;
private _mapBundleEntriesToInputResources;
private _fileUploadIdProvided;
private _filesUploaded;
private _fileSelected;
private _onHighlightHover;
private _onHighlightLeave;
private _fileDeleted;
private _updateSelectedPrescriptionItems;
private _getFilteredBundles;
dispatchEvent(event: Event): boolean;
private _updateAnalysis;
private _runAnalysis;
private _extractReasons;
}
export declare interface PrescriptionScannerProps {
apiUrl: string;
apiBcbUrl?: string;
apiKey?: string;
model?: Model;
fileUploadId?: string;
lang?: string;
selectionDisabled?: boolean;
dosageEditionDisabled?: boolean;
analysisFixingDisabled?: boolean;
prescriptionItemDeletionDisabled?: boolean;
addMedicationButtonVisible: boolean;
highlightVisible?: boolean;
webSocketDisabled?: boolean;
}
/** https://www.hl7.org/fhir/provenance.html#Provenance */
export declare type Provenance = IResource & {
__typename?: 'Provenance';
activity: CodeableConcept;
agent: Array<Maybe<ProvenanceAgent>>;
id?: Maybe<Scalars['String']['output']>;
recorded: Scalars['date']['output'];
resourceType: ResourceType;
target: Array<Reference>;
};
export declare type ProvenanceAgent = {
__typename?: 'ProvenanceAgent';
who: Reference;
};
export declare type ProvenanceAgentInput = {
who: ReferenceInput;
};
export declare type ProvenanceFragmentFragment = {
__typename?: 'Provenance';
id?: string | null;
resourceType: ResourceType;
recorded: any;
activity: {
__typename?: 'CodeableConcept';
coding?: Array<{
__typename?: 'Coding';
system?: any | null;
code?: any | null;
}> | null;
};
agent: Array<{
__typename?: 'ProvenanceAgent';
who: {
__typename?: 'Reference';
reference?: string | null;
};
} | null>;
target: Array<{
__typename?: 'Reference';
reference?: string | null;
}>;
} & {
' $fragmentName'?: 'ProvenanceFragmentFragment';
};
export declare const ProvenanceFragmentFragmentDoc: TypedDocumentNode<ProvenanceFragmentFragment, unknown>;
/** https://www.hl7.org/fhir/provenance.html#Provenance */
export declare type ProvenanceInput = {
activity: CodeableConceptInput;
agent: Array<InputMaybe<ProvenanceAgentInput>>;
id?: InputMaybe<Scalars['String']['input']>;
recorded: Scalars['date']['input'];
resourceType: ResourceType;
target: Array<ReferenceInput>;
};
export declare type Qualification = {
__typename?: 'Qualification';
code?: Maybe<CodeableConcept>;
identifier?: Maybe<Array<Maybe<Identifier>>>;
issuer?: Maybe<Reference>;
period?: Maybe<Period>;
};
/** https://www.hl7.org/fhir/organization.html#Organization */
export declare type QualificationInput = {
code?: InputMaybe<CodeableConceptInput>;
identifier?: InputMaybe<Array<InputMaybe<IdentifierInput>>>;
issuer?: InputMaybe<ReferenceInput>;
period?: InputMaybe<PeriodInput>;
};
/** 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['Strin