@tekkare/romulus 0.1.285 → 0.1.287

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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.1.284",
7
+ "version": "0.1.286",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -237,7 +237,7 @@ function urlOf(type: string, id: string, tab?: string, doc?: Record<string, any>
237
237
  * Les vues sans bandeau a elles (une carte de resultat) : le tiroir garde son
238
238
  * en-tete, titre et lien.
239
239
  */
240
- const CARD_VIEWS = new Set(["drugs-national-assembly", "science-phrc"]);
240
+ const CARD_VIEWS = new Set(["drugs-national-assembly", "drugs-national-assembly-amendment", "science-phrc"]);
241
241
 
242
242
  /** Une fiche du layer : elle porte son bandeau, le tiroir efface le sien. */
243
243
  function isPage(entry: Entry) {
@@ -22,6 +22,20 @@
22
22
  <template #title>{{ title }}</template>
23
23
  <template #subtitle>{{ subtitle }}</template>
24
24
 
25
+ <template #actions>
26
+ <!-- Emplacement libre pour un appelant (la fiche projet y pose son
27
+ bouton « Commenter ») avant le bouton projet : vide partout ailleurs. -->
28
+ <slot name="hubr-actions" />
29
+ <component
30
+ :is="projectButton"
31
+ v-if="projectButton"
32
+ :resource-id="amendmentId || amendment[AMENDMENT_FIELDS.id]"
33
+ type="FrNationalAssemblyAmendment"
34
+ :label="title"
35
+ compact
36
+ />
37
+ </template>
38
+
25
39
  <template #meta>
26
40
  <RmTag v-if="outcome" :variant="outcomeVariant">{{ outcome }}</RmTag>
27
41
  <RmTag v-if="statusLabel" variant="amber">{{ statusLabel }}</RmTag>
@@ -121,8 +135,13 @@ const props = withDefaults(
121
135
  highlight?: Record<string, string[]>;
122
136
  /** L'association dont on lit la fiche : elle ne se cite pas elle-meme. */
123
137
  currentAssociation?: string;
138
+ /**
139
+ * Le `_id` du document, pour le bouton Projet. A defaut, `amendment_id`,
140
+ * qui le vaut dans cet index (verifie sur les 2 364 amendements).
141
+ */
142
+ amendmentId?: string;
124
143
  }>(),
125
- { highlight: undefined, currentAssociation: "" },
144
+ { highlight: undefined, currentAssociation: "", amendmentId: "" },
126
145
  );
127
146
 
128
147
  /**
@@ -134,6 +153,7 @@ const emit = defineEmits<{ read: [amendment: any]; report: [amendment: any] }>()
134
153
 
135
154
  const { t, locale } = useI18n();
136
155
  const nav = useOipResourceNav();
156
+ const { projectButton } = useOipResourceHooks();
137
157
  const dateLang = computed(() => (locale.value === "en" ? "en" : "fr"));
138
158
  const blockId = `am-${useId()}`;
139
159
 
@@ -0,0 +1,126 @@
1
+ <!--
2
+ Vue de ressource d'un amendement PLFSS de l'Assemblee nationale
3
+ (FrNationalAssemblyAmendment) : le document relu par son `_id`, monte dans
4
+ la carte de la liste. Le PDF de l'Assemblee et le compte rendu de la seance
5
+ ou il est discute s'ouvrent dans la visionneuse.
6
+ -->
7
+ <template>
8
+ <div class="oip-drugs oip_list gap-12 full">
9
+
10
+ <RmLoadingState v-if="loading" />
11
+ <RmEmptyState v-else-if="!amendment" :title="t('oipDrugs.heart.errors.results')" icon="Prohibit" />
12
+ <OipDrugsHeartAssociationsNationalAssemblyAmendmentCard
13
+ v-else
14
+ :amendment="amendment"
15
+ :amendment-id="id"
16
+ @read="openPdf"
17
+ @report="openReport"
18
+ />
19
+
20
+ <OipDocumentPreview
21
+ v-model="previewOpen"
22
+ :src="previewSrc"
23
+ :title="previewTitle"
24
+ :external-src="previewExternal"
25
+ :query="previewQuery"
26
+ :fallback-src="previewFallback"
27
+ />
28
+ </div>
29
+ </template>
30
+
31
+ <script setup lang="ts">
32
+ import { ES_INDEX } from "../../../oip-drugs/esIndices";
33
+ import {
34
+ AMENDMENT_FIELDS,
35
+ NATIONAL_ASSEMBLY_FIELDS,
36
+ amendmentPdfUrl,
37
+ amendmentReportsQuery,
38
+ } from "../../../oip-drugs/utils/associationFields";
39
+ import { oipEsSearch } from "../../../composables/useOipResources";
40
+
41
+ const props = withDefaults(
42
+ defineProps<{
43
+ id: string;
44
+ type?: string;
45
+ lang?: "fr" | "en";
46
+ highlight?: string[];
47
+ }>(),
48
+ { type: "FrNationalAssemblyAmendment", lang: "fr", highlight: () => [] },
49
+ );
50
+
51
+ const { t } = useI18n();
52
+
53
+ const amendment = ref<any>(null);
54
+ const loading = ref(true);
55
+
56
+ watch(
57
+ () => props.id,
58
+ async (id) => {
59
+ loading.value = true;
60
+ amendment.value = null;
61
+ try {
62
+ const res: any = await oipEsSearch("drugs", ES_INDEX.ASSOCIATION_AMENDMENT_NATIONAL_ASSEMBLY, {
63
+ size: 1,
64
+ query: { ids: { values: [id] } },
65
+ });
66
+ amendment.value = res?.hits?.hits?.[0]?._source ?? null;
67
+ } catch {
68
+ amendment.value = null;
69
+ }
70
+ loading.value = false;
71
+ },
72
+ { immediate: true },
73
+ );
74
+
75
+ const previewOpen = ref(false);
76
+ const previewSrc = ref<string | null>(null);
77
+ const previewTitle = ref("");
78
+ const previewExternal = ref<string | null>(null);
79
+ const previewFallback = ref<string | null>(null);
80
+ const previewQuery = ref<string[] | null>(null);
81
+
82
+ /** Le PDF de l'Assemblee, par le proxy du layer (cf. amendmentPdfUrl). */
83
+ function openPdf(doc: any) {
84
+ const url = amendmentPdfUrl(doc);
85
+ if (!url) return;
86
+ previewQuery.value = null;
87
+ previewFallback.value = null;
88
+ previewExternal.value = url;
89
+ previewSrc.value = `/api/oip/pdf?url=${encodeURIComponent(url)}`;
90
+ previewTitle.value = t("oipDrugs.heart.associations.nationalAssembly.amendments.card.number", {
91
+ n: doc?.[AMENDMENT_FIELDS.number] ?? "",
92
+ });
93
+ previewOpen.value = true;
94
+ }
95
+
96
+ /**
97
+ * Le compte rendu de la seance ou il est discute, ouvert sur son numero
98
+ * (cf. amendmentReportsQuery). Sans compte rendu trouve, la page de
99
+ * l'amendement.
100
+ */
101
+ async function openReport(doc: any) {
102
+ let report: any = null;
103
+ try {
104
+ const res: any = await oipEsSearch(
105
+ "drugs",
106
+ ES_INDEX.ASSOCIATION_COMMISSION_SESSION_NATIONAL_ASSEMBLY,
107
+ amendmentReportsQuery(doc),
108
+ );
109
+ report = res?.hits?.hits?.[0]?._source ?? null;
110
+ } catch {
111
+ report = null;
112
+ }
113
+ const url = report?.[NATIONAL_ASSEMBLY_FIELDS.tekkareUrl];
114
+ if (!url) {
115
+ if (doc?.[AMENDMENT_FIELDS.url]) window.open(doc[AMENDMENT_FIELDS.url], "_blank");
116
+ return;
117
+ }
118
+ previewSrc.value = `/api/oip/pdf?url=${encodeURIComponent(url)}`;
119
+ previewFallback.value = url;
120
+ previewExternal.value = report[NATIONAL_ASSEMBLY_FIELDS.htmlUrl] || null;
121
+ previewQuery.value = [doc[AMENDMENT_FIELDS.number]];
122
+ previewTitle.value =
123
+ report[NATIONAL_ASSEMBLY_FIELDS.agenda] || t("oipDrugs.heart.associations.nationalAssembly.card.untitled");
124
+ previewOpen.value = true;
125
+ }
126
+ </script>
@@ -0,0 +1,237 @@
1
+ <!--
2
+ Fiche du remboursement AIFA d'un produit italien (Italy One, type
3
+ ItDrugReimbursement), par son `_id` dans le repertoire AIFA (code AIC) :
4
+ identite du produit, puis le remboursement SSN national de sa classe ATC4,
5
+ par canal (total, officine, hopital), en montant ou en unites.
6
+
7
+ L'AIFA ne publie le remboursement que par classe ATC4 : la fiche le dit, les
8
+ chiffres ne sont pas ceux du produit seul.
9
+
10
+ Montee par le tiroir des projets ; le lien vers l'app passe par le slot
11
+ `title-link`.
12
+ -->
13
+ <template>
14
+ <div class="oip-italy">
15
+ <RmPageHeader :eyebrow="en ? 'Reimbursement, Italy' : 'Remboursement, Italie'">
16
+ <template #title>
17
+ <span class="oip-italy__title">{{ product?.drug_label || product?.brand || `AIC ${id}` }}</span>
18
+ <slot name="title-link" />
19
+ </template>
20
+ </RmPageHeader>
21
+
22
+ <div class="oip-italy__body">
23
+ <RmLoadingState v-if="loading" spinner />
24
+ <RmEmptyState v-else-if="!product" icon="Prohibit" :title="en ? 'Product not found' : 'Produit introuvable'" />
25
+ <template v-else>
26
+ <div class="oip-italy__tags">
27
+ <RmTag v-if="product.brand" variant="indigo">{{ product.brand }}</RmTag>
28
+ <RmTag v-if="product.atc4_code" variant="blue">ATC4 · {{ product.atc4_code }}</RmTag>
29
+ <RmTag variant="gray">AIC {{ id }}</RmTag>
30
+ </div>
31
+
32
+ <RmCard padding="md">
33
+ <dl class="oip-italy__rows">
34
+ <template v-for="row in rows" :key="row.label">
35
+ <dt>{{ row.label }}</dt>
36
+ <dd>{{ row.value }}</dd>
37
+ </template>
38
+ </dl>
39
+ </RmCard>
40
+
41
+ <p class="oip-italy__note">
42
+ {{
43
+ en
44
+ ? `AIFA publishes reimbursement by ATC4 class only: the figures below cover the whole class ${classLabel}, not this product alone.`
45
+ : `L'AIFA ne publie le remboursement que par classe ATC4 : les chiffres ci-dessous couvrent toute la classe ${classLabel}, pas ce seul produit.`
46
+ }}
47
+ </p>
48
+
49
+ <div class="oip-italy__controls">
50
+ <RmSegmented v-model="measure" size="sm" :options="measureOptions" :aria-label="en ? 'Measure' : 'Mesure'" />
51
+ <RmSegmented v-model="granularity" size="sm" :options="granularityOptions" :aria-label="en ? 'Period' : 'Période'" />
52
+ </div>
53
+
54
+ <RmChartCard
55
+ :title="chartTitle"
56
+ :source="source"
57
+ :verified="verified"
58
+ :lang="lang"
59
+ >
60
+ <RmLineChart
61
+ v-if="chart.series.length"
62
+ :categories="chart.categories"
63
+ :series="chart.series"
64
+ :value-formatter="format"
65
+ :height="320"
66
+ />
67
+ <RmEmptyState
68
+ v-else
69
+ icon="MagnifyingGlassMinus"
70
+ :title="en ? 'No data' : 'Aucune donnée'"
71
+ :text="en ? 'No AIFA reimbursement for this class.' : 'Aucun remboursement AIFA pour cette classe.'"
72
+ />
73
+ </RmChartCard>
74
+ </template>
75
+ </div>
76
+ </div>
77
+ </template>
78
+
79
+ <script setup lang="ts">
80
+ import { oipEsGet, oipEsSearch } from "../../composables/useOipResources";
81
+ import { ITALY_INDEX } from "../../oip-italy/kinds";
82
+ import { useAifaSource } from "../../oip-italy/useAifaSource";
83
+
84
+ const props = withDefaults(
85
+ defineProps<{
86
+ /** Le `resourceId` : `_id` du produit dans le repertoire AIFA (code AIC). */
87
+ id: string;
88
+ type?: string;
89
+ lang?: "fr" | "en";
90
+ highlight?: string[];
91
+ }>(),
92
+ { type: "ItDrugReimbursement", lang: "fr", highlight: () => [] },
93
+ );
94
+
95
+ const en = computed(() => props.lang === "en");
96
+ const { source, verified } = useAifaSource(() => props.lang);
97
+
98
+ /** Le niveau national de l'index, comme la page /drugs d'Italy One. */
99
+ const NATIONAL = "Italy";
100
+ const CHANNELS = ["total", "retail", "hospital"] as const;
101
+
102
+ const loading = ref(true);
103
+ const product = ref<Record<string, any> | null>(null);
104
+ const docs = ref<any[]>([]);
105
+
106
+ const measure = ref<"amount_reimbursed" | "unit_reimbursed">("amount_reimbursed");
107
+ const granularity = ref<"annual" | "monthly">("annual");
108
+
109
+ const measureOptions = computed(() => [
110
+ { value: "amount_reimbursed", label: en.value ? "Amount (€)" : "Montant (€)" },
111
+ { value: "unit_reimbursed", label: en.value ? "Units" : "Unités" },
112
+ ]);
113
+ const granularityOptions = computed(() => [
114
+ { value: "annual", label: en.value ? "Years" : "Années" },
115
+ { value: "monthly", label: en.value ? "Months" : "Mois" },
116
+ ]);
117
+
118
+ const channelName = (channel: (typeof CHANNELS)[number]) =>
119
+ ({
120
+ total: "Total",
121
+ retail: en.value ? "Retail" : "Officine",
122
+ hospital: en.value ? "Hospital" : "Hôpital",
123
+ })[channel];
124
+
125
+ const classLabel = computed(() => {
126
+ const p = product.value ?? {};
127
+ const label = en.value ? p.atc4_english_label : p.atc4_french_label || p.atc4_english_label;
128
+ return [p.atc4_code, label ? `(${label})` : ""].filter(Boolean).join(" ");
129
+ });
130
+
131
+ const chartTitle = computed(() => {
132
+ const what = measure.value === "amount_reimbursed"
133
+ ? en.value ? "Reimbursed amount" : "Montant remboursé"
134
+ : en.value ? "Reimbursed units" : "Unités remboursées";
135
+ return `${what}, ${en.value ? "ATC4 class" : "classe ATC4"} ${product.value?.atc4_code ?? ""}`;
136
+ });
137
+
138
+ const format = (value: unknown) => {
139
+ const n = Number(value);
140
+ if (!Number.isFinite(n)) return "-";
141
+ const text = Math.round(n).toLocaleString(en.value ? "en-GB" : "fr-FR");
142
+ return measure.value === "amount_reimbursed" ? `${text} €` : text;
143
+ };
144
+
145
+ const rows = computed(() => {
146
+ const p = product.value ?? {};
147
+ return [
148
+ { label: en.value ? "Active ingredient" : "Principe actif", value: p.active_ingredient },
149
+ { label: en.value ? "Company" : "Laboratoire", value: p.company_label },
150
+ { label: "ATC5", value: [p.atc5_code, p.atc5_english_label].filter(Boolean).join(" · ") },
151
+ { label: en.value ? "Form" : "Forme", value: p.form_label },
152
+ { label: en.value ? "Supply" : "Délivrance", value: p.supply_type },
153
+ ].filter((row) => row.value);
154
+ });
155
+
156
+ /** Une courbe par canal, sur les periodes de la granularite choisie. */
157
+ const chart = computed(() => {
158
+ const picked = docs.value.filter((doc) => doc.period_type === granularity.value);
159
+ const categories = [...new Set(picked.map((doc) => String(doc.period)))].sort();
160
+ const series = CHANNELS.map((channel) => {
161
+ const byPeriod = new Map(
162
+ picked.filter((doc) => doc.distribution_channel === channel).map((doc) => [String(doc.period), doc[measure.value]]),
163
+ );
164
+ return { name: channelName(channel), data: categories.map((period) => byPeriod.get(period) ?? null) };
165
+ }).filter((serie) => serie.data.some((value) => value != null));
166
+ return { categories, series };
167
+ });
168
+
169
+ async function read() {
170
+ loading.value = true;
171
+ docs.value = [];
172
+ const hit = await oipEsGet<any>("drugs", ITALY_INDEX.directory, props.id).catch(() => null);
173
+ product.value = hit?._source ?? null;
174
+ const atc4 = product.value?.atc4_code;
175
+ if (atc4) {
176
+ // Toutes les annees et tous les mois de la classe au niveau national,
177
+ // les trois canaux : quelques centaines de lignes au plus.
178
+ const res = await oipEsSearch<any>("drugs", ITALY_INDEX.reimbursement, {
179
+ size: 2000,
180
+ _source: ["period", "period_type", "distribution_channel", "amount_reimbursed", "unit_reimbursed"],
181
+ query: {
182
+ bool: {
183
+ must: [{ term: { level: "atc4" } }, { term: { region: NATIONAL } }, { term: { atc_code: atc4 } }],
184
+ },
185
+ },
186
+ }).catch(() => null);
187
+ docs.value = (res?.hits?.hits ?? []).map((row: any) => row._source);
188
+ }
189
+ loading.value = false;
190
+ }
191
+
192
+ watch(() => props.id, read, { immediate: true });
193
+ </script>
194
+
195
+ <style scoped>
196
+ .oip-italy__body {
197
+ display: flex;
198
+ flex-direction: column;
199
+ gap: var(--space-16);
200
+ padding: var(--space-20) var(--space-32) var(--space-32);
201
+ }
202
+ .oip-italy__title {
203
+ margin-right: var(--space-12);
204
+ }
205
+ .oip-italy__tags,
206
+ .oip-italy__controls {
207
+ display: flex;
208
+ flex-wrap: wrap;
209
+ gap: var(--space-6);
210
+ }
211
+ .oip-italy__controls {
212
+ gap: var(--space-12);
213
+ }
214
+ .oip-italy__rows {
215
+ display: grid;
216
+ grid-template-columns: minmax(140px, max-content) 1fr;
217
+ gap: var(--space-8) var(--space-20);
218
+ margin: 0;
219
+ font-size: var(--font-14);
220
+ }
221
+ .oip-italy__rows dt {
222
+ padding-top: 2px;
223
+ color: var(--text-muted);
224
+ font-size: var(--font-12);
225
+ font-weight: var(--weight-semibold);
226
+ text-transform: uppercase;
227
+ }
228
+ .oip-italy__rows dd {
229
+ margin: 0;
230
+ line-height: 1.5;
231
+ }
232
+ .oip-italy__note {
233
+ margin: 0;
234
+ color: var(--text-muted);
235
+ font-size: var(--font-13);
236
+ }
237
+ </style>
@@ -91,6 +91,8 @@ const VIEW_LOADERS: Record<string, () => Promise<any>> = {
91
91
  "drugs-association": () => import("../components/oip-drugs/resources/Association.vue"),
92
92
  "drugs-contribution": () => import("../components/oip-drugs/resources/Contribution.vue"),
93
93
  "drugs-national-assembly": () => import("../components/oip-drugs/resources/NationalAssembly.vue"),
94
+ "drugs-national-assembly-amendment": () =>
95
+ import("../components/oip-drugs/resources/NationalAssemblyAmendment.vue"),
94
96
  "drugs-medicam": () => import("../components/oip-drugs/resources/Medicam.vue"),
95
97
  "drugs-outpatient": () => import("../components/oip-drugs/resources/Outpatient.vue"),
96
98
  "drugs-hospital": () => import("../components/oip-drugs/resources/Hospital.vue"),
@@ -105,6 +107,7 @@ const VIEW_LOADERS: Record<string, () => Promise<any>> = {
105
107
  "germany-molecule": () => import("../components/oip-germany/GkvMolecule.vue"),
106
108
  "italy-aifa-act": () => import("../components/oip-italy/AifaAct.vue"),
107
109
  "italy-price": () => import("../components/oip-italy/ItalyPrice.vue"),
110
+ "italy-reimbursement": () => import("../components/oip-italy/Reimbursement.vue"),
108
111
  };
109
112
 
110
113
  const cache = new Map<string, Component>();
@@ -208,6 +208,26 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
208
208
  source: ["agenda", "parliamentary_session", "session_date"],
209
209
  title: (s) => s?.agenda ?? "",
210
210
  subtitle: (s) => s?.parliamentary_session ?? "",
211
+ // Les amendements ouvrent la page : un compte rendu se lit sur son onglet.
212
+ path: () => "/hubr/heart/associations/national-assembly?tab=reports",
213
+ },
214
+ {
215
+ type: "FrNationalAssemblyAmendment",
216
+ index: ES_INDEX.ASSOCIATION_AMENDMENT_NATIONAL_ASSEMBLY,
217
+ label: { fr: "Amendements PLFSS", en: "Social security bill amendments" },
218
+ section: ASSOCIATIONS,
219
+ country: "fr",
220
+ icon: "Scales",
221
+ source: ["amendment_number", "location", "outcome", "status", "examination_date", "filing_date"],
222
+ // « AS592 · ART. 21 BIS », comme le titre de la carte.
223
+ title: (s) => [s?.amendment_number, s?.location].filter(Boolean).join(" · "),
224
+ // Le sort quand il existe, l'etat sinon (irrecevable, retire), puis la date.
225
+ subtitle: (s, l) => {
226
+ const raw = s?.examination_date ?? s?.filing_date;
227
+ const date = raw ? new Date(raw) : null;
228
+ const day = date && !Number.isNaN(date.getTime()) ? date.toLocaleDateString(l === "en" ? "en-GB" : "fr-FR") : "";
229
+ return [s?.outcome || s?.status, day].filter(Boolean).join(" · ");
230
+ },
211
231
  path: () => "/hubr/heart/associations/national-assembly",
212
232
  },
213
233
  {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Les familles qu'Italy One range dans un projet, decrites pour tout le
3
- * portail : actes reglementaires de l'AIFA (Trovanorme) et prix des
4
- * presentations italiennes (Price Tracker). Le tiroir d'un projet les montre
3
+ * portail : actes reglementaires de l'AIFA (Trovanorme), prix des
4
+ * presentations italiennes (Price Tracker) et remboursement AIFA d'un produit. Le tiroir d'un projet les montre
5
5
  * par leurs vues (components/oip-italy) ; la ligne du projet mene a la page
6
6
  * de l'app.
7
7
  *
@@ -19,6 +19,10 @@ const ITALY = { fr: "Italie", en: "Italy" };
19
19
  export const ITALY_INDEX = {
20
20
  aifa: "it__drug_opinion__aifa",
21
21
  prices: "ope__ww_price_tracker__tekkare",
22
+ /** Repertoire des medicaments rembourses, `_id` = code AIC. */
23
+ directory: "it__drug_directory__aifa",
24
+ /** Remboursement SSN par classe ATC4, region, canal et periode. */
25
+ reimbursement: "it__drugs__retail__aifa",
22
26
  };
23
27
 
24
28
  const day = (value: unknown) => String(value ?? "").slice(0, 10);
@@ -62,4 +66,24 @@ export const ITALY_PROJECT_KINDS: RmProjectKind[] = [
62
66
  },
63
67
  titleFromId: (id) => `AIC ${id.replace(/^it_/, "").replace(/_\d+$/, "")}`,
64
68
  },
69
+ {
70
+ // Un produit du repertoire AIFA (`_id` = code AIC). L'index du
71
+ // remboursement n'a qu'un numero de ligne pour `_id`, renumerote a chaque
72
+ // chargement (R-01 des projets) : le produit sert d'ancre, et sa fiche
73
+ // montre le remboursement de sa classe ATC4, seul niveau publie par l'AIFA.
74
+ type: "ItDrugReimbursement",
75
+ index: ITALY_INDEX.directory,
76
+ label: { fr: "Remboursement (Italie)", en: "Reimbursement (Italy)" },
77
+ section: ITALY,
78
+ country: "it",
79
+ icon: "ChartLine",
80
+ source: ["brand", "drug_label", "atc4_code", "atc4_english_label", "company_label"],
81
+ title: (s) => String(s?.drug_label ?? s?.brand ?? ""),
82
+ subtitle: (s, lang) =>
83
+ [s?.atc4_code ? `ATC4 ${s.atc4_code}` : "", s?.company_label, lang === "en" ? "SSN reimbursement of the class" : "Remboursement SSN de la classe"]
84
+ .filter(Boolean)
85
+ .join(" · "),
86
+ path: () => "/drugs",
87
+ titleFromId: (id) => `AIC ${id}`,
88
+ },
65
89
  ];
@@ -201,6 +201,7 @@ function italySpec(kind: RmProjectKind, view: string): OipResourceSpec {
201
201
  const ITALY_VIEWS: Record<string, string> = {
202
202
  ItApproval: "italy-aifa-act",
203
203
  ItDrugPrice: "italy-price",
204
+ ItDrugReimbursement: "italy-reimbursement",
204
205
  };
205
206
 
206
207
  /** La fiche de chaque famille de Germany One (cf. useOipResourceViews). */
@@ -222,6 +223,7 @@ const DRUG_VIEWS: Record<string, string> = {
222
223
  FrPatientAssociation: "drugs-association",
223
224
  FrPatientContribution: "drugs-contribution",
224
225
  FrNationalAssemblySession: "drugs-national-assembly",
226
+ FrNationalAssemblyAmendment: "drugs-national-assembly-amendment",
225
227
  FrMedicamBrand: "drugs-medicam",
226
228
  FrOutpatientBrand: "drugs-outpatient",
227
229
  FrSusBrand: "drugs-hospital",
@@ -5,6 +5,7 @@ import { oipResourceIndexes, type OipEsCluster } from "../../../app/utils/oipRes
5
5
  import { ES_INDEX } from "../../../app/oip-drugs/esIndices";
6
6
  import { OIP_PATIENT_INDEXES } from "../../../app/oip-patients/indexes";
7
7
  import { GERMANY_INDEX } from "../../../app/oip-germany/kinds";
8
+ import { ITALY_INDEX } from "../../../app/oip-italy/kinds";
8
9
 
9
10
  /**
10
11
  * POST /api/oip/es?cluster=&index=, servi par le layer OIP.
@@ -34,6 +35,12 @@ type KeyGroup = "auth" | "authAssociations" | "authApprovals" | "authVaccines" |
34
35
  /** Index de Germany One : par leur nom, hors du catalogue de fr_drugs_app. */
35
36
  const GERMANY_INDEXES = new Set<string>(Object.values(GERMANY_INDEX));
36
37
 
38
+ /**
39
+ * Index d'Italy One hors du catalogue de fr_drugs_app (repertoire et
40
+ * remboursement AIFA) : par leur nom, avec la cle principale.
41
+ */
42
+ const ITALY_INDEXES = new Set<string>([ITALY_INDEX.directory, ITALY_INDEX.reimbursement]);
43
+
37
44
  const DRUG_IDS = new Set<string>(Object.values(ES_INDEX) as string[]);
38
45
  const ASSOCIATION_IDS = new Set<string>(
39
46
  Object.entries(ES_INDEX)
@@ -52,7 +59,7 @@ const APPROVAL_IDS = new Set<string>(
52
59
  * Vide si l'index n'est pas au catalogue.
53
60
  */
54
61
  async function drugsKeyOf(ref: string): Promise<string> {
55
- if (DRUG_IDS.has(ref) || GERMANY_INDEXES.has(ref)) return ref;
62
+ if (DRUG_IDS.has(ref) || GERMANY_INDEXES.has(ref) || ITALY_INDEXES.has(ref)) return ref;
56
63
  const id = (await findOipEsIndex(ref).catch(() => undefined))?.id;
57
64
  return id && DRUG_IDS.has(id) ? id : "";
58
65
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.285",
3
+ "version": "0.1.287",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",