@tekkare/romulus 0.1.267 → 0.1.268
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/utils/oipResources.ts +12 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -171,6 +171,17 @@ const DRUG_VIEWS: Record<string, string> = {
|
|
|
171
171
|
const TRIALS = { fr: "Essais cliniques", en: "Clinical trials" };
|
|
172
172
|
const MATCHING = { fr: "Expertises", en: "Expertise" };
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* La specialite principale d'un professionnel : l'annuaire range une liste
|
|
176
|
+
* d'objets (`hcp_specialty_type`, `hcp_specialty_label_regroup`), jamais une
|
|
177
|
+
* chaine. Lue telle quelle, la ligne d'un projet affichait « [object Object] ».
|
|
178
|
+
*/
|
|
179
|
+
function hcpSpecialty(value: unknown): string {
|
|
180
|
+
const specs: any[] = Array.isArray(value) ? value : value ? [value] : [];
|
|
181
|
+
const principal = specs.find((s) => s?.hcp_specialty_type === "PRINCIPAL") ?? specs[0];
|
|
182
|
+
return typeof principal === "string" ? principal : String(principal?.hcp_specialty_label_regroup ?? "");
|
|
183
|
+
}
|
|
184
|
+
|
|
174
185
|
const T = {
|
|
175
186
|
description: tab("study-description", "Description de l'étude", "Study description"),
|
|
176
187
|
investigators: tab("investigators", "Investigateurs", "Investigators"),
|
|
@@ -286,7 +297,7 @@ export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
|
|
|
286
297
|
icon: "UserCircle",
|
|
287
298
|
source: ["hcp_code", "hcp_first_name", "hcp_family_name", "specialty", "address"],
|
|
288
299
|
title: (s) => `${s.hcp_first_name || ""} ${s.hcp_family_name || ""}`.trim() || String(s.hcp_code),
|
|
289
|
-
subtitle: (s) => [s.specialty, s.address?.[0]?.hcp_city].filter(Boolean).join(" · "),
|
|
300
|
+
subtitle: (s) => [hcpSpecialty(s.specialty), s.address?.[0]?.hcp_city].filter(Boolean).join(" · "),
|
|
290
301
|
path: (s) => `/hcps/${s.hcp_code}/informations`,
|
|
291
302
|
},
|
|
292
303
|
// L'_id de l'annuaire est `10_<RPPS>` ; la page de la fiche, le RPPS seul.
|