@tekkare/romulus 0.1.300 → 0.1.301
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-spain/AempsReport.vue +147 -0
- package/layer/app/components/oip-spain/Reimbursement.vue +193 -0
- package/layer/app/components/oip-spain/SpainPrice.vue +243 -0
- package/layer/app/composables/useOipResourceViews.ts +3 -0
- package/layer/app/oip-spain/kinds.ts +94 -0
- package/layer/app/utils/oipResources.ts +32 -0
- package/layer/server/api/oip/es.post.ts +9 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Un rapport de l'AEMPS range dans un projet (Spain One, type EsApproval), par
|
|
3
|
+
son `_id` (detail_id) : titre, produit, aire therapeutique, date et version,
|
|
4
|
+
puis le PDF (copie Tekkare, et l'original sur le site de l'AEMPS).
|
|
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-spain">
|
|
11
|
+
<RmPageHeader :eyebrow="en ? 'AEMPS report' : 'Rapport de l’AEMPS'">
|
|
12
|
+
<template #title>
|
|
13
|
+
<span class="oip-spain__title">{{ title || id }}</span>
|
|
14
|
+
<slot name="title-link" />
|
|
15
|
+
</template>
|
|
16
|
+
</RmPageHeader>
|
|
17
|
+
|
|
18
|
+
<div class="oip-spain__body">
|
|
19
|
+
<RmLoadingState v-if="loading" spinner />
|
|
20
|
+
<RmEmptyState v-else-if="!doc" icon="Prohibit" :title="en ? 'Report not found' : 'Rapport introuvable'" />
|
|
21
|
+
<template v-else>
|
|
22
|
+
<div class="oip-spain__tags">
|
|
23
|
+
<RmTag v-if="known(doc.brand)" variant="indigo">{{ doc.brand }}</RmTag>
|
|
24
|
+
<RmTag v-if="known(doc.molecule)" variant="gray">{{ doc.molecule }}</RmTag>
|
|
25
|
+
<RmTag v-if="doc.atc2_code" variant="blue">{{ doc.atc2_code }}</RmTag>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<RmCard padding="md">
|
|
29
|
+
<dl class="oip-spain__rows">
|
|
30
|
+
<template v-for="row in rows" :key="row.label">
|
|
31
|
+
<dt>{{ row.label }}</dt>
|
|
32
|
+
<dd>{{ row.value }}</dd>
|
|
33
|
+
</template>
|
|
34
|
+
</dl>
|
|
35
|
+
<div v-if="doc.tekkare_pdf_url || doc.pdf_url" class="oip-spain__links">
|
|
36
|
+
<a v-if="doc.tekkare_pdf_url" :href="doc.tekkare_pdf_url" target="_blank" rel="noopener">
|
|
37
|
+
{{ en ? "Open the report (PDF)" : "Ouvrir le rapport (PDF)" }}
|
|
38
|
+
</a>
|
|
39
|
+
<a v-if="doc.pdf_url" :href="doc.pdf_url" target="_blank" rel="noopener">
|
|
40
|
+
{{ en ? "Original on the AEMPS website" : "Original sur le site de l’AEMPS" }}
|
|
41
|
+
</a>
|
|
42
|
+
</div>
|
|
43
|
+
</RmCard>
|
|
44
|
+
</template>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup lang="ts">
|
|
50
|
+
import { oipEsGet } from "../../composables/useOipResources";
|
|
51
|
+
import { SPAIN_INDEX } from "../../oip-spain/kinds";
|
|
52
|
+
|
|
53
|
+
const props = withDefaults(
|
|
54
|
+
defineProps<{
|
|
55
|
+
/** Le `resourceId` : `_id` du rapport (detail_id). */
|
|
56
|
+
id: string;
|
|
57
|
+
type?: string;
|
|
58
|
+
lang?: "fr" | "en";
|
|
59
|
+
highlight?: string[];
|
|
60
|
+
}>(),
|
|
61
|
+
{ type: "EsApproval", lang: "fr", highlight: () => [] },
|
|
62
|
+
);
|
|
63
|
+
|
|
64
|
+
const en = computed(() => props.lang === "en");
|
|
65
|
+
const loading = ref(true);
|
|
66
|
+
const doc = ref<Record<string, any> | null>(null);
|
|
67
|
+
|
|
68
|
+
/** Les rapports sans produit portent « UNKNOWN » en marque et en molecule. */
|
|
69
|
+
const known = (value: unknown) => !!value && value !== "UNKNOWN";
|
|
70
|
+
|
|
71
|
+
const title = computed(() =>
|
|
72
|
+
en.value ? doc.value?.report_english_title || doc.value?.report_spanish_title : doc.value?.report_spanish_title,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const date = (value: unknown) => {
|
|
76
|
+
const parsed = new Date(String(value ?? ""));
|
|
77
|
+
return Number.isNaN(parsed.getTime())
|
|
78
|
+
? ""
|
|
79
|
+
: parsed.toLocaleDateString(en.value ? "en-GB" : "fr-FR", { day: "numeric", month: "short", year: "numeric" });
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const rows = computed(() => {
|
|
83
|
+
const d = doc.value ?? {};
|
|
84
|
+
return [
|
|
85
|
+
{ label: en.value ? "Date" : "Date", value: date(d.report_date) },
|
|
86
|
+
{ label: "Version", value: d.version },
|
|
87
|
+
{ label: en.value ? "Condition" : "Pathologie", value: en.value ? d.illness_english_label : d.illness_spanish_label },
|
|
88
|
+
{ label: en.value ? "Therapeutic area" : "Aire thérapeutique", value: en.value ? d.atc2_english_label : d.atc2_spanish_label },
|
|
89
|
+
{ label: en.value ? "English title" : "Titre anglais", value: en.value ? "" : d.report_english_title },
|
|
90
|
+
].filter((row) => row.value);
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
async function read() {
|
|
94
|
+
loading.value = true;
|
|
95
|
+
const hit = await oipEsGet<any>("drugs", SPAIN_INDEX.aemps, props.id).catch(() => null);
|
|
96
|
+
doc.value = hit?._source ?? null;
|
|
97
|
+
loading.value = false;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
watch(() => props.id, read, { immediate: true });
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style scoped>
|
|
104
|
+
.oip-spain__body {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: column;
|
|
107
|
+
gap: var(--space-16);
|
|
108
|
+
padding: var(--space-20) var(--space-32) var(--space-32);
|
|
109
|
+
}
|
|
110
|
+
.oip-spain__title {
|
|
111
|
+
margin-right: var(--space-12);
|
|
112
|
+
}
|
|
113
|
+
.oip-spain__tags {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-wrap: wrap;
|
|
116
|
+
gap: var(--space-6);
|
|
117
|
+
}
|
|
118
|
+
.oip-spain__rows {
|
|
119
|
+
display: grid;
|
|
120
|
+
grid-template-columns: minmax(140px, max-content) 1fr;
|
|
121
|
+
gap: var(--space-8) var(--space-20);
|
|
122
|
+
margin: 0;
|
|
123
|
+
font-size: var(--font-14);
|
|
124
|
+
}
|
|
125
|
+
.oip-spain__rows dt {
|
|
126
|
+
padding-top: 2px;
|
|
127
|
+
color: var(--text-muted);
|
|
128
|
+
font-size: var(--font-12);
|
|
129
|
+
font-weight: var(--weight-semibold);
|
|
130
|
+
text-transform: uppercase;
|
|
131
|
+
}
|
|
132
|
+
.oip-spain__rows dd {
|
|
133
|
+
margin: 0;
|
|
134
|
+
line-height: 1.5;
|
|
135
|
+
}
|
|
136
|
+
.oip-spain__links {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-wrap: wrap;
|
|
139
|
+
gap: var(--space-8) var(--space-20);
|
|
140
|
+
margin-top: var(--space-20);
|
|
141
|
+
font-size: var(--font-14);
|
|
142
|
+
}
|
|
143
|
+
.oip-spain__links a {
|
|
144
|
+
color: var(--primary);
|
|
145
|
+
font-weight: var(--weight-semibold);
|
|
146
|
+
}
|
|
147
|
+
</style>
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Le remboursement Sanidad d'une molecule ou d'une classe ATC range dans un
|
|
3
|
+
projet (Spain One, type EsDrugReimbursement). Le `resourceId` est le document
|
|
4
|
+
du dernier mois au moment de l'ajout (es_<ATC>_<periode>_monthly) : il ne
|
|
5
|
+
sert que d'ancre, la fiche relit tout l'historique mensuel du code.
|
|
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-spain">
|
|
12
|
+
<RmPageHeader :eyebrow="en ? 'Reimbursement, Spain' : 'Remboursement, Espagne'">
|
|
13
|
+
<template #title>
|
|
14
|
+
<span class="oip-spain__title">{{ anchor?.local_name || id }}</span>
|
|
15
|
+
<slot name="title-link" />
|
|
16
|
+
</template>
|
|
17
|
+
</RmPageHeader>
|
|
18
|
+
|
|
19
|
+
<div class="oip-spain__body">
|
|
20
|
+
<RmLoadingState v-if="loading" spinner />
|
|
21
|
+
<RmEmptyState v-else-if="!anchor" icon="Prohibit" :title="en ? 'Data not found' : 'Données introuvables'" />
|
|
22
|
+
<template v-else>
|
|
23
|
+
<div class="oip-spain__tags">
|
|
24
|
+
<RmTag v-if="anchor.local_code" variant="indigo">ATC{{ anchor.atc_level }} {{ anchor.local_code }}</RmTag>
|
|
25
|
+
<RmTag v-if="en && anchor.atc_label_en" variant="gray">{{ anchor.atc_label_en }}</RmTag>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<RmCard padding="md">
|
|
29
|
+
<h3 class="oip-spain__card-title">
|
|
30
|
+
{{ en ? "Last month" : "Dernier mois" }} ({{ latest?.period ?? "-" }})
|
|
31
|
+
</h3>
|
|
32
|
+
<div class="oip-spain__figures">
|
|
33
|
+
<div v-for="figure in figures" :key="figure.label" class="oip-spain__figure">
|
|
34
|
+
<span class="oip-spain__figure-label">{{ figure.label }}</span>
|
|
35
|
+
<span class="oip-spain__figure-value">{{ figure.value }}</span>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</RmCard>
|
|
39
|
+
|
|
40
|
+
<RmCard v-if="history.length" padding="md">
|
|
41
|
+
<h3 class="oip-spain__card-title">{{ en ? "Monthly history" : "Historique mensuel" }} ({{ history.length }})</h3>
|
|
42
|
+
<RmTable
|
|
43
|
+
:columns="columns"
|
|
44
|
+
:rows="history"
|
|
45
|
+
compact
|
|
46
|
+
flat
|
|
47
|
+
:page-size="12"
|
|
48
|
+
max-height="none"
|
|
49
|
+
:empty-text="en ? 'No data' : 'Aucune donnée'"
|
|
50
|
+
/>
|
|
51
|
+
</RmCard>
|
|
52
|
+
|
|
53
|
+
<p class="oip-spain__note">
|
|
54
|
+
{{
|
|
55
|
+
en
|
|
56
|
+
? "Sanidad publishes reimbursed dispensing in community pharmacies, by ATC code."
|
|
57
|
+
: "Sanidad publie les dispensations remboursées en officine, par code ATC."
|
|
58
|
+
}}
|
|
59
|
+
</p>
|
|
60
|
+
</template>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<script setup lang="ts">
|
|
66
|
+
import { oipEsGet, oipEsSearch } from "../../composables/useOipResources";
|
|
67
|
+
import { SPAIN_INDEX } from "../../oip-spain/kinds";
|
|
68
|
+
|
|
69
|
+
const props = withDefaults(
|
|
70
|
+
defineProps<{
|
|
71
|
+
/** Le `resourceId` : `_id` du document d'ancrage (es_<ATC>_<periode>_monthly). */
|
|
72
|
+
id: string;
|
|
73
|
+
type?: string;
|
|
74
|
+
lang?: "fr" | "en";
|
|
75
|
+
highlight?: string[];
|
|
76
|
+
}>(),
|
|
77
|
+
{ type: "EsDrugReimbursement", lang: "fr", highlight: () => [] },
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
const en = computed(() => props.lang === "en");
|
|
81
|
+
const loading = ref(true);
|
|
82
|
+
const anchor = ref<Record<string, any> | null>(null);
|
|
83
|
+
const docs = ref<any[]>([]);
|
|
84
|
+
|
|
85
|
+
const number = (value: unknown, digits = 0) => {
|
|
86
|
+
const n = Number(value);
|
|
87
|
+
return Number.isFinite(n)
|
|
88
|
+
? n.toLocaleString(en.value ? "en-GB" : "fr-FR", { minimumFractionDigits: digits, maximumFractionDigits: digits })
|
|
89
|
+
: "-";
|
|
90
|
+
};
|
|
91
|
+
/** Les montants et les boites sont publies en milliers. */
|
|
92
|
+
const thousands = (value: unknown) => {
|
|
93
|
+
const n = Number(value);
|
|
94
|
+
return Number.isFinite(n) ? number(n * 1000) : "-";
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const latest = computed(() => docs.value[0] ?? null);
|
|
98
|
+
|
|
99
|
+
const figures = computed(() => {
|
|
100
|
+
const d = latest.value ?? {};
|
|
101
|
+
return [
|
|
102
|
+
{ label: en.value ? "Amount (€)" : "Montant (€)", value: thousands(d.retail_price_amount_thousands_eur) },
|
|
103
|
+
{ label: en.value ? "Packs" : "Boîtes", value: thousands(d.nb_packs_thousands) },
|
|
104
|
+
{ label: "DHD", value: number(d.dhd, 2) },
|
|
105
|
+
];
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const columns = computed(() => [
|
|
109
|
+
{ key: "period", label: en.value ? "Month" : "Mois" },
|
|
110
|
+
{ key: "amount", label: en.value ? "Amount (€)" : "Montant (€)", numeric: true },
|
|
111
|
+
{ key: "packs", label: en.value ? "Packs" : "Boîtes", numeric: true },
|
|
112
|
+
{ key: "dhd", label: "DHD", numeric: true },
|
|
113
|
+
]);
|
|
114
|
+
|
|
115
|
+
const history = computed(() =>
|
|
116
|
+
docs.value.map((d) => ({
|
|
117
|
+
period: d.period,
|
|
118
|
+
amount: thousands(d.retail_price_amount_thousands_eur),
|
|
119
|
+
packs: thousands(d.nb_packs_thousands),
|
|
120
|
+
dhd: number(d.dhd, 2),
|
|
121
|
+
})),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
async function read() {
|
|
125
|
+
loading.value = true;
|
|
126
|
+
const hit = await oipEsGet<any>("drugs", SPAIN_INDEX.reimbursement, props.id).catch(() => null);
|
|
127
|
+
anchor.value = hit?._source ?? null;
|
|
128
|
+
docs.value = [];
|
|
129
|
+
const code = anchor.value?.local_code;
|
|
130
|
+
if (code) {
|
|
131
|
+
const res = await oipEsSearch<any>("drugs", SPAIN_INDEX.reimbursement, {
|
|
132
|
+
size: 120,
|
|
133
|
+
sort: [{ "period.keyword": "desc" }],
|
|
134
|
+
_source: ["period", "retail_price_amount_thousands_eur", "nb_packs_thousands", "dhd"],
|
|
135
|
+
query: {
|
|
136
|
+
bool: {
|
|
137
|
+
filter: [{ term: { "local_code.keyword": code } }, { term: { "period_type.keyword": "monthly" } }],
|
|
138
|
+
},
|
|
139
|
+
},
|
|
140
|
+
}).catch(() => null);
|
|
141
|
+
docs.value = (res?.hits?.hits ?? []).map((h: any) => h._source);
|
|
142
|
+
}
|
|
143
|
+
loading.value = false;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
watch(() => props.id, read, { immediate: true });
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<style scoped>
|
|
150
|
+
.oip-spain__body {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
gap: var(--space-16);
|
|
154
|
+
padding: var(--space-20) var(--space-32) var(--space-32);
|
|
155
|
+
}
|
|
156
|
+
.oip-spain__title {
|
|
157
|
+
margin-right: var(--space-12);
|
|
158
|
+
}
|
|
159
|
+
.oip-spain__tags {
|
|
160
|
+
display: flex;
|
|
161
|
+
flex-wrap: wrap;
|
|
162
|
+
gap: var(--space-6);
|
|
163
|
+
}
|
|
164
|
+
.oip-spain__card-title {
|
|
165
|
+
margin: 0 0 var(--space-12);
|
|
166
|
+
font-size: var(--font-16);
|
|
167
|
+
font-weight: var(--weight-bold);
|
|
168
|
+
}
|
|
169
|
+
.oip-spain__figures {
|
|
170
|
+
display: flex;
|
|
171
|
+
flex-wrap: wrap;
|
|
172
|
+
gap: var(--space-12) var(--space-32);
|
|
173
|
+
}
|
|
174
|
+
.oip-spain__figure {
|
|
175
|
+
display: flex;
|
|
176
|
+
flex-direction: column;
|
|
177
|
+
gap: 2px;
|
|
178
|
+
}
|
|
179
|
+
.oip-spain__figure-label {
|
|
180
|
+
color: var(--text-muted);
|
|
181
|
+
font-size: var(--font-12);
|
|
182
|
+
}
|
|
183
|
+
.oip-spain__figure-value {
|
|
184
|
+
font-size: var(--font-22);
|
|
185
|
+
font-weight: var(--weight-bold);
|
|
186
|
+
font-variant-numeric: tabular-nums;
|
|
187
|
+
}
|
|
188
|
+
.oip-spain__note {
|
|
189
|
+
margin: 0;
|
|
190
|
+
color: var(--text-muted);
|
|
191
|
+
font-size: var(--font-13);
|
|
192
|
+
}
|
|
193
|
+
</style>
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Fiche d'une presentation du Price Tracker espagnol (Spain One, type
|
|
3
|
+
EsDrugPrice), par son `_id` (es_<CN>_<n>) : identite, prix en vigueur par
|
|
4
|
+
type, puis les vrais changements de prix (les reconductions « N » a prix
|
|
5
|
+
inchange sont ecartees, comme dans Spain One).
|
|
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-spain">
|
|
12
|
+
<RmPageHeader :eyebrow="en ? 'Price, Spain' : 'Prix, Espagne'">
|
|
13
|
+
<template #title>
|
|
14
|
+
<span class="oip-spain__title">{{ doc?.label_local || id }}</span>
|
|
15
|
+
<slot name="title-link" />
|
|
16
|
+
</template>
|
|
17
|
+
</RmPageHeader>
|
|
18
|
+
|
|
19
|
+
<div class="oip-spain__body">
|
|
20
|
+
<RmLoadingState v-if="loading" spinner />
|
|
21
|
+
<RmEmptyState v-else-if="!doc" icon="Prohibit" :title="en ? 'Price not found' : 'Prix introuvable'" />
|
|
22
|
+
<template v-else>
|
|
23
|
+
<div class="oip-spain__tags">
|
|
24
|
+
<RmTag v-if="doc.brand" variant="indigo">{{ doc.brand }}</RmTag>
|
|
25
|
+
<RmTag v-if="doc.price_category" :variant="String(doc.price_category).includes('Hospital') ? 'blue' : 'orange'">
|
|
26
|
+
{{ doc.price_category }}
|
|
27
|
+
</RmTag>
|
|
28
|
+
<RmTag v-if="doc.local_drug_id" variant="gray">CN {{ doc.local_drug_id }}</RmTag>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<RmCard padding="md">
|
|
32
|
+
<h3 class="oip-spain__card-title">{{ en ? "Current prices" : "Prix en vigueur" }}</h3>
|
|
33
|
+
<div v-if="current.length" class="oip-spain__prices">
|
|
34
|
+
<div v-for="price in current" :key="price.type" class="oip-spain__price">
|
|
35
|
+
<span class="oip-spain__price-type">{{ price.type }}</span>
|
|
36
|
+
<span class="oip-spain__price-value">{{ price.value }}</span>
|
|
37
|
+
<span class="oip-spain__price-date">{{ en ? "since" : "depuis le" }} {{ price.date }}</span>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<p v-else class="oip-spain__note">{{ en ? "No price recorded." : "Aucun prix enregistré." }}</p>
|
|
41
|
+
<dl class="oip-spain__rows oip-spain__rows--spaced">
|
|
42
|
+
<template v-for="row in rows" :key="row.label">
|
|
43
|
+
<dt>{{ row.label }}</dt>
|
|
44
|
+
<dd>{{ row.value }}</dd>
|
|
45
|
+
</template>
|
|
46
|
+
</dl>
|
|
47
|
+
</RmCard>
|
|
48
|
+
|
|
49
|
+
<RmCard v-if="history.length" padding="md">
|
|
50
|
+
<h3 class="oip-spain__card-title">{{ en ? "Price changes" : "Changements de prix" }} ({{ history.length }})</h3>
|
|
51
|
+
<RmTable
|
|
52
|
+
:columns="historyColumns"
|
|
53
|
+
:rows="history"
|
|
54
|
+
compact
|
|
55
|
+
flat
|
|
56
|
+
:page-size="20"
|
|
57
|
+
max-height="none"
|
|
58
|
+
:empty-text="en ? 'No data' : 'Aucune donnée'"
|
|
59
|
+
/>
|
|
60
|
+
</RmCard>
|
|
61
|
+
</template>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<script setup lang="ts">
|
|
67
|
+
import { oipEsGet } from "../../composables/useOipResources";
|
|
68
|
+
import { SPAIN_INDEX } from "../../oip-spain/kinds";
|
|
69
|
+
|
|
70
|
+
const props = withDefaults(
|
|
71
|
+
defineProps<{
|
|
72
|
+
/** Le `resourceId` : `_id` de la presentation (es_<CN>_<n>). */
|
|
73
|
+
id: string;
|
|
74
|
+
type?: string;
|
|
75
|
+
lang?: "fr" | "en";
|
|
76
|
+
highlight?: string[];
|
|
77
|
+
}>(),
|
|
78
|
+
{ type: "EsDrugPrice", lang: "fr", highlight: () => [] },
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const en = computed(() => props.lang === "en");
|
|
82
|
+
const loading = ref(true);
|
|
83
|
+
const doc = ref<Record<string, any> | null>(null);
|
|
84
|
+
|
|
85
|
+
/** Les types de prix du Price Tracker, comme Spain One les nomme. */
|
|
86
|
+
const PRICE_TYPES: Record<number, { fr: string; en: string }> = {
|
|
87
|
+
1: { fr: "Prix fabricant", en: "Ex-factory" },
|
|
88
|
+
2: { fr: "Prix grossiste", en: "Wholesale price" },
|
|
89
|
+
11: { fr: "Prix public", en: "Public price" },
|
|
90
|
+
12: { fr: "Remboursement", en: "Reimbursement" },
|
|
91
|
+
13: { fr: "Prix gouvernemental", en: "Government price" },
|
|
92
|
+
14: { fr: "Taux de remboursement", en: "Reimbursement rate" },
|
|
93
|
+
21: { fr: "Taux de remboursement", en: "Reimbursement rate" },
|
|
94
|
+
};
|
|
95
|
+
/** Taux de remboursement : une fraction, pas un montant. */
|
|
96
|
+
const RATE_TYPES = [14, 21];
|
|
97
|
+
/** Mouvements de prix qui comptent (les autres statuts sont des reconductions). */
|
|
98
|
+
const VALID_STATUSES = ["Y", "NEW", "INIT", "FP"];
|
|
99
|
+
const typeName = (id: number) => {
|
|
100
|
+
const type = PRICE_TYPES[id];
|
|
101
|
+
return type ? (en.value ? type.en : type.fr) : String(id);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const date = (value: unknown) => {
|
|
105
|
+
const parsed = new Date(String(value ?? ""));
|
|
106
|
+
return Number.isNaN(parsed.getTime())
|
|
107
|
+
? "-"
|
|
108
|
+
: parsed.toLocaleDateString(en.value ? "en-GB" : "fr-FR", { day: "numeric", month: "short", year: "numeric" });
|
|
109
|
+
};
|
|
110
|
+
const euro = (value: unknown, type?: number) => {
|
|
111
|
+
const n = Number(value);
|
|
112
|
+
if (type != null && RATE_TYPES.includes(type) && Number.isFinite(n))
|
|
113
|
+
return `${(n <= 1 ? n * 100 : n).toLocaleString(en.value ? "en-GB" : "fr-FR", { maximumFractionDigits: 1 })} %`;
|
|
114
|
+
return Number.isFinite(n)
|
|
115
|
+
? `${n.toLocaleString(en.value ? "en-GB" : "fr-FR", { minimumFractionDigits: 2, maximumFractionDigits: 2 })} €`
|
|
116
|
+
: "-";
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/** L'historique du plus recent au plus ancien (l'index ne le garantit pas pour un meme jour). */
|
|
120
|
+
const entries = computed(() =>
|
|
121
|
+
[...(doc.value?.price_history ?? [])].filter((entry: any) => VALID_STATUSES.includes(entry?.status_changed)).sort(
|
|
122
|
+
(a: any, b: any) => new Date(b.application_date ?? 0).getTime() - new Date(a.application_date ?? 0).getTime(),
|
|
123
|
+
),
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
const current = computed(() => {
|
|
127
|
+
const seen = new Set<number>();
|
|
128
|
+
const out: { type: string; value: string; date: string }[] = [];
|
|
129
|
+
for (const entry of entries.value) {
|
|
130
|
+
const id = Number(entry.price_type_id);
|
|
131
|
+
if (seen.has(id) || !Number.isFinite(Number(entry.new_price))) continue;
|
|
132
|
+
seen.add(id);
|
|
133
|
+
out.push({ type: typeName(id), value: euro(entry.new_price, id), date: date(entry.application_date) });
|
|
134
|
+
}
|
|
135
|
+
return out;
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
const historyColumns = computed(() => [
|
|
139
|
+
{ key: "date", label: en.value ? "Application date" : "Date d'application" },
|
|
140
|
+
{ key: "type", label: en.value ? "Price type" : "Type de prix" },
|
|
141
|
+
{ key: "price", label: en.value ? "Price" : "Prix", numeric: true },
|
|
142
|
+
{ key: "before", label: en.value ? "Previous price" : "Prix précédent", numeric: true },
|
|
143
|
+
]);
|
|
144
|
+
|
|
145
|
+
const history = computed(() =>
|
|
146
|
+
entries.value.map((entry: any) => ({
|
|
147
|
+
date: date(entry.application_date),
|
|
148
|
+
type: typeName(Number(entry.price_type_id)),
|
|
149
|
+
price: euro(entry.new_price, Number(entry.price_type_id)),
|
|
150
|
+
before:
|
|
151
|
+
entry.last_price != null && Number(entry.last_price) !== Number(entry.new_price)
|
|
152
|
+
? euro(entry.last_price, Number(entry.price_type_id))
|
|
153
|
+
: "-",
|
|
154
|
+
})),
|
|
155
|
+
);
|
|
156
|
+
|
|
157
|
+
const rows = computed(() => {
|
|
158
|
+
const d = doc.value ?? {};
|
|
159
|
+
return [
|
|
160
|
+
{ label: en.value ? "Molecule" : "Molécule", value: d.molecule_local || d.molecule_en },
|
|
161
|
+
{ label: en.value ? "Company" : "Laboratoire", value: d.manufacturer_regroup || d.manufacturer },
|
|
162
|
+
{ label: "ATC4", value: d.atc4 },
|
|
163
|
+
{ label: en.value ? "Unit" : "Unité", value: d.unit },
|
|
164
|
+
].filter((row) => row.value);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
async function read() {
|
|
168
|
+
loading.value = true;
|
|
169
|
+
const hit = await oipEsGet<any>("drugs", SPAIN_INDEX.prices, props.id).catch(() => null);
|
|
170
|
+
doc.value = hit?._source ?? null;
|
|
171
|
+
loading.value = false;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
watch(() => props.id, read, { immediate: true });
|
|
175
|
+
</script>
|
|
176
|
+
|
|
177
|
+
<style scoped>
|
|
178
|
+
.oip-spain__body {
|
|
179
|
+
display: flex;
|
|
180
|
+
flex-direction: column;
|
|
181
|
+
gap: var(--space-16);
|
|
182
|
+
padding: var(--space-20) var(--space-32) var(--space-32);
|
|
183
|
+
}
|
|
184
|
+
.oip-spain__title {
|
|
185
|
+
margin-right: var(--space-12);
|
|
186
|
+
}
|
|
187
|
+
.oip-spain__tags {
|
|
188
|
+
display: flex;
|
|
189
|
+
flex-wrap: wrap;
|
|
190
|
+
gap: var(--space-6);
|
|
191
|
+
}
|
|
192
|
+
.oip-spain__card-title {
|
|
193
|
+
margin: 0 0 var(--space-12);
|
|
194
|
+
font-size: var(--font-16);
|
|
195
|
+
font-weight: var(--weight-bold);
|
|
196
|
+
}
|
|
197
|
+
.oip-spain__prices {
|
|
198
|
+
display: flex;
|
|
199
|
+
flex-wrap: wrap;
|
|
200
|
+
gap: var(--space-12) var(--space-32);
|
|
201
|
+
}
|
|
202
|
+
.oip-spain__price {
|
|
203
|
+
display: flex;
|
|
204
|
+
flex-direction: column;
|
|
205
|
+
gap: 2px;
|
|
206
|
+
}
|
|
207
|
+
.oip-spain__price-type,
|
|
208
|
+
.oip-spain__price-date {
|
|
209
|
+
color: var(--text-muted);
|
|
210
|
+
font-size: var(--font-12);
|
|
211
|
+
}
|
|
212
|
+
.oip-spain__price-value {
|
|
213
|
+
font-size: var(--font-22);
|
|
214
|
+
font-weight: var(--weight-bold);
|
|
215
|
+
font-variant-numeric: tabular-nums;
|
|
216
|
+
}
|
|
217
|
+
.oip-spain__rows {
|
|
218
|
+
display: grid;
|
|
219
|
+
grid-template-columns: minmax(140px, max-content) 1fr;
|
|
220
|
+
gap: var(--space-8) var(--space-20);
|
|
221
|
+
margin: 0;
|
|
222
|
+
font-size: var(--font-14);
|
|
223
|
+
}
|
|
224
|
+
.oip-spain__rows--spaced {
|
|
225
|
+
margin-top: var(--space-20);
|
|
226
|
+
}
|
|
227
|
+
.oip-spain__rows dt {
|
|
228
|
+
padding-top: 2px;
|
|
229
|
+
color: var(--text-muted);
|
|
230
|
+
font-size: var(--font-12);
|
|
231
|
+
font-weight: var(--weight-semibold);
|
|
232
|
+
text-transform: uppercase;
|
|
233
|
+
}
|
|
234
|
+
.oip-spain__rows dd {
|
|
235
|
+
margin: 0;
|
|
236
|
+
line-height: 1.5;
|
|
237
|
+
}
|
|
238
|
+
.oip-spain__note {
|
|
239
|
+
margin: 0;
|
|
240
|
+
color: var(--text-muted);
|
|
241
|
+
font-size: var(--font-13);
|
|
242
|
+
}
|
|
243
|
+
</style>
|
|
@@ -108,6 +108,9 @@ const VIEW_LOADERS: Record<string, () => Promise<any>> = {
|
|
|
108
108
|
"italy-aifa-act": () => import("../components/oip-italy/AifaAct.vue"),
|
|
109
109
|
"italy-price": () => import("../components/oip-italy/ItalyPrice.vue"),
|
|
110
110
|
"italy-reimbursement": () => import("../components/oip-italy/Reimbursement.vue"),
|
|
111
|
+
"spain-aemps-report": () => import("../components/oip-spain/AempsReport.vue"),
|
|
112
|
+
"spain-price": () => import("../components/oip-spain/SpainPrice.vue"),
|
|
113
|
+
"spain-reimbursement": () => import("../components/oip-spain/Reimbursement.vue"),
|
|
111
114
|
"australia-pbac": () => import("../components/oip-australia/PbacOpinion.vue"),
|
|
112
115
|
"australia-price": () => import("../components/oip-australia/AustraliaPrice.vue"),
|
|
113
116
|
"australia-item": () => import("../components/oip-australia/PbsItem.vue"),
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Les familles que Spain One range dans un projet, decrites pour tout le
|
|
3
|
+
* portail : rapports de positionnement therapeutique de l'AEMPS, prix des
|
|
4
|
+
* presentations espagnoles (Price Tracker) et remboursement Sanidad d'une
|
|
5
|
+
* molecule. Le tiroir d'un projet les montre par leurs vues
|
|
6
|
+
* (components/oip-spain) ; la ligne du projet mene a la page de l'app.
|
|
7
|
+
*
|
|
8
|
+
* Index lus sur le cluster `drugs` (meme domaine que fr_drugs_app ; chaque app
|
|
9
|
+
* y joint sa propre cle, cf. runtimeConfig.oipEs.drugs).
|
|
10
|
+
*
|
|
11
|
+
* Importe aussi par le serveur : pas d'import propre a Vue ou a Nuxt ici.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import type { RmProjectKind } from "@tekkare/romulus/utils/projects";
|
|
15
|
+
|
|
16
|
+
const SPAIN = { fr: "Espagne", en: "Spain" };
|
|
17
|
+
|
|
18
|
+
/** Les index des fiches de Spain One, relus aussi par leurs vues de tiroir. */
|
|
19
|
+
export const SPAIN_INDEX = {
|
|
20
|
+
/** Rapports de l'AEMPS, `_id` = `<date>__v<n>__<titre>-<empreinte>`. */
|
|
21
|
+
aemps: "es__drug_opinion__aemps",
|
|
22
|
+
prices: "ope__ww_price_tracker__tekkare",
|
|
23
|
+
/** Remboursement Sanidad par code ATC et periode, `_id` = `es_<ATC>_<periode>_<type>`. */
|
|
24
|
+
reimbursement: "ope__es_sanidad_drug_reimbursement__tekkare",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const day = (value: unknown) => String(value ?? "").slice(0, 10);
|
|
28
|
+
|
|
29
|
+
/** Le code CN d'une presentation, lu dans son `_id` (es_<CN>_<n>). */
|
|
30
|
+
const cnOf = (id: string) => id.replace(/^es_/, "").replace(/_\d+$/, "");
|
|
31
|
+
|
|
32
|
+
/** Le code ATC d'un document de remboursement, lu dans son `_id`. */
|
|
33
|
+
const atcOf = (id: string) => id.replace(/^es_/, "").split("_")[0] ?? id;
|
|
34
|
+
|
|
35
|
+
export const SPAIN_PROJECT_KINDS: RmProjectKind[] = [
|
|
36
|
+
{
|
|
37
|
+
// Un rapport de l'AEMPS (`_id` = detail_id complet). Une carte marque
|
|
38
|
+
// range son dernier rapport ; la page de la marque les montre tous.
|
|
39
|
+
type: "EsApproval",
|
|
40
|
+
index: SPAIN_INDEX.aemps,
|
|
41
|
+
label: { fr: "Rapports de l'AEMPS", en: "AEMPS reports" },
|
|
42
|
+
section: SPAIN,
|
|
43
|
+
country: "es",
|
|
44
|
+
icon: "Certificate",
|
|
45
|
+
source: ["brand", "molecule", "report_spanish_title", "report_english_title", "report_date", "version"],
|
|
46
|
+
title: (s) =>
|
|
47
|
+
String(s?.brand && s.brand !== "UNKNOWN" ? s.brand : (s?.report_english_title ?? s?.report_spanish_title ?? "")),
|
|
48
|
+
subtitle: (s, lang) =>
|
|
49
|
+
[lang === "en" ? s?.report_english_title : s?.report_spanish_title, day(s?.report_date)].filter(Boolean).join(" · "),
|
|
50
|
+
path: (s) =>
|
|
51
|
+
s?.brand && s.brand !== "UNKNOWN" ? `/approvals/details/brand/${encodeURIComponent(s.brand)}` : "/approvals",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
// Une presentation du Price Tracker (`_id` = es_<CN>_<n>). Une carte marque
|
|
55
|
+
// range ses presentations.
|
|
56
|
+
type: "EsDrugPrice",
|
|
57
|
+
index: SPAIN_INDEX.prices,
|
|
58
|
+
label: { fr: "Prix (Espagne)", en: "Prices (Spain)" },
|
|
59
|
+
section: SPAIN,
|
|
60
|
+
country: "es",
|
|
61
|
+
icon: "Tag",
|
|
62
|
+
source: ["brand", "label_local", "local_drug_id", "manufacturer_regroup", "manufacturer"],
|
|
63
|
+
title: (s) => String(s?.label_local ?? s?.brand ?? ""),
|
|
64
|
+
subtitle: (s) =>
|
|
65
|
+
[s?.brand, s?.local_drug_id ? `CN ${s.local_drug_id}` : "", s?.manufacturer_regroup ?? s?.manufacturer]
|
|
66
|
+
.filter(Boolean)
|
|
67
|
+
.join(" · "),
|
|
68
|
+
path: (s, id) => `/price-tracker/details/${encodeURIComponent(s?.local_drug_id ?? cnOf(id))}?c=es`,
|
|
69
|
+
titleFromId: (id) => `CN ${cnOf(id)}`,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
// Le remboursement d'une molecule (ATC5) ou d'une classe (ATC4). L'index a
|
|
73
|
+
// un document par code et par periode : l'element s'ancre sur le dernier
|
|
74
|
+
// mois au moment de l'ajout (R-01 des projets) et designe le code et tout
|
|
75
|
+
// son historique.
|
|
76
|
+
type: "EsDrugReimbursement",
|
|
77
|
+
index: SPAIN_INDEX.reimbursement,
|
|
78
|
+
label: { fr: "Remboursement (Espagne)", en: "Reimbursement (Spain)" },
|
|
79
|
+
section: SPAIN,
|
|
80
|
+
country: "es",
|
|
81
|
+
icon: "ChartLine",
|
|
82
|
+
source: ["local_code", "local_name", "atc_label_en", "atc_level", "period"],
|
|
83
|
+
title: (s) => String(s?.local_name ?? s?.local_code ?? ""),
|
|
84
|
+
subtitle: (s, lang) =>
|
|
85
|
+
[
|
|
86
|
+
s?.local_code ? `ATC${s?.atc_level ?? ""} ${s.local_code}` : "",
|
|
87
|
+
s?.period ? (lang === "en" ? `last month: ${s.period}` : `dernier mois : ${s.period}`) : "",
|
|
88
|
+
]
|
|
89
|
+
.filter(Boolean)
|
|
90
|
+
.join(" · "),
|
|
91
|
+
path: () => "/drugs",
|
|
92
|
+
titleFromId: (id) => `ATC ${atcOf(id)}`,
|
|
93
|
+
},
|
|
94
|
+
];
|
|
@@ -22,6 +22,7 @@ import { GERMANY_PROJECT_KINDS } from "../oip-germany/kinds";
|
|
|
22
22
|
import { ITALY_PROJECT_KINDS } from "../oip-italy/kinds";
|
|
23
23
|
import { AUSTRALIA_PROJECT_KINDS } from "../oip-australia/kinds";
|
|
24
24
|
import { NEW_ZEALAND_PROJECT_KINDS } from "../oip-new-zealand/kinds";
|
|
25
|
+
import { SPAIN_PROJECT_KINDS } from "../oip-spain/kinds";
|
|
25
26
|
|
|
26
27
|
/** Les apps qui ont des fiches a montrer, et ou les ouvrir. */
|
|
27
28
|
export const OIP_RESOURCE_APPS = {
|
|
@@ -53,6 +54,10 @@ export const OIP_RESOURCE_APPS = {
|
|
|
53
54
|
name: "New Zealand One",
|
|
54
55
|
url: "https://new-zealand-one.app.tekkare.com",
|
|
55
56
|
},
|
|
57
|
+
spain_one_app: {
|
|
58
|
+
name: "Spain One",
|
|
59
|
+
url: "https://spain-one.app.tekkare.com",
|
|
60
|
+
},
|
|
56
61
|
} as const;
|
|
57
62
|
|
|
58
63
|
export type OipResourceApp = keyof typeof OIP_RESOURCE_APPS;
|
|
@@ -240,6 +245,32 @@ function newZealandSpec(kind: RmProjectKind, view: string): OipResourceSpec {
|
|
|
240
245
|
};
|
|
241
246
|
}
|
|
242
247
|
|
|
248
|
+
/**
|
|
249
|
+
* Une fiche de Spain One, lue sur le cluster `drugs` et montree d'un seul
|
|
250
|
+
* tenant (components/oip-spain) ; la ligne du projet mene a la page de l'app
|
|
251
|
+
* qui la montre.
|
|
252
|
+
*/
|
|
253
|
+
function spainSpec(kind: RmProjectKind, view: string): OipResourceSpec {
|
|
254
|
+
return {
|
|
255
|
+
type: kind.type,
|
|
256
|
+
app: "spain_one_app",
|
|
257
|
+
cluster: "drugs",
|
|
258
|
+
kind,
|
|
259
|
+
routeId: (id) => id,
|
|
260
|
+
base: () => "",
|
|
261
|
+
tabs: [],
|
|
262
|
+
view,
|
|
263
|
+
detailPath: (id, _tab, doc) => kind.path?.(doc ?? {}, id) ?? "",
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/** La fiche de chaque famille de Spain One (cf. useOipResourceViews). */
|
|
268
|
+
const SPAIN_VIEWS: Record<string, string> = {
|
|
269
|
+
EsApproval: "spain-aemps-report",
|
|
270
|
+
EsDrugPrice: "spain-price",
|
|
271
|
+
EsDrugReimbursement: "spain-reimbursement",
|
|
272
|
+
};
|
|
273
|
+
|
|
243
274
|
/** La fiche de chaque famille de New Zealand One (cf. useOipResourceViews). */
|
|
244
275
|
const NEW_ZEALAND_VIEWS: Record<string, string> = {
|
|
245
276
|
NzMedsafeProduct: "new-zealand-medsafe",
|
|
@@ -503,6 +534,7 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
|
|
|
503
534
|
...ITALY_PROJECT_KINDS.map((kind) => italySpec(kind, ITALY_VIEWS[kind.type]!)),
|
|
504
535
|
...AUSTRALIA_PROJECT_KINDS.map((kind) => australiaSpec(kind, AUSTRALIA_VIEWS[kind.type]!)),
|
|
505
536
|
...NEW_ZEALAND_PROJECT_KINDS.map((kind) => newZealandSpec(kind, NEW_ZEALAND_VIEWS[kind.type]!)),
|
|
537
|
+
...SPAIN_PROJECT_KINDS.map((kind) => spainSpec(kind, SPAIN_VIEWS[kind.type]!)),
|
|
506
538
|
];
|
|
507
539
|
|
|
508
540
|
export function oipResourceSpec(type: string): OipResourceSpec | undefined {
|
|
@@ -6,6 +6,7 @@ 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
8
|
import { ITALY_INDEX } from "../../../app/oip-italy/kinds";
|
|
9
|
+
import { SPAIN_INDEX } from "../../../app/oip-spain/kinds";
|
|
9
10
|
import { AUSTRALIA_INDEX } from "../../../app/oip-australia/kinds";
|
|
10
11
|
import { NEW_ZEALAND_INDEX } from "../../../app/oip-new-zealand/kinds";
|
|
11
12
|
|
|
@@ -57,6 +58,13 @@ const AUSTRALIA_INDEXES = new Set<string>([AUSTRALIA_INDEX.pbac, AUSTRALIA_INDEX
|
|
|
57
58
|
*/
|
|
58
59
|
const NEW_ZEALAND_INDEXES = new Set<string>([NEW_ZEALAND_INDEX.medsafe, NEW_ZEALAND_INDEX.retail]);
|
|
59
60
|
|
|
61
|
+
/**
|
|
62
|
+
* Index de Spain One hors du catalogue de fr_drugs_app (rapports de l'AEMPS,
|
|
63
|
+
* remboursement Sanidad) : par leur nom, avec la cle principale. Les prix
|
|
64
|
+
* passent par le Price Tracker, deja au catalogue.
|
|
65
|
+
*/
|
|
66
|
+
const SPAIN_INDEXES = new Set<string>([SPAIN_INDEX.aemps, SPAIN_INDEX.reimbursement]);
|
|
67
|
+
|
|
60
68
|
const DRUG_IDS = new Set<string>(Object.values(ES_INDEX) as string[]);
|
|
61
69
|
const ASSOCIATION_IDS = new Set<string>(
|
|
62
70
|
Object.entries(ES_INDEX)
|
|
@@ -75,7 +83,7 @@ const APPROVAL_IDS = new Set<string>(
|
|
|
75
83
|
* Vide si l'index n'est pas au catalogue.
|
|
76
84
|
*/
|
|
77
85
|
async function drugsKeyOf(ref: string): Promise<string> {
|
|
78
|
-
if (DRUG_IDS.has(ref) || GERMANY_INDEXES.has(ref) || ITALY_INDEXES.has(ref) || AUSTRALIA_INDEXES.has(ref) || NEW_ZEALAND_INDEXES.has(ref)) return ref;
|
|
86
|
+
if (DRUG_IDS.has(ref) || GERMANY_INDEXES.has(ref) || ITALY_INDEXES.has(ref) || AUSTRALIA_INDEXES.has(ref) || NEW_ZEALAND_INDEXES.has(ref) || SPAIN_INDEXES.has(ref)) return ref;
|
|
79
87
|
const id = (await findOipEsIndex(ref).catch(() => undefined))?.id;
|
|
80
88
|
return id && DRUG_IDS.has(id) ? id : "";
|
|
81
89
|
}
|