@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.
Files changed (265) hide show
  1. package/dist/module.json +1 -1
  2. package/layer/app/app.config.ts +6 -0
  3. package/layer/app/components/OipPubmedSummary.vue +223 -0
  4. package/layer/app/components/OipResourceDrawer.vue +331 -0
  5. package/layer/app/components/OipResourceDrawerLink.vue +40 -0
  6. package/layer/app/components/OipResourceField.vue +41 -0
  7. package/layer/app/components/OipResourceGenericCard.vue +54 -0
  8. package/layer/app/components/OipResourceSource.vue +50 -0
  9. package/layer/app/components/OipResourceTags.vue +65 -0
  10. package/layer/app/components/OipResourceView.vue +107 -0
  11. package/layer/app/components/oip-drugs/fiches/AssociationFiche.vue +775 -0
  12. package/layer/app/components/oip-drugs/fiches/BrandFiche.vue +1111 -0
  13. package/layer/app/components/oip-drugs/fiches/IndicationFiche.vue +182 -0
  14. package/layer/app/components/oip-drugs/fiches/JoFiche.vue +101 -0
  15. package/layer/app/components/oip-drugs/fiches/PndsFiche.vue +279 -0
  16. package/layer/app/components/oip-drugs/heart/JoCard.vue +314 -0
  17. package/layer/app/components/oip-drugs/heart/TextHighlight.vue +326 -0
  18. package/layer/app/components/oip-drugs/heart/ansm/BrandCard.vue +187 -0
  19. package/layer/app/components/oip-drugs/heart/ansm/CisDetail.vue +363 -0
  20. package/layer/app/components/oip-drugs/heart/ansm/CisTable.vue +167 -0
  21. package/layer/app/components/oip-drugs/heart/associations/NationalAssemblyCard.vue +373 -0
  22. package/layer/app/components/oip-drugs/heart/associations/NationalAssemblyFiche.vue +372 -0
  23. package/layer/app/components/oip-drugs/heart/associations/TranscriptionCard.vue +55 -0
  24. package/layer/app/components/oip-drugs/heart/elastic/SourceContainerElastic.vue +103 -0
  25. package/layer/app/components/oip-drugs/heart/france/BrandGroupCard.vue +450 -0
  26. package/layer/app/components/oip-drugs/heart/mitm/Card.vue +199 -0
  27. package/layer/app/components/oip-drugs/heart/mitm/Source.vue +23 -0
  28. package/layer/app/components/oip-drugs/heart/mitm/details/Overview.vue +381 -0
  29. package/layer/app/components/oip-drugs/heart/put/Card.vue +212 -0
  30. package/layer/app/components/oip-drugs/heart/results/AccesCard.vue +696 -0
  31. package/layer/app/components/oip-drugs/heart/results/AlertCard.vue +342 -0
  32. package/layer/app/components/oip-drugs/heart/results/AsmrCursor.vue +229 -0
  33. package/layer/app/components/oip-drugs/heart/results/EvalCard.vue +370 -0
  34. package/layer/app/components/oip-drugs/heart/results/IndicCard.vue +743 -0
  35. package/layer/app/components/oip-drugs/heart/results/MatchExplain.vue +243 -0
  36. package/layer/app/components/oip-drugs/heart/results/PrefRows.vue +105 -0
  37. package/layer/app/components/oip-drugs/heart/results/details/HasHistory.vue +487 -0
  38. package/layer/app/components/oip-drugs/heart/results/details/InternationalCountryCard.vue +461 -0
  39. package/layer/app/components/oip-drugs/heart/results/details/InternationalOverview.vue +200 -0
  40. package/layer/app/components/oip-drugs/heart/results/details/InternationalPriceDrawer.vue +647 -0
  41. package/layer/app/components/oip-drugs/heart/results/details/Monograph.vue +128 -0
  42. package/layer/app/components/oip-drugs/heart/results/details/OpinionDrawer.vue +535 -0
  43. package/layer/app/components/oip-drugs/heart/results/details/PresentationDrawer.vue +738 -0
  44. package/layer/app/components/oip-drugs/heart/results/details/Price.vue +227 -0
  45. package/layer/app/components/oip-drugs/heart/results/details/PriceOverview.vue +1261 -0
  46. package/layer/app/components/oip-drugs/heart/results/details/RecordDrawer.vue +494 -0
  47. package/layer/app/components/oip-drugs/heart/results/details/RecordList.vue +426 -0
  48. package/layer/app/components/oip-drugs/heart/results/les/Card.vue +340 -0
  49. package/layer/app/components/oip-drugs/heart/results/les/Drawer.vue +67 -0
  50. package/layer/app/components/oip-drugs/heart/results/les/IndicationDetail.vue +149 -0
  51. package/layer/app/components/oip-drugs/heart/results/les/Source.vue +20 -0
  52. package/layer/app/components/oip-drugs/heart/results/les/SourceTag.vue +39 -0
  53. package/layer/app/components/oip-drugs/heart/searchPage/DynamicSource.vue +29 -0
  54. package/layer/app/components/oip-drugs/medicam/market/Chart.vue +121 -0
  55. package/layer/app/components/oip-drugs/outpatient/ProductEvolution.vue +236 -0
  56. package/layer/app/components/oip-drugs/resources/Ansm.vue +75 -0
  57. package/layer/app/components/oip-drugs/resources/Association.vue +30 -0
  58. package/layer/app/components/oip-drugs/resources/Brand.vue +65 -0
  59. package/layer/app/components/oip-drugs/resources/Contribution.vue +216 -0
  60. package/layer/app/components/oip-drugs/resources/Hospital.vue +151 -0
  61. package/layer/app/components/oip-drugs/resources/Indication.vue +54 -0
  62. package/layer/app/components/oip-drugs/resources/Jo.vue +57 -0
  63. package/layer/app/components/oip-drugs/resources/Medicam.vue +140 -0
  64. package/layer/app/components/oip-drugs/resources/Mitm.vue +84 -0
  65. package/layer/app/components/oip-drugs/resources/NationalAssembly.vue +93 -0
  66. package/layer/app/components/oip-drugs/resources/Outpatient.vue +97 -0
  67. package/layer/app/components/oip-drugs/resources/Pnds.vue +24 -0
  68. package/layer/app/components/oip-drugs/resources/Price.vue +106 -0
  69. package/layer/app/components/oip-drugs/resources/Put.vue +143 -0
  70. package/layer/app/components/oip-science/appel-a-projet/Cards.vue +162 -0
  71. package/layer/app/components/oip-science/clinical-trials/Cards.vue +382 -0
  72. package/layer/app/components/oip-science/clinical-trials/CardsGlobal.vue +273 -0
  73. package/layer/app/components/oip-science/clinical-trials/LinkedList.vue +366 -0
  74. package/layer/app/components/oip-science/clinical-trials/PairBadge.vue +25 -0
  75. package/layer/app/components/oip-science/clinical-trials/PairBody.vue +182 -0
  76. package/layer/app/components/oip-science/clinical-trials/SitesDrawer.vue +95 -0
  77. package/layer/app/components/oip-science/common/Form.vue +73 -0
  78. package/layer/app/components/oip-science/common/MatchAvgTag.vue +283 -0
  79. package/layer/app/components/oip-science/common/NoData.vue +16 -0
  80. package/layer/app/components/oip-science/common/ScoreBadge.vue +35 -0
  81. package/layer/app/components/oip-science/common/Source.vue +31 -0
  82. package/layer/app/components/oip-science/common/TableTags.vue +279 -0
  83. package/layer/app/components/oip-science/common/Timeline.vue +104 -0
  84. package/layer/app/components/oip-science/common/ToolTips.vue +89 -0
  85. package/layer/app/components/oip-science/cross/publicationPubmed.vue +484 -0
  86. package/layer/app/components/oip-science/crossData/CrossDataLocations.vue +71 -0
  87. package/layer/app/components/oip-science/ctgov/Investigators.vue +148 -0
  88. package/layer/app/components/oip-science/ctgov/Locations.vue +102 -0
  89. package/layer/app/components/oip-science/ctgov/Publications.vue +52 -0
  90. package/layer/app/components/oip-science/ctgov/Sponsors.vue +66 -0
  91. package/layer/app/components/oip-science/ctgov/StudyDescription.vue +1136 -0
  92. package/layer/app/components/oip-science/ctgov-centers/ClinicalTrials.vue +40 -0
  93. package/layer/app/components/oip-science/ctgov-centers/Publications.vue +50 -0
  94. package/layer/app/components/oip-science/ctgov-investigators/ClinicalTrials.vue +43 -0
  95. package/layer/app/components/oip-science/ctgov-investigators/Informations.vue +171 -0
  96. package/layer/app/components/oip-science/ctgov-investigators/Publications.vue +44 -0
  97. package/layer/app/components/oip-science/elastic/DateRangeFilter.vue +209 -0
  98. package/layer/app/components/oip-science/elastic/Filter.vue +719 -0
  99. package/layer/app/components/oip-science/elastic/MatchExplain.vue +152 -0
  100. package/layer/app/components/oip-science/establishments/Cards.vue +183 -0
  101. package/layer/app/components/oip-science/establishments/ClinicalTrials.vue +62 -0
  102. package/layer/app/components/oip-science/establishments/Hcps.vue +227 -0
  103. package/layer/app/components/oip-science/establishments/Informations.vue +263 -0
  104. package/layer/app/components/oip-science/establishments/LinkedList.vue +153 -0
  105. package/layer/app/components/oip-science/establishments/MatchedLabels.vue +194 -0
  106. package/layer/app/components/oip-science/establishments/PublicFinance.vue +62 -0
  107. package/layer/app/components/oip-science/euct/Investigators.vue +125 -0
  108. package/layer/app/components/oip-science/euct/Locations.vue +102 -0
  109. package/layer/app/components/oip-science/euct/Products.vue +101 -0
  110. package/layer/app/components/oip-science/euct/Publications.vue +89 -0
  111. package/layer/app/components/oip-science/euct/Sponsors.vue +86 -0
  112. package/layer/app/components/oip-science/euct/StudyDescription.vue +1075 -0
  113. package/layer/app/components/oip-science/euct-centers/ClinicalTrials.vue +40 -0
  114. package/layer/app/components/oip-science/euct-centers/Publications.vue +55 -0
  115. package/layer/app/components/oip-science/euct-investigators/ClinicalTrials.vue +41 -0
  116. package/layer/app/components/oip-science/euct-investigators/Informations.vue +171 -0
  117. package/layer/app/components/oip-science/euct-investigators/Publications.vue +51 -0
  118. package/layer/app/components/oip-science/hcps/AppelsAProjet.vue +62 -0
  119. package/layer/app/components/oip-science/hcps/Cards.vue +237 -0
  120. package/layer/app/components/oip-science/hcps/ClinicalTrials.vue +78 -0
  121. package/layer/app/components/oip-science/hcps/Informations.vue +296 -0
  122. package/layer/app/components/oip-science/hcps/LinkedList.vue +153 -0
  123. package/layer/app/components/oip-science/hcps/MatchedLabels.vue +207 -0
  124. package/layer/app/components/oip-science/hcps/Pubmed.vue +128 -0
  125. package/layer/app/components/oip-science/local/SliderTabs.vue +99 -0
  126. package/layer/app/components/oip-science/local/SliderTabsFull.vue +135 -0
  127. package/layer/app/components/oip-science/pubmed/Authors.vue +128 -0
  128. package/layer/app/components/oip-science/pubmed/Cards.vue +417 -0
  129. package/layer/app/components/oip-science/pubmed/ClinicalTrials.vue +71 -0
  130. package/layer/app/components/oip-science/resources/Phrc.vue +39 -0
  131. package/layer/app/composables/useOipChapterScroll.ts +43 -0
  132. package/layer/app/composables/useOipResourceHooks.ts +27 -0
  133. package/layer/app/composables/useOipResourceNav.ts +66 -0
  134. package/layer/app/composables/useOipResourceViews.ts +117 -0
  135. package/layer/app/composables/useOipResources.ts +83 -0
  136. package/layer/app/oip-drugs/PORTING.md +120 -0
  137. package/layer/app/oip-drugs/composables/useAssociationDetail.ts +220 -0
  138. package/layer/app/oip-drugs/composables/useAssociationExport.ts +63 -0
  139. package/layer/app/oip-drugs/composables/useAssociationLookup.ts +105 -0
  140. package/layer/app/oip-drugs/composables/useCardPrefOptions.ts +201 -0
  141. package/layer/app/oip-drugs/composables/useCurrency.ts +121 -0
  142. package/layer/app/oip-drugs/composables/useDirectusSources.ts +224 -0
  143. package/layer/app/oip-drugs/composables/useHeartBrandMatches.ts +112 -0
  144. package/layer/app/oip-drugs/composables/useHeartDetailSearches.ts +479 -0
  145. package/layer/app/oip-drugs/composables/useHeartIntlApprovals.ts +661 -0
  146. package/layer/app/oip-drugs/composables/useHeartLesIndication.ts +168 -0
  147. package/layer/app/oip-drugs/composables/useHeartMatchExplain.ts +231 -0
  148. package/layer/app/oip-drugs/composables/useHeartReports.ts +239 -0
  149. package/layer/app/oip-drugs/composables/useHeartSearchFields.ts +233 -0
  150. package/layer/app/oip-drugs/composables/useMergeByKey.ts +23 -0
  151. package/layer/app/oip-drugs/composables/useOipDrugsElastic.ts +621 -0
  152. package/layer/app/oip-drugs/composables/usePageEmpty.ts +58 -0
  153. package/layer/app/oip-drugs/composables/v-useSalesSource.ts +64 -0
  154. package/layer/app/oip-drugs/drugs.css +500 -0
  155. package/layer/app/oip-drugs/esIndices.ts +322 -0
  156. package/layer/app/oip-drugs/kinds.ts +264 -0
  157. package/layer/app/oip-drugs/locales/en.json +1571 -0
  158. package/layer/app/oip-drugs/locales/fr.json +1571 -0
  159. package/layer/app/oip-drugs/monographs/blincyto-has.vue +289 -0
  160. package/layer/app/oip-drugs/monographs/darzalex-has.vue +276 -0
  161. package/layer/app/oip-drugs/monographs/dupixent-has.vue +216 -0
  162. package/layer/app/oip-drugs/monographs/enhertu-has.vue +280 -0
  163. package/layer/app/oip-drugs/monographs/has-sein-2023.vue +1649 -0
  164. package/layer/app/oip-drugs/monographs/ibrance-has.vue +277 -0
  165. package/layer/app/oip-drugs/monographs/imfinzi-has.vue +293 -0
  166. package/layer/app/oip-drugs/monographs/keytruda-has.vue +334 -0
  167. package/layer/app/oip-drugs/monographs/kisqali-has.vue +201 -0
  168. package/layer/app/oip-drugs/monographs/opdivo-has.vue +231 -0
  169. package/layer/app/oip-drugs/monographs/ozempic-has.vue +186 -0
  170. package/layer/app/oip-drugs/monographs/tecentriq-has.vue +312 -0
  171. package/layer/app/oip-drugs/monographs/yescarta-has.vue +272 -0
  172. package/layer/app/oip-drugs/types/elastic.ts +113 -0
  173. package/layer/app/oip-drugs/types/es/agencies.ts +152 -0
  174. package/layer/app/oip-drugs/types/es/directory.ts +54 -0
  175. package/layer/app/oip-drugs/types/es/docByIndex.ts +151 -0
  176. package/layer/app/oip-drugs/types/es/openmedic.ts +67 -0
  177. package/layer/app/oip-drugs/types/es/outpatient.ts +71 -0
  178. package/layer/app/oip-drugs/types/es/portal.ts +130 -0
  179. package/layer/app/oip-drugs/types/es/retail.ts +107 -0
  180. package/layer/app/oip-drugs/types/es/statistics.ts +29 -0
  181. package/layer/app/oip-drugs/types/heart/CurrencyRate.ts +16 -0
  182. package/layer/app/oip-drugs/types/heart/ansm.ts +106 -0
  183. package/layer/app/oip-drugs/types/heart/tag.ts +29 -0
  184. package/layer/app/oip-drugs/utils/associationFields.ts +118 -0
  185. package/layer/app/oip-drugs/utils/contributions.ts +36 -0
  186. package/layer/app/oip-drugs/utils/countryMapping.ts +387 -0
  187. package/layer/app/oip-drugs/utils/esHighlight.ts +21 -0
  188. package/layer/app/oip-drugs/utils/exportSheets.ts +57 -0
  189. package/layer/app/oip-drugs/utils/heartIntlPrice.ts +228 -0
  190. package/layer/app/oip-drugs/utils/heartStyleAndFormat.ts +262 -0
  191. package/layer/app/oip-drugs/utils/heartStyleAnsm.ts +71 -0
  192. package/layer/app/oip-drugs/utils/latestDate.ts +31 -0
  193. package/layer/app/oip-drugs/utils/p-heartCardTags.ts +53 -0
  194. package/layer/app/oip-drugs/utils/priceExport.ts +269 -0
  195. package/layer/app/oip-drugs/utils/q-hasRatings.ts +43 -0
  196. package/layer/app/oip-drugs/utils/s-openCard.ts +20 -0
  197. package/layer/app/oip-drugs/utils/sourceUuids.ts +155 -0
  198. package/layer/app/oip-drugs/utils/styleAndFormat.ts +40 -0
  199. package/layer/app/oip-drugs/utils/v-salesSeries.ts +156 -0
  200. package/layer/app/oip-drugs/utils/v-scopeTags.ts +23 -0
  201. package/layer/app/oip-science/PORTING.md +93 -0
  202. package/layer/app/oip-science/assets/smartSelection.json +428 -0
  203. package/layer/app/oip-science/composables/useAuthorMatching.ts +342 -0
  204. package/layer/app/oip-science/composables/useCTCenter.ts +107 -0
  205. package/layer/app/oip-science/composables/useCTInvestigators.ts +107 -0
  206. package/layer/app/oip-science/composables/useEstablishmentCrossData.ts +139 -0
  207. package/layer/app/oip-science/composables/useEstablishmentMatching.ts +176 -0
  208. package/layer/app/oip-science/composables/useEuct.ts +418 -0
  209. package/layer/app/oip-science/composables/useEuctCenter.ts +107 -0
  210. package/layer/app/oip-science/composables/useEuctInvestigators.ts +107 -0
  211. package/layer/app/oip-science/composables/useGlobalClinicalTrials.ts +624 -0
  212. package/layer/app/oip-science/composables/useLinkedTrials.ts +83 -0
  213. package/layer/app/oip-science/composables/useOipElastic.ts +658 -0
  214. package/layer/app/oip-science/composables/useOipSearchExplain.ts +166 -0
  215. package/layer/app/oip-science/composables/usePubmed.ts +487 -0
  216. package/layer/app/oip-science/composables/useSearchFields.ts +153 -0
  217. package/layer/app/oip-science/indexConfig.json +794 -0
  218. package/layer/app/oip-science/locales/en.json +483 -0
  219. package/layer/app/oip-science/locales/fr.json +483 -0
  220. package/layer/app/oip-science/science.css +1182 -0
  221. package/layer/app/oip-science/utils/a-openCard.ts +23 -0
  222. package/layer/app/oip-science/utils/b-openCard.ts +35 -0
  223. package/layer/app/oip-science/utils/c-filterContext.ts +81 -0
  224. package/layer/app/oip-science/utils/f-types.ts +241 -0
  225. package/layer/app/oip-science/utils/frDiseaseTerms.ts +269 -0
  226. package/layer/app/oip-science/utils/matchMethod.ts +53 -0
  227. package/layer/app/oip-science/utils/sliderTabs.ts +13 -0
  228. package/layer/app/oip-science/utils/sources.ts +15 -0
  229. package/layer/app/oip-science/utils/styleAndFormat.ts +608 -0
  230. package/layer/app/oip-science/utils/toPresets.ts +7 -0
  231. package/layer/app/oip-science/utils/valueTable.ts +126 -0
  232. package/layer/app/plugins/oip-science-i18n.ts +17 -0
  233. package/layer/app/utils/oipFicheRoutes.ts +118 -0
  234. package/layer/app/utils/oipResources.ts +440 -0
  235. package/layer/nuxt.config.ts +22 -2
  236. package/layer/public/reports/blincyto-has.html +292 -0
  237. package/layer/public/reports/blincyto-has.pdf +0 -0
  238. package/layer/public/reports/darzalex-has.html +279 -0
  239. package/layer/public/reports/darzalex-has.pdf +0 -0
  240. package/layer/public/reports/dupixent-has.html +217 -0
  241. package/layer/public/reports/dupixent-has.pdf +0 -0
  242. package/layer/public/reports/enhertu-has.html +283 -0
  243. package/layer/public/reports/enhertu-has.pdf +0 -0
  244. package/layer/public/reports/has-sein-2023.html +1639 -0
  245. package/layer/public/reports/ibrance-has.html +280 -0
  246. package/layer/public/reports/ibrance-has.pdf +0 -0
  247. package/layer/public/reports/imfinzi-has.html +297 -0
  248. package/layer/public/reports/imfinzi-has.pdf +0 -0
  249. package/layer/public/reports/keytruda-has.html +337 -0
  250. package/layer/public/reports/keytruda-has.pdf +0 -0
  251. package/layer/public/reports/kisqali-has.html +202 -0
  252. package/layer/public/reports/kisqali-has.pdf +0 -0
  253. package/layer/public/reports/opdivo-has.html +232 -0
  254. package/layer/public/reports/opdivo-has.pdf +0 -0
  255. package/layer/public/reports/ozempic-has.html +188 -0
  256. package/layer/public/reports/ozempic-has.pdf +0 -0
  257. package/layer/public/reports/tecentriq-has.html +315 -0
  258. package/layer/public/reports/tecentriq-has.pdf +0 -0
  259. package/layer/public/reports/yescarta-has.html +275 -0
  260. package/layer/public/reports/yescarta-has.pdf +0 -0
  261. package/layer/server/api/oip/es.post.ts +99 -0
  262. package/layer/server/api/oip/pdf.get.ts +70 -0
  263. package/layer/server/api/oip/reports.get.ts +98 -0
  264. package/layer/server/api/oip/resource-types.get.ts +22 -0
  265. package/package.json +1 -1
@@ -0,0 +1,263 @@
1
+ <!--
2
+ Onglet Informations de la fiche etablissement (porte de la page
3
+ establishments/[id]/informations de France Augmented Science). Dans FAS
4
+ l'en-tete chargeait le document (useState('current-establishment')) :
5
+ l'onglet le relit lui-meme. Les cartes KPI ouvrent les onglets de la fiche
6
+ par la navigation du layer.
7
+ -->
8
+ <template>
9
+ <div class="oip-science oip_grid gap-16">
10
+ <!-- Address + KPIs -->
11
+ <div v-if="!isLoading && establishment" class="oip_grid gap-24 info-card-section">
12
+ <div class="grid gap-4">
13
+ <h1 class="oip_title_table kk_title_medium_2">{{ $t('oipScience.common.informations') }}</h1>
14
+ <OipScienceCommonSource :sources="['FINESS']" :lang="lang" />
15
+ </div>
16
+
17
+ <!-- Google Map -->
18
+ <div v-if="hasCoordinates" class="map-container">
19
+ <iframe
20
+ :src="`https://maps.google.com/maps?q=${establishment.latitude},${establishment.longitude}&z=14&output=embed`"
21
+ width="100%"
22
+ height="300"
23
+ style="border: 0; border-radius: 8px;"
24
+ allowfullscreen
25
+ loading="lazy"
26
+ />
27
+ </div>
28
+
29
+ <!-- Info text (two columns) -->
30
+ <div class="info-card">
31
+ <div class="info-row" v-if="streetLine || cityLine">
32
+ <RmIcon name="MapPin" color="var(--primary)" :size="18" />
33
+ <p class="info-text-bold">
34
+ <template v-if="streetLine">{{ streetLine }}, </template>{{ cityLine }}
35
+ </p>
36
+ </div>
37
+ <div class="info-row" v-if="establishment?.hco_et_dpt_label || establishment?.hco_et_region_label">
38
+ <RmIcon name="MapTrifold" color="var(--cool-grey)" :size="18" />
39
+ <p class="info-text">
40
+ <template v-if="establishment?.hco_et_dpt_label">
41
+ {{ establishment.hco_et_dpt_label }}<template v-if="establishment?.hco_et_dpt_code"> ({{ establishment.hco_et_dpt_code }})</template>
42
+ </template>
43
+ <template v-if="establishment?.hco_et_dpt_label && establishment?.hco_et_region_label">, </template>
44
+ <template v-if="establishment?.hco_et_region_label">{{ establishment.hco_et_region_label }}</template>
45
+ </p>
46
+ </div>
47
+ <div class="info-row" v-if="establishment?.hco_ej_label">
48
+ <RmIcon name="Buildings" color="var(--cool-grey)" :size="18" />
49
+ <p class="info-text">
50
+ {{ $t('oipScience.common.legalEntity') }} : <strong>{{ establishment.hco_ej_label }}</strong>
51
+ <template v-if="establishment?.hco_ej_code"> ({{ establishment.hco_ej_code }})</template>
52
+ </p>
53
+ </div>
54
+ <div class="info-row" v-if="establishment?.hco_et_tekkare_category">
55
+ <RmIcon name="Tag" color="var(--cool-grey)" :size="18" />
56
+ <p class="info-text">{{ $t('oipScience.common.category') }} : <strong>{{ establishment.hco_et_tekkare_category }}</strong></p>
57
+ </div>
58
+ <div class="info-row" v-if="establishment?.hco_et_sector">
59
+ <RmIcon name="Briefcase" color="var(--cool-grey)" :size="18" />
60
+ <p class="info-text">{{ $t('oipScience.common.sector') }} : <strong>{{ establishment.hco_et_sector }}</strong></p>
61
+ </div>
62
+ <div class="info-row" v-if="establishment?.iris_code">
63
+ <RmIcon name="MapPinArea" color="var(--cool-grey)" :size="18" />
64
+ <p class="info-text">IRIS : <strong>{{ establishment.iris_code }}</strong></p>
65
+ </div>
66
+ </div>
67
+ </div>
68
+
69
+ <!-- Summary KPIs: NCT / EUCT / Authors / Investigators / AAP -->
70
+ <div v-if="!isLoading && establishment" class="kpi-summary-section">
71
+ <a :href="nav.href('Establishment', id, 'clinical-trials')" class="kpi-summary-card" @click="openTab($event, 'clinical-trials')">
72
+ <span class="kpi-summary-number">{{ formatNumber(establishment?.nct_trial_count || 0) }}</span>
73
+ <span class="kpi-summary-label">🇺🇸 NCT</span>
74
+ <span v-if="(establishment?.nct_ongoing_count || 0) > 0" class="kpi-summary-ongoing">
75
+ {{ formatNumber(establishment.nct_ongoing_count) }} {{ $t('oipScience.kpi.ongoing') }}
76
+ </span>
77
+ </a>
78
+ <a :href="nav.href('Establishment', id, 'clinical-trials')" class="kpi-summary-card" @click="openTab($event, 'clinical-trials')">
79
+ <span class="kpi-summary-number">{{ formatNumber(establishment?.euct_trial_count || 0) }}</span>
80
+ <span class="kpi-summary-label">🇪🇺 EUCT</span>
81
+ <span v-if="(establishment?.euct_ongoing_count || 0) > 0" class="kpi-summary-ongoing">
82
+ {{ formatNumber(establishment.euct_ongoing_count) }} {{ $t('oipScience.kpi.ongoing') }}
83
+ </span>
84
+ </a>
85
+ <a :href="nav.href('Establishment', id, 'hcps')" class="kpi-summary-card" @click="openTab($event, 'hcps')">
86
+ <span class="kpi-summary-number">{{ formatNumber(kpi.authors) }}</span>
87
+ <span class="kpi-summary-label">📝 {{ $t('oipScience.ui.authors') }}</span>
88
+ </a>
89
+ <a :href="nav.href('Establishment', id, 'hcps')" class="kpi-summary-card" @click="openTab($event, 'hcps')">
90
+ <span class="kpi-summary-number">{{ formatNumber(kpi.investigators) }}</span>
91
+ <span class="kpi-summary-label">🩺 {{ $t('oipScience.common.investigators') }}</span>
92
+ </a>
93
+ <a :href="nav.href('Establishment', id, 'public-finance')" class="kpi-summary-card" @click="openTab($event, 'public-finance')">
94
+ <span class="kpi-summary-number">{{ formatNumber(kpi.aap) }}</span>
95
+ <span class="kpi-summary-label">📋 AAP</span>
96
+ </a>
97
+ </div>
98
+
99
+ <RmLoadingState v-if="isLoading" :lines="3" :chart-height="240" />
100
+ <RmEmptyState
101
+ v-if="!isLoading && !establishment"
102
+ :title="$t('oipScience.common.noDataTitle')"
103
+ :text="$t('oipScience.common.noDataText')"
104
+ />
105
+ </div>
106
+ </template>
107
+
108
+ <script setup lang="ts">
109
+ import indexConfig from '../../../oip-science/indexConfig.json';
110
+ import useOipElastic from '../../../oip-science/composables/useOipElastic';
111
+ import { formatNumber } from '../../../oip-science/utils/styleAndFormat';
112
+
113
+ const props = withDefaults(defineProps<{ id: string; highlight?: string[]; lang?: 'fr' | 'en' }>(), {
114
+ highlight: () => [],
115
+ lang: undefined,
116
+ });
117
+
118
+ const nav = useOipResourceNav();
119
+ const { queryOneElastic } = useOipElastic();
120
+
121
+ const isLoading = ref(true);
122
+ const establishment = ref<any>(null);
123
+
124
+ async function load(urlId: string) {
125
+ isLoading.value = true;
126
+ establishment.value = null;
127
+ try {
128
+ establishment.value = await queryOneElastic({
129
+ index: indexConfig.establishments.index,
130
+ cluster: indexConfig.establishments.cluster,
131
+ path: 'hco_et_code',
132
+ id: urlId,
133
+ });
134
+ } catch (e) {
135
+ console.error(e);
136
+ } finally {
137
+ isLoading.value = false;
138
+ }
139
+ }
140
+
141
+ watch(() => props.id, (id) => { if (id) load(id); }, { immediate: true });
142
+
143
+ // Ctrl/Cmd-clic : le lien garde son href, sinon la fiche ouvre l'onglet.
144
+ function openTab(event: MouseEvent, tab: string) {
145
+ if (event.metaKey || event.ctrlKey || event.shiftKey || event.button === 1) return;
146
+ event.preventDefault();
147
+ nav.open('Establishment', props.id, tab);
148
+ }
149
+
150
+ const streetLine = computed(() => {
151
+ const e = establishment.value;
152
+ if (!e) return '';
153
+ return [e.hco_et_street_number, e.hco_et_street_type, e.hco_et_street_label]
154
+ .filter(Boolean)
155
+ .join(' ')
156
+ .trim();
157
+ });
158
+
159
+ const cityLine = computed(() => {
160
+ const e = establishment.value;
161
+ if (!e) return '';
162
+ return [e.hco_et_zip_code, e.hco_et_city].filter(Boolean).join(' ').trim();
163
+ });
164
+
165
+ const hasCoordinates = computed(() => {
166
+ const e = establishment.value;
167
+ return typeof e?.latitude === 'number' && typeof e?.longitude === 'number';
168
+ });
169
+
170
+ // All KPIs come from native counters on the HCO directory doc itself
171
+ const kpi = computed(() => ({
172
+ authors: establishment.value?.pubmed_hcp_count || 0,
173
+ investigators: establishment.value?.nct_euct_hcp_count || 0,
174
+ aap: establishment.value?.aap_trial_count || 0,
175
+ }));
176
+ </script>
177
+
178
+ <style scoped>
179
+ .info-card-section {
180
+ background: var(--bg-surface);
181
+ border-radius: 12px;
182
+ padding: 24px;
183
+ }
184
+ .map-container {
185
+ border-radius: 12px;
186
+ overflow: hidden;
187
+ }
188
+
189
+ /* Info text in two columns */
190
+ .info-card {
191
+ display: grid;
192
+ grid-template-columns: 1fr 1fr;
193
+ column-gap: 32px;
194
+ row-gap: 14px;
195
+ padding: 16px 8px;
196
+ }
197
+ .info-row {
198
+ display: flex;
199
+ align-items: center;
200
+ gap: 10px;
201
+ }
202
+ .info-text-bold {
203
+ font-size: 14px;
204
+ font-weight: 600;
205
+ color: var(--text-primary);
206
+ }
207
+ .info-text {
208
+ font-size: 13px;
209
+ color: var(--text-muted);
210
+ }
211
+
212
+ @media (max-width: 768px) {
213
+ .info-card {
214
+ grid-template-columns: 1fr;
215
+ }
216
+ }
217
+
218
+ /* Summary KPIs (below the info card) */
219
+ .kpi-summary-section {
220
+ display: grid;
221
+ grid-template-columns: repeat(5, 1fr);
222
+ gap: 12px;
223
+ }
224
+ .kpi-summary-card {
225
+ display: flex;
226
+ flex-direction: column;
227
+ align-items: center;
228
+ justify-content: center;
229
+ gap: 4px;
230
+ padding: 16px 12px;
231
+ background: var(--bg-surface);
232
+ border-radius: 12px;
233
+ text-decoration: none;
234
+ color: inherit;
235
+ transition: transform 0.15s ease, box-shadow 0.15s ease;
236
+ }
237
+ .kpi-summary-card:hover {
238
+ transform: translateY(-2px);
239
+ box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
240
+ }
241
+ .kpi-summary-number {
242
+ font-size: 22px;
243
+ font-weight: 700;
244
+ color: var(--text-primary);
245
+ }
246
+ .kpi-summary-label {
247
+ font-size: 12px;
248
+ color: var(--text-muted);
249
+ white-space: nowrap;
250
+ }
251
+ .kpi-summary-ongoing {
252
+ margin-top: 2px;
253
+ font-size: 11px;
254
+ color: var(--color-success);
255
+ font-weight: 600;
256
+ white-space: nowrap;
257
+ }
258
+ @media (max-width: 768px) {
259
+ .kpi-summary-section {
260
+ grid-template-columns: repeat(2, 1fr);
261
+ }
262
+ }
263
+ </style>
@@ -0,0 +1,153 @@
1
+ <!--
2
+ Liste d'etablissements lies a une fiche (sites d'un essai, lieux d'exercice
3
+ d'un professionnel, etablissements rapproches). Un etablissement reconnu
4
+ dans l'annuaire FINESS a la carte de la page /establishments ; les autres
5
+ (etrangers, non reconnus) gardent le meme gabarit, sans lien. (Portage de
6
+ components/establishments/LinkedList.vue de France Augmented Science.)
7
+ -->
8
+ <template>
9
+ <div class="oip-science">
10
+ <div v-if="!loading && !isLoadingDocs" class="oip_grid gap-16">
11
+ <RmSearchBar
12
+ v-model="searchText"
13
+ :placeholder="$t('oipScience.common.searchTrialLocations')"
14
+ :have-advanced="false"
15
+ />
16
+
17
+ <RmResultsLine icon="Hospital" :items="[{ count: filtered.length, label: $t('oipScience.resultKpis.establishments', filtered.length) }]" />
18
+ <div class="oip_grid gap-8">
19
+ <template v-for="(location, index) in visible" :key="index">
20
+ <OipScienceEstablishmentsCards
21
+ v-if="location.finess && establishmentDocs.get(location.finess)"
22
+ :data="establishmentDocs.get(location.finess)"
23
+ >
24
+ <template #extra>
25
+ <OipScienceCommonScoreBadge :score="location.score" />
26
+ </template>
27
+ </OipScienceEstablishmentsCards>
28
+
29
+ <RmResultCard v-else :actions="false">
30
+ <template #title>{{ ifNoRes(location.name) }}</template>
31
+ <template #subtitle>
32
+ {{ $t('oipScience.common.city') }}: {{ ifNoRes(location.city) }}
33
+ </template>
34
+ <template #meta>
35
+ <RmTag v-if="location.country" variant="gray" class="no-wrap">
36
+ {{ getCountryEmoji(location.country) }}
37
+ </RmTag>
38
+ </template>
39
+ <template #footer>
40
+ <OipScienceCommonSource :sources="sources" />
41
+ </template>
42
+ </RmResultCard>
43
+ </template>
44
+ </div>
45
+
46
+ <RmEmptyState v-if="!filtered.length" :title="$t('oipScience.common.noMatchingResult')" />
47
+ <RmButton
48
+ v-if="visible.length < filtered.length"
49
+ variant="secondary"
50
+ class="load_more"
51
+ @click="displayCount += PAGE_SIZE"
52
+ >{{ $t('oipScience.common.loadMore') }}</RmButton>
53
+ </div>
54
+ <RmLoadingState v-else :lines="3" :chart-height="240" />
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 useAuthorMatching from '../../../oip-science/composables/useAuthorMatching';
62
+ import { getCountryEmoji, ifNoRes } from '../../../oip-science/utils/styleAndFormat';
63
+
64
+ export type LinkedLocation = {
65
+ name: string | null;
66
+ city?: string | null;
67
+ country?: string | null;
68
+ finess?: string | null;
69
+ score?: number | null;
70
+ };
71
+
72
+ const props = withDefaults(
73
+ defineProps<{
74
+ locations: LinkedLocation[];
75
+ title: string;
76
+ sources: string[];
77
+ indexLastUpdate: string;
78
+ loading?: boolean;
79
+ }>(),
80
+ { loading: false },
81
+ );
82
+
83
+ const { normalize } = useAuthorMatching();
84
+ const { queryCustomElastic } = useOipElastic();
85
+
86
+ // Fiches annuaire des etablissements reconnus, en une seule requete.
87
+ const establishmentDocs = ref<Map<string, any>>(new Map());
88
+ const isLoadingDocs = ref(false);
89
+
90
+ async function loadEstablishmentDocs(codes: (string | null | undefined)[]) {
91
+ const ids = [...new Set(codes.filter((x): x is string => !!x))].filter(
92
+ (id) => !establishmentDocs.value.has(id),
93
+ );
94
+ if (!ids.length) return;
95
+ isLoadingDocs.value = true;
96
+ try {
97
+ const res = await queryCustomElastic({
98
+ index: indexConfig.establishments.index,
99
+ cluster: indexConfig.establishments.cluster,
100
+ customQuery: {
101
+ size: ids.length,
102
+ query: {
103
+ bool: {
104
+ should: [
105
+ { terms: { hco_et_code: ids } },
106
+ { terms: { 'hco_et_code.keyword': ids } },
107
+ ],
108
+ minimum_should_match: 1,
109
+ },
110
+ },
111
+ },
112
+ });
113
+ const map = new Map(establishmentDocs.value);
114
+ for (const doc of res?.results || []) {
115
+ if (doc?.hco_et_code) map.set(String(doc.hco_et_code), doc);
116
+ }
117
+ establishmentDocs.value = map;
118
+ } finally {
119
+ isLoadingDocs.value = false;
120
+ }
121
+ }
122
+
123
+ watch(
124
+ () => props.locations.map((l) => l.finess),
125
+ (codes) => loadEstablishmentDocs(codes),
126
+ { immediate: true },
127
+ );
128
+
129
+ const searchText = ref('');
130
+ const PAGE_SIZE = 20;
131
+ const displayCount = ref(PAGE_SIZE);
132
+
133
+ const filtered = computed(() => {
134
+ const q = normalize(searchText.value);
135
+ if (!q) return props.locations;
136
+ return props.locations.filter((l) =>
137
+ normalize([l.name, l.city, l.country, l.finess].filter(Boolean).join(' ')).includes(q),
138
+ );
139
+ });
140
+
141
+ const visible = computed(() => filtered.value.slice(0, displayCount.value));
142
+
143
+ watch(searchText, () => {
144
+ displayCount.value = PAGE_SIZE;
145
+ });
146
+ </script>
147
+
148
+ <style scoped>
149
+ .load_more {
150
+ align-self: center;
151
+ justify-self: center;
152
+ }
153
+ </style>
@@ -0,0 +1,194 @@
1
+ <!--
2
+ Onglet Labels matches de la fiche etablissement (porte de la page
3
+ establishments/[id]/matched-labels de France Augmented Science). Dans FAS l'en-tete
4
+ chargeait le document (useState('current-establishment')) : 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 && establishment" :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']" :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="value === 'NCT' ? 'blue' : 'purple'">
36
+ {{ value === 'NCT' ? '🇺🇸 NCT' : '🇪🇺 EUCT' }}
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 && establishment && 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 establishment = ref<any>(null);
74
+
75
+ async function load(urlId: string) {
76
+ isLoading.value = true;
77
+ establishment.value = null;
78
+ try {
79
+ establishment.value = await queryOneElastic({
80
+ index: indexConfig.establishments.index,
81
+ cluster: indexConfig.establishments.cluster,
82
+ path: 'hco_et_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';
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 e = establishment.value;
100
+ if (!e) 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
+ if (!m?.name || typeof m?.score !== 'number') continue;
106
+ const key = `${source}|${m.name}`;
107
+ const existing = byKey.get(key);
108
+ if (!existing || (m.score ?? 0) > (existing.score ?? 0)) {
109
+ byKey.set(key, {
110
+ name: m.name,
111
+ source,
112
+ match_method: m.match_method ?? null,
113
+ score: m.score,
114
+ });
115
+ }
116
+ }
117
+ };
118
+ collect(e.nct_name, 'NCT');
119
+ collect(e.euct_name, 'EUCT');
120
+ return [...byKey.values()].sort((a, b) => (b.score ?? 0) - (a.score ?? 0));
121
+ });
122
+
123
+ const avgScorePct = computed(() => {
124
+ if (uniqueRows.value.length === 0) return 0;
125
+ const sum = uniqueRows.value.reduce((acc, r) => acc + (r.score || 0), 0);
126
+ return Math.round((sum / uniqueRows.value.length) * 100);
127
+ });
128
+
129
+ const getContent = computed(() =>
130
+ uniqueRows.value.map((r) => ({
131
+ values: [r.name, r.source, formatMatchMethod(r.match_method), r.score],
132
+ })),
133
+ );
134
+
135
+ const table = computed(() =>
136
+ valueTable(
137
+ [t('oipScience.common.name'), 'Source', t('oipScience.common.matchType'), t('oipScience.common.confidenceScore')],
138
+ getContent.value,
139
+ ['', 'Source', '', 'Score'],
140
+ { align: ['left', 'left', 'left', 'right'] },
141
+ ),
142
+ );
143
+ </script>
144
+
145
+ <style scoped>
146
+ .match-stats {
147
+ display: flex;
148
+ gap: 24px;
149
+ align-items: center;
150
+ }
151
+ .match-stat {
152
+ display: flex;
153
+ flex-direction: column;
154
+ align-items: flex-end;
155
+ gap: 2px;
156
+ }
157
+ .match-stat-label {
158
+ font-size: 11px;
159
+ color: var(--text-muted);
160
+ text-transform: uppercase;
161
+ letter-spacing: 0.5px;
162
+ }
163
+ .match-stat-value {
164
+ font-size: 18px;
165
+ font-weight: 700;
166
+ color: var(--text-primary);
167
+ margin: 0;
168
+ }
169
+ .match-stat-pill {
170
+ display: inline-block;
171
+ padding: 2px 10px;
172
+ border-radius: 999px;
173
+ font-size: 14px;
174
+ font-variant-numeric: tabular-nums;
175
+ }
176
+ .match-stat-pill.high {
177
+ background: var(--color-success-bg);
178
+ color: var(--color-success);
179
+ }
180
+ .match-stat-pill.low {
181
+ background: var(--color-warning-bg);
182
+ color: var(--color-warning);
183
+ }
184
+ .score-badge {
185
+ display: inline-block;
186
+ padding: 2px 8px;
187
+ border-radius: 12px;
188
+ font-size: 12px;
189
+ font-weight: 600;
190
+ cursor: help;
191
+ }
192
+ .score-high { background: var(--color-success-bg); color: var(--color-success); }
193
+ .score-low { background: var(--color-warning-bg); color: var(--color-warning); }
194
+ </style>
@@ -0,0 +1,62 @@
1
+ <!--
2
+ Onglet Financements publics de la fiche etablissement (porte de la page
3
+ establishments/[id]/public-finance de France Augmented Science).
4
+ -->
5
+ <template>
6
+ <div class="oip-science oip_grid gap-24">
7
+ <div v-if="!isLoading && projects.length > 0" class="oip_grid gap-24">
8
+ <RmResultsLine icon="Coins" :items="[{ count: projects.length, label: $t('oipScience.resultKpis.projects', projects.length) }]" />
9
+ <div v-for="(item, index) in projects" :key="index">
10
+ <OipScienceAppelAProjetCards :data="item" :highlight="highlight" />
11
+ </div>
12
+ </div>
13
+ <RmLoadingState v-if="isLoading" :lines="3" :chart-height="240" />
14
+ <RmEmptyState
15
+ v-if="!isLoading && projects.length === 0"
16
+ :title="$t('oipScience.common.noDataTitle')"
17
+ :text="$t('oipScience.common.noDataText')"
18
+ />
19
+ </div>
20
+ </template>
21
+
22
+ <script setup lang="ts">
23
+ import indexConfig from '../../../oip-science/indexConfig.json';
24
+ import useOipElastic from '../../../oip-science/composables/useOipElastic';
25
+
26
+ const props = withDefaults(defineProps<{ id: string; highlight?: string[]; lang?: 'fr' | 'en' }>(), {
27
+ highlight: () => [],
28
+ lang: undefined,
29
+ });
30
+
31
+ const { queryElastic } = useOipElastic();
32
+
33
+ const isLoading = ref(true);
34
+ const projects = ref<any[]>([]);
35
+
36
+ async function load(urlId: string) {
37
+ isLoading.value = true;
38
+ projects.value = [];
39
+ try {
40
+ const res = await queryElastic({
41
+ index: indexConfig.phrc.index,
42
+ take: 1000,
43
+ cluster: indexConfig.phrc.cluster,
44
+ customQuery: [
45
+ {
46
+ values: {
47
+ term: { hco_et_code: urlId },
48
+ },
49
+ },
50
+ ],
51
+ });
52
+
53
+ projects.value = res?.results || [];
54
+ } catch (e) {
55
+ console.error(e);
56
+ } finally {
57
+ isLoading.value = false;
58
+ }
59
+ }
60
+
61
+ watch(() => props.id, (id) => { if (id) load(id); }, { immediate: true });
62
+ </script>