@tekkare/romulus 0.1.345 → 0.1.346
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.
package/dist/module.json
CHANGED
|
@@ -549,8 +549,9 @@ const derogatoryRecords = computed(() => {
|
|
|
549
549
|
const groups = new Map<string, any[]>();
|
|
550
550
|
for (const hit of resultsQueryDerogatory.value) {
|
|
551
551
|
const row = hit._source ?? {};
|
|
552
|
-
//
|
|
553
|
-
|
|
552
|
+
// Une fiche par dispositif pour la marque, toutes presentations
|
|
553
|
+
// confondues. Sans dispositif, la ligne reste seule.
|
|
554
|
+
const key = row.scheme_type ? row.scheme_type : hit._id;
|
|
554
555
|
if (!groups.has(key)) groups.set(key, []);
|
|
555
556
|
groups.get(key)!.push(row);
|
|
556
557
|
}
|
|
@@ -563,6 +564,9 @@ const derogatoryRecords = computed(() => {
|
|
|
563
564
|
// Champs du produit (nom, titulaire, statut actuel...) : communs aux indications.
|
|
564
565
|
const row = rows[0];
|
|
565
566
|
const single = rows.length === 1;
|
|
567
|
+
// Presentations du dispositif : leur nom, ou leur nombre s'il y en a plusieurs
|
|
568
|
+
// (certains noms ANSM embarquent l'indication et font un paragraphe).
|
|
569
|
+
const presentations = [...new Set(rows.map((r) => pickText(r.drug_name)).filter(Boolean))];
|
|
566
570
|
const lastRenewal = [...(row.renewal_date ?? [])].sort().at(-1);
|
|
567
571
|
const milestones = [
|
|
568
572
|
[english ? "Published" : "Publié", row.published_date],
|
|
@@ -588,8 +592,11 @@ const derogatoryRecords = computed(() => {
|
|
|
588
592
|
icon: "Key",
|
|
589
593
|
date: derogatoryDate(row),
|
|
590
594
|
url: row.url_link || null,
|
|
591
|
-
|
|
592
|
-
|
|
595
|
+
// Le dispositif fait le titre, les presentations le sous-titre.
|
|
596
|
+
title: derogatorySchemeLabel(row.scheme_type, english) || pickText(row.drug_name) || "ANSM",
|
|
597
|
+
excerpt: presentations.length > 1
|
|
598
|
+
? `${presentations.length} ${english ? "presentations" : "présentations"}`
|
|
599
|
+
: presentations[0] || null,
|
|
593
600
|
status: single ? row.state_label || null : null,
|
|
594
601
|
statusTone: derogatoryTone(row.state_label),
|
|
595
602
|
statuses: single ? undefined : derogatoryStateCounts(rows),
|
|
@@ -621,6 +628,24 @@ const derogatoryRecords = computed(() => {
|
|
|
621
628
|
.sort((a, b) => String(b.date ?? "").localeCompare(String(a.date ?? "")));
|
|
622
629
|
});
|
|
623
630
|
|
|
631
|
+
const DEROGATORY_SCHEMES: Record<string, { fr: string; en: string }> = {
|
|
632
|
+
AAC: { fr: "Autorisation d'accès compassionnel", en: "Compassionate access authorisation" },
|
|
633
|
+
AAP: { fr: "Autorisation d'accès précoce", en: "Early access authorisation" },
|
|
634
|
+
CPC: { fr: "Cadre de prescription compassionnelle", en: "Compassionate prescription framework" },
|
|
635
|
+
ATU: { fr: "Autorisation temporaire d'utilisation", en: "Temporary use authorisation" },
|
|
636
|
+
ATUc: { fr: "ATU de cohorte", en: "Cohort temporary use authorisation" },
|
|
637
|
+
ATUn: { fr: "ATU nominative", en: "Named-patient temporary use authorisation" },
|
|
638
|
+
RTU: { fr: "Recommandation temporaire d'utilisation", en: "Temporary use recommendation" },
|
|
639
|
+
AMM: { fr: "Autorisation de mise sur le marché", en: "Marketing authorisation" },
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
/** « Autorisation d'accès précoce (AAP) » ; le sigle seul s'il est inconnu. */
|
|
643
|
+
function derogatorySchemeLabel(scheme: string | undefined, english: boolean): string {
|
|
644
|
+
if (!scheme) return "";
|
|
645
|
+
const labels = DEROGATORY_SCHEMES[scheme];
|
|
646
|
+
return labels ? `${english ? labels.en : labels.fr} (${scheme})` : scheme;
|
|
647
|
+
}
|
|
648
|
+
|
|
624
649
|
/**
|
|
625
650
|
* Date d'une indication selon son etat : octroi si elle court, arret si elle
|
|
626
651
|
* est arretee, refus si elle est refusee. Les autres etats gardent la
|