UNPKG

@claudebernard/medication-request-editor-element

Version:

An element which permit to edit a medication request.

189 lines (166 loc) 5.02 kB
import { CSSResult } from 'lit'; import { DirectiveResult } from 'lit-html/directive'; import { LitElement } from 'lit'; import { TemplateResult } from 'lit'; import { UntilDirective } from 'lit-html/directives/until'; /** * FHIR class that need to be shared between multiple components. */ /** https://www.hl7.org/fhir/datatypes.html#CodeableConcept */ declare type CodeableConcept = { coding?: Array<Coding>; text?: string; }; /** https://www.hl7.org/fhir/references.html#CodeableReference */ declare type CodeableReference = { concept?: CodeableConcept; reference?: Reference; }; /** https://www.hl7.org/fhir/datatypes.html#Coding */ declare type Coding = { code?: string; display?: string; system?: string; }; /** https://www.hl7.org/fhir/valueset-days-of-week.html */ declare enum DayOfWeek { Fri = "fri", Mon = "mon", Sat = "sat", Sun = "sun", Thu = "thu", Tue = "tue", Wed = "wed" } /** https://www.hl7.org/fhir/dosage.html#Dosage */ declare type Dosage = { asNeeded: boolean; asNeededFor: Array<CodeableConcept>; doseAndRate: Array<DoseAndRate>; maxDosePerPeriod: Array<Ratio>; route?: CodeableConcept; sequence: number; text?: string; timing?: Timing; }; /** https://www.hl7.org/fhir/dosage-definitions.html#Dosage.doseAndRate */ declare type DoseAndRate = { doseQuantity: Quantity; type: CodeableConcept; }; /** https://www.hl7.org/fhir/extensibility.html#Extension */ declare type Extension = { url: string; valueString: string; }; export declare const getLocale: (() => string) & { _LIT_LOCALIZE_GET_LOCALE_?: undefined; }; /** https://www.hl7.org/fhir/datatypes.html#Identifier */ declare type Identifier = { __typename?: 'Identifier'; system?: string; type?: CodeableConcept; use?: string; value?: string; }; /** https://www.hl7.org/fhir/resource.html#Resource */ declare type IResource = { id?: string; resourceType: ResourceType; }; /** https://www.hl7.org/fhir/medicationrequest.html#MedicationRequest */ declare type MedicationRequest = IResource & { dosageInstruction: Array<Dosage>; id?: string; medication?: CodeableReference; reason: Array<CodeableReference>; resourceType: ResourceType; }; /** * An element which permit to edit a medication request. * * @fires {MedicationRequest} medication-request-removed - medication request removed * @fires {MedicationRequest} medication-request-updated - medication request updated * */ export declare class MedicationRequestEditor extends LitElement { static readonly events: { MEDICATION_REQUEST_REMOVED: string; MEDICATION_REQUEST_UPDATED: string; }; lang: string; medicationRequest: MedicationRequest; static styles: CSSResult[]; connectedCallback(): void; render(): DirectiveResult<typeof UntilDirective>; withLocale(template: () => TemplateResult): DirectiveResult<typeof UntilDirective>; private _removeDosage; private _updateDosage; private _addDosage; dispatchEvent(event: Event): boolean; } /** https://www.hl7.org/fhir/datatypes.html#Period */ declare type Period = { end?: string | Date; start?: string | Date; }; /** https://www.hl7.org/fhir/datatypes.html#quantity */ declare type Quantity = { code?: string; system?: string; unit?: string; value?: number; }; /** https://www.hl7.org/fhir/datatypes.html#Ratio */ declare type Ratio = { denominator: Quantity; numerator: Quantity; }; /** https://www.hl7.org/fhir/references.html#Reference */ declare type Reference = { identifier?: Identifier; reference?: string; type?: string; }; /** https://www.hl7.org/fhir/valueset-resource-types.html */ declare enum ResourceType { Medication = "Medication", MedicationRequest = "MedicationRequest" } export declare const setLocale: ((newLocale: string) => Promise<void>) & { _LIT_LOCALIZE_SET_LOCALE_?: undefined; }; /** https://www.hl7.org/fhir/datatypes.html#Timing */ declare type Timing = { code?: CodeableConcept; repeat: TimingRepeat; }; /** https://www.hl7.org/fhir/datatypes-definitions.html#Timing.repeat */ declare type TimingRepeat = { boundsDuration?: Quantity; boundsPeriod?: Period; count?: number; countMax?: number; dayOfWeek: Array<DayOfWeek>; extension: Array<Extension>; frequency?: number; frequencyMax?: number; offset?: number; period?: number; periodMax?: number; periodUnit?: UnitsOfTime; timeOfDay: Array<string>; when: Array<string>; }; /** https://www.hl7.org/fhir/valueset-units-of-time.html */ declare enum UnitsOfTime { A = "a", D = "d", H = "h", Min = "min", Mo = "mo", S = "s", Wk = "wk" } export { }