@tekkare/romulus 0.1.289 → 0.1.291

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.
@@ -20,6 +20,7 @@ import { OIP_PATIENT_INDEXES } from "../oip-patients/indexes";
20
20
  import { PATIENT_KIND, VACCINE_KIND } from "../oip-patients/kinds";
21
21
  import { GERMANY_PROJECT_KINDS } from "../oip-germany/kinds";
22
22
  import { ITALY_PROJECT_KINDS } from "../oip-italy/kinds";
23
+ import { AUSTRALIA_PROJECT_KINDS } from "../oip-australia/kinds";
23
24
 
24
25
  /** Les apps qui ont des fiches a montrer, et ou les ouvrir. */
25
26
  export const OIP_RESOURCE_APPS = {
@@ -43,6 +44,10 @@ export const OIP_RESOURCE_APPS = {
43
44
  name: "Italy One",
44
45
  url: "https://italy-one.app.tekkare.com",
45
46
  },
47
+ australia_one_app: {
48
+ name: "Australia One",
49
+ url: "https://australia-one.app.tekkare.com",
50
+ },
46
51
  } as const;
47
52
 
48
53
  export type OipResourceApp = keyof typeof OIP_RESOURCE_APPS;
@@ -197,6 +202,28 @@ function italySpec(kind: RmProjectKind, view: string): OipResourceSpec {
197
202
  };
198
203
  }
199
204
 
205
+ function australiaSpec(kind: RmProjectKind, view: string): OipResourceSpec {
206
+ return {
207
+ type: kind.type,
208
+ app: "australia_one_app",
209
+ cluster: "drugs",
210
+ kind,
211
+ routeId: (id) => id,
212
+ base: () => "",
213
+ tabs: [],
214
+ view,
215
+ detailPath: (id, _tab, doc) => kind.path?.(doc ?? {}, id) ?? "",
216
+ };
217
+ }
218
+
219
+ /** La fiche de chaque famille d'Australia One (cf. useOipResourceViews). */
220
+ const AUSTRALIA_VIEWS: Record<string, string> = {
221
+ AuPbacOpinion: "australia-pbac",
222
+ AuPbsPrice: "australia-price",
223
+ AuPbsItem: "australia-item",
224
+ AuDrugReimbursement: "australia-reimbursement",
225
+ };
226
+
200
227
  /** La fiche de chaque famille d'Italy One (cf. useOipResourceViews). */
201
228
  const ITALY_VIEWS: Record<string, string> = {
202
229
  ItApproval: "italy-aifa-act",
@@ -443,6 +470,7 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
443
470
  patientsSpec(VACCINE_KIND, "patients-vaccine"),
444
471
  ...GERMANY_PROJECT_KINDS.map((kind) => germanySpec(kind, GERMANY_VIEWS[kind.type]!)),
445
472
  ...ITALY_PROJECT_KINDS.map((kind) => italySpec(kind, ITALY_VIEWS[kind.type]!)),
473
+ ...AUSTRALIA_PROJECT_KINDS.map((kind) => australiaSpec(kind, AUSTRALIA_VIEWS[kind.type]!)),
446
474
  ];
447
475
 
448
476
  export function oipResourceSpec(type: string): OipResourceSpec | undefined {
@@ -44,6 +44,7 @@ export default defineNuxtConfig({
44
44
  fileURLToPath(new URL("./app/oip-science/science.css", import.meta.url)),
45
45
  fileURLToPath(new URL("./app/oip-drugs/drugs.css", import.meta.url)),
46
46
  fileURLToPath(new URL("./app/oip-patients/patients.css", import.meta.url)),
47
+ fileURLToPath(new URL("./app/oip-australia/australia.css", import.meta.url)),
47
48
  ],
48
49
  // Reglages serveur propres au layer. Les cles Directus (directus*Url,
49
50
  // directus*Token) restent declarees par l'app, qui les avait deja.
@@ -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 { AUSTRALIA_INDEX } from "../../../app/oip-australia/kinds";
9
10
 
10
11
  /**
11
12
  * POST /api/oip/es?cluster=&index=, servi par le layer OIP.
@@ -41,6 +42,13 @@ const GERMANY_INDEXES = new Set<string>(Object.values(GERMANY_INDEX));
41
42
  */
42
43
  const ITALY_INDEXES = new Set<string>([ITALY_INDEX.directory, ITALY_INDEX.reimbursement]);
43
44
 
45
+ /**
46
+ * Index d'Australia One hors du catalogue de fr_drugs_app (avis du PBAC,
47
+ * dictionnaire et remboursement des codes items PBS) : par leur nom, avec la
48
+ * cle principale.
49
+ */
50
+ const AUSTRALIA_INDEXES = new Set<string>([AUSTRALIA_INDEX.pbac, AUSTRALIA_INDEX.items, AUSTRALIA_INDEX.reimbursement]);
51
+
44
52
  const DRUG_IDS = new Set<string>(Object.values(ES_INDEX) as string[]);
45
53
  const ASSOCIATION_IDS = new Set<string>(
46
54
  Object.entries(ES_INDEX)
@@ -59,7 +67,7 @@ const APPROVAL_IDS = new Set<string>(
59
67
  * Vide si l'index n'est pas au catalogue.
60
68
  */
61
69
  async function drugsKeyOf(ref: string): Promise<string> {
62
- if (DRUG_IDS.has(ref) || GERMANY_INDEXES.has(ref) || ITALY_INDEXES.has(ref)) return ref;
70
+ if (DRUG_IDS.has(ref) || GERMANY_INDEXES.has(ref) || ITALY_INDEXES.has(ref) || AUSTRALIA_INDEXES.has(ref)) return ref;
63
71
  const id = (await findOipEsIndex(ref).catch(() => undefined))?.id;
64
72
  return id && DRUG_IDS.has(id) ? id : "";
65
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.289",
3
+ "version": "0.1.291",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",