@tekkare/romulus 0.1.269 → 0.1.271
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
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Les familles que Germany One range dans un projet, decrites pour tout le
|
|
3
|
+
* portail : evaluations du benefice du G-BA et molecules du remboursement
|
|
4
|
+
* ambulatoire (GKV). Pas de vue dediee : la ligne du projet mene a la page de
|
|
5
|
+
* l'app, le tiroir montre l'en-tete et le lien vers Germany One.
|
|
6
|
+
*
|
|
7
|
+
* Index lus sur le cluster `drugs` (meme domaine que fr_drugs_app ; chaque app
|
|
8
|
+
* y joint sa propre cle, cf. runtimeConfig.oipEs.drugs).
|
|
9
|
+
*
|
|
10
|
+
* Importe aussi par le serveur : pas d'import propre a Vue ou a Nuxt ici.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { RmProjectKind } from "@tekkare/romulus/utils/projects";
|
|
14
|
+
|
|
15
|
+
const GERMANY = { fr: "Allemagne", en: "Germany" };
|
|
16
|
+
|
|
17
|
+
const list = (value: unknown) => (Array.isArray(value) ? value.filter(Boolean).join(", ") : String(value ?? ""));
|
|
18
|
+
|
|
19
|
+
export const GERMANY_PROJECT_KINDS: RmProjectKind[] = [
|
|
20
|
+
{
|
|
21
|
+
// Une evaluation = un groupe de patients d'une resolution du G-BA
|
|
22
|
+
// (`_id` = benefit_assessment_id). Une carte marque en range plusieurs.
|
|
23
|
+
type: "DeGbaAssessment",
|
|
24
|
+
index: "ope__de_gba_benefit_assessment_drug_approvals__tekkare",
|
|
25
|
+
label: { fr: "Évaluations du G-BA", en: "G-BA assessments" },
|
|
26
|
+
section: GERMANY,
|
|
27
|
+
icon: "Certificate",
|
|
28
|
+
source: ["brand_name", "active_substance", "patient_group_en", "added_benefit_en", "valid_from"],
|
|
29
|
+
title: (s) => list(s?.brand_name),
|
|
30
|
+
subtitle: (s) => [s?.added_benefit_en, s?.patient_group_en].filter(Boolean).join(" · "),
|
|
31
|
+
path: (s) => {
|
|
32
|
+
const brand = list(s?.brand_name);
|
|
33
|
+
return brand ? `/approvals?search=${encodeURIComponent(brand)}` : "/approvals";
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
// Une molecule ATC5 de l'index GKV (`_id` = de_<ATC5>_).
|
|
38
|
+
type: "DeGkvMolecule",
|
|
39
|
+
index: "ope_de_retail_national_tekkare",
|
|
40
|
+
label: { fr: "Molécules (GKV)", en: "Molecules (GKV)" },
|
|
41
|
+
section: GERMANY,
|
|
42
|
+
icon: "Pill",
|
|
43
|
+
source: ["concat_label_code", "atc5_label", "atc5_code"],
|
|
44
|
+
title: (s) => String(s?.concat_label_code ?? ""),
|
|
45
|
+
subtitle: (_s, lang) => (lang === "en" ? "Ambulatory reimbursement, Germany" : "Remboursement ambulatoire, Allemagne"),
|
|
46
|
+
path: (s) => (s?.atc5_code ? `/drugs?codes=${encodeURIComponent(s.atc5_code)}` : "/drugs"),
|
|
47
|
+
titleFromId: (id) => id.replace(/^de_/, "").replace(/_$/, ""),
|
|
48
|
+
},
|
|
49
|
+
];
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
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). Pas de vue dediee : la ligne du
|
|
5
|
+
* projet mene a la page de l'app, le tiroir montre l'en-tete et le lien vers
|
|
6
|
+
* Italy One.
|
|
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 ITALY = { fr: "Italie", en: "Italy" };
|
|
17
|
+
|
|
18
|
+
const day = (value: unknown) => String(value ?? "").slice(0, 10);
|
|
19
|
+
|
|
20
|
+
export const ITALY_PROJECT_KINDS: RmProjectKind[] = [
|
|
21
|
+
{
|
|
22
|
+
// Un acte de l'AIFA (`_id` = opinion_id, ex. TNF_<uuid>). Une carte marque
|
|
23
|
+
// range son dernier acte ; la page de la marque les montre tous.
|
|
24
|
+
type: "ItApproval",
|
|
25
|
+
index: "it__drug_opinion__aifa",
|
|
26
|
+
label: { fr: "Actes de l'AIFA", en: "AIFA acts" },
|
|
27
|
+
section: ITALY,
|
|
28
|
+
icon: "Certificate",
|
|
29
|
+
source: ["brand", "molecule", "nature_of_request", "nature_of_request_en", "decision_date", "has_code"],
|
|
30
|
+
title: (s) => String(s?.brand ?? ""),
|
|
31
|
+
subtitle: (s, lang) =>
|
|
32
|
+
[lang === "en" ? s?.nature_of_request_en || s?.nature_of_request : s?.nature_of_request, day(s?.decision_date)]
|
|
33
|
+
.filter(Boolean)
|
|
34
|
+
.join(" · "),
|
|
35
|
+
path: (s) => (s?.brand ? `/approvals/details/${encodeURIComponent(s.brand)}/` : "/approvals"),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
// Une presentation du Price Tracker (`_id` = it_<AIC>_1). Une carte marque
|
|
39
|
+
// range ses presentations.
|
|
40
|
+
type: "ItDrugPrice",
|
|
41
|
+
index: "ope__ww_price_tracker__tekkare",
|
|
42
|
+
label: { fr: "Prix (Italie)", en: "Prices (Italy)" },
|
|
43
|
+
section: ITALY,
|
|
44
|
+
icon: "Tag",
|
|
45
|
+
source: ["brand", "label_local", "local_drug_id", "manufacturer_regroup", "manufacturer"],
|
|
46
|
+
title: (s) => String(s?.label_local ?? s?.brand ?? ""),
|
|
47
|
+
subtitle: (s) =>
|
|
48
|
+
[s?.brand, s?.local_drug_id ? `AIC ${s.local_drug_id}` : "", s?.manufacturer_regroup ?? s?.manufacturer]
|
|
49
|
+
.filter(Boolean)
|
|
50
|
+
.join(" · "),
|
|
51
|
+
path: (s, id) => {
|
|
52
|
+
const aic = s?.local_drug_id ?? id.replace(/^it_/, "").replace(/_\d+$/, "");
|
|
53
|
+
return `/price-tracker/details/${encodeURIComponent(aic)}?c=it`;
|
|
54
|
+
},
|
|
55
|
+
titleFromId: (id) => `AIC ${id.replace(/^it_/, "").replace(/_\d+$/, "")}`,
|
|
56
|
+
},
|
|
57
|
+
];
|
|
@@ -18,6 +18,8 @@ import scienceIndexConfig from "../oip-science/indexConfig.json";
|
|
|
18
18
|
import { DRUG_PROJECT_KINDS } from "../oip-drugs/kinds";
|
|
19
19
|
import { OIP_PATIENT_INDEXES } from "../oip-patients/indexes";
|
|
20
20
|
import { PATIENT_KIND, VACCINE_KIND } from "../oip-patients/kinds";
|
|
21
|
+
import { GERMANY_PROJECT_KINDS } from "../oip-germany/kinds";
|
|
22
|
+
import { ITALY_PROJECT_KINDS } from "../oip-italy/kinds";
|
|
21
23
|
|
|
22
24
|
/** Les apps qui ont des fiches a montrer, et ou les ouvrir. */
|
|
23
25
|
export const OIP_RESOURCE_APPS = {
|
|
@@ -33,6 +35,14 @@ export const OIP_RESOURCE_APPS = {
|
|
|
33
35
|
name: "OIP Case Atlas",
|
|
34
36
|
url: "https://global-case-atlas.app.tekkare.com",
|
|
35
37
|
},
|
|
38
|
+
germany_one_app: {
|
|
39
|
+
name: "Germany One",
|
|
40
|
+
url: "https://germany-one.app.tekkare.com",
|
|
41
|
+
},
|
|
42
|
+
italy_one_app: {
|
|
43
|
+
name: "Italy One",
|
|
44
|
+
url: "https://italy-one.app.tekkare.com",
|
|
45
|
+
},
|
|
36
46
|
} as const;
|
|
37
47
|
|
|
38
48
|
export type OipResourceApp = keyof typeof OIP_RESOURCE_APPS;
|
|
@@ -149,6 +159,40 @@ function patientsSpec(kind: RmProjectKind, view: string): OipResourceSpec {
|
|
|
149
159
|
};
|
|
150
160
|
}
|
|
151
161
|
|
|
162
|
+
/**
|
|
163
|
+
* Une fiche de Germany One, lue sur le cluster `drugs`. Sans vue ni onglets :
|
|
164
|
+
* la ligne du projet mene a la page de l'app qui la montre.
|
|
165
|
+
*/
|
|
166
|
+
function germanySpec(kind: RmProjectKind): OipResourceSpec {
|
|
167
|
+
return {
|
|
168
|
+
type: kind.type,
|
|
169
|
+
app: "germany_one_app",
|
|
170
|
+
cluster: "drugs",
|
|
171
|
+
kind,
|
|
172
|
+
routeId: (id) => id,
|
|
173
|
+
base: () => "",
|
|
174
|
+
tabs: [],
|
|
175
|
+
detailPath: (id, _tab, doc) => kind.path?.(doc ?? {}, id) ?? "",
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Une fiche d'Italy One, lue sur le cluster `drugs`. Sans vue ni onglets : la
|
|
181
|
+
* ligne du projet mene a la page de l'app qui la montre.
|
|
182
|
+
*/
|
|
183
|
+
function italySpec(kind: RmProjectKind): OipResourceSpec {
|
|
184
|
+
return {
|
|
185
|
+
type: kind.type,
|
|
186
|
+
app: "italy_one_app",
|
|
187
|
+
cluster: "drugs",
|
|
188
|
+
kind,
|
|
189
|
+
routeId: (id) => id,
|
|
190
|
+
base: () => "",
|
|
191
|
+
tabs: [],
|
|
192
|
+
detailPath: (id, _tab, doc) => kind.path?.(doc ?? {}, id) ?? "",
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
|
|
152
196
|
/** La vue de chaque famille de fr_drugs_app (cf. useOipResourceViews). */
|
|
153
197
|
const DRUG_VIEWS: Record<string, string> = {
|
|
154
198
|
FrHasBrand: "drugs-brand",
|
|
@@ -379,6 +423,8 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
|
|
|
379
423
|
...DRUG_PROJECT_KINDS.map((kind) => drugsSpec(kind, DRUG_VIEWS[kind.type]!)),
|
|
380
424
|
patientsSpec(PATIENT_KIND, "patients-patient"),
|
|
381
425
|
patientsSpec(VACCINE_KIND, "patients-vaccine"),
|
|
426
|
+
...GERMANY_PROJECT_KINDS.map(germanySpec),
|
|
427
|
+
...ITALY_PROJECT_KINDS.map(italySpec),
|
|
382
428
|
];
|
|
383
429
|
|
|
384
430
|
export function oipResourceSpec(type: string): OipResourceSpec | undefined {
|