@tekkare/romulus 0.1.279 → 0.1.280
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 +1 -1
- package/layer/app/components/oip-italy/AifaAct.vue +236 -0
- package/layer/app/components/oip-italy/ItalyPrice.vue +232 -0
- package/layer/app/composables/useOipResourceViews.ts +2 -0
- package/layer/app/oip-italy/kinds.ts +11 -5
- package/layer/app/utils/oipResources.ts +12 -4
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Fiche d'un acte de l'AIFA (Italy One, type ItApproval), par son `_id`
|
|
3
|
+
(opinion_id) : nature, date, molecule, laboratoire, indication et texte de
|
|
4
|
+
la determination. Puis les autres actes de la meme marque, en bref : la
|
|
5
|
+
page de la marque d'Italy One les montre ensemble.
|
|
6
|
+
|
|
7
|
+
Montee par le tiroir des projets ; le lien vers l'app passe par le slot
|
|
8
|
+
`title-link`.
|
|
9
|
+
-->
|
|
10
|
+
<template>
|
|
11
|
+
<div class="oip-italy">
|
|
12
|
+
<RmPageHeader :eyebrow="en ? 'AIFA regulatory act' : 'Acte réglementaire de l’AIFA'">
|
|
13
|
+
<template #title>
|
|
14
|
+
<span class="oip-italy__title">{{ doc?.brand || id }}</span>
|
|
15
|
+
<slot name="title-link" />
|
|
16
|
+
</template>
|
|
17
|
+
</RmPageHeader>
|
|
18
|
+
|
|
19
|
+
<div class="oip-italy__body">
|
|
20
|
+
<RmLoadingState v-if="loading" spinner />
|
|
21
|
+
<RmEmptyState v-else-if="!doc" icon="Prohibit" :title="en ? 'Act not found' : 'Acte introuvable'" />
|
|
22
|
+
<template v-else>
|
|
23
|
+
<div class="oip-italy__tags">
|
|
24
|
+
<RmTag variant="gray">{{ documentType(doc.document_type) }}</RmTag>
|
|
25
|
+
<RmTag v-if="doc.nature_of_request_en || doc.nature_of_request" variant="violet">
|
|
26
|
+
{{ doc.nature_of_request_en || doc.nature_of_request }}
|
|
27
|
+
</RmTag>
|
|
28
|
+
<RmTag v-if="hasIndication" variant="emerald">Indication</RmTag>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<RmCard padding="md">
|
|
32
|
+
<h3 class="oip-italy__card-title">{{ en ? "Act" : "Acte" }}</h3>
|
|
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
|
+
<RmCard v-if="hasIndication" padding="md">
|
|
42
|
+
<h3 class="oip-italy__card-title">Indication</h3>
|
|
43
|
+
<p class="oip-italy__text">{{ doc.indication_en || doc.indication }}</p>
|
|
44
|
+
</RmCard>
|
|
45
|
+
|
|
46
|
+
<RmCard v-if="essential" padding="md">
|
|
47
|
+
<h3 class="oip-italy__card-title">{{ en ? "Determination" : "Détermination" }}</h3>
|
|
48
|
+
<p class="oip-italy__text oip-italy__text--long">{{ essential }}</p>
|
|
49
|
+
<a v-if="doc.aifa_url" class="oip-italy__link" :href="doc.aifa_url" target="_blank" rel="noopener">
|
|
50
|
+
{{ en ? "Act on AIFA Trovanorme" : "L’acte sur Trovanorme (AIFA)" }} ↗
|
|
51
|
+
</a>
|
|
52
|
+
</RmCard>
|
|
53
|
+
|
|
54
|
+
<RmCard v-if="others.length" padding="md">
|
|
55
|
+
<h3 class="oip-italy__card-title">
|
|
56
|
+
{{ en ? `Other acts of ${doc.brand}` : `Autres actes de ${doc.brand}` }} ({{ othersTotal }})
|
|
57
|
+
</h3>
|
|
58
|
+
<ul class="oip-italy__list">
|
|
59
|
+
<li v-for="other in others" :key="other.opinion_id">
|
|
60
|
+
<span class="oip-italy__date">{{ date(other.decision_date) }}</span>
|
|
61
|
+
<span>{{ other.nature_of_request_en || other.nature_of_request || documentType(other.document_type) }}</span>
|
|
62
|
+
</li>
|
|
63
|
+
</ul>
|
|
64
|
+
<p v-if="othersTotal > others.length" class="oip-italy__note">
|
|
65
|
+
{{ en ? `The ${others.length} most recent.` : `Les ${others.length} plus récents.` }}
|
|
66
|
+
</p>
|
|
67
|
+
</RmCard>
|
|
68
|
+
</template>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import { oipEsGet, oipEsSearch } from "../../composables/useOipResources";
|
|
75
|
+
import { ITALY_INDEX } from "../../oip-italy/kinds";
|
|
76
|
+
|
|
77
|
+
const props = withDefaults(
|
|
78
|
+
defineProps<{
|
|
79
|
+
/** Le `resourceId` : `_id` de l'acte (opinion_id). */
|
|
80
|
+
id: string;
|
|
81
|
+
type?: string;
|
|
82
|
+
lang?: "fr" | "en";
|
|
83
|
+
highlight?: string[];
|
|
84
|
+
}>(),
|
|
85
|
+
{ type: "ItApproval", lang: "fr", highlight: () => [] },
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const OTHERS_SHOWN = 30;
|
|
89
|
+
|
|
90
|
+
const en = computed(() => props.lang === "en");
|
|
91
|
+
const loading = ref(true);
|
|
92
|
+
const doc = ref<Record<string, any> | null>(null);
|
|
93
|
+
const others = ref<Record<string, any>[]>([]);
|
|
94
|
+
const othersTotal = ref(0);
|
|
95
|
+
|
|
96
|
+
/** Les cinq canaux de publication de Trovanorme, nommes comme le portail. */
|
|
97
|
+
const DOCUMENT_TYPES: Record<string, string> = {
|
|
98
|
+
GU: "Gazzetta Ufficiale",
|
|
99
|
+
MSF: "Modifiche secondarie di farmaci",
|
|
100
|
+
TNF: "Testi normativi farmaceutici",
|
|
101
|
+
AIFA: "Documenti AIFA",
|
|
102
|
+
NEWS: "News",
|
|
103
|
+
};
|
|
104
|
+
const documentType = (code: unknown) => DOCUMENT_TYPES[String(code ?? "")] ?? (String(code ?? "") || "-");
|
|
105
|
+
|
|
106
|
+
const date = (value: unknown) => {
|
|
107
|
+
const parsed = new Date(String(value ?? ""));
|
|
108
|
+
return Number.isNaN(parsed.getTime())
|
|
109
|
+
? "-"
|
|
110
|
+
: parsed.toLocaleDateString(en.value ? "en-GB" : "fr-FR", { day: "numeric", month: "short", year: "numeric" });
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const hasIndication = computed(() => !!(doc.value?.indication_en || doc.value?.indication));
|
|
114
|
+
// le texte traduit quand il existe, l'original italien sinon (champ « None » quand le quota de traduction est epuise)
|
|
115
|
+
const essential = computed(() => {
|
|
116
|
+
const translated = doc.value?.essential_en;
|
|
117
|
+
return translated && translated !== "None" ? translated : (doc.value?.essential ?? "");
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
const rows = computed(() => {
|
|
121
|
+
const d = doc.value ?? {};
|
|
122
|
+
return [
|
|
123
|
+
{ label: "Date", value: date(d.decision_date) },
|
|
124
|
+
{ label: en.value ? "Reference" : "Référence", value: d.has_code },
|
|
125
|
+
{ label: en.value ? "Molecule" : "Molécule", value: d.atc5_code_label || d.molecule },
|
|
126
|
+
{ label: en.value ? "Company" : "Laboratoire", value: d.company },
|
|
127
|
+
{ label: en.value ? "Therapeutic area" : "Aire thérapeutique", value: d.theme_en || d.theme },
|
|
128
|
+
].filter((row) => row.value);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
async function read() {
|
|
132
|
+
loading.value = true;
|
|
133
|
+
doc.value = null;
|
|
134
|
+
others.value = [];
|
|
135
|
+
othersTotal.value = 0;
|
|
136
|
+
const hit = await oipEsGet<any>("drugs", ITALY_INDEX.aifa, props.id).catch(() => null);
|
|
137
|
+
doc.value = hit?._source ?? null;
|
|
138
|
+
if (doc.value?.brand) {
|
|
139
|
+
const res = await oipEsSearch<any>("drugs", ITALY_INDEX.aifa, {
|
|
140
|
+
size: OTHERS_SHOWN + 1,
|
|
141
|
+
track_total_hits: true,
|
|
142
|
+
_source: ["opinion_id", "decision_date", "document_type", "nature_of_request", "nature_of_request_en"],
|
|
143
|
+
query: { term: { "brand.keyword": doc.value.brand } },
|
|
144
|
+
sort: [{ decision_date: "desc" }],
|
|
145
|
+
}).catch(() => null);
|
|
146
|
+
const list = (res?.hits?.hits ?? []).map((h: any) => h._source).filter((s: any) => s.opinion_id !== props.id);
|
|
147
|
+
others.value = list.slice(0, OTHERS_SHOWN);
|
|
148
|
+
othersTotal.value = Math.max(0, (res?.hits?.total?.value ?? list.length) - 1);
|
|
149
|
+
}
|
|
150
|
+
loading.value = false;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
watch(() => props.id, read, { immediate: true });
|
|
154
|
+
</script>
|
|
155
|
+
|
|
156
|
+
<style scoped>
|
|
157
|
+
.oip-italy__body {
|
|
158
|
+
display: flex;
|
|
159
|
+
flex-direction: column;
|
|
160
|
+
gap: var(--space-16);
|
|
161
|
+
padding: var(--space-20) var(--space-32) var(--space-32);
|
|
162
|
+
}
|
|
163
|
+
.oip-italy__title {
|
|
164
|
+
margin-right: var(--space-12);
|
|
165
|
+
}
|
|
166
|
+
.oip-italy__tags {
|
|
167
|
+
display: flex;
|
|
168
|
+
flex-wrap: wrap;
|
|
169
|
+
gap: var(--space-6);
|
|
170
|
+
}
|
|
171
|
+
.oip-italy__card-title {
|
|
172
|
+
margin: 0 0 var(--space-12);
|
|
173
|
+
font-size: var(--font-16);
|
|
174
|
+
font-weight: var(--weight-bold);
|
|
175
|
+
}
|
|
176
|
+
.oip-italy__text {
|
|
177
|
+
margin: 0;
|
|
178
|
+
font-size: var(--font-14);
|
|
179
|
+
line-height: 1.6;
|
|
180
|
+
}
|
|
181
|
+
.oip-italy__text--long {
|
|
182
|
+
max-height: 320px;
|
|
183
|
+
overflow-y: auto;
|
|
184
|
+
white-space: pre-line;
|
|
185
|
+
}
|
|
186
|
+
.oip-italy__rows {
|
|
187
|
+
display: grid;
|
|
188
|
+
grid-template-columns: minmax(140px, max-content) 1fr;
|
|
189
|
+
gap: var(--space-8) var(--space-20);
|
|
190
|
+
margin: 0;
|
|
191
|
+
font-size: var(--font-14);
|
|
192
|
+
}
|
|
193
|
+
.oip-italy__rows dt {
|
|
194
|
+
padding-top: 2px;
|
|
195
|
+
color: var(--text-muted);
|
|
196
|
+
font-size: var(--font-12);
|
|
197
|
+
font-weight: var(--weight-semibold);
|
|
198
|
+
text-transform: uppercase;
|
|
199
|
+
}
|
|
200
|
+
.oip-italy__rows dd {
|
|
201
|
+
margin: 0;
|
|
202
|
+
line-height: 1.5;
|
|
203
|
+
}
|
|
204
|
+
.oip-italy__link {
|
|
205
|
+
display: inline-block;
|
|
206
|
+
margin-top: var(--space-16);
|
|
207
|
+
color: var(--color-primary);
|
|
208
|
+
font-size: var(--font-13);
|
|
209
|
+
font-weight: var(--weight-semibold);
|
|
210
|
+
}
|
|
211
|
+
.oip-italy__list {
|
|
212
|
+
display: flex;
|
|
213
|
+
flex-direction: column;
|
|
214
|
+
gap: var(--space-8);
|
|
215
|
+
margin: 0;
|
|
216
|
+
padding: 0;
|
|
217
|
+
font-size: var(--font-13);
|
|
218
|
+
line-height: 1.5;
|
|
219
|
+
list-style: none;
|
|
220
|
+
}
|
|
221
|
+
.oip-italy__list li {
|
|
222
|
+
display: flex;
|
|
223
|
+
gap: var(--space-12);
|
|
224
|
+
}
|
|
225
|
+
.oip-italy__date {
|
|
226
|
+
flex: none;
|
|
227
|
+
width: 96px;
|
|
228
|
+
color: var(--text-muted);
|
|
229
|
+
font-variant-numeric: tabular-nums;
|
|
230
|
+
}
|
|
231
|
+
.oip-italy__note {
|
|
232
|
+
margin: var(--space-10) 0 0;
|
|
233
|
+
color: var(--text-muted);
|
|
234
|
+
font-size: var(--font-12);
|
|
235
|
+
}
|
|
236
|
+
</style>
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Fiche d'une presentation du Price Tracker italien (Italy One, type
|
|
3
|
+
ItDrugPrice), par son `_id` (it_<AIC>_<n>) : identite, prix en vigueur par
|
|
4
|
+
type, puis l'historique des prix.
|
|
5
|
+
|
|
6
|
+
Montee par le tiroir des projets ; le lien vers l'app passe par le slot
|
|
7
|
+
`title-link`.
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div class="oip-italy">
|
|
11
|
+
<RmPageHeader :eyebrow="en ? 'Price, Italy' : 'Prix, Italie'">
|
|
12
|
+
<template #title>
|
|
13
|
+
<span class="oip-italy__title">{{ doc?.label_local || id }}</span>
|
|
14
|
+
<slot name="title-link" />
|
|
15
|
+
</template>
|
|
16
|
+
</RmPageHeader>
|
|
17
|
+
|
|
18
|
+
<div class="oip-italy__body">
|
|
19
|
+
<RmLoadingState v-if="loading" spinner />
|
|
20
|
+
<RmEmptyState v-else-if="!doc" icon="Prohibit" :title="en ? 'Price not found' : 'Prix introuvable'" />
|
|
21
|
+
<template v-else>
|
|
22
|
+
<div class="oip-italy__tags">
|
|
23
|
+
<RmTag v-if="doc.brand" variant="indigo">{{ doc.brand }}</RmTag>
|
|
24
|
+
<RmTag v-if="doc.price_category" :variant="String(doc.price_category).includes('Hospital') ? 'blue' : 'orange'">
|
|
25
|
+
{{ doc.price_category }}
|
|
26
|
+
</RmTag>
|
|
27
|
+
<RmTag v-if="doc.local_drug_id" variant="gray">AIC {{ doc.local_drug_id }}</RmTag>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<RmCard padding="md">
|
|
31
|
+
<h3 class="oip-italy__card-title">{{ en ? "Current prices" : "Prix en vigueur" }}</h3>
|
|
32
|
+
<div v-if="current.length" class="oip-italy__prices">
|
|
33
|
+
<div v-for="price in current" :key="price.type" class="oip-italy__price">
|
|
34
|
+
<span class="oip-italy__price-type">{{ price.type }}</span>
|
|
35
|
+
<span class="oip-italy__price-value">{{ price.value }}</span>
|
|
36
|
+
<span class="oip-italy__price-date">{{ en ? "since" : "depuis le" }} {{ price.date }}</span>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
<p v-else class="oip-italy__note">{{ en ? "No price recorded." : "Aucun prix enregistré." }}</p>
|
|
40
|
+
<dl class="oip-italy__rows oip-italy__rows--spaced">
|
|
41
|
+
<template v-for="row in rows" :key="row.label">
|
|
42
|
+
<dt>{{ row.label }}</dt>
|
|
43
|
+
<dd>{{ row.value }}</dd>
|
|
44
|
+
</template>
|
|
45
|
+
</dl>
|
|
46
|
+
</RmCard>
|
|
47
|
+
|
|
48
|
+
<RmCard v-if="history.length" padding="md">
|
|
49
|
+
<h3 class="oip-italy__card-title">{{ en ? "Price history" : "Historique des prix" }} ({{ history.length }})</h3>
|
|
50
|
+
<RmTable
|
|
51
|
+
:columns="historyColumns"
|
|
52
|
+
:rows="history"
|
|
53
|
+
compact
|
|
54
|
+
flat
|
|
55
|
+
:page-size="20"
|
|
56
|
+
max-height="none"
|
|
57
|
+
:empty-text="en ? 'No data' : 'Aucune donnée'"
|
|
58
|
+
/>
|
|
59
|
+
</RmCard>
|
|
60
|
+
</template>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script setup lang="ts">
|
|
66
|
+
import { oipEsGet } from "../../composables/useOipResources";
|
|
67
|
+
import { ITALY_INDEX } from "../../oip-italy/kinds";
|
|
68
|
+
|
|
69
|
+
const props = withDefaults(
|
|
70
|
+
defineProps<{
|
|
71
|
+
/** Le `resourceId` : `_id` de la presentation (it_<AIC>_<n>). */
|
|
72
|
+
id: string;
|
|
73
|
+
type?: string;
|
|
74
|
+
lang?: "fr" | "en";
|
|
75
|
+
highlight?: string[];
|
|
76
|
+
}>(),
|
|
77
|
+
{ type: "ItDrugPrice", lang: "fr", highlight: () => [] },
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const en = computed(() => props.lang === "en");
|
|
81
|
+
const loading = ref(true);
|
|
82
|
+
const doc = ref<Record<string, any> | null>(null);
|
|
83
|
+
|
|
84
|
+
/** Les types de prix du Price Tracker, dans l'ordre d'Italy One. */
|
|
85
|
+
const PRICE_TYPES: Record<number, { fr: string; en: string }> = {
|
|
86
|
+
1: { fr: "Prix ex-usine", en: "Ex-factory" },
|
|
87
|
+
2: { fr: "Prix grossiste", en: "Wholesale" },
|
|
88
|
+
11: { fr: "Prix public", en: "Public price" },
|
|
89
|
+
12: { fr: "Remboursement", en: "Reimbursement" },
|
|
90
|
+
13: { fr: "Prix gouvernement", en: "Government" },
|
|
91
|
+
14: { fr: "Prix patient", en: "Patient price" },
|
|
92
|
+
};
|
|
93
|
+
const typeName = (id: number) => {
|
|
94
|
+
const type = PRICE_TYPES[id];
|
|
95
|
+
return type ? (en.value ? type.en : type.fr) : String(id);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const date = (value: unknown) => {
|
|
99
|
+
const parsed = new Date(String(value ?? ""));
|
|
100
|
+
return Number.isNaN(parsed.getTime())
|
|
101
|
+
? "-"
|
|
102
|
+
: parsed.toLocaleDateString(en.value ? "en-GB" : "fr-FR", { day: "numeric", month: "short", year: "numeric" });
|
|
103
|
+
};
|
|
104
|
+
const euro = (value: unknown) => {
|
|
105
|
+
const n = Number(value);
|
|
106
|
+
return Number.isFinite(n)
|
|
107
|
+
? `${n.toLocaleString(en.value ? "en-GB" : "fr-FR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} €`
|
|
108
|
+
: "-";
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/** L'historique du plus recent au plus ancien (l'index ne le garantit pas pour un meme jour). */
|
|
112
|
+
const entries = computed(() =>
|
|
113
|
+
[...(doc.value?.price_history ?? [])].sort(
|
|
114
|
+
(a: any, b: any) => new Date(b.application_date ?? 0).getTime() - new Date(a.application_date ?? 0).getTime(),
|
|
115
|
+
),
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const current = computed(() => {
|
|
119
|
+
const seen = new Set<number>();
|
|
120
|
+
const out: { type: string; value: string; date: string }[] = [];
|
|
121
|
+
for (const entry of entries.value) {
|
|
122
|
+
const id = Number(entry.price_type_id);
|
|
123
|
+
if (seen.has(id) || !Number.isFinite(Number(entry.new_price))) continue;
|
|
124
|
+
seen.add(id);
|
|
125
|
+
out.push({ type: typeName(id), value: euro(entry.new_price), date: date(entry.application_date) });
|
|
126
|
+
}
|
|
127
|
+
return out;
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const historyColumns = computed(() => [
|
|
131
|
+
{ key: "date", label: en.value ? "Application date" : "Date d'application" },
|
|
132
|
+
{ key: "type", label: en.value ? "Price type" : "Type de prix" },
|
|
133
|
+
{ key: "price", label: en.value ? "Price" : "Prix", numeric: true },
|
|
134
|
+
{ key: "before", label: en.value ? "Previous price" : "Prix précédent", numeric: true },
|
|
135
|
+
]);
|
|
136
|
+
|
|
137
|
+
const history = computed(() =>
|
|
138
|
+
entries.value.map((entry: any) => ({
|
|
139
|
+
date: date(entry.application_date),
|
|
140
|
+
type: typeName(Number(entry.price_type_id)),
|
|
141
|
+
price: euro(entry.new_price),
|
|
142
|
+
before: entry.last_price != null && Number(entry.last_price) !== Number(entry.new_price) ? euro(entry.last_price) : "-",
|
|
143
|
+
})),
|
|
144
|
+
);
|
|
145
|
+
|
|
146
|
+
const rows = computed(() => {
|
|
147
|
+
const d = doc.value ?? {};
|
|
148
|
+
return [
|
|
149
|
+
{ label: en.value ? "Molecule" : "Molécule", value: d.molecule_local || d.molecule_en },
|
|
150
|
+
{ label: en.value ? "Company" : "Laboratoire", value: d.manufacturer_regroup || d.manufacturer },
|
|
151
|
+
{ label: "ATC4", value: d.atc4 },
|
|
152
|
+
{ label: en.value ? "Unit" : "Unité", value: d.unit },
|
|
153
|
+
].filter((row) => row.value);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
async function read() {
|
|
157
|
+
loading.value = true;
|
|
158
|
+
const hit = await oipEsGet<any>("drugs", ITALY_INDEX.prices, props.id).catch(() => null);
|
|
159
|
+
doc.value = hit?._source ?? null;
|
|
160
|
+
loading.value = false;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
watch(() => props.id, read, { immediate: true });
|
|
164
|
+
</script>
|
|
165
|
+
|
|
166
|
+
<style scoped>
|
|
167
|
+
.oip-italy__body {
|
|
168
|
+
display: flex;
|
|
169
|
+
flex-direction: column;
|
|
170
|
+
gap: var(--space-16);
|
|
171
|
+
padding: var(--space-20) var(--space-32) var(--space-32);
|
|
172
|
+
}
|
|
173
|
+
.oip-italy__title {
|
|
174
|
+
margin-right: var(--space-12);
|
|
175
|
+
}
|
|
176
|
+
.oip-italy__tags {
|
|
177
|
+
display: flex;
|
|
178
|
+
flex-wrap: wrap;
|
|
179
|
+
gap: var(--space-6);
|
|
180
|
+
}
|
|
181
|
+
.oip-italy__card-title {
|
|
182
|
+
margin: 0 0 var(--space-12);
|
|
183
|
+
font-size: var(--font-16);
|
|
184
|
+
font-weight: var(--weight-bold);
|
|
185
|
+
}
|
|
186
|
+
.oip-italy__prices {
|
|
187
|
+
display: flex;
|
|
188
|
+
flex-wrap: wrap;
|
|
189
|
+
gap: var(--space-12) var(--space-32);
|
|
190
|
+
}
|
|
191
|
+
.oip-italy__price {
|
|
192
|
+
display: flex;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: 2px;
|
|
195
|
+
}
|
|
196
|
+
.oip-italy__price-type,
|
|
197
|
+
.oip-italy__price-date {
|
|
198
|
+
color: var(--text-muted);
|
|
199
|
+
font-size: var(--font-12);
|
|
200
|
+
}
|
|
201
|
+
.oip-italy__price-value {
|
|
202
|
+
font-size: var(--font-22);
|
|
203
|
+
font-weight: var(--weight-bold);
|
|
204
|
+
font-variant-numeric: tabular-nums;
|
|
205
|
+
}
|
|
206
|
+
.oip-italy__rows {
|
|
207
|
+
display: grid;
|
|
208
|
+
grid-template-columns: minmax(140px, max-content) 1fr;
|
|
209
|
+
gap: var(--space-8) var(--space-20);
|
|
210
|
+
margin: 0;
|
|
211
|
+
font-size: var(--font-14);
|
|
212
|
+
}
|
|
213
|
+
.oip-italy__rows--spaced {
|
|
214
|
+
margin-top: var(--space-20);
|
|
215
|
+
}
|
|
216
|
+
.oip-italy__rows dt {
|
|
217
|
+
padding-top: 2px;
|
|
218
|
+
color: var(--text-muted);
|
|
219
|
+
font-size: var(--font-12);
|
|
220
|
+
font-weight: var(--weight-semibold);
|
|
221
|
+
text-transform: uppercase;
|
|
222
|
+
}
|
|
223
|
+
.oip-italy__rows dd {
|
|
224
|
+
margin: 0;
|
|
225
|
+
line-height: 1.5;
|
|
226
|
+
}
|
|
227
|
+
.oip-italy__note {
|
|
228
|
+
margin: 0;
|
|
229
|
+
color: var(--text-muted);
|
|
230
|
+
font-size: var(--font-13);
|
|
231
|
+
}
|
|
232
|
+
</style>
|
|
@@ -103,6 +103,8 @@ const VIEW_LOADERS: Record<string, () => Promise<any>> = {
|
|
|
103
103
|
"patients-vaccine": () => import("../components/oip-patients/VaccineFiche.vue"),
|
|
104
104
|
"germany-gba": () => import("../components/oip-germany/GbaAssessment.vue"),
|
|
105
105
|
"germany-molecule": () => import("../components/oip-germany/GkvMolecule.vue"),
|
|
106
|
+
"italy-aifa-act": () => import("../components/oip-italy/AifaAct.vue"),
|
|
107
|
+
"italy-price": () => import("../components/oip-italy/ItalyPrice.vue"),
|
|
106
108
|
};
|
|
107
109
|
|
|
108
110
|
const cache = new Map<string, Component>();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Les familles qu'Italy One range dans un projet, decrites pour tout le
|
|
3
3
|
* portail : actes reglementaires de l'AIFA (Trovanorme) et prix des
|
|
4
|
-
* presentations italiennes (Price Tracker).
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* presentations italiennes (Price Tracker). Le tiroir d'un projet les montre
|
|
5
|
+
* par leurs vues (components/oip-italy) ; la ligne du projet mene a la page
|
|
6
|
+
* de l'app.
|
|
7
7
|
*
|
|
8
8
|
* Index lus sur le cluster `drugs` (meme domaine que fr_drugs_app ; chaque app
|
|
9
9
|
* y joint sa propre cle, cf. runtimeConfig.oipEs.drugs).
|
|
@@ -15,6 +15,12 @@ import type { RmProjectKind } from "@tekkare/romulus/utils/projects";
|
|
|
15
15
|
|
|
16
16
|
const ITALY = { fr: "Italie", en: "Italy" };
|
|
17
17
|
|
|
18
|
+
/** Les index des fiches d'Italy One, relus aussi par leurs vues de tiroir. */
|
|
19
|
+
export const ITALY_INDEX = {
|
|
20
|
+
aifa: "it__drug_opinion__aifa",
|
|
21
|
+
prices: "ope__ww_price_tracker__tekkare",
|
|
22
|
+
};
|
|
23
|
+
|
|
18
24
|
const day = (value: unknown) => String(value ?? "").slice(0, 10);
|
|
19
25
|
|
|
20
26
|
export const ITALY_PROJECT_KINDS: RmProjectKind[] = [
|
|
@@ -22,7 +28,7 @@ export const ITALY_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
22
28
|
// Un acte de l'AIFA (`_id` = opinion_id, ex. TNF_<uuid>). Une carte marque
|
|
23
29
|
// range son dernier acte ; la page de la marque les montre tous.
|
|
24
30
|
type: "ItApproval",
|
|
25
|
-
index:
|
|
31
|
+
index: ITALY_INDEX.aifa,
|
|
26
32
|
label: { fr: "Actes de l'AIFA", en: "AIFA acts" },
|
|
27
33
|
section: ITALY,
|
|
28
34
|
country: "it",
|
|
@@ -39,7 +45,7 @@ export const ITALY_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
39
45
|
// Une presentation du Price Tracker (`_id` = it_<AIC>_1). Une carte marque
|
|
40
46
|
// range ses presentations.
|
|
41
47
|
type: "ItDrugPrice",
|
|
42
|
-
index:
|
|
48
|
+
index: ITALY_INDEX.prices,
|
|
43
49
|
label: { fr: "Prix (Italie)", en: "Prices (Italy)" },
|
|
44
50
|
section: ITALY,
|
|
45
51
|
country: "it",
|
|
@@ -179,10 +179,11 @@ function germanySpec(kind: RmProjectKind, view: string): OipResourceSpec {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
* Une fiche d'Italy One, lue sur le cluster `drugs
|
|
183
|
-
* ligne du projet mene a la page de l'app
|
|
182
|
+
* Une fiche d'Italy One, lue sur le cluster `drugs` et montree d'un seul
|
|
183
|
+
* tenant (components/oip-italy) ; la ligne du projet mene a la page de l'app
|
|
184
|
+
* qui la montre.
|
|
184
185
|
*/
|
|
185
|
-
function italySpec(kind: RmProjectKind): OipResourceSpec {
|
|
186
|
+
function italySpec(kind: RmProjectKind, view: string): OipResourceSpec {
|
|
186
187
|
return {
|
|
187
188
|
type: kind.type,
|
|
188
189
|
app: "italy_one_app",
|
|
@@ -191,10 +192,17 @@ function italySpec(kind: RmProjectKind): OipResourceSpec {
|
|
|
191
192
|
routeId: (id) => id,
|
|
192
193
|
base: () => "",
|
|
193
194
|
tabs: [],
|
|
195
|
+
view,
|
|
194
196
|
detailPath: (id, _tab, doc) => kind.path?.(doc ?? {}, id) ?? "",
|
|
195
197
|
};
|
|
196
198
|
}
|
|
197
199
|
|
|
200
|
+
/** La fiche de chaque famille d'Italy One (cf. useOipResourceViews). */
|
|
201
|
+
const ITALY_VIEWS: Record<string, string> = {
|
|
202
|
+
ItApproval: "italy-aifa-act",
|
|
203
|
+
ItDrugPrice: "italy-price",
|
|
204
|
+
};
|
|
205
|
+
|
|
198
206
|
/** La fiche de chaque famille de Germany One (cf. useOipResourceViews). */
|
|
199
207
|
const GERMANY_VIEWS: Record<string, string> = {
|
|
200
208
|
DeGbaAssessment: "germany-gba",
|
|
@@ -432,7 +440,7 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
|
|
|
432
440
|
patientsSpec(PATIENT_KIND, "patients-patient"),
|
|
433
441
|
patientsSpec(VACCINE_KIND, "patients-vaccine"),
|
|
434
442
|
...GERMANY_PROJECT_KINDS.map((kind) => germanySpec(kind, GERMANY_VIEWS[kind.type]!)),
|
|
435
|
-
...ITALY_PROJECT_KINDS.map(italySpec),
|
|
443
|
+
...ITALY_PROJECT_KINDS.map((kind) => italySpec(kind, ITALY_VIEWS[kind.type]!)),
|
|
436
444
|
];
|
|
437
445
|
|
|
438
446
|
export function oipResourceSpec(type: string): OipResourceSpec | undefined {
|