@tekkare/romulus 0.1.251 → 0.1.252
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/app.config.ts +6 -0
- package/layer/app/components/OipPubmedSummary.vue +223 -0
- package/layer/app/components/OipResourceDrawer.vue +331 -0
- package/layer/app/components/OipResourceDrawerLink.vue +40 -0
- package/layer/app/components/OipResourceField.vue +41 -0
- package/layer/app/components/OipResourceGenericCard.vue +54 -0
- package/layer/app/components/OipResourceSource.vue +50 -0
- package/layer/app/components/OipResourceTags.vue +65 -0
- package/layer/app/components/OipResourceView.vue +107 -0
- package/layer/app/components/oip-drugs/fiches/AssociationFiche.vue +775 -0
- package/layer/app/components/oip-drugs/fiches/BrandFiche.vue +1111 -0
- package/layer/app/components/oip-drugs/fiches/IndicationFiche.vue +182 -0
- package/layer/app/components/oip-drugs/fiches/JoFiche.vue +101 -0
- package/layer/app/components/oip-drugs/fiches/PndsFiche.vue +279 -0
- package/layer/app/components/oip-drugs/heart/JoCard.vue +314 -0
- package/layer/app/components/oip-drugs/heart/TextHighlight.vue +326 -0
- package/layer/app/components/oip-drugs/heart/ansm/BrandCard.vue +187 -0
- package/layer/app/components/oip-drugs/heart/ansm/CisDetail.vue +363 -0
- package/layer/app/components/oip-drugs/heart/ansm/CisTable.vue +167 -0
- package/layer/app/components/oip-drugs/heart/associations/NationalAssemblyCard.vue +373 -0
- package/layer/app/components/oip-drugs/heart/associations/NationalAssemblyFiche.vue +372 -0
- package/layer/app/components/oip-drugs/heart/associations/TranscriptionCard.vue +55 -0
- package/layer/app/components/oip-drugs/heart/elastic/SourceContainerElastic.vue +103 -0
- package/layer/app/components/oip-drugs/heart/france/BrandGroupCard.vue +450 -0
- package/layer/app/components/oip-drugs/heart/mitm/Card.vue +199 -0
- package/layer/app/components/oip-drugs/heart/mitm/Source.vue +23 -0
- package/layer/app/components/oip-drugs/heart/mitm/details/Overview.vue +381 -0
- package/layer/app/components/oip-drugs/heart/put/Card.vue +212 -0
- package/layer/app/components/oip-drugs/heart/results/AccesCard.vue +696 -0
- package/layer/app/components/oip-drugs/heart/results/AlertCard.vue +342 -0
- package/layer/app/components/oip-drugs/heart/results/AsmrCursor.vue +229 -0
- package/layer/app/components/oip-drugs/heart/results/EvalCard.vue +370 -0
- package/layer/app/components/oip-drugs/heart/results/IndicCard.vue +743 -0
- package/layer/app/components/oip-drugs/heart/results/MatchExplain.vue +243 -0
- package/layer/app/components/oip-drugs/heart/results/PrefRows.vue +105 -0
- package/layer/app/components/oip-drugs/heart/results/details/HasHistory.vue +487 -0
- package/layer/app/components/oip-drugs/heart/results/details/InternationalCountryCard.vue +461 -0
- package/layer/app/components/oip-drugs/heart/results/details/InternationalOverview.vue +200 -0
- package/layer/app/components/oip-drugs/heart/results/details/InternationalPriceDrawer.vue +647 -0
- package/layer/app/components/oip-drugs/heart/results/details/Monograph.vue +128 -0
- package/layer/app/components/oip-drugs/heart/results/details/OpinionDrawer.vue +535 -0
- package/layer/app/components/oip-drugs/heart/results/details/PresentationDrawer.vue +738 -0
- package/layer/app/components/oip-drugs/heart/results/details/Price.vue +227 -0
- package/layer/app/components/oip-drugs/heart/results/details/PriceOverview.vue +1261 -0
- package/layer/app/components/oip-drugs/heart/results/details/RecordDrawer.vue +494 -0
- package/layer/app/components/oip-drugs/heart/results/details/RecordList.vue +426 -0
- package/layer/app/components/oip-drugs/heart/results/les/Card.vue +340 -0
- package/layer/app/components/oip-drugs/heart/results/les/Drawer.vue +67 -0
- package/layer/app/components/oip-drugs/heart/results/les/IndicationDetail.vue +149 -0
- package/layer/app/components/oip-drugs/heart/results/les/Source.vue +20 -0
- package/layer/app/components/oip-drugs/heart/results/les/SourceTag.vue +39 -0
- package/layer/app/components/oip-drugs/heart/searchPage/DynamicSource.vue +29 -0
- package/layer/app/components/oip-drugs/medicam/market/Chart.vue +121 -0
- package/layer/app/components/oip-drugs/outpatient/ProductEvolution.vue +236 -0
- package/layer/app/components/oip-drugs/resources/Ansm.vue +75 -0
- package/layer/app/components/oip-drugs/resources/Association.vue +30 -0
- package/layer/app/components/oip-drugs/resources/Brand.vue +65 -0
- package/layer/app/components/oip-drugs/resources/Contribution.vue +216 -0
- package/layer/app/components/oip-drugs/resources/Hospital.vue +151 -0
- package/layer/app/components/oip-drugs/resources/Indication.vue +54 -0
- package/layer/app/components/oip-drugs/resources/Jo.vue +57 -0
- package/layer/app/components/oip-drugs/resources/Medicam.vue +140 -0
- package/layer/app/components/oip-drugs/resources/Mitm.vue +84 -0
- package/layer/app/components/oip-drugs/resources/NationalAssembly.vue +93 -0
- package/layer/app/components/oip-drugs/resources/Outpatient.vue +97 -0
- package/layer/app/components/oip-drugs/resources/Pnds.vue +24 -0
- package/layer/app/components/oip-drugs/resources/Price.vue +106 -0
- package/layer/app/components/oip-drugs/resources/Put.vue +143 -0
- package/layer/app/components/oip-science/appel-a-projet/Cards.vue +162 -0
- package/layer/app/components/oip-science/clinical-trials/Cards.vue +382 -0
- package/layer/app/components/oip-science/clinical-trials/CardsGlobal.vue +273 -0
- package/layer/app/components/oip-science/clinical-trials/LinkedList.vue +366 -0
- package/layer/app/components/oip-science/clinical-trials/PairBadge.vue +25 -0
- package/layer/app/components/oip-science/clinical-trials/PairBody.vue +182 -0
- package/layer/app/components/oip-science/clinical-trials/SitesDrawer.vue +95 -0
- package/layer/app/components/oip-science/common/Form.vue +73 -0
- package/layer/app/components/oip-science/common/MatchAvgTag.vue +283 -0
- package/layer/app/components/oip-science/common/NoData.vue +16 -0
- package/layer/app/components/oip-science/common/ScoreBadge.vue +35 -0
- package/layer/app/components/oip-science/common/Source.vue +31 -0
- package/layer/app/components/oip-science/common/TableTags.vue +279 -0
- package/layer/app/components/oip-science/common/Timeline.vue +104 -0
- package/layer/app/components/oip-science/common/ToolTips.vue +89 -0
- package/layer/app/components/oip-science/cross/publicationPubmed.vue +484 -0
- package/layer/app/components/oip-science/crossData/CrossDataLocations.vue +71 -0
- package/layer/app/components/oip-science/ctgov/Investigators.vue +148 -0
- package/layer/app/components/oip-science/ctgov/Locations.vue +102 -0
- package/layer/app/components/oip-science/ctgov/Publications.vue +52 -0
- package/layer/app/components/oip-science/ctgov/Sponsors.vue +66 -0
- package/layer/app/components/oip-science/ctgov/StudyDescription.vue +1136 -0
- package/layer/app/components/oip-science/ctgov-centers/ClinicalTrials.vue +40 -0
- package/layer/app/components/oip-science/ctgov-centers/Publications.vue +50 -0
- package/layer/app/components/oip-science/ctgov-investigators/ClinicalTrials.vue +43 -0
- package/layer/app/components/oip-science/ctgov-investigators/Informations.vue +171 -0
- package/layer/app/components/oip-science/ctgov-investigators/Publications.vue +44 -0
- package/layer/app/components/oip-science/elastic/DateRangeFilter.vue +209 -0
- package/layer/app/components/oip-science/elastic/Filter.vue +719 -0
- package/layer/app/components/oip-science/elastic/MatchExplain.vue +152 -0
- package/layer/app/components/oip-science/establishments/Cards.vue +183 -0
- package/layer/app/components/oip-science/establishments/ClinicalTrials.vue +62 -0
- package/layer/app/components/oip-science/establishments/Hcps.vue +227 -0
- package/layer/app/components/oip-science/establishments/Informations.vue +263 -0
- package/layer/app/components/oip-science/establishments/LinkedList.vue +153 -0
- package/layer/app/components/oip-science/establishments/MatchedLabels.vue +194 -0
- package/layer/app/components/oip-science/establishments/PublicFinance.vue +62 -0
- package/layer/app/components/oip-science/euct/Investigators.vue +125 -0
- package/layer/app/components/oip-science/euct/Locations.vue +102 -0
- package/layer/app/components/oip-science/euct/Products.vue +101 -0
- package/layer/app/components/oip-science/euct/Publications.vue +89 -0
- package/layer/app/components/oip-science/euct/Sponsors.vue +86 -0
- package/layer/app/components/oip-science/euct/StudyDescription.vue +1075 -0
- package/layer/app/components/oip-science/euct-centers/ClinicalTrials.vue +40 -0
- package/layer/app/components/oip-science/euct-centers/Publications.vue +55 -0
- package/layer/app/components/oip-science/euct-investigators/ClinicalTrials.vue +41 -0
- package/layer/app/components/oip-science/euct-investigators/Informations.vue +171 -0
- package/layer/app/components/oip-science/euct-investigators/Publications.vue +51 -0
- package/layer/app/components/oip-science/hcps/AppelsAProjet.vue +62 -0
- package/layer/app/components/oip-science/hcps/Cards.vue +237 -0
- package/layer/app/components/oip-science/hcps/ClinicalTrials.vue +78 -0
- package/layer/app/components/oip-science/hcps/Informations.vue +296 -0
- package/layer/app/components/oip-science/hcps/LinkedList.vue +153 -0
- package/layer/app/components/oip-science/hcps/MatchedLabels.vue +207 -0
- package/layer/app/components/oip-science/hcps/Pubmed.vue +128 -0
- package/layer/app/components/oip-science/local/SliderTabs.vue +99 -0
- package/layer/app/components/oip-science/local/SliderTabsFull.vue +135 -0
- package/layer/app/components/oip-science/pubmed/Authors.vue +128 -0
- package/layer/app/components/oip-science/pubmed/Cards.vue +417 -0
- package/layer/app/components/oip-science/pubmed/ClinicalTrials.vue +71 -0
- package/layer/app/components/oip-science/resources/Phrc.vue +39 -0
- package/layer/app/composables/useOipChapterScroll.ts +43 -0
- package/layer/app/composables/useOipResourceHooks.ts +27 -0
- package/layer/app/composables/useOipResourceNav.ts +66 -0
- package/layer/app/composables/useOipResourceViews.ts +117 -0
- package/layer/app/composables/useOipResources.ts +83 -0
- package/layer/app/oip-drugs/PORTING.md +120 -0
- package/layer/app/oip-drugs/composables/useAssociationDetail.ts +220 -0
- package/layer/app/oip-drugs/composables/useAssociationExport.ts +63 -0
- package/layer/app/oip-drugs/composables/useAssociationLookup.ts +105 -0
- package/layer/app/oip-drugs/composables/useCardPrefOptions.ts +201 -0
- package/layer/app/oip-drugs/composables/useCurrency.ts +121 -0
- package/layer/app/oip-drugs/composables/useDirectusSources.ts +224 -0
- package/layer/app/oip-drugs/composables/useHeartBrandMatches.ts +112 -0
- package/layer/app/oip-drugs/composables/useHeartDetailSearches.ts +479 -0
- package/layer/app/oip-drugs/composables/useHeartIntlApprovals.ts +661 -0
- package/layer/app/oip-drugs/composables/useHeartLesIndication.ts +168 -0
- package/layer/app/oip-drugs/composables/useHeartMatchExplain.ts +231 -0
- package/layer/app/oip-drugs/composables/useHeartReports.ts +239 -0
- package/layer/app/oip-drugs/composables/useHeartSearchFields.ts +233 -0
- package/layer/app/oip-drugs/composables/useMergeByKey.ts +23 -0
- package/layer/app/oip-drugs/composables/useOipDrugsElastic.ts +621 -0
- package/layer/app/oip-drugs/composables/usePageEmpty.ts +58 -0
- package/layer/app/oip-drugs/composables/v-useSalesSource.ts +64 -0
- package/layer/app/oip-drugs/drugs.css +500 -0
- package/layer/app/oip-drugs/esIndices.ts +322 -0
- package/layer/app/oip-drugs/kinds.ts +264 -0
- package/layer/app/oip-drugs/locales/en.json +1571 -0
- package/layer/app/oip-drugs/locales/fr.json +1571 -0
- package/layer/app/oip-drugs/monographs/blincyto-has.vue +289 -0
- package/layer/app/oip-drugs/monographs/darzalex-has.vue +276 -0
- package/layer/app/oip-drugs/monographs/dupixent-has.vue +216 -0
- package/layer/app/oip-drugs/monographs/enhertu-has.vue +280 -0
- package/layer/app/oip-drugs/monographs/has-sein-2023.vue +1649 -0
- package/layer/app/oip-drugs/monographs/ibrance-has.vue +277 -0
- package/layer/app/oip-drugs/monographs/imfinzi-has.vue +293 -0
- package/layer/app/oip-drugs/monographs/keytruda-has.vue +334 -0
- package/layer/app/oip-drugs/monographs/kisqali-has.vue +201 -0
- package/layer/app/oip-drugs/monographs/opdivo-has.vue +231 -0
- package/layer/app/oip-drugs/monographs/ozempic-has.vue +186 -0
- package/layer/app/oip-drugs/monographs/tecentriq-has.vue +312 -0
- package/layer/app/oip-drugs/monographs/yescarta-has.vue +272 -0
- package/layer/app/oip-drugs/types/elastic.ts +113 -0
- package/layer/app/oip-drugs/types/es/agencies.ts +152 -0
- package/layer/app/oip-drugs/types/es/directory.ts +54 -0
- package/layer/app/oip-drugs/types/es/docByIndex.ts +151 -0
- package/layer/app/oip-drugs/types/es/openmedic.ts +67 -0
- package/layer/app/oip-drugs/types/es/outpatient.ts +71 -0
- package/layer/app/oip-drugs/types/es/portal.ts +130 -0
- package/layer/app/oip-drugs/types/es/retail.ts +107 -0
- package/layer/app/oip-drugs/types/es/statistics.ts +29 -0
- package/layer/app/oip-drugs/types/heart/CurrencyRate.ts +16 -0
- package/layer/app/oip-drugs/types/heart/ansm.ts +106 -0
- package/layer/app/oip-drugs/types/heart/tag.ts +29 -0
- package/layer/app/oip-drugs/utils/associationFields.ts +118 -0
- package/layer/app/oip-drugs/utils/contributions.ts +36 -0
- package/layer/app/oip-drugs/utils/countryMapping.ts +387 -0
- package/layer/app/oip-drugs/utils/esHighlight.ts +21 -0
- package/layer/app/oip-drugs/utils/exportSheets.ts +57 -0
- package/layer/app/oip-drugs/utils/heartIntlPrice.ts +228 -0
- package/layer/app/oip-drugs/utils/heartStyleAndFormat.ts +262 -0
- package/layer/app/oip-drugs/utils/heartStyleAnsm.ts +71 -0
- package/layer/app/oip-drugs/utils/latestDate.ts +31 -0
- package/layer/app/oip-drugs/utils/p-heartCardTags.ts +53 -0
- package/layer/app/oip-drugs/utils/priceExport.ts +269 -0
- package/layer/app/oip-drugs/utils/q-hasRatings.ts +43 -0
- package/layer/app/oip-drugs/utils/s-openCard.ts +20 -0
- package/layer/app/oip-drugs/utils/sourceUuids.ts +155 -0
- package/layer/app/oip-drugs/utils/styleAndFormat.ts +40 -0
- package/layer/app/oip-drugs/utils/v-salesSeries.ts +156 -0
- package/layer/app/oip-drugs/utils/v-scopeTags.ts +23 -0
- package/layer/app/oip-science/PORTING.md +93 -0
- package/layer/app/oip-science/assets/smartSelection.json +428 -0
- package/layer/app/oip-science/composables/useAuthorMatching.ts +342 -0
- package/layer/app/oip-science/composables/useCTCenter.ts +107 -0
- package/layer/app/oip-science/composables/useCTInvestigators.ts +107 -0
- package/layer/app/oip-science/composables/useEstablishmentCrossData.ts +139 -0
- package/layer/app/oip-science/composables/useEstablishmentMatching.ts +176 -0
- package/layer/app/oip-science/composables/useEuct.ts +418 -0
- package/layer/app/oip-science/composables/useEuctCenter.ts +107 -0
- package/layer/app/oip-science/composables/useEuctInvestigators.ts +107 -0
- package/layer/app/oip-science/composables/useGlobalClinicalTrials.ts +624 -0
- package/layer/app/oip-science/composables/useLinkedTrials.ts +83 -0
- package/layer/app/oip-science/composables/useOipElastic.ts +658 -0
- package/layer/app/oip-science/composables/useOipSearchExplain.ts +166 -0
- package/layer/app/oip-science/composables/usePubmed.ts +487 -0
- package/layer/app/oip-science/composables/useSearchFields.ts +153 -0
- package/layer/app/oip-science/indexConfig.json +794 -0
- package/layer/app/oip-science/locales/en.json +483 -0
- package/layer/app/oip-science/locales/fr.json +483 -0
- package/layer/app/oip-science/science.css +1182 -0
- package/layer/app/oip-science/utils/a-openCard.ts +23 -0
- package/layer/app/oip-science/utils/b-openCard.ts +35 -0
- package/layer/app/oip-science/utils/c-filterContext.ts +81 -0
- package/layer/app/oip-science/utils/f-types.ts +241 -0
- package/layer/app/oip-science/utils/frDiseaseTerms.ts +269 -0
- package/layer/app/oip-science/utils/matchMethod.ts +53 -0
- package/layer/app/oip-science/utils/sliderTabs.ts +13 -0
- package/layer/app/oip-science/utils/sources.ts +15 -0
- package/layer/app/oip-science/utils/styleAndFormat.ts +608 -0
- package/layer/app/oip-science/utils/toPresets.ts +7 -0
- package/layer/app/oip-science/utils/valueTable.ts +126 -0
- package/layer/app/plugins/oip-science-i18n.ts +17 -0
- package/layer/app/utils/oipFicheRoutes.ts +118 -0
- package/layer/app/utils/oipResources.ts +440 -0
- package/layer/nuxt.config.ts +22 -2
- package/layer/public/reports/blincyto-has.html +292 -0
- package/layer/public/reports/blincyto-has.pdf +0 -0
- package/layer/public/reports/darzalex-has.html +279 -0
- package/layer/public/reports/darzalex-has.pdf +0 -0
- package/layer/public/reports/dupixent-has.html +217 -0
- package/layer/public/reports/dupixent-has.pdf +0 -0
- package/layer/public/reports/enhertu-has.html +283 -0
- package/layer/public/reports/enhertu-has.pdf +0 -0
- package/layer/public/reports/has-sein-2023.html +1639 -0
- package/layer/public/reports/ibrance-has.html +280 -0
- package/layer/public/reports/ibrance-has.pdf +0 -0
- package/layer/public/reports/imfinzi-has.html +297 -0
- package/layer/public/reports/imfinzi-has.pdf +0 -0
- package/layer/public/reports/keytruda-has.html +337 -0
- package/layer/public/reports/keytruda-has.pdf +0 -0
- package/layer/public/reports/kisqali-has.html +202 -0
- package/layer/public/reports/kisqali-has.pdf +0 -0
- package/layer/public/reports/opdivo-has.html +232 -0
- package/layer/public/reports/opdivo-has.pdf +0 -0
- package/layer/public/reports/ozempic-has.html +188 -0
- package/layer/public/reports/ozempic-has.pdf +0 -0
- package/layer/public/reports/tecentriq-has.html +315 -0
- package/layer/public/reports/tecentriq-has.pdf +0 -0
- package/layer/public/reports/yescarta-has.html +275 -0
- package/layer/public/reports/yescarta-has.pdf +0 -0
- package/layer/server/api/oip/es.post.ts +99 -0
- package/layer/server/api/oip/pdf.get.ts +70 -0
- package/layer/server/api/oip/reports.get.ts +98 -0
- package/layer/server/api/oip/resource-types.get.ts +22 -0
- package/package.json +1 -1
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
// Les types de ressources que le layer OIP sait afficher, quelle que soit
|
|
2
|
+
// l'app qui les ouvre.
|
|
3
|
+
//
|
|
4
|
+
// Un projet est commun au portail : une publication rangee depuis France
|
|
5
|
+
// Augmented Science s'ouvre aussi dans fr_drugs_app. Chaque type garde
|
|
6
|
+
// l'affichage de son app d'origine : sa vue vit ici, une seule fois, et sert
|
|
7
|
+
// la page de l'app d'origine comme le tiroir de n'importe quelle autre app.
|
|
8
|
+
//
|
|
9
|
+
// Un type sans vue ici s'affiche par la carte generique, decrite dans le
|
|
10
|
+
// registre de l'API Virtual Lab (`resource_types.display`) : il apparait
|
|
11
|
+
// partout sans deploiement, en attendant une vue a lui.
|
|
12
|
+
//
|
|
13
|
+
// Importe aussi par le serveur (server/api/oip/es.post.ts) : pas d'import
|
|
14
|
+
// propre a Vue ou a Nuxt ici.
|
|
15
|
+
|
|
16
|
+
import type { RmProjectKind, RmProjectLang } from "@tekkare/romulus/utils/projects";
|
|
17
|
+
import scienceIndexConfig from "../oip-science/indexConfig.json";
|
|
18
|
+
import { DRUG_PROJECT_KINDS } from "../oip-drugs/kinds";
|
|
19
|
+
|
|
20
|
+
/** Les apps qui ont des fiches a montrer, et ou les ouvrir. */
|
|
21
|
+
export const OIP_RESOURCE_APPS = {
|
|
22
|
+
france_augmented_science_app: {
|
|
23
|
+
name: "France Augmented Science",
|
|
24
|
+
url: "https://france-augmented-science.app.tekkare.com",
|
|
25
|
+
},
|
|
26
|
+
fr_drugs_app: {
|
|
27
|
+
name: "France Drugs",
|
|
28
|
+
url: "https://france-drugs.app.tekkare.com",
|
|
29
|
+
},
|
|
30
|
+
} as const;
|
|
31
|
+
|
|
32
|
+
export type OipResourceApp = keyof typeof OIP_RESOURCE_APPS;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Les clusters Elasticsearch que le proxy du layer sait joindre. Chaque app
|
|
36
|
+
* donne leurs cles dans `runtimeConfig.oipEs` (cf. nuxt.config du layer).
|
|
37
|
+
*/
|
|
38
|
+
export type OipEsCluster = "science" | "hcp" | "drugs";
|
|
39
|
+
|
|
40
|
+
/** Un onglet de fiche : sa cle est le bout de chemin de sa page (« summary »). */
|
|
41
|
+
export interface OipResourceTab {
|
|
42
|
+
key: string;
|
|
43
|
+
label: { fr: string; en: string };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface OipResourceSpec {
|
|
47
|
+
/** Valeur de `resourceType` cote API. */
|
|
48
|
+
type: string;
|
|
49
|
+
/** App d'origine : celle dont on reprend l'affichage, et ou mene le lien. */
|
|
50
|
+
app: OipResourceApp;
|
|
51
|
+
cluster: OipEsCluster;
|
|
52
|
+
/** Ce qu'il faut pour lister la ressource dans la page d'un projet. */
|
|
53
|
+
kind: RmProjectKind;
|
|
54
|
+
/**
|
|
55
|
+
* L'identifiant de la fiche dans les routes de son app, quand il differe
|
|
56
|
+
* du `resourceId` (un professionnel est range en `10_<RPPS>`, sa page est
|
|
57
|
+
* /hcps/<RPPS>). C'est lui que recoivent les onglets.
|
|
58
|
+
*/
|
|
59
|
+
routeId: (id: string) => string;
|
|
60
|
+
/** L'inverse de `routeId`, quand il differe de l'identite. */
|
|
61
|
+
fromRouteId?: (routeId: string) => string;
|
|
62
|
+
/** Chemin de la fiche sans onglet ni prefixe de langue (« /pubmed/123 »). */
|
|
63
|
+
base: (routeId: string) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Les onglets, dans l'ordre de l'app d'origine. Le premier s'ouvre d'abord.
|
|
66
|
+
* Vide pour une fiche qui porte ses propres onglets (cf. `view`).
|
|
67
|
+
*/
|
|
68
|
+
tabs: OipResourceTab[];
|
|
69
|
+
/**
|
|
70
|
+
* Fiche d'un seul tenant, sans onglets du registre (fiche marque de
|
|
71
|
+
* fr_drugs_app, evolution des ventes...) : la cle de sa vue dans
|
|
72
|
+
* useOipResourceViews. Elle recoit le `resourceId` tel quel.
|
|
73
|
+
*/
|
|
74
|
+
view?: string;
|
|
75
|
+
/**
|
|
76
|
+
* Chemin de la fiche (onglet `tab`, sinon le premier), sans prefixe de
|
|
77
|
+
* langue. Certaines fiches se designent par un champ du document (une marque
|
|
78
|
+
* HAS par son `brand_group`) : `doc` le donne quand il est relu.
|
|
79
|
+
*/
|
|
80
|
+
detailPath: (id: string, tab?: string, doc?: Record<string, any> | null) => string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
type SpecInput = Omit<OipResourceSpec, "detailPath" | "routeId" | "app" | "cluster"> &
|
|
84
|
+
Partial<Pick<OipResourceSpec, "routeId" | "app" | "cluster">>;
|
|
85
|
+
|
|
86
|
+
/** Une fiche de France Augmented Science, lue sur le cluster `science`. */
|
|
87
|
+
function scienceSpec(input: SpecInput): OipResourceSpec {
|
|
88
|
+
const routeId = input.routeId ?? ((id: string) => id);
|
|
89
|
+
return {
|
|
90
|
+
app: "france_augmented_science_app",
|
|
91
|
+
cluster: "science",
|
|
92
|
+
...input,
|
|
93
|
+
routeId,
|
|
94
|
+
detailPath: (id, tab) => `${input.base(routeId(id))}/${tab || input.tabs[0]!.key}`,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Libelle d'onglet, tel que France Augmented Science l'ecrit. */
|
|
99
|
+
function tab(key: string, fr: string, en: string): OipResourceTab {
|
|
100
|
+
return { key, label: { fr, en } };
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const titleCase = (value: unknown) =>
|
|
104
|
+
typeof value === "string" ? value.toLowerCase().replace(/(^|[\s-])\S/g, (c) => c.toUpperCase()) : "";
|
|
105
|
+
|
|
106
|
+
/** Une fiche de fr_drugs_app, lue sur le cluster `drugs`, montree d'un seul tenant. */
|
|
107
|
+
function drugsSpec(kind: RmProjectKind, view: string): OipResourceSpec {
|
|
108
|
+
return {
|
|
109
|
+
type: kind.type,
|
|
110
|
+
app: "fr_drugs_app",
|
|
111
|
+
cluster: "drugs",
|
|
112
|
+
kind,
|
|
113
|
+
routeId: (id) => id,
|
|
114
|
+
base: () => "",
|
|
115
|
+
tabs: [],
|
|
116
|
+
view,
|
|
117
|
+
detailPath: (id, tab, doc) => {
|
|
118
|
+
const path = kind.path?.(doc ?? {}, id) ?? "";
|
|
119
|
+
return path && tab ? `${path}?tab=${encodeURIComponent(tab)}` : path;
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** La vue de chaque famille de fr_drugs_app (cf. useOipResourceViews). */
|
|
125
|
+
const DRUG_VIEWS: Record<string, string> = {
|
|
126
|
+
FrHasBrand: "drugs-brand",
|
|
127
|
+
FrHasIndication: "drugs-indication",
|
|
128
|
+
FrHasPut: "drugs-put",
|
|
129
|
+
FrMitm: "drugs-mitm",
|
|
130
|
+
FrPnds: "drugs-pnds",
|
|
131
|
+
FrDrugPrice: "drugs-price",
|
|
132
|
+
FrDrugPriceJo: "drugs-jo",
|
|
133
|
+
FrAnsmProduct: "drugs-ansm",
|
|
134
|
+
FrPatientAssociation: "drugs-association",
|
|
135
|
+
FrPatientContribution: "drugs-contribution",
|
|
136
|
+
FrNationalAssemblySession: "drugs-national-assembly",
|
|
137
|
+
FrMedicamBrand: "drugs-medicam",
|
|
138
|
+
FrOutpatientBrand: "drugs-outpatient",
|
|
139
|
+
FrSusBrand: "drugs-hospital",
|
|
140
|
+
FrRetrocessionBrand: "drugs-hospital",
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
const TRIALS = { fr: "Essais cliniques", en: "Clinical trials" };
|
|
144
|
+
const MATCHING = { fr: "Expertises", en: "Expertise" };
|
|
145
|
+
|
|
146
|
+
const T = {
|
|
147
|
+
description: tab("study-description", "Description de l'étude", "Study description"),
|
|
148
|
+
investigators: tab("investigators", "Investigateurs", "Investigators"),
|
|
149
|
+
locations: tab("locations", "Sites", "Locations"),
|
|
150
|
+
sponsors: tab("sponsors", "Promoteurs et collaborateurs", "Sponsors & Collaborators"),
|
|
151
|
+
publications: tab("publications", "Publications", "Publications"),
|
|
152
|
+
products: tab("products", "Produits", "Products"),
|
|
153
|
+
informations: tab("informations", "Informations", "Informations"),
|
|
154
|
+
trials: tab("clinical-trials", "Essais cliniques", "Clinical Trials"),
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
export const OIP_RESOURCE_SPECS: OipResourceSpec[] = [
|
|
158
|
+
scienceSpec({
|
|
159
|
+
type: "PubMed",
|
|
160
|
+
kind: {
|
|
161
|
+
type: "PubMed",
|
|
162
|
+
index: "oip-discovery-pubmed",
|
|
163
|
+
label: { fr: "Publications", en: "Publications" },
|
|
164
|
+
section: { fr: "PubMed", en: "PubMed" },
|
|
165
|
+
icon: "Books",
|
|
166
|
+
source: ["PubMed_ID", "title", "pubdate", "journal"],
|
|
167
|
+
title: (s) => s.title || `PMID ${s.PubMed_ID}`,
|
|
168
|
+
subtitle: (s) => [s.PubMed_ID ? `PMID ${s.PubMed_ID}` : "", s.journal, s.pubdate].filter(Boolean).join(" · "),
|
|
169
|
+
path: (s, id) => `/pubmed/${s.PubMed_ID || id}/summary`,
|
|
170
|
+
},
|
|
171
|
+
base: (id) => `/pubmed/${id}`,
|
|
172
|
+
// Titres en anglais dans les deux langues, comme l'en-tete de France Augmented Science.
|
|
173
|
+
tabs: [tab("summary", "Summary", "Summary"), tab("authors", "Authors", "Authors"), tab("clinical-trials", "Clinical Trials", "Clinical Trials")],
|
|
174
|
+
}),
|
|
175
|
+
scienceSpec({
|
|
176
|
+
type: "ClinicalTrialsNCT",
|
|
177
|
+
kind: {
|
|
178
|
+
type: "ClinicalTrialsNCT",
|
|
179
|
+
index: scienceIndexConfig.globalCT.index,
|
|
180
|
+
label: { fr: "Essais NCT", en: "NCT trials" },
|
|
181
|
+
section: TRIALS,
|
|
182
|
+
icon: "ClipboardText",
|
|
183
|
+
source: ["nct_id", "brief_title", "official_title", "overall_status", "phase"],
|
|
184
|
+
title: (s) => s.brief_title || s.official_title || s.nct_id,
|
|
185
|
+
subtitle: (s) => [s.nct_id, s.overall_status, s.phase].filter(Boolean).join(" · "),
|
|
186
|
+
path: (s, id) => `/ctgov/${s.nct_id || id}/study-description`,
|
|
187
|
+
},
|
|
188
|
+
base: (id) => `/ctgov/${id}`,
|
|
189
|
+
tabs: [T.description, T.investigators, T.locations, T.sponsors, T.publications],
|
|
190
|
+
}),
|
|
191
|
+
scienceSpec({
|
|
192
|
+
type: "ClinicalTrialsEUCT",
|
|
193
|
+
kind: {
|
|
194
|
+
type: "ClinicalTrialsEUCT",
|
|
195
|
+
index: scienceIndexConfig.euct.index,
|
|
196
|
+
label: { fr: "Essais EUCT", en: "EUCT trials" },
|
|
197
|
+
section: TRIALS,
|
|
198
|
+
icon: "ClipboardText",
|
|
199
|
+
source: ["euct_number", "public_title", "global_status", "trial_phase"],
|
|
200
|
+
title: (s) => s.public_title || s.euct_number,
|
|
201
|
+
subtitle: (s) => [s.euct_number, s.global_status, s.trial_phase].filter(Boolean).join(" · "),
|
|
202
|
+
path: (s, id) => `/euct/${s.euct_number || id}/study-description`,
|
|
203
|
+
},
|
|
204
|
+
base: (id) => `/euct/${id}`,
|
|
205
|
+
tabs: [T.description, T.products, T.investigators, T.locations, T.sponsors, T.publications],
|
|
206
|
+
}),
|
|
207
|
+
{
|
|
208
|
+
type: "PHRC",
|
|
209
|
+
app: "france_augmented_science_app",
|
|
210
|
+
cluster: "science",
|
|
211
|
+
kind: {
|
|
212
|
+
type: "PHRC",
|
|
213
|
+
index: scienceIndexConfig.phrc.index,
|
|
214
|
+
label: { fr: "Appels à projets", en: "Calls for projects" },
|
|
215
|
+
section: { fr: "Appels à projets", en: "Calls for projects" },
|
|
216
|
+
icon: "Megaphone",
|
|
217
|
+
source: ["clinical_trial_id", "title_fr", "acronym", "period"],
|
|
218
|
+
title: (s) => s.title_fr || s.acronym || String(s.clinical_trial_id),
|
|
219
|
+
subtitle: (s) => [s.acronym, s.period].filter(Boolean).join(" · "),
|
|
220
|
+
path: (s) => `/appel-a-projet/${s.clinical_trial_id}`,
|
|
221
|
+
},
|
|
222
|
+
routeId: (id) => id,
|
|
223
|
+
base: (id) => `/appel-a-projet/${id}`,
|
|
224
|
+
// Pas de fiche a onglets dans France Augmented Science : la carte de sa liste.
|
|
225
|
+
tabs: [],
|
|
226
|
+
view: "science-phrc",
|
|
227
|
+
detailPath: (id) => `/appel-a-projet/${id}`,
|
|
228
|
+
},
|
|
229
|
+
scienceSpec({
|
|
230
|
+
type: "Establishment",
|
|
231
|
+
kind: {
|
|
232
|
+
type: "Establishment",
|
|
233
|
+
index: scienceIndexConfig.establishments.index,
|
|
234
|
+
label: { fr: "Établissements", en: "Establishments" },
|
|
235
|
+
section: MATCHING,
|
|
236
|
+
icon: "Buildings",
|
|
237
|
+
source: ["hco_et_code", "hco_et_label", "hco_et_city", "hco_ej_label"],
|
|
238
|
+
title: (s) => s.hco_et_label || String(s.hco_et_code),
|
|
239
|
+
subtitle: (s) => [s.hco_et_city, s.hco_ej_label].filter(Boolean).join(" · "),
|
|
240
|
+
path: (s) => `/establishments/${s.hco_et_code}/informations`,
|
|
241
|
+
},
|
|
242
|
+
base: (id) => `/establishments/${id}`,
|
|
243
|
+
tabs: [
|
|
244
|
+
T.informations,
|
|
245
|
+
T.trials,
|
|
246
|
+
tab("public-finance", "AAP (PHRC)", "AAP (PHRC)"),
|
|
247
|
+
tab("hcps", "Investigateurs & Auteurs", "Investigators & Authors"),
|
|
248
|
+
tab("matched-labels", "Labels matchés", "Matched labels"),
|
|
249
|
+
],
|
|
250
|
+
}),
|
|
251
|
+
scienceSpec({
|
|
252
|
+
type: "HCP",
|
|
253
|
+
kind: {
|
|
254
|
+
type: "HCP",
|
|
255
|
+
index: scienceIndexConfig.hcps.index,
|
|
256
|
+
label: { fr: "Professionnels de santé", en: "Healthcare professionals" },
|
|
257
|
+
section: MATCHING,
|
|
258
|
+
icon: "UserCircle",
|
|
259
|
+
source: ["hcp_code", "hcp_first_name", "hcp_family_name", "specialty", "address"],
|
|
260
|
+
title: (s) => `${s.hcp_first_name || ""} ${s.hcp_family_name || ""}`.trim() || String(s.hcp_code),
|
|
261
|
+
subtitle: (s) => [s.specialty, s.address?.[0]?.hcp_city].filter(Boolean).join(" · "),
|
|
262
|
+
path: (s) => `/hcps/${s.hcp_code}/informations`,
|
|
263
|
+
},
|
|
264
|
+
// L'_id de l'annuaire est `10_<RPPS>` ; la page de la fiche, le RPPS seul.
|
|
265
|
+
routeId: (id) => id.replace(/^10_/, ""),
|
|
266
|
+
fromRouteId: (rpps) => `10_${rpps}`,
|
|
267
|
+
base: (id) => `/hcps/${id}`,
|
|
268
|
+
tabs: [
|
|
269
|
+
T.informations,
|
|
270
|
+
T.trials,
|
|
271
|
+
tab("appels-a-projet", "AAP (PHRC)", "AAP (PHRC)"),
|
|
272
|
+
tab("pubmed", "PubMed", "PubMed"),
|
|
273
|
+
tab("matched-labels", "Labels matchés", "Matched labels"),
|
|
274
|
+
],
|
|
275
|
+
}),
|
|
276
|
+
scienceSpec({
|
|
277
|
+
type: "ClinicalTrialsInvestigatorsNCT",
|
|
278
|
+
kind: {
|
|
279
|
+
type: "ClinicalTrialsInvestigatorsNCT",
|
|
280
|
+
index: scienceIndexConfig.globalCTInvestigators.index,
|
|
281
|
+
label: { fr: "Investigateurs NCT", en: "NCT investigators" },
|
|
282
|
+
section: TRIALS,
|
|
283
|
+
icon: "Users",
|
|
284
|
+
source: ["id", "investigator_name", "country"],
|
|
285
|
+
title: (s) => titleCase(s.investigator_name) || String(s.id),
|
|
286
|
+
subtitle: (s) => s.country || "",
|
|
287
|
+
path: (s, id) => `/ctgov/investigators/${s.id ?? id}/clinical-trials`,
|
|
288
|
+
},
|
|
289
|
+
base: (id) => `/ctgov/investigators/${id}`,
|
|
290
|
+
tabs: [T.informations, T.trials, T.publications],
|
|
291
|
+
}),
|
|
292
|
+
scienceSpec({
|
|
293
|
+
type: "ClinicalTrialsInvestigatorsEUCT",
|
|
294
|
+
kind: {
|
|
295
|
+
type: "ClinicalTrialsInvestigatorsEUCT",
|
|
296
|
+
index: scienceIndexConfig.euctInvestigators.index,
|
|
297
|
+
label: { fr: "Investigateurs EUCT", en: "EUCT investigators" },
|
|
298
|
+
section: TRIALS,
|
|
299
|
+
icon: "Users",
|
|
300
|
+
source: ["id", "full_name", "country"],
|
|
301
|
+
title: (s) => titleCase(s.full_name) || String(s.id),
|
|
302
|
+
subtitle: (s) => s.country || "",
|
|
303
|
+
path: (s, id) => `/euct/investigators/${s.id ?? id}/clinical-trials`,
|
|
304
|
+
},
|
|
305
|
+
base: (id) => `/euct/investigators/${id}`,
|
|
306
|
+
tabs: [T.informations, T.trials, T.publications],
|
|
307
|
+
}),
|
|
308
|
+
scienceSpec({
|
|
309
|
+
type: "ClinicalTrialsCentersNCT",
|
|
310
|
+
kind: {
|
|
311
|
+
type: "ClinicalTrialsCentersNCT",
|
|
312
|
+
index: scienceIndexConfig.globalCTCenters.index,
|
|
313
|
+
label: { fr: "Centres NCT", en: "NCT centers" },
|
|
314
|
+
section: TRIALS,
|
|
315
|
+
icon: "Hospital",
|
|
316
|
+
source: ["id", "facility_name", "facility_city", "facility_country"],
|
|
317
|
+
title: (s) => s.facility_name || String(s.id),
|
|
318
|
+
subtitle: (s) => [s.facility_city, s.facility_country].filter(Boolean).join(" · "),
|
|
319
|
+
path: (s, id) => `/ctgov/centers/${s.id ?? id}/clinical-trials`,
|
|
320
|
+
},
|
|
321
|
+
base: (id) => `/ctgov/centers/${id}`,
|
|
322
|
+
tabs: [T.trials, T.publications],
|
|
323
|
+
}),
|
|
324
|
+
scienceSpec({
|
|
325
|
+
type: "ClinicalTrialsCentersEUCT",
|
|
326
|
+
kind: {
|
|
327
|
+
type: "ClinicalTrialsCentersEUCT",
|
|
328
|
+
index: scienceIndexConfig.euctCenters.index,
|
|
329
|
+
label: { fr: "Centres EUCT", en: "EUCT centers" },
|
|
330
|
+
section: TRIALS,
|
|
331
|
+
icon: "Hospital",
|
|
332
|
+
source: ["id", "organisation_name", "city", "country"],
|
|
333
|
+
title: (s) => s.organisation_name || String(s.id),
|
|
334
|
+
subtitle: (s) => [s.city, s.country].filter(Boolean).join(" · "),
|
|
335
|
+
path: (s, id) => `/euct/centers/${s.id ?? id}/clinical-trials`,
|
|
336
|
+
},
|
|
337
|
+
base: (id) => `/euct/centers/${id}`,
|
|
338
|
+
tabs: [T.trials, T.publications],
|
|
339
|
+
}),
|
|
340
|
+
...DRUG_PROJECT_KINDS.map((kind) => drugsSpec(kind, DRUG_VIEWS[kind.type]!)),
|
|
341
|
+
];
|
|
342
|
+
|
|
343
|
+
export function oipResourceSpec(type: string): OipResourceSpec | undefined {
|
|
344
|
+
return OIP_RESOURCE_SPECS.find((spec) => spec.type === type);
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Types ranges par une autre app sur les memes documents qu'un type du layer :
|
|
349
|
+
* fr_drugs_app range les essais dans les index de France Augmented Science,
|
|
350
|
+
* sous ses propres cles. Ils s'ouvrent avec la fiche du type d'origine.
|
|
351
|
+
*/
|
|
352
|
+
export const OIP_RESOURCE_ALIASES: Record<string, string> = {
|
|
353
|
+
FrClinicalTrialNct: "ClinicalTrialsNCT",
|
|
354
|
+
FrClinicalTrialEuct: "ClinicalTrialsEUCT",
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/** La fiche qui montre un type : la sienne, ou celle du type dont il est l'alias. */
|
|
358
|
+
export function oipResourceViewSpec(type: string): OipResourceSpec | undefined {
|
|
359
|
+
return oipResourceSpec(OIP_RESOURCE_ALIASES[type] ?? type);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Les index des fiches de France Augmented Science (essais, publications,
|
|
364
|
+
* annuaires...), tous sur le cluster `science` : ceux que ses vues lisent.
|
|
365
|
+
*/
|
|
366
|
+
export const OIP_SCIENCE_INDEXES: string[] = Object.values(scienceIndexConfig as Record<string, { index?: string }>)
|
|
367
|
+
.map((entry) => entry?.index)
|
|
368
|
+
.filter((index): index is string => !!index);
|
|
369
|
+
|
|
370
|
+
/** Les index que le proxy du layer accepte de lire, par cluster. */
|
|
371
|
+
export function oipResourceIndexes(cluster: OipEsCluster): string[] {
|
|
372
|
+
const declared = OIP_RESOURCE_SPECS.filter((spec) => spec.cluster === cluster).map((spec) => spec.kind.index);
|
|
373
|
+
return cluster === "science" ? [...new Set([...declared, ...OIP_SCIENCE_INDEXES])] : declared;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* L'URL de la fiche dans son app d'origine. Les apps OIP sont en
|
|
378
|
+
* `prefix_and_default` : le francais n'a pas de prefixe.
|
|
379
|
+
*/
|
|
380
|
+
export function oipResourceAppUrl(app: OipResourceApp, path: string, lang: RmProjectLang): string {
|
|
381
|
+
return `${OIP_RESOURCE_APPS[app].url}${lang === "en" ? "/en" : ""}${path}`;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** L'affichage d'un type sans vue, tel que le registre de l'API le donne. */
|
|
385
|
+
export interface OipResourceDisplay {
|
|
386
|
+
label?: { fr?: string; en?: string };
|
|
387
|
+
section?: { fr?: string; en?: string };
|
|
388
|
+
icon?: string;
|
|
389
|
+
title?: string[];
|
|
390
|
+
subtitle?: string[];
|
|
391
|
+
detailUrl?: string;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/** Une entree du registre des types (GET /resource-types de l'API). */
|
|
395
|
+
export interface OipResourceTypeEntry {
|
|
396
|
+
key: string;
|
|
397
|
+
esIndex: string | null;
|
|
398
|
+
label: string | null;
|
|
399
|
+
ownerApp: string | null;
|
|
400
|
+
display: OipResourceDisplay | null;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
function readPath(source: unknown, path: string): unknown {
|
|
404
|
+
return path.split(".").reduce<any>((value, key) => (value == null ? value : value[key]), source);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Remplit un gabarit du registre : `{champ}`, `{champ.0.sous_champ}`, `{a|b}`
|
|
409
|
+
* (premier non vide), `{id}` (l'_id range). Vide si un champ manque : un
|
|
410
|
+
* gabarit a moitie rempli (« PMID ») ne vaut pas mieux que rien.
|
|
411
|
+
*/
|
|
412
|
+
export function oipFillTemplate(template: string, source: unknown, id: string): string {
|
|
413
|
+
let missing = false;
|
|
414
|
+
const text = template.replace(/\{([^}]+)\}/g, (_, expr: string) => {
|
|
415
|
+
for (const path of expr.split("|")) {
|
|
416
|
+
const value = path === "id" ? id : readPath(source, path.trim());
|
|
417
|
+
if (value != null && value !== "") return String(value);
|
|
418
|
+
}
|
|
419
|
+
missing = true;
|
|
420
|
+
return "";
|
|
421
|
+
});
|
|
422
|
+
return missing ? "" : text.trim();
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/** Le premier gabarit qui se remplit. */
|
|
426
|
+
export function oipFirstTemplate(templates: string[] | undefined, source: unknown, id: string): string {
|
|
427
|
+
for (const template of templates ?? []) {
|
|
428
|
+
const text = oipFillTemplate(template, source, id);
|
|
429
|
+
if (text) return text;
|
|
430
|
+
}
|
|
431
|
+
return "";
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/** Les gabarits remplis, joints par « · ». */
|
|
435
|
+
export function oipJoinTemplates(templates: string[] | undefined, source: unknown, id: string): string {
|
|
436
|
+
return (templates ?? [])
|
|
437
|
+
.map((template) => oipFillTemplate(template, source, id))
|
|
438
|
+
.filter(Boolean)
|
|
439
|
+
.join(" · ");
|
|
440
|
+
}
|
package/layer/nuxt.config.ts
CHANGED
|
@@ -21,8 +21,14 @@ export default defineNuxtConfig({
|
|
|
21
21
|
future: {
|
|
22
22
|
compatibilityVersion: 4,
|
|
23
23
|
},
|
|
24
|
-
// Regles du cadre communes aux apps (bandeau de page, barre de filtres)
|
|
25
|
-
|
|
24
|
+
// Regles du cadre communes aux apps (bandeau de page, barre de filtres), et
|
|
25
|
+
// classes des fiches de France Augmented Science, limitees a `.oip-science`
|
|
26
|
+
// (cf. app/oip-science/science.css).
|
|
27
|
+
css: [
|
|
28
|
+
fileURLToPath(new URL("./app/assets/oip-frame.css", import.meta.url)),
|
|
29
|
+
fileURLToPath(new URL("./app/oip-science/science.css", import.meta.url)),
|
|
30
|
+
fileURLToPath(new URL("./app/oip-drugs/drugs.css", import.meta.url)),
|
|
31
|
+
],
|
|
26
32
|
// Reglages serveur propres au layer. Les cles Directus (directus*Url,
|
|
27
33
|
// directus*Token) restent declarees par l'app, qui les avait deja.
|
|
28
34
|
runtimeConfig: {
|
|
@@ -48,5 +54,19 @@ export default defineNuxtConfig({
|
|
|
48
54
|
oipPosthogKey: "",
|
|
49
55
|
oipPosthogProjectId: "",
|
|
50
56
|
oipPosthogHost: "",
|
|
57
|
+
/**
|
|
58
|
+
* Clusters Elasticsearch des vues de ressources (/api/oip/es) : domaine et
|
|
59
|
+
* cle ApiKey. `science` porte les index de France Augmented Science
|
|
60
|
+
* (PubMed, essais), `hcp` l'annuaire, `drugs` ceux de fr_drugs_app. Une
|
|
61
|
+
* app les remplit depuis ses propres variables, ou par
|
|
62
|
+
* NUXT_OIP_ES_SCIENCE_DOMAIN / NUXT_OIP_ES_SCIENCE_AUTH, etc.
|
|
63
|
+
*/
|
|
64
|
+
oipEs: {
|
|
65
|
+
science: { domain: "", auth: "" },
|
|
66
|
+
hcp: { domain: "", auth: "" },
|
|
67
|
+
// Associations et registres d'autorisation etrangers : une autre cle sur
|
|
68
|
+
// le meme domaine, comme dans fr_drugs_app. Vides : la cle principale.
|
|
69
|
+
drugs: { domain: "", auth: "", authAssociations: "", authApprovals: "" },
|
|
70
|
+
},
|
|
51
71
|
},
|
|
52
72
|
});
|