@tekkare/romulus 0.1.347 → 0.1.349
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/dist/runtime/components/Drawer.vue +10 -3
- package/dist/runtime/components/ProjectCreateDialog.vue +1 -1
- package/dist/runtime/components/ProjectResources.vue +63 -3
- package/dist/runtime/utils/projects.d.ts +9 -0
- package/dist/runtime/utils/projects.js +2 -1
- package/layer/app/components/oip-drugs/fiches/BrandFiche.vue +13 -23
- package/layer/app/components/oip-drugs/heart/results/details/RecordDrawer.vue +92 -3
- package/layer/app/components/oip-science/resources/Phrc.vue +161 -8
- package/layer/app/components/project/Guided.vue +1475 -0
- package/layer/app/components/project/NewButton.vue +21 -17
- package/layer/app/oip-defaults/projects.ts +13 -3
- package/layer/app/oip-drugs/esIndices.ts +5 -0
- package/layer/app/oip-drugs/kinds.ts +12 -0
- package/layer/app/oip-drugs/utils/ansmDocuments.ts +17 -3
- package/layer/app/oip-guided/families.ts +984 -0
- package/layer/app/oip-guided/shared.ts +179 -0
- package/layer/app/oip-guided/subjects.ts +384 -0
- package/layer/app/utils/oipResources.ts +2 -1
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
2
|
Bouton « Nouveau projet », et ses deux facons de creer : un nom suffit
|
|
3
|
-
(`free`, le parent ouvre son formulaire), ou
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
(`free`, le parent ouvre son formulaire), ou la creation guidee cadre le
|
|
4
|
+
projet en quelques etapes : celle du layer (ProjectGuided, quand l'app
|
|
5
|
+
pose `PROJECT_GUIDED_BLOCKS`), sinon celle de l'app (`PROJECT_ASSISTANT`),
|
|
6
|
+
montee ici. Sans l'une ni l'autre, le bouton ouvre directement le
|
|
7
|
+
formulaire.
|
|
6
8
|
|
|
7
9
|
Un panneau accroche au bouton plutot qu'une modale : le choix se fait dans
|
|
8
10
|
la foulee du clic. Le meme bouton sert le panneau Projets du rail et la
|
|
@@ -14,15 +16,15 @@
|
|
|
14
16
|
variant="primary"
|
|
15
17
|
:size="size"
|
|
16
18
|
prefix-icon="Plus"
|
|
17
|
-
:aria-expanded="
|
|
18
|
-
@click="
|
|
19
|
+
:aria-expanded="guided ? choosing : undefined"
|
|
20
|
+
@click="guided ? (choosing = !choosing) : emit('free')"
|
|
19
21
|
>
|
|
20
22
|
{{ label || (en ? "New project" : "Nouveau projet") }}
|
|
21
23
|
</RmButton>
|
|
22
24
|
</span>
|
|
23
25
|
|
|
24
26
|
<RmPopover
|
|
25
|
-
v-if="
|
|
27
|
+
v-if="guided"
|
|
26
28
|
v-model="choosing"
|
|
27
29
|
:anchor="anchor"
|
|
28
30
|
:label="en ? 'New project' : 'Nouveau projet'"
|
|
@@ -39,15 +41,15 @@
|
|
|
39
41
|
</span>
|
|
40
42
|
</span>
|
|
41
43
|
</button>
|
|
42
|
-
<button type="button" class="prj_pnb_choice" @click="
|
|
43
|
-
<RmIcon name="
|
|
44
|
+
<button type="button" class="prj_pnb_choice" @click="startGuided">
|
|
45
|
+
<RmIcon name="ListChecks" :size="18" />
|
|
44
46
|
<span>
|
|
45
|
-
<span class="prj_pnb_title">{{ en ? "
|
|
47
|
+
<span class="prj_pnb_title">{{ en ? "Guided creation" : "Création guidée" }}</span>
|
|
46
48
|
<span class="prj_pnb_desc">
|
|
47
49
|
{{
|
|
48
50
|
en
|
|
49
|
-
? "
|
|
50
|
-
: "
|
|
51
|
+
? "A few steps to frame the project and fill it."
|
|
52
|
+
: "Quelques étapes pour cadrer le projet et le remplir."
|
|
51
53
|
}}
|
|
52
54
|
</span>
|
|
53
55
|
</span>
|
|
@@ -55,11 +57,12 @@
|
|
|
55
57
|
</div>
|
|
56
58
|
</RmPopover>
|
|
57
59
|
|
|
58
|
-
<component :is="
|
|
60
|
+
<component :is="guided" v-if="guided" v-model="guiding" />
|
|
59
61
|
</template>
|
|
60
62
|
|
|
61
63
|
<script setup lang="ts">
|
|
62
|
-
import { PROJECT_ASSISTANT } from "#oip-projects";
|
|
64
|
+
import { PROJECT_ASSISTANT, PROJECT_GUIDED_BLOCKS } from "#oip-projects";
|
|
65
|
+
import { defineAsyncComponent } from "vue";
|
|
63
66
|
|
|
64
67
|
withDefaults(
|
|
65
68
|
defineProps<{
|
|
@@ -77,19 +80,20 @@ const emit = defineEmits<{ free: [] }>();
|
|
|
77
80
|
const { locale } = useI18n();
|
|
78
81
|
const en = computed(() => locale.value === "en");
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
/** La creation guidee du layer quand l'app la demande, sinon celle de l'app. */
|
|
84
|
+
const guided = PROJECT_GUIDED_BLOCKS?.length ? defineAsyncComponent(() => import("./Guided.vue")) : PROJECT_ASSISTANT;
|
|
81
85
|
const anchor = ref<HTMLElement | null>(null);
|
|
82
86
|
const choosing = ref(false);
|
|
83
|
-
const
|
|
87
|
+
const guiding = ref(false);
|
|
84
88
|
|
|
85
89
|
function startFree() {
|
|
86
90
|
choosing.value = false;
|
|
87
91
|
emit("free");
|
|
88
92
|
}
|
|
89
93
|
|
|
90
|
-
function
|
|
94
|
+
function startGuided() {
|
|
91
95
|
choosing.value = false;
|
|
92
|
-
|
|
96
|
+
guiding.value = true;
|
|
93
97
|
}
|
|
94
98
|
</script>
|
|
95
99
|
|
|
@@ -19,6 +19,7 @@ import type { RmExportSheet } from "@tekkare/romulus/utils/export";
|
|
|
19
19
|
import type { RmDashboardModel, RmDashboardWidget, RmWidgetContext, RmWidgetKind } from "@tekkare/romulus/utils/dashboard";
|
|
20
20
|
import { rmAddableWidgets, rmNewWidgetId } from "@tekkare/romulus/utils/dashboard";
|
|
21
21
|
import type { ProjectInboxItem, ProjectSuggestion } from "../types/projects";
|
|
22
|
+
import type { GuidedBlockKey } from "../oip-guided/families";
|
|
22
23
|
|
|
23
24
|
type Lang = "fr" | "en";
|
|
24
25
|
type Text = { fr: string; en: string };
|
|
@@ -59,9 +60,18 @@ export function useProjectsAccess(): Ref<boolean> | ComputedRef<boolean> {
|
|
|
59
60
|
export const PROJECTS_UPSELL: Component | null = null;
|
|
60
61
|
|
|
61
62
|
/**
|
|
62
|
-
* La creation
|
|
63
|
-
* creation libre
|
|
64
|
-
*
|
|
63
|
+
* La creation guidee du layer (components/project/Guided.vue), proposee a
|
|
64
|
+
* cote de la creation libre : les blocs de sources qu'elle offre, dans
|
|
65
|
+
* l'ordre du layer (« drugs », « regulatory », « science »). `null` : pas de
|
|
66
|
+
* creation guidee du layer.
|
|
67
|
+
*/
|
|
68
|
+
export const PROJECT_GUIDED_BLOCKS: GuidedBlockKey[] | null = null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Une creation guidee propre a l'app (v-model d'ouverture), pour les apps
|
|
72
|
+
* qui ne sont pas encore passees a celle du layer (`PROJECT_GUIDED_BLOCKS`,
|
|
73
|
+
* qui l'emporte). Absentes toutes deux : « Nouveau projet » ouvre
|
|
74
|
+
* directement le formulaire du nom.
|
|
65
75
|
*/
|
|
66
76
|
export const PROJECT_ASSISTANT: Component | null = null;
|
|
67
77
|
|
|
@@ -29,6 +29,11 @@ export const ES_INDEX = {
|
|
|
29
29
|
// maladie de l'assistant de creation de projet.
|
|
30
30
|
ONCOLOGY_DICTIONARY: "8b505318-be8a-4a2a-8296-0b9b4fe53717", // ope__ww__oncology_dictionary__tekkare
|
|
31
31
|
|
|
32
|
+
// Hospitalisations par diagnostic, tous pays : ses codes CIM-10 portent
|
|
33
|
+
// leurs libelles FR et EN (`diagnosis_label_fr`, `diagnosis_label`). Sert
|
|
34
|
+
// de dictionnaire CIM-10 aux sujets de la creation guidee de projet.
|
|
35
|
+
WW_HOSPITALIZATION_DIAGNOSIS: "225ddd22-0a5f-4b05-a4d3-2586a53fbba6", // ope_ww_hospitalization_diagnosis_tekkare_staging
|
|
36
|
+
|
|
32
37
|
// Ville, Medic'AM (mensuel et glissant)
|
|
33
38
|
RETAIL_MONTHLY_ATC1: "f541e8cc-6344-4b6c-8c3e-1b0b91c52539", // ope_block402_fr__drugs__retail_monthly__atc1__medicam
|
|
34
39
|
RETAIL_MONTHLY_ATC2: "29a84ea8-4cb8-464b-bd5e-32c918f27101", // ope_block402_fr__drugs__retail_monthly__atc2__medicam
|
|
@@ -82,6 +82,8 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
82
82
|
country: "fr",
|
|
83
83
|
icon: "ListChecks",
|
|
84
84
|
source: ["brand", "indication", "indication_fr", "indication_en", "indication_label_fr", "french_label", "card_id"],
|
|
85
|
+
// Une ligne par presentation, repliees sous leur marque dans la liste du projet (comme fr_drugs_app les montre).
|
|
86
|
+
bundle: (s) => String(s?.brand ?? "").trim(),
|
|
85
87
|
title: (s, l) => loc(s, "indication", l) || s?.indication_label_fr || s?.french_label || "",
|
|
86
88
|
subtitle: (s) => list(s?.brand),
|
|
87
89
|
path: (s) => {
|
|
@@ -97,6 +99,8 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
97
99
|
country: "fr",
|
|
98
100
|
icon: "ClipboardText",
|
|
99
101
|
source: ["brand", "dci", "aap_type_fr", "aap_type_en", "authorization_date"],
|
|
102
|
+
// Une ligne par presentation, repliees sous leur marque dans la liste du projet (comme fr_drugs_app les montre).
|
|
103
|
+
bundle: (s) => String(s?.brand ?? "").trim(),
|
|
100
104
|
title: (s) => list(s?.brand),
|
|
101
105
|
subtitle: (s, l) => loc(s, "aap_type", l),
|
|
102
106
|
path: (_s, id) => `/hubr/heart/put/${id}`,
|
|
@@ -109,6 +113,8 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
109
113
|
country: "fr",
|
|
110
114
|
icon: "FirstAid",
|
|
111
115
|
source: ["brand", "cis_label", "cis_code", "atc5_french_code_label", "atc5_english_code_label", "owner_regroup"],
|
|
116
|
+
// Une ligne par presentation, repliees sous leur marque dans la liste du projet (comme fr_drugs_app les montre).
|
|
117
|
+
bundle: (s) => String(s?.brand ?? "").trim(),
|
|
112
118
|
title: (s) => s?.cis_label ?? s?.brand ?? "",
|
|
113
119
|
subtitle: (s, l) =>
|
|
114
120
|
[l === "en" ? s?.atc5_english_code_label : s?.atc5_french_code_label, s?.owner_regroup].filter(Boolean).join(" · "),
|
|
@@ -134,6 +140,8 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
134
140
|
country: "fr",
|
|
135
141
|
icon: "CurrencyEur",
|
|
136
142
|
source: ["brand", "label", "local_drug_id", "last_price_update"],
|
|
143
|
+
// Une ligne par presentation, repliees sous leur marque dans la liste du projet (comme fr_drugs_app les montre).
|
|
144
|
+
bundle: (s) => String(s?.brand ?? "").trim(),
|
|
137
145
|
title: (s) => s?.label ?? s?.brand ?? "",
|
|
138
146
|
subtitle: (s, l) => (s?.last_price_update ? `${l === "en" ? "Latest price" : "Dernier prix"} : ${s.last_price_update}` : ""),
|
|
139
147
|
path: (s) => (s?.local_drug_id ? `/hubr/heart/prices/details/${s.local_drug_id}` : ""),
|
|
@@ -146,6 +154,8 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
146
154
|
country: "fr",
|
|
147
155
|
icon: "Newspaper",
|
|
148
156
|
source: ["brand", "label", "local_drug_id", "jo", "update_date"],
|
|
157
|
+
// Une ligne par presentation, repliees sous leur marque dans la liste du projet (comme fr_drugs_app les montre).
|
|
158
|
+
bundle: (s) => String(s?.brand ?? "").trim(),
|
|
149
159
|
title: (s) => s?.label ?? s?.brand ?? "",
|
|
150
160
|
subtitle: (s, l) => joSubtitle(s?.jo, l),
|
|
151
161
|
path: (s) => (s?.local_drug_id ? `/hubr/heart/prices/jo/${s.local_drug_id}` : ""),
|
|
@@ -158,6 +168,8 @@ export const DRUG_PROJECT_KINDS: RmProjectKind[] = [
|
|
|
158
168
|
country: "fr",
|
|
159
169
|
icon: "Pill",
|
|
160
170
|
source: ["brand", "cis_label", "cis_code", "amm_status", "owner_regroup"],
|
|
171
|
+
// Une ligne par presentation, repliees sous leur marque dans la liste du projet (comme fr_drugs_app les montre).
|
|
172
|
+
bundle: (s) => String(s?.brand ?? "").trim(),
|
|
161
173
|
title: (s) => s?.cis_label ?? s?.brand ?? "",
|
|
162
174
|
subtitle: (s) => s?.owner_regroup ?? "",
|
|
163
175
|
path: (_s, id) => `/hubr/heart/ansm/details/${id}`,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* L'index ne donne que des adresses. Les PDF de l'ANSM portent un nom de
|
|
6
6
|
* fichier parlant (`20230809-aap-epcoritamab-avis-ansm.pdf`) : on en tire la
|
|
7
|
-
* date et le libelle. Les autres liens (
|
|
8
|
-
*
|
|
7
|
+
* date et le libelle. Les autres liens (fiche HAS, base publique, FDA...)
|
|
8
|
+
* prennent le nom de leur site ; les liens generiques sont ecartes. Un PDF d'un hote que sert
|
|
9
9
|
* `/api/oip/pdf` s'ouvre dans la visionneuse, le reste dans un onglet.
|
|
10
10
|
*/
|
|
11
11
|
|
|
@@ -21,7 +21,6 @@ export type AnsmDocument = {
|
|
|
21
21
|
const PREVIEW_HOSTS = new Set(["ansm.sante.fr", "has-sante.fr", "www.has-sante.fr"]);
|
|
22
22
|
|
|
23
23
|
const SITE_NAMES: Record<string, { fr: string; en: string }> = {
|
|
24
|
-
"icsaturne.ansm.sante.fr": { fr: "Portail e-Saturne (demande d'accès)", en: "e-Saturne portal (access request)" },
|
|
25
24
|
"ansm.sante.fr": { fr: "ANSM", en: "ANSM" },
|
|
26
25
|
"www.has-sante.fr": { fr: "HAS", en: "HAS" },
|
|
27
26
|
"has-sante.fr": { fr: "HAS", en: "HAS" },
|
|
@@ -56,6 +55,20 @@ const PHRASES: [RegExp, string][] = [
|
|
|
56
55
|
[/\bno (\d+)\b/g, "n°$1"],
|
|
57
56
|
];
|
|
58
57
|
|
|
58
|
+
/**
|
|
59
|
+
* Liens generiques que l'ANSM colle sous presque chaque fiche, sans rien sur le
|
|
60
|
+
* produit : le portail e-Saturne de demande d'acces (262 lignes sur 904 au
|
|
61
|
+
* 13/11/2026), le formulaire de declaration d'effets indesirables (264), les
|
|
62
|
+
* pages d'accueil de la base publique du medicament. Ecartes de la liste.
|
|
63
|
+
*/
|
|
64
|
+
function isGenericLink(url: URL): boolean {
|
|
65
|
+
const path = url.pathname.replace(/\/+$/, "");
|
|
66
|
+
if (url.hostname === "icsaturne.ansm.sante.fr") return true;
|
|
67
|
+
if (url.hostname === "ansm.sante.fr" && path === "/page/formulaire-si") return true;
|
|
68
|
+
if (url.hostname === "base-donnees-publique.medicaments.gouv.fr" && (path === "" || path === "/index.php")) return true;
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
|
|
59
72
|
/** Fichiers bureautiques : nommes comme un PDF, ouverts dans un onglet. */
|
|
60
73
|
const FILE_EXTENSION = /\.(pdf|docx?|xlsx?|pptx?)$/i;
|
|
61
74
|
|
|
@@ -91,6 +104,7 @@ export function ansmDocumentsOf(urls: string[] | null | undefined, locale: strin
|
|
|
91
104
|
continue;
|
|
92
105
|
}
|
|
93
106
|
if (url.protocol !== "https:" && url.protocol !== "http:") continue;
|
|
107
|
+
if (isGenericLink(url)) continue;
|
|
94
108
|
if (seen.has(url.href)) continue;
|
|
95
109
|
seen.add(url.href);
|
|
96
110
|
|