@claudebernard/prescription-alerts-element
Version:
An element providing some custom stuff.
682 lines (650 loc) • 20.1 kB
TypeScript
import { CSSResult } from 'lit';
import { LitElement } from 'lit';
import { PropertyValues } from 'lit';
import { TemplateResult } from 'lit-html';
import { TemplateResult as TemplateResult_2 } from 'lit';
export declare class BcbPrescriptionAlertsAllergy extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: {};
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
isModalOpen: boolean;
currentAlert: IAlertChapter[];
static styles: CSSResult;
connectedCallback(): void;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(chapter: string, level: string, product: IProductAlert): Promise<void>;
renderAlerts(): TemplateResult<1>;
renderModal(alertDetails: IAlertChapter[]): TemplateResult<1>;
render(): TemplateResult<1>;
}
export declare class BcbPrescriptionAlertsCI extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: {};
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
alertsCount: number;
isModalOpen: boolean;
currentAlert: IAlertChapter[];
static readonly styles: CSSResult;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(chapter: string, level: string, product: IProductAlert): Promise<void>;
renderAlerts(): TemplateResult<1>;
renderModal(alertDetails: IAlertChapter[]): TemplateResult<1>;
render(): TemplateResult<1>;
}
export declare class BcbPrescriptionAlertsInteractions extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: any;
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
isInteractionToggled: boolean;
isModalOpen: boolean;
currentAlert: IPrescriptionAlert;
interactionColorMap: {
1: string;
2: string;
3: string;
4: string;
};
static readonly styles: CSSResult;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(alertDetails: IPrescriptionAlert): Promise<void>;
renderAlerts(): TemplateResult_2 | TemplateResult_2[];
generateCards(product: IProductAlert, productId: string | number): TemplateResult_2;
renderModal(alertDetails: IPrescriptionAlert): TemplateResult_2<1>;
decodeHtml(html: string): string;
isInteractionToggledMap: {
[key: string]: boolean;
};
toggleInteraction(productId: string | number): void;
getInteractionTitle(productId: string | number): string;
getInteractionProducts(alerts: IPrescriptionAlert[], productId: string | number): any[];
buildInteractions(alerts: any): any;
render(): TemplateResult_2 | TemplateResult_2[];
}
export declare class BcbPrescriptionAlertsIpc extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: any;
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
isInteractionToggled: boolean;
isModalOpen: boolean;
currentAlert: IPrescriptionAlert;
static readonly styles: CSSResult;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(alertDetails: IPrescriptionAlert, productId: number): Promise<void>;
renderAlerts(): TemplateResult_2 | TemplateResult_2[];
generateCards(product: IProductAlert, productId: string | number): TemplateResult_2;
renderModal(alertDetails: IPrescriptionAlert): TemplateResult_2<1>;
decodeHtml(html: string): string;
isInteractionToggledMap: {
[key: string]: boolean;
};
toggleInteraction(productId: string | number): void;
getInteractionTitle(productId: string | number): string;
getInteractionProducts(alerts: IPrescriptionAlert[], productId: string | number): any[];
buildInteractions(alerts: any): any;
render(): TemplateResult_2 | TemplateResult_2[];
}
export declare class BcbPrescriptionAlertsPE extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: any;
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
isModalOpen: boolean;
currentAlert: IAlertChapter[];
static readonly styles: CSSResult;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(chapter: string, level: string, product: IProductAlert): Promise<void>;
renderAlerts(): TemplateResult_2;
renderModal(alertDetails: IAlertChapter[]): TemplateResult_2<1>;
render(): TemplateResult_2;
}
export declare class BcbPrescriptionAlertsPoso extends LitElement {
apiUrl: string;
apiKey: string;
posologies: IPosology[];
patient: {};
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
alertsCount: number;
posoAlerts: string[];
isModalOpen: boolean;
currentAlert: IPosologyMessage;
static readonly styles: CSSResult;
connectedCallback(): void;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(product: IProductAlert): Promise<void>;
sortPosoMessages(alerts: IPrescriptionAlert[]): void;
renderAlerts(): TemplateResult<1>;
renderModal(alertDetails: IPosologyMessage): TemplateResult<1>;
render(): TemplateResult<1>;
}
export declare interface BcbPrescriptionAlertsProps {
apiUrl: string;
apiKey: string;
products: any[];
patient: any;
productId: number;
posologies: any[];
}
export declare class BcbPrescriptionAlertsRedundancy extends LitElement {
apiUrl: string;
apiKey: string;
products: IProduct[];
patient: any;
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
alertVisibility: {
interactionsLv1: boolean;
interactionsLv2: boolean;
interactionsLv3: boolean;
interactionsLv4: boolean;
surdosages: boolean;
redondances_composant: boolean;
redondances_classe: boolean;
precautions_emploi: boolean;
contre_indicationsLv3: boolean;
contre_indicationsLv4: boolean;
allergies: boolean;
stopp: boolean;
posologies: boolean;
ipc: boolean;
};
productAlerts: {
[productId: number]: IProductAlert;
};
redundancyTitle: string;
isNewApiEnabled: boolean;
static readonly styles: CSSResult;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
renderAlerts(): TemplateResult_2 | TemplateResult_2[];
generateCards(product: IProductAlert): TemplateResult_2;
sortProducts: (products: any[]) => any[];
removeDuplicateProducts: (alerts: any) => void;
filterAlertsByUniqueShortText: (alerts: any) => void;
removeDuplicateAlerts: (alerts: any) => void;
removeIdenticalAlerts: (alerts: any) => void;
buildRedundancies(alerts: any): any;
decodeHtml(html: string): string;
getRedundancyTitle(alert: IPrescriptionAlert): string;
getRedundantProducts(alerts: IPrescriptionAlert[]): any[];
render(): TemplateResult_2 | TemplateResult_2[];
}
export declare class BcbPrescriptionAlertsSam extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: {};
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
productAlerts: {
[productId: number]: IProductAlert;
};
willBeDeleted: boolean;
isModalOpen: boolean;
currentAlert: string;
samAlertsEmitted: boolean;
connectedCallback(): void;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
getSamAlerts(): void;
}
export declare class BcbPrescriptionAlertsStopp extends LitElement {
apiUrl: string;
apiKey: string;
isNewApiEnabled: boolean;
products: IProduct[];
patient: {};
productId: number;
lang: string;
isPatientActive: boolean;
isAlertsVisible: boolean;
productAlerts: {
[productId: number]: IProductAlert;
};
willBeDeleted: boolean;
isModalOpen: boolean;
currentAlert: string;
static styles: CSSResult;
connectedCallback(): void;
fetchData(): Promise<void>;
updated(changedProperties: PropertyValues): void;
countAlerts(): void;
handleClick(product: IProductAlert): Promise<void>;
renderAlerts(): TemplateResult<1>;
renderModal(alertDetails: string): TemplateResult<1>;
render(): TemplateResult<1>;
}
declare interface IAlertChapter {
id: string;
label: string;
text: string;
source: string;
}
declare interface IAlerts {
prescriptionAlerts: IPrescriptionAlert[];
stoppAlerts: IPrescriptionAlert[];
posoAlerts: IPrescriptionAlert[];
samAlert: IPrescriptionAlert[];
}
declare interface IInteractionsInformations {
classCode1: number;
classLabel1: string;
classCode2: number;
classLabel2: string;
toBehave: string;
mechanism: string;
type: number;
}
declare interface IpcInformations {
activeSubstanceCode1: number;
activeSubstanceCode2: number;
activeSubstanceLabel1: string;
activeSubstanceLabel2: string;
routeCode: number;
routeLabel: string;
text: string;
}
declare interface IPosology {
code: number;
patientGroundCode: number;
patientGround: string;
patientGroundAge1: string;
patientGroundAge2: string;
patientGroundWeight1: string;
patientGroundWeight2: string;
implicit: number;
indicationCode: string;
indicationLabel: string;
profilCode: number;
profilLabel: string;
typeCode: number;
typeLabel: string;
routeCode: number;
routeLabel: string;
biologicalCriterion: string;
biologicalValue: string;
quantity1: string;
quantity2: string;
intakeUnitCode: number;
intakeUnitLabel: string;
perKilo: number;
adequacy: number;
byCode: string;
howMuch1: number;
howMuch2: number;
every: number;
duration1Code: number;
duration1Label: string;
duration1PluralLabel: string;
momentCode: number;
momentLabel: string;
momentCoeff: number;
during1: number;
during2: number;
duration2Code: number;
duration2Label: string;
duration2PluralLabel: string;
maximum: string;
weightMaximum: string;
duration3Code: number;
duration3Label: string;
duration3PluralLabel: string;
intakeSpecification1Code: number;
intakeSpecification1Label: string;
intakeSpecification2Code: number;
intakeSpecification2Label: string;
intakeHours: string;
numberOfUnits: number;
comment: string;
decodedPosology: string;
patientPosology: number;
isActive: boolean;
productId: number;
}
declare interface IPosologyMessage {
htmlMessage: string;
quantityMessage: string;
}
declare interface IPrescriptionAlert {
type: number;
level: number;
levelLabel: string;
products: IProduct[];
shortText: string;
details: string;
source: string;
interactionsInformations: null | IInteractionsInformations;
ipcInformations: null | IpcInformations;
ciPeInformations: null | string;
therapeuticClass?: TherapeuticClass[];
stoppId?: number;
stoppDescription?: string;
stoppLevel?: number;
stoppMessage?: string;
headProductId?: number;
productId?: number;
alert?: number;
durationAlert?: number;
durationMessage?: string;
quantityAlert?: number;
quantityMessage?: string;
intervalAlert?: number;
intervalMessage?: string;
maxPerDoseAlert?: number;
maxPerDoseMessage?: string;
globalQuantityAlert?: number;
globalQuantityMessage?: string;
htmlMessage?: string;
error?: number;
errorLabel?: string;
codeErreurPoidsTaille?: number;
hasSam?: boolean;
patientEligibility?: boolean;
}
declare interface IProduct {
code: string;
productId: number;
type: number;
labelHtml: string;
code13: string;
deletedDate: string;
deleted: boolean;
displayedLabel: string;
typeColor: string;
currentPosology: IPosology;
userPosology: IPosology;
posology: IPosology;
alerts: IAlerts;
labels: IProductLabels;
properties: IProductProperties;
prices: IProductPrices;
molecule?: string;
}
declare interface IProductAlert {
alerts0: IPrescriptionAlert[];
alerts1c: IPrescriptionAlert[];
alerts1d: IPrescriptionAlert[];
alerts2: IPrescriptionAlert[];
alerts4: IPrescriptionAlert[];
alerts5: IPrescriptionAlert[];
alerts6: IPrescriptionAlert[];
stoppAlerts: IPrescriptionAlert[];
posoAlerts: IPrescriptionAlert[];
samAlerts: IPrescriptionAlert[];
}
declare interface IProductAtcClass {
code: string;
label: string;
}
declare interface IProductCodes {
cip7: string;
cip13: string;
cip13Referent: string;
ucd7: string;
ucd13: string;
cis: string;
code13Referent: string;
ean13: IProductEan13[];
}
declare interface IProductComponent {
code: string;
label: string;
parentCode: string;
}
declare interface IProductEan13 {
code: string;
}
declare interface IProductExtendedFlags {
bloodDerivative: number;
anticoagulant: number;
vaccin: number;
soluteDilution: number;
emergencyContraceptive: number;
minorContraceptive: number;
fridge: number;
humanAntibiotic: number;
veterinaryAntibiotic: number;
deconditionning: number;
seasonalFluVaccine: number;
ghs: number;
horsGhs: number;
infertilityTreatment: number;
mindalteringSubstance: number;
testReagent: number;
firstAgeMilk: number;
abortionDrug: number;
mte: number;
tfr: number;
biosimilarReferent: number;
freezer: number;
reinforcedMonitoring: number;
t2a: number;
communityApproval: number;
drugException: number;
}
declare interface IProductFlags {
doping: number;
driveWarning: string;
narcotic: number;
crushable: number;
referent: number;
generic: number;
biosimilar: number;
hospitalDelivery: number;
internal: number;
medicalDevice: number;
homeo: number;
exactcureSimulable: number;
pediatrics: number;
extendedFlags: IProductExtendedFlags | null;
}
declare interface IProductIntakeUnit {
order: number;
code: number;
labelHtml: string;
pluralLabelHtml: string;
shortLabelHtml: string;
intakeUnitNumber: string;
dispensationNumber: string;
distributionNumber: string;
round: number;
throwTheRest: number;
}
declare interface IProductLabels {
typeLabel: string;
label: string;
shortLabel: string;
shortLabelHtml: string;
longLabel: string;
longLabelHtml: string;
searchLabel: string;
}
declare interface IProductPrices {
ucdPrice: string;
repaymentRate: number;
vatRate: string;
reimbursementBase: string;
sellingPrice: string;
tfr: string;
}
declare interface IProductProperties {
thumbnail: string;
productName: string;
productDosage: string;
galenicFormCode: string;
galenicFormLabel: string;
codes: IProductCodes;
flags: IProductFlags;
segmentationAttributes: string[];
excipientsWithKnowEffects: IProductComponent[];
atcClassesLevel2: IProductAtcClass[];
intakeUnits: IProductIntakeUnit[];
}
declare interface TherapeuticClass {
code: string;
label: string;
}
export { }