@tekkare/romulus 0.1.269 → 0.1.270

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.268",
7
+ "version": "0.1.269",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -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
+ ];
@@ -18,6 +18,7 @@ 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";
21
22
 
22
23
  /** Les apps qui ont des fiches a montrer, et ou les ouvrir. */
23
24
  export const OIP_RESOURCE_APPS = {
@@ -33,6 +34,10 @@ export const OIP_RESOURCE_APPS = {
33
34
  name: "OIP Case Atlas",
34
35
  url: "https://global-case-atlas.app.tekkare.com",
35
36
  },
37
+ germany_one_app: {
38
+ name: "Germany One",
39
+ url: "https://germany-one.app.tekkare.com",
40
+ },
36
41
  } as const;
37
42
 
38
43
  export type OipResourceApp = keyof typeof OIP_RESOURCE_APPS;
@@ -149,6 +154,23 @@ function patientsSpec(kind: RmProjectKind, view: string): OipResourceSpec {
149
154
  };
150
155
  }
151
156
 
157
+ /**
158
+ * Une fiche de Germany One, lue sur le cluster `drugs`. Sans vue ni onglets :
159
+ * la ligne du projet mene a la page de l'app qui la montre.
160
+ */
161
+ function germanySpec(kind: RmProjectKind): OipResourceSpec {
162
+ return {
163
+ type: kind.type,
164
+ app: "germany_one_app",
165
+ cluster: "drugs",
166
+ kind,
167
+ routeId: (id) => id,
168
+ base: () => "",
169
+ tabs: [],
170
+ detailPath: (id, _tab, doc) => kind.path?.(doc ?? {}, id) ?? "",
171
+ };
172
+ }
173
+
152
174
  /** La vue de chaque famille de fr_drugs_app (cf. useOipResourceViews). */
153
175
  const DRUG_VIEWS: Record<string, string> = {
154
176
  FrHasBrand: "drugs-brand",
@@ -379,6 +401,7 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
379
401
  ...DRUG_PROJECT_KINDS.map((kind) => drugsSpec(kind, DRUG_VIEWS[kind.type]!)),
380
402
  patientsSpec(PATIENT_KIND, "patients-patient"),
381
403
  patientsSpec(VACCINE_KIND, "patients-vaccine"),
404
+ ...GERMANY_PROJECT_KINDS.map(germanySpec),
382
405
  ];
383
406
 
384
407
  export function oipResourceSpec(type: string): OipResourceSpec | undefined {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.269",
3
+ "version": "0.1.270",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",