@claudebernard/therapeutic-alternative-element 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,504 +3,11 @@ import { CSSResult } from 'lit';
3
3
  import { LitElement } from 'lit';
4
4
  import { TemplateResult } from 'lit-html';
5
5
 
6
- declare type ProductAtcClassBean = {
7
- code?: string;
8
- label?: string;
9
- };
10
-
11
- /**
12
- * Products
13
- */
14
- declare type ProductBean = {
15
- code?: string;
16
- productId?: number;
17
- type?: number;
18
- typeCategory?: number;
19
- labelHtml?: string;
20
- code13?: string;
21
- deletedDate?: string;
22
- deleted?: boolean;
23
- replacementProductId?: number;
24
- replacementProductLabel?: string;
25
- labels?: ProductLabelsBean;
26
- properties?: ProductPropertiesBean;
27
- prices?: ProductPricesBean;
28
- searchProperties?: ProductSearchPropertiesBean;
29
- extendedProperties?: ProductExtendedPropertiesBean;
30
- };
31
-
32
- declare type ProductCareBasketBean = {
33
- code?: string;
34
- startDate?: string;
35
- endDate?: string;
36
- averagePrice?: string;
37
- visibility?: number;
38
- label?: string;
39
- };
40
-
41
- declare type ProductClassBean = {
42
- code?: string;
43
- label?: string;
44
- codeLvl1?: string;
45
- labelLvl1?: string;
46
- codeLvl2?: string;
47
- labelLvl2?: string;
48
- codeLvl3?: string;
49
- labelLvl3?: string;
50
- codeLvl4?: string;
51
- labelLvl4?: string;
52
- codeLvl5?: string;
53
- labelLvl5?: string;
54
- codeLvl6?: string;
55
- labelLvl6?: string;
56
- codeLvl7?: string;
57
- labelLvl7?: string;
58
- notSubstituable?: number;
59
- };
60
-
61
- declare type ProductCodesBean = {
62
- cip7?: string;
63
- cip13?: string;
64
- cip13Referent?: string;
65
- ucd7?: string;
66
- ucd13?: string;
67
- cis?: string;
68
- code13Referent?: string;
69
- ean13?: Array<ProductEan13Bean>;
70
- udi?: Array<ProductUdiBean>;
71
- };
72
-
73
- declare type ProductComponentBean = {
74
- code?: string;
75
- label?: string;
76
- parentCode?: string;
77
- };
78
-
79
- declare type ProductComponentsBean = {
80
- activeSubstances?: Array<ProductComponentBean>;
81
- excipients?: Array<ProductComponentBean>;
82
- excipientsWithKnownEffects?: Array<ProductComponentBean>;
83
- };
84
-
85
- declare type ProductCrushabilityBean = {
86
- unpleasantTaste?: number;
87
- crushable?: number;
88
- openable?: number;
89
- disintegrationPossible?: number;
90
- canBeTakenWithWater?: number;
91
- canBeTakenWithOrangeJuice?: number;
92
- canBeTakenWithMilk?: number;
93
- canBeTakenWithYogurt?: number;
94
- canBeTakenWithCompote?: number;
95
- immediateMedicationPossible?: number;
96
- informations?: string;
97
- };
98
-
99
- declare type ProductDocumentBean = {
100
- code?: string;
101
- name?: string;
102
- extension?: string;
103
- source?: string;
104
- date?: string;
105
- title?: string;
106
- titleHtml?: string;
107
- category?: string;
108
- categoryHtml?: string;
109
- link?: string;
110
- };
111
-
112
- declare type ProductEan13Bean = {
113
- code?: string;
114
- };
115
-
116
- declare type ProductExtendedFlagsBean = {
117
- bloodDerivative?: number;
118
- anticoagulant?: number;
119
- vaccin?: number;
120
- soluteDilution?: number;
121
- emergencyContraceptive?: number;
122
- minorContraceptive?: number;
123
- fridge?: number;
124
- humanAntibiotic?: number;
125
- veterinaryAntibiotic?: number;
126
- veterinaryPrescription?: number;
127
- deconditionning?: number;
128
- seasonalFluVaccine?: number;
129
- ghs?: number;
130
- horsGhs?: number;
131
- infertilityTreatment?: number;
132
- mindalteringSubstance?: number;
133
- testReagent?: number;
134
- firstAgeMilk?: number;
135
- abortionDrug?: number;
136
- mte?: number;
137
- tfr?: number;
138
- biosimilarReferent?: number;
139
- freezer?: number;
140
- reinforcedMonitoring?: number;
141
- t2a?: number;
142
- communityApproval?: number;
143
- drugException?: number;
144
- hybridReferent?: number;
145
- pregnancyPictogram?: number;
146
- foodSupplement?: number;
147
- foodSupplementInfo?: number;
148
- paraInfo?: number;
149
- specificDrug?: number;
150
- };
151
-
152
- declare type ProductExtendedPropertiesBean = {
153
- brandCode?: string;
154
- brandLabel?: string;
155
- brandLabelHtml?: string;
156
- rangeCode?: string;
157
- rangeLabel?: string;
158
- rangeLabelHtml?: string;
159
- biosimilarGroupLabel?: string;
160
- numberOfUcds?: number;
161
- listCode?: string;
162
- listLabel?: string;
163
- statusCode?: number;
164
- statusLabel?: string;
165
- commonNameCode?: string;
166
- commonNameLabel?: string;
167
- revisionDate?: string;
168
- segmentationStatus?: string;
169
- segmentationStatusHtml?: string;
170
- actCode?: string;
171
- actLabelHtml?: string;
172
- ammNumber?: string;
173
- segments?: string;
174
- segmentsHtml?: string;
175
- equivalentDosage?: Array<string>;
176
- genericGroups?: Array<ProductGenericGroupBean>;
177
- ammDate?: string;
178
- ammRevisionDate?: string;
179
- composition?: ProductComponentsBean;
180
- holderLab?: ProductLaboratoryBean;
181
- operatingLab?: ProductLaboratoryBean;
182
- chapters?: Array<ProductMonographChaptersBean>;
183
- paradocChapters?: Array<ProductMonographChaptersBean>;
184
- atcClass?: Array<ProductClassBean>;
185
- bcbClass?: Array<ProductClassBean>;
186
- routes?: Array<ProductRouteAdministrationBean>;
187
- prescriptibles?: ProductPrescriptibleBean;
188
- restrictedPrescription?: Array<ProductRestrictedPrescriptionBean>;
189
- documents?: Array<ProductDocumentBean>;
190
- segmentationAttributes?: ProductSegmentationAttributesBean;
191
- keywords?: ProductKeywordBean;
192
- crushability?: ProductCrushabilityBean;
193
- specialPrescription?: Array<ProductSpecialPrescriptionBean>;
194
- photo?: string;
195
- sam?: ProductSamBean;
196
- creationDate?: string;
197
- pricesHistory?: Array<ProductPriceHistoryBean>;
198
- tips?: Array<ProductTipsBean>;
199
- identifier?: ProductIdentifierBean;
200
- };
201
-
202
- declare type ProductFlagsBean = {
203
- misuse?: number;
204
- careBasket?: number;
205
- doping?: number;
206
- driveWarning?: string;
207
- narcotic?: number;
208
- crushable?: number;
209
- referent?: number;
210
- generic?: number;
211
- biosimilar?: number;
212
- hospitalDelivery?: number;
213
- internal?: number;
214
- medicalDevice?: number;
215
- homeo?: number;
216
- pediatrics?: number;
217
- hybrid?: number;
218
- extendedFlags?: ProductExtendedFlagsBean;
219
- };
220
-
221
- declare type ProductGenericGroupBean = {
222
- genericGroupCode?: string;
223
- genericGroupLabel?: string;
224
- genericGroupLabelHtml?: string;
225
- };
226
-
227
- declare type ProductIdentifierBean = {
228
- numberOfPresentations?: string;
229
- unitsPerPresentation?: string;
230
- presentationLabel?: string;
231
- packagingLabel?: string;
232
- unitPresentationLabel?: string;
233
- unitPresentationLabelPlural?: string;
234
- };
235
-
236
- declare type ProductIntakeUnitBean = {
237
- order?: number;
238
- code?: number;
239
- labelHtml?: string;
240
- pluralLabelHtml?: string;
241
- shortLabelHtml?: string;
242
- dispensationNumber?: string;
243
- distributionNumber?: string;
244
- intakeUnitNumber?: string;
245
- round?: number;
246
- throwTheRest?: number;
247
- };
248
-
249
- declare type ProductKeywordBean = {
250
- indicationsKeywords?: Array<ProductKeywordDetailBean>;
251
- contraindicationsKeywords?: Array<ProductKeywordDetailBean>;
252
- contraindicationsNotRecommendedKeywords?: Array<ProductKeywordDetailBean>;
253
- sideEffectsKeywords?: Array<ProductKeywordDetailBean>;
254
- precautionsForUseKeywords?: Array<ProductKeywordDetailBean>;
255
- };
256
-
257
- declare type ProductKeywordDetailBean = {
258
- code?: string;
259
- label?: string;
260
- labelHtml?: string;
261
- frequencyCode?: string;
262
- frequencyLabel?: string;
263
- frequencyLabelHtml?: string;
264
- socCode?: string;
265
- socLabel?: string;
266
- socShortLabel?: string;
267
- glossary?: number;
268
- };
269
-
270
- declare type ProductLabelsBean = {
271
- typeLabel?: string;
272
- label?: string;
273
- shortLabel?: string;
274
- shortLabelHtml?: string;
275
- longLabel?: string;
276
- longLabelHtml?: string;
277
- searchLabel?: string;
278
- };
279
-
280
- declare type ProductLaboratoryBean = {
281
- code?: string;
282
- label?: string;
283
- address?: string;
284
- zipCode?: string;
285
- town?: string;
286
- website?: string;
287
- email?: string;
288
- phone?: string;
289
- fax?: string;
290
- country?: string;
291
- };
292
-
293
- declare type ProductLppBean = {
294
- code?: string;
295
- label?: string;
296
- order?: string;
297
- coefficient?: string;
298
- text?: string;
299
- qualifying?: string;
300
- price?: string;
301
- maxAmount?: string;
302
- };
303
-
304
- declare type ProductMatchBean = {
305
- type?: string;
306
- code?: string;
307
- label?: string;
308
- };
309
-
310
- declare type ProductMedicabaseBean = {
311
- medicabaseCode?: string;
312
- medicabaseLabel?: string;
313
- standardCodeTerm?: string;
314
- dosageUse?: string;
315
- dosageNumerator?: string;
316
- dosageNumeratorUnit?: string;
317
- dosageDenominator?: string;
318
- dosageDenominatorUnit?: string;
319
- molecules?: Array<ProductMoleculeBean>;
320
- };
321
-
322
- declare type ProductMoleculeBean = {
323
- moleculeId?: string;
324
- moleculeLabel?: string;
325
- country?: string;
326
- dosageQuantity?: number;
327
- dosageUnit?: string;
328
- dosageConcatenation?: string;
329
- dosageBaseExpression?: boolean;
330
- };
331
-
332
- declare type ProductMonographChaptersBean = {
333
- id?: string;
334
- label?: string;
335
- text?: string;
336
- };
337
-
338
- declare type ProductPrescriptibleBean = {
339
- nurse?: string;
340
- podiatrist?: string;
341
- physiotherapist?: string;
342
- midwifeForWomen?: string;
343
- midwifeForNewborns?: string;
344
- speechTherapist?: string;
345
- orthoptist?: string;
346
- midwifeForPatient?: string;
347
- advancedPracticeNurse?: string;
348
- dentist?: string;
349
- biologist?: string;
350
- pharmacist?: string;
351
- occupationalTherapist?: string;
352
- doctor?: string;
353
- veterinary?: string;
354
- };
355
-
356
- declare type ProductPriceHistoryBean = {
357
- field?: string;
358
- applicationDate?: string;
359
- value?: string;
360
- opposabilityDate?: string;
361
- joDate?: string;
362
- nor?: string;
363
- correctedValue?: string;
364
- correctedOpposabilityDate?: string;
365
- correctionSource?: string;
366
- sourceLabel?: string;
367
- };
368
-
369
- declare type ProductPricesBean = {
370
- ucdPrice?: string;
371
- repaymentRate?: number;
372
- vatRate?: string;
373
- reimbursementBase?: string;
374
- sellingPrice?: string;
375
- tfr?: string;
376
- };
377
-
378
- declare type ProductPropertiesBean = {
379
- thumbnail?: string;
380
- productName?: string;
381
- productDosage?: string;
382
- galenicFormCode?: string;
383
- galenicFormLabel?: string;
384
- galenicFormLabelHtml?: string;
385
- aspect?: string;
386
- inFacilityFormulary?: boolean;
387
- medicabase?: ProductMedicabaseBean;
388
- virtualDrug?: ProductVirtualDrugBean;
389
- codes?: ProductCodesBean;
390
- flags?: ProductFlagsBean;
391
- careBasket?: ProductCareBasketBean;
392
- segmentationAttributes?: Array<string>;
393
- excipientsWithKnowEffects?: Array<ProductComponentBean>;
394
- atcClasses?: Array<ProductAtcClassBean>;
395
- intakeUnits?: Array<ProductIntakeUnitBean>;
396
- lpp?: Array<ProductLppBean>;
397
- subLaboratories?: Array<ProductSubLaboratoryBean>;
398
- };
399
-
400
- declare type ProductRestrictedPrescriptionBean = {
401
- code?: string;
402
- title?: string;
403
- titleHtml?: string;
404
- decree?: string;
405
- decreeHtml?: string;
406
- };
407
-
408
- declare type ProductRouteAdministrationBean = {
409
- code?: string;
410
- label?: string;
411
- };
412
-
413
- declare type ProductSamBean = {
414
- code?: string;
415
- name?: string;
416
- author?: string;
417
- coAuthor?: string;
418
- referencingDate?: string;
419
- title?: string;
420
- requester?: string;
421
- hospitalLAP?: number;
422
- outpatientLAP?: number;
423
- pharmacyLAD?: number;
424
- puiLAD?: number;
425
- validationDate?: string;
426
- updateDate?: string;
427
- versionNumber?: string;
428
- status?: string;
429
- source?: string;
430
- contact?: string;
431
- logo?: string;
432
- pdf?: string;
433
- hospitalLAPText?: string;
434
- outpatientLAPText?: string;
435
- pharmacyLADText?: string;
436
- };
437
-
438
- declare type ProductSearchPropertiesBean = {
439
- score?: number;
440
- safeScore?: number;
441
- safeDetails?: Array<SafeSearchBean>;
442
- samCode?: string;
443
- samPatient?: boolean;
444
- match?: ProductMatchBean;
445
- };
446
-
447
- declare type ProductSegmentationAttributesBean = {
448
- others?: Array<string>;
449
- patientGrounds?: Array<string>;
450
- distributionChannels?: Array<string>;
451
- };
452
-
453
- declare type ProductSpecialPrescriptionBean = {
454
- label?: string;
455
- speciality?: string;
456
- };
457
-
458
- declare type ProductSubLaboratoryBean = {
459
- code?: number;
460
- label?: string;
461
- };
462
-
463
- declare type ProductTipsBean = {
464
- order?: string;
465
- operator?: string;
466
- coefficient?: string;
467
- qualifying?: string;
468
- code?: string;
469
- label?: string;
470
- startDate?: string;
471
- endDate?: string;
472
- natureOfService?: string;
473
- price?: string;
474
- type?: string;
475
- actCode?: string;
476
- publicPrice?: string;
477
- };
478
-
479
- declare type ProductUdiBean = {
480
- order?: string;
481
- udiType?: string;
482
- udi?: string;
483
- };
484
-
485
- declare type ProductVirtualDrugBean = {
486
- virtualDrugCode?: number;
487
- virtualDrugLabel?: string;
488
- };
489
-
490
- declare type SafeSearchBean = {
491
- codeAlerte?: number;
492
- libelleAlerte?: string;
493
- typeAlerte?: string;
494
- niveauAlerte?: number;
495
- idAlerte?: string;
496
- productId2?: number;
497
- productLabel2?: string;
498
- details?: string;
499
- };
500
-
501
6
  /**
502
- * Composant pour afficher les alternatives thérapeutiques d'un médicament donné
503
- * Permet à l'utilisateur de sélectionner une indication pour laquelle il souhaite trouver une alternative thérapeutique, et affiche les résultats correspondants.
7
+ * Composant pour afficher les alternatives thérapeutiques d'un médicament donné.
8
+ * Permet à l'utilisateur d'affiner sa recherche via des critères d'inclusion, d'exclusion et des
9
+ * filtres rapides, et affiche les résultats correspondants — toute la recherche/agrégation reste
10
+ * côté serveur, ce composant ne fait qu'envoyer les critères et afficher ce qui revient.
504
11
  * @element bcb-therapeutic-alternative
505
12
  */
506
13
  export declare class TherapeuticAlternative extends LitElement {
@@ -509,35 +16,67 @@ export declare class TherapeuticAlternative extends LitElement {
509
16
  patientProfile: Bundle | null;
510
17
  apiUrl: string;
511
18
  apiKey: string | undefined;
512
- indicationSelected: {
513
- code: string;
514
- label: string;
515
- } | undefined;
516
- indicationsList: {
517
- code: string;
518
- label: string;
519
- }[];
520
- apiInfoError: string | null;
521
- apiSearchError: string | null;
522
- apiSearchLoading: boolean;
523
- apiInfoLoading: boolean;
524
- apiReplaceError: string | null;
525
- apiReplaceLoading: boolean;
526
- missingPrescriptionError: string | null;
527
- numberTotalOfResults: number | null;
528
- currentPage: number;
529
- productsList: ProductBean[];
19
+ private sourceProduct;
20
+ private results;
21
+ private totalElements;
22
+ private lastRequestHadNoSelectedCriteria;
23
+ private currentPage;
24
+ private include;
25
+ private exclude;
26
+ private quickFilters;
27
+ private includeFacets;
28
+ private excludeFacets;
29
+ private truncatedGroups;
30
+ private expandFacetGroupKey;
31
+ private includeLabels;
32
+ private excludeLabels;
33
+ private openInclusionGroup;
34
+ private openExclusionGroup;
35
+ private checklistSearchTerm;
36
+ private sectionCollapsed;
37
+ private apiSearchError;
38
+ private apiSearchLoading;
39
+ private pendingToggleIds;
40
+ private apiReplaceError;
41
+ private apiReplaceLoading;
42
+ private missingPrescriptionError;
43
+ private hasAppliedInitialInclude;
44
+ private refetchTimer;
45
+ private requestSeq;
530
46
  private get currentMedication();
531
47
  private get currentMedicationRequest();
48
+ private get sourceProductId();
532
49
  updated(changedProperties: Map<string | number | symbol, unknown>): void;
533
- private selectIndication;
534
- private getIndicationsListForMedication;
535
- private searchTherapeuticAlternative;
50
+ disconnectedCallback(): void;
51
+ private clearScheduledRefetch;
52
+ private scheduleRefetch;
53
+ private hasNoSelectedCriteria;
54
+ private fetchAlternatives;
55
+ private applyResponse;
56
+ private static buildIncludeFacets;
57
+ private static buildExcludeFacets;
58
+ private static deriveInitialInclude;
59
+ private toggleInclude;
60
+ private toggleExclude;
61
+ private toggleQuickFilter;
62
+ private exclusionTruncatedGroupKey;
63
+ private toggleInclusionPanel;
64
+ private toggleExclusionPanel;
65
+ private requestMoreFacetValues;
66
+ private toggleSection;
536
67
  private cancelAlternative;
537
68
  private handlePageChange;
538
69
  private emitReplacedProduct;
539
- private displayResult;
540
- private displayRadioButtons;
70
+ private renderChecklistPanel;
71
+ private renderChecklistSearch;
72
+ private renderSelectedChips;
73
+ private renderPill;
74
+ private renderInclusionSection;
75
+ private renderExclusionSection;
76
+ private renderQuickFiltersSection;
77
+ private renderSectionHeader;
78
+ private matchReasonLabels;
79
+ private renderResults;
541
80
  render(): TemplateResult<1>;
542
81
  static styles: CSSResult;
543
82
  }