@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,207 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Onglet Labels matches de la fiche professionnel (porte de la page
|
|
3
|
+
hcps/[id]/matched-labels de France Augmented Science). Dans FAS l'en-tete
|
|
4
|
+
chargeait le document (useState('current-hcp')) : l'onglet le relit lui-meme.
|
|
5
|
+
Le menu d'export de la carte (payload useGenerateExcel) est retire.
|
|
6
|
+
-->
|
|
7
|
+
<template>
|
|
8
|
+
<div class="oip-science">
|
|
9
|
+
<RmLoadingState v-if="isLoading" :lines="3" :chart-height="240" />
|
|
10
|
+
<RmTableCard v-if="!isLoading && hcp" :lang="lang">
|
|
11
|
+
<template #header>
|
|
12
|
+
<div>
|
|
13
|
+
<h3 class="rm-table-card__title">{{ $t('oipScience.common.matchedLabels') }}</h3>
|
|
14
|
+
<p class="rm-table-card__context">{{ uniqueRows.length }} {{ $t('oipScience.common.results') }}</p>
|
|
15
|
+
<OipScienceCommonSource :sources="['CT.gov', 'EUCT', 'PubMed']" :lang="lang" />
|
|
16
|
+
</div>
|
|
17
|
+
<div class="match-stats">
|
|
18
|
+
<div class="match-stat">
|
|
19
|
+
<p class="match-stat-label">{{ $t('oipScience.common.matchedLabels') }}</p>
|
|
20
|
+
<p class="match-stat-value">{{ uniqueRows.length }}</p>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="match-stat">
|
|
23
|
+
<p class="match-stat-label">Score moyen</p>
|
|
24
|
+
<p class="match-stat-value">
|
|
25
|
+
<span
|
|
26
|
+
class="match-stat-pill"
|
|
27
|
+
:class="avgScorePct >= 80 ? 'high' : 'low'"
|
|
28
|
+
>{{ avgScorePct }}%</span>
|
|
29
|
+
</p>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<RmTable :columns="table.columns" :rows="table.rows" search>
|
|
34
|
+
<template v-for="key in table.typeKeys.Source" :key="key" #[key]="{ value }">
|
|
35
|
+
<RmTag class="no-wrap" :variant="sourceTagStyle(value)">
|
|
36
|
+
{{ sourceTagLabel(value) }}
|
|
37
|
+
</RmTag>
|
|
38
|
+
</template>
|
|
39
|
+
<template v-for="key in table.typeKeys.Score" :key="key" #[key]="{ value }">
|
|
40
|
+
<span
|
|
41
|
+
v-if="typeof value === 'number'"
|
|
42
|
+
class="score-badge"
|
|
43
|
+
:class="value >= 0.8 ? 'score-high' : 'score-low'"
|
|
44
|
+
:data-tooltip="$t('oipScience.common.matchingScoreTooltip')"
|
|
45
|
+
>{{ Math.round(value * 100) }}%</span>
|
|
46
|
+
<span v-else>-</span>
|
|
47
|
+
</template>
|
|
48
|
+
</RmTable>
|
|
49
|
+
</RmTableCard>
|
|
50
|
+
<RmEmptyState
|
|
51
|
+
v-if="!isLoading && hcp && uniqueRows.length === 0"
|
|
52
|
+
:title="$t('oipScience.common.noDataTitle')"
|
|
53
|
+
:text="$t('oipScience.common.noDataText')"
|
|
54
|
+
/>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
|
|
58
|
+
<script setup lang="ts">
|
|
59
|
+
import indexConfig from '../../../oip-science/indexConfig.json';
|
|
60
|
+
import useOipElastic from '../../../oip-science/composables/useOipElastic';
|
|
61
|
+
import { valueTable } from '../../../oip-science/utils/valueTable';
|
|
62
|
+
import { formatMatchMethod } from '../../../oip-science/utils/matchMethod';
|
|
63
|
+
|
|
64
|
+
const props = withDefaults(defineProps<{ id: string; highlight?: string[]; lang?: 'fr' | 'en' }>(), {
|
|
65
|
+
highlight: () => [],
|
|
66
|
+
lang: undefined,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const { t } = useI18n();
|
|
70
|
+
const { queryOneElastic } = useOipElastic();
|
|
71
|
+
|
|
72
|
+
const isLoading = ref(true);
|
|
73
|
+
const hcp = ref<any>(null);
|
|
74
|
+
|
|
75
|
+
async function load(urlId: string) {
|
|
76
|
+
isLoading.value = true;
|
|
77
|
+
hcp.value = null;
|
|
78
|
+
try {
|
|
79
|
+
hcp.value = await queryOneElastic({
|
|
80
|
+
index: indexConfig.hcps.index,
|
|
81
|
+
cluster: indexConfig.hcps.cluster,
|
|
82
|
+
path: 'hcp_code',
|
|
83
|
+
id: urlId,
|
|
84
|
+
});
|
|
85
|
+
} catch (e) {
|
|
86
|
+
console.error(e);
|
|
87
|
+
} finally {
|
|
88
|
+
isLoading.value = false;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
watch(() => props.id, (id) => { if (id) load(id); }, { immediate: true });
|
|
93
|
+
|
|
94
|
+
type Source = 'NCT' | 'EUCT' | 'PubMed';
|
|
95
|
+
type Row = { name: string; source: Source; match_method: string | null; score: number };
|
|
96
|
+
|
|
97
|
+
// Dedupe by (name, source). Keep highest score per unique pair.
|
|
98
|
+
const uniqueRows = computed<Row[]>(() => {
|
|
99
|
+
const h = hcp.value;
|
|
100
|
+
if (!h) return [];
|
|
101
|
+
const byKey = new Map<string, Row>();
|
|
102
|
+
const collect = (entries: any[] | null | undefined, source: Source) => {
|
|
103
|
+
if (!Array.isArray(entries)) return;
|
|
104
|
+
for (const m of entries) {
|
|
105
|
+
const name = m?.name || [m?.first_name, m?.last_name].filter(Boolean).join(' ').trim();
|
|
106
|
+
if (!name || typeof m?.score !== 'number') continue;
|
|
107
|
+
const key = `${source}|${name}`;
|
|
108
|
+
const existing = byKey.get(key);
|
|
109
|
+
if (!existing || (m.score ?? 0) > (existing.score ?? 0)) {
|
|
110
|
+
byKey.set(key, {
|
|
111
|
+
name,
|
|
112
|
+
source,
|
|
113
|
+
match_method: m.match_method ?? null,
|
|
114
|
+
score: m.score,
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
collect(h.nct_name, 'NCT');
|
|
120
|
+
collect(h.euct_name, 'EUCT');
|
|
121
|
+
collect(h.pubmed_name, 'PubMed');
|
|
122
|
+
return [...byKey.values()].sort((a, b) => (b.score ?? 0) - (a.score ?? 0));
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const avgScorePct = computed(() => {
|
|
126
|
+
if (uniqueRows.value.length === 0) return 0;
|
|
127
|
+
const sum = uniqueRows.value.reduce((acc, r) => acc + (r.score || 0), 0);
|
|
128
|
+
return Math.round((sum / uniqueRows.value.length) * 100);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
function sourceTagStyle(source: string): string {
|
|
132
|
+
if (source === 'NCT') return 'blue';
|
|
133
|
+
if (source === 'EUCT') return 'purple';
|
|
134
|
+
return 'green';
|
|
135
|
+
}
|
|
136
|
+
function sourceTagLabel(source: string): string {
|
|
137
|
+
if (source === 'NCT') return '🇺🇸 NCT';
|
|
138
|
+
if (source === 'EUCT') return '🇪🇺 EUCT';
|
|
139
|
+
return '📚 PubMed';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const getContent = computed(() =>
|
|
143
|
+
uniqueRows.value.map((r) => ({
|
|
144
|
+
values: [r.name, r.source, formatMatchMethod(r.match_method), r.score],
|
|
145
|
+
})),
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
const table = computed(() =>
|
|
149
|
+
valueTable(
|
|
150
|
+
[t('oipScience.common.name'), 'Source', t('oipScience.common.matchType'), t('oipScience.common.confidenceScore')],
|
|
151
|
+
getContent.value,
|
|
152
|
+
['', 'Source', '', 'Score'],
|
|
153
|
+
{ align: ['left', 'left', 'left', 'right'] },
|
|
154
|
+
),
|
|
155
|
+
);
|
|
156
|
+
</script>
|
|
157
|
+
|
|
158
|
+
<style scoped>
|
|
159
|
+
.match-stats {
|
|
160
|
+
display: flex;
|
|
161
|
+
gap: 24px;
|
|
162
|
+
align-items: center;
|
|
163
|
+
}
|
|
164
|
+
.match-stat {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
align-items: flex-end;
|
|
168
|
+
gap: 2px;
|
|
169
|
+
}
|
|
170
|
+
.match-stat-label {
|
|
171
|
+
font-size: 11px;
|
|
172
|
+
color: var(--text-muted);
|
|
173
|
+
text-transform: uppercase;
|
|
174
|
+
letter-spacing: 0.5px;
|
|
175
|
+
}
|
|
176
|
+
.match-stat-value {
|
|
177
|
+
font-size: 18px;
|
|
178
|
+
font-weight: 700;
|
|
179
|
+
color: var(--text-primary);
|
|
180
|
+
margin: 0;
|
|
181
|
+
}
|
|
182
|
+
.match-stat-pill {
|
|
183
|
+
display: inline-block;
|
|
184
|
+
padding: 2px 10px;
|
|
185
|
+
border-radius: 999px;
|
|
186
|
+
font-size: 14px;
|
|
187
|
+
font-variant-numeric: tabular-nums;
|
|
188
|
+
}
|
|
189
|
+
.match-stat-pill.high {
|
|
190
|
+
background: var(--color-success-bg);
|
|
191
|
+
color: var(--color-success);
|
|
192
|
+
}
|
|
193
|
+
.match-stat-pill.low {
|
|
194
|
+
background: var(--color-warning-bg);
|
|
195
|
+
color: var(--color-warning);
|
|
196
|
+
}
|
|
197
|
+
.score-badge {
|
|
198
|
+
display: inline-block;
|
|
199
|
+
padding: 2px 8px;
|
|
200
|
+
border-radius: 12px;
|
|
201
|
+
font-size: 12px;
|
|
202
|
+
font-weight: 600;
|
|
203
|
+
cursor: help;
|
|
204
|
+
}
|
|
205
|
+
.score-high { background: var(--color-success-bg); color: var(--color-success); }
|
|
206
|
+
.score-low { background: var(--color-warning-bg); color: var(--color-warning); }
|
|
207
|
+
</style>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Onglet PubMed de la fiche professionnel (porte de la page hcps/[id]/pubmed
|
|
3
|
+
de France Augmented Science).
|
|
4
|
+
-->
|
|
5
|
+
<template>
|
|
6
|
+
<div class="oip-science">
|
|
7
|
+
<div v-if="!isLoading && pubmedResults.length" class="oip_grid gap-24">
|
|
8
|
+
<RmResultsLine icon="Article" :items="[{ count: pubmedResults.length, label: $t('oipScience.resultKpis.publications', pubmedResults.length) }]" />
|
|
9
|
+
<div v-for="(res, index) in pubmedResults" :key="index">
|
|
10
|
+
<OipSciencePubmedCards
|
|
11
|
+
:data="res"
|
|
12
|
+
:id="res.PubMed_ID"
|
|
13
|
+
:match-score="scoreByPmid[res.PubMed_ID] ?? null"
|
|
14
|
+
:match-method="methodByPmid[res.PubMed_ID] || null"
|
|
15
|
+
:highlight="highlight"
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
<RmLoadingState v-if="isLoading" :lines="3" :chart-height="240" />
|
|
20
|
+
<RmEmptyState
|
|
21
|
+
v-if="!isLoading && !pubmedResults.length"
|
|
22
|
+
:title="$t('oipScience.common.noDataTitle')"
|
|
23
|
+
:text="$t('oipScience.common.noDataText')"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import indexConfig from '../../../oip-science/indexConfig.json';
|
|
30
|
+
import useOipElastic from '../../../oip-science/composables/useOipElastic';
|
|
31
|
+
|
|
32
|
+
const props = withDefaults(defineProps<{ id: string; highlight?: string[]; lang?: 'fr' | 'en' }>(), {
|
|
33
|
+
highlight: () => [],
|
|
34
|
+
lang: undefined,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const { queryCustomElastic, queryOneElastic } = useOipElastic();
|
|
38
|
+
|
|
39
|
+
const isLoading = ref(true);
|
|
40
|
+
const pubmedResults = ref<any[]>([]);
|
|
41
|
+
const scoreByPmid = ref<Record<string, number | null>>({});
|
|
42
|
+
const methodByPmid = ref<Record<string, string | null>>({});
|
|
43
|
+
|
|
44
|
+
async function load(urlId: string) {
|
|
45
|
+
isLoading.value = true;
|
|
46
|
+
pubmedResults.value = [];
|
|
47
|
+
scoreByPmid.value = {};
|
|
48
|
+
methodByPmid.value = {};
|
|
49
|
+
try {
|
|
50
|
+
// Pull pubmed_trial[] directly from the new HCP directory doc
|
|
51
|
+
const hcp: any = await queryOneElastic({
|
|
52
|
+
index: indexConfig.hcps.index,
|
|
53
|
+
cluster: indexConfig.hcps.cluster,
|
|
54
|
+
path: 'hcp_code',
|
|
55
|
+
id: urlId,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const pubmedIds = [
|
|
59
|
+
...new Set(
|
|
60
|
+
(hcp?.pubmed_trial || [])
|
|
61
|
+
.map((t: any) => t?.clinical_trial_id)
|
|
62
|
+
.filter(Boolean),
|
|
63
|
+
),
|
|
64
|
+
] as string[];
|
|
65
|
+
|
|
66
|
+
if (pubmedIds.length === 0) return;
|
|
67
|
+
|
|
68
|
+
// Fetch per-paper match scores for this HCP from the per-trial hcpPubmed index
|
|
69
|
+
const scoresRes = await queryCustomElastic({
|
|
70
|
+
index: indexConfig.hcpPubmed.index,
|
|
71
|
+
cluster: indexConfig.hcpPubmed.cluster,
|
|
72
|
+
customQuery: {
|
|
73
|
+
size: pubmedIds.length,
|
|
74
|
+
_source: ['PubMed_ID', 'hcp.hcp_code', 'hcp.score', 'hcp.match_method'],
|
|
75
|
+
query: {
|
|
76
|
+
bool: {
|
|
77
|
+
must: [
|
|
78
|
+
{ terms: { PubMed_ID: pubmedIds } },
|
|
79
|
+
{
|
|
80
|
+
nested: {
|
|
81
|
+
path: 'hcp',
|
|
82
|
+
query: { term: { 'hcp.hcp_code.keyword': urlId } },
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
const scoreMap: Record<string, number | null> = {};
|
|
92
|
+
const methodMap: Record<string, string | null> = {};
|
|
93
|
+
for (const doc of scoresRes?.results || []) {
|
|
94
|
+
if (!doc?.PubMed_ID) continue;
|
|
95
|
+
const matched = (doc?.hcp || []).find((h: any) => h?.hcp_code === urlId);
|
|
96
|
+
if (matched) {
|
|
97
|
+
scoreMap[doc.PubMed_ID] = typeof matched.score === 'number' ? matched.score : null;
|
|
98
|
+
methodMap[doc.PubMed_ID] = matched.match_method || null;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
scoreByPmid.value = scoreMap;
|
|
102
|
+
methodByPmid.value = methodMap;
|
|
103
|
+
|
|
104
|
+
const batchSize = 1000;
|
|
105
|
+
const all: any[] = [];
|
|
106
|
+
for (let i = 0; i < pubmedIds.length; i += batchSize) {
|
|
107
|
+
const batch = pubmedIds.slice(i, i + batchSize);
|
|
108
|
+
const res = await queryCustomElastic({
|
|
109
|
+
index: indexConfig.pubmed.index,
|
|
110
|
+
cluster: indexConfig.pubmed.cluster,
|
|
111
|
+
customQuery: {
|
|
112
|
+
size: batch.length,
|
|
113
|
+
query: { terms: { 'PubMed_ID.keyword': batch } },
|
|
114
|
+
sort: [{ article_date: { order: 'desc' } }],
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
all.push(...(res?.results || []));
|
|
118
|
+
}
|
|
119
|
+
pubmedResults.value = all;
|
|
120
|
+
} catch (e) {
|
|
121
|
+
console.error(e);
|
|
122
|
+
} finally {
|
|
123
|
+
isLoading.value = false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
watch(() => props.id, (id) => { if (id) load(id); }, { immediate: true });
|
|
128
|
+
</script>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Onglets segmentes d'une liste (anciennement LocalSliderTabs de France
|
|
3
|
+
Augmented Science). L'onglet choisi va dans le contexte de la liste parente
|
|
4
|
+
(c-filterContext).
|
|
5
|
+
-->
|
|
6
|
+
<template>
|
|
7
|
+
<div>
|
|
8
|
+
<OipScienceLocalSliderTabsFull
|
|
9
|
+
v-if="isFullWidth"
|
|
10
|
+
:tabs="tabs"
|
|
11
|
+
:active-tab="selectedItem"
|
|
12
|
+
:switch-tab="changeSelectValue"
|
|
13
|
+
:sliderId="sliderId"
|
|
14
|
+
/>
|
|
15
|
+
|
|
16
|
+
<RmSegmented
|
|
17
|
+
v-else
|
|
18
|
+
:model-value="selectedItem"
|
|
19
|
+
:options="indexedSegments(tabs)"
|
|
20
|
+
@update:model-value="changeSelectValue"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { useOipFilterContext } from '../../../oip-science/utils/c-filterContext';
|
|
26
|
+
import { indexedSegments } from '../../../oip-science/utils/sliderTabs';
|
|
27
|
+
|
|
28
|
+
const filterContext = useOipFilterContext();
|
|
29
|
+
|
|
30
|
+
const emit = defineEmits(['changeElement']);
|
|
31
|
+
|
|
32
|
+
const props = defineProps({
|
|
33
|
+
filterValues: {
|
|
34
|
+
type: [Array, String, Function],
|
|
35
|
+
required: true,
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
filterName: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
keyName: {
|
|
44
|
+
type: String,
|
|
45
|
+
required: false,
|
|
46
|
+
default: null,
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
tabs: {
|
|
50
|
+
type: Array,
|
|
51
|
+
required: false,
|
|
52
|
+
default: [
|
|
53
|
+
{ label: 'List', icon: 'List' },
|
|
54
|
+
{ label: 'Dashboard', icon: 'SquaresFour' },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
sliderId: {
|
|
58
|
+
type: String,
|
|
59
|
+
required: false,
|
|
60
|
+
default: 'sliderTabs',
|
|
61
|
+
},
|
|
62
|
+
isFullWidth: {
|
|
63
|
+
type: Boolean,
|
|
64
|
+
required: false,
|
|
65
|
+
default: false,
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const selectedItem = ref(0 as Number);
|
|
70
|
+
|
|
71
|
+
onMounted(() => {
|
|
72
|
+
selectedItem.value =
|
|
73
|
+
(props.filterValues as number[]).length > 0
|
|
74
|
+
? (props.filterValues as number[])[0]
|
|
75
|
+
: 0;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
watch(
|
|
79
|
+
() => selectedItem.value,
|
|
80
|
+
(val) => {
|
|
81
|
+
filterContext.setAppFilters({
|
|
82
|
+
filter: props.filterName,
|
|
83
|
+
keyName: props.keyName,
|
|
84
|
+
values: val != 0 ? [val] : [],
|
|
85
|
+
});
|
|
86
|
+
emit('changeElement', val);
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const changeSelectValue = (val: any) => {
|
|
91
|
+
selectedItem.value = val;
|
|
92
|
+
};
|
|
93
|
+
</script>
|
|
94
|
+
|
|
95
|
+
<style>
|
|
96
|
+
.oip-science .isFullWidth > div > .wrapper {
|
|
97
|
+
width: 100% !important;
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!-- Onglets pleine largeur a indicateur glissant (anciennement LocalSliderTabsFull de FAS). -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="oip_row">
|
|
4
|
+
<div class="slider-tabs-columns wrapper relative">
|
|
5
|
+
<div
|
|
6
|
+
v-for="(tab, index) in tabs"
|
|
7
|
+
:key="index"
|
|
8
|
+
class="slider-tab-column"
|
|
9
|
+
:style="{ width: 100 / tabs.length + '%' }"
|
|
10
|
+
@click="updateButton(index)"
|
|
11
|
+
>
|
|
12
|
+
<div
|
|
13
|
+
:id="sliderId + tab.label + index"
|
|
14
|
+
:class="{ 'slider-tab-active': index === activeTab }"
|
|
15
|
+
>
|
|
16
|
+
<div class="slider-tab-label">
|
|
17
|
+
{{ tab.label }}
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Barre d'indication animée -->
|
|
23
|
+
<div
|
|
24
|
+
class="slider-tab-indicator"
|
|
25
|
+
:style="{
|
|
26
|
+
width: `calc(${100 / tabs.length}% - ${4 / tabs.length}px)`,
|
|
27
|
+
transform: `translateX(calc(${activeTab * 100}% + ${
|
|
28
|
+
activeTab * (4 / tabs.length)
|
|
29
|
+
}px))`,
|
|
30
|
+
}"
|
|
31
|
+
></div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
import { defineComponent } from 'vue';
|
|
38
|
+
|
|
39
|
+
interface Tab {
|
|
40
|
+
label: string;
|
|
41
|
+
icon?: string;
|
|
42
|
+
}
|
|
43
|
+
type Tabs = Array<Tab>;
|
|
44
|
+
|
|
45
|
+
export default defineComponent({
|
|
46
|
+
name: 'OipScienceLocalSliderTabsFull',
|
|
47
|
+
|
|
48
|
+
props: {
|
|
49
|
+
tabs: {
|
|
50
|
+
type: Array as () => Tabs,
|
|
51
|
+
required: true,
|
|
52
|
+
default: () => [{ label: '' }],
|
|
53
|
+
},
|
|
54
|
+
activeTab: {
|
|
55
|
+
type: Number,
|
|
56
|
+
required: true,
|
|
57
|
+
default: 0,
|
|
58
|
+
},
|
|
59
|
+
switchTab: {
|
|
60
|
+
type: Function,
|
|
61
|
+
required: true,
|
|
62
|
+
},
|
|
63
|
+
sliderId: {
|
|
64
|
+
type: String,
|
|
65
|
+
default: 'slider',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
setup(props) {
|
|
70
|
+
const updateButton = (value: number) => {
|
|
71
|
+
props.switchTab(value);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
return { updateButton };
|
|
75
|
+
},
|
|
76
|
+
});
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<style scoped>
|
|
80
|
+
.wrapper {
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
border: 1px solid rgba(82, 86, 112, 0.1);
|
|
83
|
+
background: rgba(82, 86, 112, 0.04);
|
|
84
|
+
padding: 2px;
|
|
85
|
+
width: 100%;
|
|
86
|
+
box-sizing: border-box;
|
|
87
|
+
display: flex;
|
|
88
|
+
justify-content: center;
|
|
89
|
+
position: relative;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.slider-tabs-columns {
|
|
94
|
+
display: flex;
|
|
95
|
+
width: 100%;
|
|
96
|
+
position: relative;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.slider-tab-column {
|
|
100
|
+
display: flex;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
align-items: center;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
z-index: 2;
|
|
105
|
+
height: 30px;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.slider-tab-label {
|
|
109
|
+
text-align: center;
|
|
110
|
+
color: var(--Main-Dark, var(--text-secondary));
|
|
111
|
+
font-family: Figtree;
|
|
112
|
+
font-size: 14px;
|
|
113
|
+
font-weight: 500;
|
|
114
|
+
z-index: 2;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.slider-tab-active .slider-tab-label {
|
|
118
|
+
color: var(--white);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.slider-tab-active {
|
|
122
|
+
z-index: 3;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.slider-tab-indicator {
|
|
126
|
+
position: absolute;
|
|
127
|
+
bottom: 2px;
|
|
128
|
+
left: 2px;
|
|
129
|
+
height: calc(100% - 4px);
|
|
130
|
+
border-radius: 8px;
|
|
131
|
+
background: var(--primary);
|
|
132
|
+
transition: all 0.4s ease;
|
|
133
|
+
z-index: 1;
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Onglet « Auteurs » d'une publication PubMed (portage de la page
|
|
3
|
+
/pubmed/[id]/authors de France Augmented Science). Les auteurs de la
|
|
4
|
+
publication, rapproches des professionnels de sante par l'index.
|
|
5
|
+
-->
|
|
6
|
+
<template>
|
|
7
|
+
<div class="oip-science">
|
|
8
|
+
<OipScienceHcpsLinkedList
|
|
9
|
+
v-if="!loaded || isLoadingQueryPubmed || resultsQueryPubmed"
|
|
10
|
+
:people="people"
|
|
11
|
+
:title="$t('oipScience.publication.authors')"
|
|
12
|
+
:sources="['PubMed']"
|
|
13
|
+
index-last-update="PubMed"
|
|
14
|
+
:loading="!loaded || isLoadingQueryPubmed || isLoadingMatches"
|
|
15
|
+
/>
|
|
16
|
+
<RmEmptyState v-else :title="$t('oipScience.common.noDataTitle')" :text="$t('oipScience.common.noDataText')" />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import usePubmed from '../../../oip-science/composables/usePubmed';
|
|
22
|
+
import useAuthorMatching from '../../../oip-science/composables/useAuthorMatching';
|
|
23
|
+
import type { LinkedPerson } from '../hcps/LinkedList.vue';
|
|
24
|
+
|
|
25
|
+
const props = withDefaults(
|
|
26
|
+
defineProps<{
|
|
27
|
+
/** PMID de la publication. */
|
|
28
|
+
id: string;
|
|
29
|
+
highlight?: string[];
|
|
30
|
+
lang?: 'fr' | 'en';
|
|
31
|
+
}>(),
|
|
32
|
+
{ highlight: () => [], lang: 'fr' },
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
const { findPubmedById, resultsQueryPubmed, isLoadingQueryPubmed } = usePubmed();
|
|
36
|
+
const { fetchPubmedAuthorMatches, normalize } = useAuthorMatching();
|
|
37
|
+
|
|
38
|
+
type PubmedHcpMatch = Awaited<ReturnType<typeof fetchPubmedAuthorMatches>>[number];
|
|
39
|
+
const pubmedMatches = ref<PubmedHcpMatch[]>([]);
|
|
40
|
+
const matchByName = ref<Map<string, PubmedHcpMatch>>(new Map());
|
|
41
|
+
const isLoadingMatches = ref(true);
|
|
42
|
+
// Le composable part a `false` : sans ce drapeau, l'etat vide sortirait avant la requete.
|
|
43
|
+
const loaded = ref(false);
|
|
44
|
+
|
|
45
|
+
async function load() {
|
|
46
|
+
if (!props.id) return;
|
|
47
|
+
const id = props.id.toString();
|
|
48
|
+
isLoadingMatches.value = true;
|
|
49
|
+
try {
|
|
50
|
+
await findPubmedById({ id, source: ['authors'] });
|
|
51
|
+
pubmedMatches.value = await fetchPubmedAuthorMatches(id);
|
|
52
|
+
const map = new Map<string, PubmedHcpMatch>();
|
|
53
|
+
for (const m of pubmedMatches.value) {
|
|
54
|
+
const first = normalize(m.first_name);
|
|
55
|
+
const family = normalize(m.family_name);
|
|
56
|
+
if (first && family) {
|
|
57
|
+
map.set(first + family, m);
|
|
58
|
+
map.set(family + first, m);
|
|
59
|
+
}
|
|
60
|
+
if (family) map.set(family, m);
|
|
61
|
+
}
|
|
62
|
+
matchByName.value = map;
|
|
63
|
+
} finally {
|
|
64
|
+
isLoadingMatches.value = false;
|
|
65
|
+
loaded.value = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
onMounted(load);
|
|
70
|
+
watch(() => props.id, load);
|
|
71
|
+
|
|
72
|
+
function findMatch(name: string): PubmedHcpMatch | null {
|
|
73
|
+
const n = normalize(name);
|
|
74
|
+
if (!n) return null;
|
|
75
|
+
const direct = matchByName.value.get(n);
|
|
76
|
+
if (direct) return direct;
|
|
77
|
+
for (const m of pubmedMatches.value) {
|
|
78
|
+
const family = normalize(m.family_name);
|
|
79
|
+
if (family && family.length >= 3 && n.includes(family)) {
|
|
80
|
+
const first = normalize(m.first_name);
|
|
81
|
+
if (!first || first.length < 2 || n.includes(first.slice(0, 2))) {
|
|
82
|
+
return m;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const people = computed<LinkedPerson[]>(() => {
|
|
90
|
+
const seen = new Set<string>();
|
|
91
|
+
const rows: LinkedPerson[] = (((resultsQueryPubmed.value as any)?.authors as any[]) || []).map((item) => {
|
|
92
|
+
const fullName = `${item.forename || ''} ${item.lastname || ''}`.trim();
|
|
93
|
+
const m = findMatch(fullName);
|
|
94
|
+
if (m) seen.add(m.hcp_code);
|
|
95
|
+
const primary = (m?.address || []).find((a: any) => a?.hco_et_code) || null;
|
|
96
|
+
return {
|
|
97
|
+
name: fullName || null,
|
|
98
|
+
facility: item.affiliation || primary?.hco_et_label || null,
|
|
99
|
+
city: primary?.city || null,
|
|
100
|
+
rpps: m?.hcp_code || null,
|
|
101
|
+
score: m?.score ?? null,
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Professionnels rapproches par l'index mais absents de la liste d'auteurs.
|
|
106
|
+
for (const m of pubmedMatches.value) {
|
|
107
|
+
if (seen.has(m.hcp_code)) continue;
|
|
108
|
+
const primary = (m.address || []).find((a: any) => a?.hco_et_code) || null;
|
|
109
|
+
rows.push({
|
|
110
|
+
name: `${m.first_name} ${m.family_name}`.trim(),
|
|
111
|
+
facility: primary?.hco_et_label || null,
|
|
112
|
+
city: primary?.city || null,
|
|
113
|
+
country: 'France',
|
|
114
|
+
rpps: m.hcp_code,
|
|
115
|
+
score: m.score,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Une personne par RPPS, sinon par nom.
|
|
120
|
+
const unique = new Map<string, LinkedPerson>();
|
|
121
|
+
for (const row of rows) {
|
|
122
|
+
const key = row.rpps ? `rpps:${row.rpps}` : `name:${normalize(row.name || '')}`;
|
|
123
|
+
if (key === 'name:' || unique.has(key)) continue;
|
|
124
|
+
unique.set(key, row);
|
|
125
|
+
}
|
|
126
|
+
return [...unique.values()];
|
|
127
|
+
});
|
|
128
|
+
</script>
|