@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,53 @@
1
+ // Aogo match_method codes โ†’ user-friendly labels.
2
+ //
3
+ // Naming pattern observed in the data:
4
+ // - `*_specific_label` โ†’ exact match against a curated alias dictionary (high confidence)
5
+ // - `*_fuzzy_match` โ†’ similarity-based match (lower confidence)
6
+ // - `*_contains_match` โ†’ substring match on the name part
7
+ // - `*_compact_match` โ†’ exact match after stripping spaces / punctuation
8
+ // - `*_inverted_*` โ†’ identical when first/last name (or words) are reordered
9
+ // - `full_match` โ†’ entire input string is identical to the reference (after normalization)
10
+ //
11
+ // FINESS hierarchy applies to HCO codes:
12
+ // `hco_*` = HCO group (broadest)
13
+ // `hco_ej_*` = legal entity (middle)
14
+ // `hco_et_*` = specific establishment site (most precise)
15
+ //
16
+ // Distinct values currently observed in production (run an aggregation on
17
+ // hco_directory + hcp_directory if you suspect new variants have appeared).
18
+ export const MATCH_METHOD_LABELS: Record<string, string> = {
19
+ // Whole-string exact matches
20
+ full_match: 'โœ… Identique',
21
+ full_inverted_match: '๐Ÿ” Identique (mots inversรฉs)',
22
+ full_compact_match: 'โœ… Identique (sans espaces)',
23
+ full_compact_inverted_match: '๐Ÿ” Identique (sans espaces, mots inversรฉs)',
24
+
25
+ // HCP-level alias dictionary
26
+ hcp_specific_label: '๐Ÿฉบ HCP (alias exact)',
27
+
28
+ // HCO hierarchy โ€” alias dictionary (exact)
29
+ hco_specific_label: '๐Ÿข Groupe (alias exact)',
30
+ hco_ej_specific_label: '๐Ÿ›๏ธ Entitรฉ juridique (alias exact)',
31
+ hco_et_specific_label: '๐Ÿฅ ร‰tablissement (alias exact)',
32
+
33
+ // HCO hierarchy โ€” fuzzy (similarity)
34
+ hco_fuzzy_match: '๐Ÿข Groupe (similaritรฉ)',
35
+ hco_ej_fuzzy_match: '๐Ÿ›๏ธ Entitรฉ juridique (similaritรฉ)',
36
+ hco_et_fuzzy_match: '๐Ÿฅ ร‰tablissement (similaritรฉ)',
37
+
38
+ // Person name โ€” fuzzy (similarity)
39
+ family_name_fuzzy_match: '๐Ÿ‘ค Nom de famille (similaritรฉ)',
40
+ first_name_fuzzy_match: '๐Ÿ‘ค Prรฉnom (similaritรฉ)',
41
+ full_name_fuzzy_match: '๐Ÿ‘ค Nom complet (similaritรฉ)',
42
+
43
+ // Person name โ€” substring (contains)
44
+ family_name_contains_match: '๐Ÿ‘ค Nom de famille (sous-chaรฎne)',
45
+ first_name_contains_match: '๐Ÿ‘ค Prรฉnom (sous-chaรฎne)',
46
+ family_name_contains_inverted_match: '๐Ÿ” Nom de famille (sous-chaรฎne, inversรฉ)',
47
+ first_name_contains_inverted_match: '๐Ÿ” Prรฉnom (sous-chaรฎne, inversรฉ)',
48
+ };
49
+
50
+ export function formatMatchMethod(method: string | null | undefined): string {
51
+ if (!method) return '-';
52
+ return MATCH_METHOD_LABELS[method] ?? method;
53
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Onglets d'argSliderTabs (`{ label, icon }`, repรฉrรฉs par leur index) vers les
3
+ * options de RmSegmented. La valeur reste l'index, pour que les handlers des
4
+ * pages ne changent pas ; l'icรดne passe en kebab-case, la forme qu'attend la
5
+ * police Phosphor de RmSegmented (`ph ph-squares-four`).
6
+ */
7
+ export function indexedSegments(tabs: { label: string; icon?: string }[]) {
8
+ return tabs.map((tab, index) => ({
9
+ value: index,
10
+ label: tab.label,
11
+ icon: tab.icon?.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase(),
12
+ }));
13
+ }
@@ -0,0 +1,15 @@
1
+ // Les cles de source des fiches de France Augmented Science (ยซ PubMed ยป,
2
+ // ยซ CT.gov ยป...) et leur fiche Directus. Reprises de son useSources.
3
+ export const OIP_SCIENCE_SOURCE_UUIDS: Record<string, string> = {
4
+ "CT.gov": "224f4621-f6e7-4635-a7d9-371e212d5ca6",
5
+ EUCT: "a81861dc-3a42-4019-a93b-e0e83edcaf41",
6
+ Comet: "9ee495c0-670e-4eaa-9d5d-485cad3659ba",
7
+ PubMed: "63805e97-48ac-4c04-afd6-8a15055dec97",
8
+ UMLS: "59e4e608-9ebb-45ee-8955-1c78546033c1",
9
+ Epo: "e40487c1-5ab9-4a58-87d4-ba55b54b56e6",
10
+ FINESS: "545ba237-b92d-47fc-b336-25972873d0b2",
11
+ RPPS: "fee124b8-7cb7-41a0-825b-6a70ce975834",
12
+ "Appel ร  projet": "27571a73-3736-4961-bc81-0ffb460baca2",
13
+ HAS: "6f0bfe9a-bc58-4feb-9e9c-f37a0ac9ceba",
14
+ ANSM: "6ed012ef-9df7-4a2f-80b2-79b341d9c692",
15
+ };
@@ -0,0 +1,608 @@
1
+ // Portage de utils/styleAndFormat de France Augmented Science, pour les fiches
2
+ // du layer (cf. components/oip-science) : import explicite, pas d'auto-import.
3
+ // sendToPosthog et captureException (PostHog de l'app) ne sont pas repris.
4
+
5
+ // export const { format: formatNumber } = Intl.NumberFormat('en-GB', {
6
+ // notation: 'compact',
7
+ // maximumFractionDigits: 1,
8
+ // });
9
+
10
+ export const formatNumber = (value: any) => {
11
+ if(!value || isNaN(value)) return value;
12
+ return value > 100
13
+ ? value.toLocaleString("fr-FR", { maximumFractionDigits: 0 })
14
+ : value > 10
15
+ ? value
16
+ .toLocaleString("fr-FR", { maximumFractionDigits: 1 })
17
+ ?.replace(",", ".")
18
+ : value < 1
19
+ ? value
20
+ .toLocaleString("fr-FR", { maximumFractionDigits: 3 })
21
+ ?.replace(",", ".")
22
+ : value
23
+ ?.toLocaleString("fr-FR", { maximumFractionDigits: 2 })
24
+ ?.replace(",", ".");
25
+ };
26
+
27
+ export const dateFormat = (value: any, locale?: string) => {
28
+ const loc = locale || (typeof document !== 'undefined' && document.documentElement.lang) || 'fr';
29
+ const fullLocale = loc.startsWith('fr') ? 'fr-FR' : 'en-US';
30
+ return new Date(value).toLocaleDateString(fullLocale, {
31
+ year: "numeric",
32
+ month: "long",
33
+ day: "numeric"
34
+ });
35
+ };
36
+
37
+ export const formatDate = function (date: any) {
38
+ return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()))
39
+ .toISOString()
40
+ .split('T')[0];
41
+ };
42
+
43
+ export const getDateRange = (value: any) => {
44
+ const now = new Date();
45
+
46
+ switch (value) {
47
+ case 'last_30':
48
+ const thirtyDaysAgo = new Date();
49
+ thirtyDaysAgo.setDate(thirtyDaysAgo.getDate() - 30);
50
+ return {
51
+ gte: thirtyDaysAgo.toISOString().split('T')[0],
52
+ lte: now.toISOString().split('T')[0],
53
+ };
54
+
55
+ case 'last_90':
56
+ const ninetyDaysAgo = new Date();
57
+ ninetyDaysAgo.setDate(ninetyDaysAgo.getDate() - 90);
58
+ return {
59
+ gte: ninetyDaysAgo.toISOString().split('T')[0],
60
+ lte: now.toISOString().split('T')[0],
61
+ };
62
+
63
+ case 'last_180':
64
+ const oneEightyDaysAgo = new Date();
65
+ oneEightyDaysAgo.setDate(oneEightyDaysAgo.getDate() - 180);
66
+ return {
67
+ gte: oneEightyDaysAgo.toISOString().split('T')[0],
68
+ lte: now.toISOString().split('T')[0],
69
+ };
70
+
71
+ case 'last_3_month':
72
+ const threeMonthAgo = new Date();
73
+ threeMonthAgo.setMonth(threeMonthAgo.getMonth() - 3);
74
+ return {
75
+ gte: threeMonthAgo.toISOString().split('T')[0],
76
+ lte: now.toISOString().split('T')[0],
77
+ };
78
+
79
+ case 'last_6_month':
80
+ const sixMonthAgo = new Date();
81
+ sixMonthAgo.setMonth(sixMonthAgo.getMonth() - 6);
82
+ return {
83
+ gte: sixMonthAgo.toISOString().split('T')[0],
84
+ lte: now.toISOString().split('T')[0],
85
+ };
86
+
87
+ case 'last_year':
88
+ const oneYearAgo = new Date();
89
+ oneYearAgo.setFullYear(oneYearAgo.getFullYear() - 1);
90
+ return {
91
+ gte: oneYearAgo.toISOString().split('T')[0],
92
+ lte: now.toISOString().split('T')[0],
93
+ };
94
+
95
+ case 'last_360':
96
+ const threeSixtyDaysAgo = new Date();
97
+ threeSixtyDaysAgo.setDate(threeSixtyDaysAgo.getDate() - 360);
98
+ return {
99
+ gte: threeSixtyDaysAgo.toISOString().split('T')[0],
100
+ lte: now.toISOString().split('T')[0],
101
+ };
102
+
103
+ case 'last_3_years':
104
+ const threeYearsAgo = new Date();
105
+ threeYearsAgo.setFullYear(threeYearsAgo.getFullYear() - 3);
106
+ return {
107
+ gte: threeYearsAgo.toISOString().split('T')[0],
108
+ lte: now.toISOString().split('T')[0],
109
+ };
110
+
111
+ case 'last_5_years':
112
+ const fiveYearsAgo = new Date();
113
+ fiveYearsAgo.setFullYear(fiveYearsAgo.getFullYear() - 5);
114
+ return {
115
+ gte: fiveYearsAgo.toISOString().split('T')[0],
116
+ lte: now.toISOString().split('T')[0],
117
+ };
118
+
119
+ case 'last_10_years':
120
+ const tenYearsAgo = new Date();
121
+ tenYearsAgo.setFullYear(tenYearsAgo.getFullYear() - 10);
122
+ return {
123
+ gte: tenYearsAgo.toISOString().split('T')[0],
124
+ lte: now.toISOString().split('T')[0],
125
+ };
126
+
127
+ default:
128
+ return {};
129
+ }
130
+ };
131
+
132
+ export const removeDuplicate = (array: any) => {
133
+ return [...new Set(array)].filter((item) => item);
134
+ };
135
+
136
+ // Same intent as removeDuplicate but the equivalence is case-insensitive
137
+ // and ignores trailing plural "s" / non-alphanumeric noise. "Cancer" +
138
+ // "cancer" โ†’ 1 entry; "Neoplasms" + "Neoplasm" โ†’ 1 entry. Keeps the
139
+ // FIRST occurrence's original casing (input order matters).
140
+ export const dedupNormalized = (array: any[]): any[] => {
141
+ const seen = new Map<string, any>();
142
+ for (const item of array || []) {
143
+ if (!item) continue;
144
+ const norm = String(item)
145
+ .toLowerCase()
146
+ // Collapse punctuation/apostrophes to spaces so 'Crohn's disease'
147
+ // and 'Crohns disease' compare equal.
148
+ .replace(/[^a-z0-9 ]+/g, ' ')
149
+ // Naive plural strip on each word โ€” good enough for the medical
150
+ // terminology we surface (Cancer/Cancers, Neoplasm/Neoplasms).
151
+ // Linguistically wrong for words like 'Sclerosis' โ†’ 'Sclerosi'
152
+ // but that's fine: dedup keys only need to be CONSISTENT between
153
+ // two forms that should collapse, not linguistically correct.
154
+ .replace(/s\b/g, '')
155
+ .replace(/\s+/g, ' ')
156
+ .trim();
157
+ if (norm && !seen.has(norm)) seen.set(norm, item);
158
+ }
159
+ return [...seen.values()];
160
+ };
161
+
162
+ export const capitalizeFirstLetter = (string: string) => {
163
+ //
164
+ return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
165
+ };
166
+
167
+ export const meshTermsReformat = (meshTerms: string) => {
168
+ const includedAge = [
169
+ 'Aged, 80 and over',
170
+ 'Aged',
171
+ 'Child',
172
+ 'Infant',
173
+ 'Child, Preschool',
174
+ 'Infant, Newborn',
175
+ 'Young Adult',
176
+ 'Middle Aged',
177
+ 'Adult',
178
+ 'Adolescent',
179
+ ];
180
+ const includedGender = ['Male', 'Female'];
181
+ const includedSpecies = ['Humans'];
182
+ const includedBiomarkers = ['Biomarkers'];
183
+ const excludedMeshTerms = [
184
+ includedAge,
185
+ includedGender,
186
+ includedSpecies,
187
+ includedBiomarkers,
188
+ ].flat();
189
+
190
+ switch (meshTerms) {
191
+ case 'Age':
192
+ return includedAge;
193
+ case 'Gender':
194
+ return includedGender;
195
+ case 'Species':
196
+ return includedSpecies;
197
+ case 'Biomarkers':
198
+ return includedBiomarkers;
199
+ case 'Excluded':
200
+ return excludedMeshTerms;
201
+ default:
202
+ return [];
203
+ }
204
+ };
205
+
206
+ export const formatName = (name: any) => {
207
+ {
208
+ if(!name || typeof name !== 'string') return name;
209
+ // Convertir toutes les lettres en minuscules
210
+ const lowercaseName = name.toLowerCase();
211
+ // Diviser la chaรฎne en mots
212
+ const words = lowercaseName.split(' ');
213
+ // Capitaliser la premiรจre lettre de chaque mot
214
+ const capitalizedWords = words.map(
215
+ (word: any) => word.charAt(0).toUpperCase() + word.slice(1)
216
+ );
217
+ // Joindre les mots pour former le nom final
218
+ const formattedName = capitalizedWords.join(' ');
219
+ return formattedName;
220
+ }
221
+ };
222
+
223
+ export const getIconfromField = (field: any) => {
224
+ field = field.toLowerCase();
225
+ if (field.includes("molecule") || field.includes("ingredient")) {
226
+ return "Molecule";
227
+ }else if(field.includes("disease")){
228
+ return "Virus";
229
+ } else if (
230
+ field.includes("manufacturer") ||
231
+ field.includes("company") ||
232
+ field.includes("supplier")
233
+ ) {
234
+ return "Factory";
235
+ } else if (field.includes("atc") || field.includes("category")) {
236
+ return "TagSimple";
237
+ } else if (
238
+ field.includes("label") ||
239
+ field.includes("product") ||
240
+ field.includes("name")
241
+ ) {
242
+ return "Bookmark";
243
+ } else if (field.includes("brand")) {
244
+ return "Package";
245
+ } else if (field.includes("indication") | field.includes("notes")) {
246
+ return "FirstAid";
247
+ } else return "CrosshairSimple";
248
+ };
249
+
250
+ export const ifNoRes = (value: any, type?: any) => {
251
+ if (value === undefined || value === null) {
252
+ return "N/A";
253
+ } else {
254
+ if (type === "date") {
255
+ return dateFormat(value);
256
+ }
257
+ if (type === "number") {
258
+ return formatNumber(value);
259
+ }
260
+ return value;
261
+ }
262
+ };
263
+
264
+ export const getCountryEmoji = (country: string): string | undefined => {
265
+ const countryEmojis: { [key: string]: string } = {
266
+ Austria: "๐Ÿ‡ฆ๐Ÿ‡น ",
267
+ Belgium: "๐Ÿ‡ง๐Ÿ‡ช",
268
+ Bulgaria: "๐Ÿ‡ง๐Ÿ‡ฌ",
269
+ Croatia: "๐Ÿ‡ญ๐Ÿ‡ท",
270
+ Cyprus: "๐Ÿ‡จ๐Ÿ‡พ",
271
+ Czechia: "๐Ÿ‡จ๐Ÿ‡ฟ",
272
+ Denmark: "๐Ÿ‡ฉ๐Ÿ‡ฐ",
273
+ Estonia: "๐Ÿ‡ช๐Ÿ‡ช",
274
+ Finland: "๐Ÿ‡ซ๐Ÿ‡ฎ",
275
+ France: "๐Ÿ‡ซ๐Ÿ‡ท",
276
+ England: "๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ",
277
+ Germany: "๐Ÿ‡ฉ๐Ÿ‡ช",
278
+ Greece: "๐Ÿ‡ฌ๐Ÿ‡ท",
279
+ Hungary: "๐Ÿ‡ญ๐Ÿ‡บ",
280
+ Ireland: "๐Ÿ‡ฎ๐Ÿ‡ช",
281
+ Italy: "๐Ÿ‡ฎ๐Ÿ‡น",
282
+ Latvia: "๐Ÿ‡ฑ๐Ÿ‡ป",
283
+ Lithuania: "๐Ÿ‡ฑ๐Ÿ‡น",
284
+ Netherlands: "๐Ÿ‡ณ๐Ÿ‡ฑ",
285
+ Norway: "๐Ÿ‡ณ๐Ÿ‡ด",
286
+ Poland: "๐Ÿ‡ต๐Ÿ‡ฑ",
287
+ Portugal: "๐Ÿ‡ต๐Ÿ‡น",
288
+ Romania: "๐Ÿ‡ท๐Ÿ‡ด",
289
+ Slovakia: "๐Ÿ‡ธ๐Ÿ‡ฐ",
290
+ Slovenia: "๐Ÿ‡ธ๐Ÿ‡ฎ",
291
+ Spain: "๐Ÿ‡ช๐Ÿ‡ธ",
292
+ Sweden: "๐Ÿ‡ธ๐Ÿ‡ช",
293
+ "United states": "๐Ÿ‡บ๐Ÿ‡ธ",
294
+ "United States": "๐Ÿ‡บ๐Ÿ‡ธ",
295
+ Switzerland: "๐Ÿ‡จ๐Ÿ‡ญ",
296
+ "United Kingdom": "๐Ÿ‡ฌ๐Ÿ‡ง",
297
+ "Northern Ireland": "๐Ÿ‡ฌ๐Ÿ‡ง",
298
+ Taiwan: "๐Ÿ‡น๐Ÿ‡ผ",
299
+ "Russian Federation": "๐Ÿ‡ท๐Ÿ‡บ",
300
+ Canada: "๐Ÿ‡จ๐Ÿ‡ฆ",
301
+ Afghanistan: "๐Ÿ‡ฆ๐Ÿ‡ซ",
302
+ "Aland Islands": "๐Ÿ‡ฆ๐Ÿ‡ฝ",
303
+ Albania: "๐Ÿ‡ฆ๐Ÿ‡ฑ",
304
+ "Bosnia and Herzegovina": "๐Ÿ‡ง๐Ÿ‡ฆ",
305
+ "Former Serbia and Montenegro": "๐Ÿ‡ท๐Ÿ‡ธ",
306
+ "Macedonia, The Former Yugoslav Republic of": "๐Ÿ‡ฒ๐Ÿ‡ฐ",
307
+ Serbia: "๐Ÿ‡ท๐Ÿ‡ธ",
308
+ Turkey: "๐Ÿ‡น๐Ÿ‡ท",
309
+ India: "๐Ÿ‡ฎ๐Ÿ‡ณ",
310
+ "Iran, Islamic Republic of": "๐Ÿ‡ฎ๐Ÿ‡ท",
311
+ "Iran, Islamic Republic Of": "๐Ÿ‡ฎ๐Ÿ‡ท",
312
+ Israel: "๐Ÿ‡ฎ๐Ÿ‡ฑ",
313
+ Mexico: "๐Ÿ‡ฒ๐Ÿ‡ฝ",
314
+ Morocco: "๐Ÿ‡ฒ๐Ÿ‡ฆ",
315
+ Pakistan: "๐Ÿ‡ต๐Ÿ‡ฐ",
316
+ Tunisia: "๐Ÿ‡น๐Ÿ‡ณ",
317
+ Venezuela: "๐Ÿ‡ป๐Ÿ‡ช",
318
+ Algeria: "๐Ÿ‡ฉ๐Ÿ‡ฟ",
319
+ Egypt: "๐Ÿ‡ช๐Ÿ‡ฌ",
320
+ Brazil: "๐Ÿ‡ง๐Ÿ‡ท",
321
+ Bahrain: "๐Ÿ‡ง๐Ÿ‡ญ",
322
+ "Korea, Republic of": "๐Ÿ‡ฐ๐Ÿ‡ท",
323
+ Kuwait: "๐Ÿ‡ฐ๐Ÿ‡ผ",
324
+ Lebanon: "๐Ÿ‡ฑ๐Ÿ‡ง",
325
+ "United Arab Emirates": "๐Ÿ‡ฆ๐Ÿ‡ช",
326
+ Qatar: "๐Ÿ‡ถ๐Ÿ‡ฆ",
327
+ Argentina: "๐Ÿ‡ฆ๐Ÿ‡ท",
328
+ Australia: "๐Ÿ‡ฆ๐Ÿ‡บ",
329
+ Colombia: "๐Ÿ‡จ๐Ÿ‡ด",
330
+ "Czech Republic": "๐Ÿ‡จ๐Ÿ‡ฟ",
331
+ "NEW-ZEALAND": "๐Ÿ‡ณ๐Ÿ‡ฟ",
332
+ "New Zealand": "๐Ÿ‡ณ๐Ÿ‡ฟ",
333
+ "South Africa": "๐Ÿ‡ฟ๐Ÿ‡ฆ",
334
+ Ukraine: "๐Ÿ‡บ๐Ÿ‡ฆ",
335
+ Ecuador: "๐Ÿ‡ช๐Ÿ‡จ",
336
+ Belarus: "๐Ÿ‡ง๐Ÿ‡พ",
337
+ Montenegro: "๐Ÿ‡ฒ๐Ÿ‡ช",
338
+ "Moldova, Republic of": "๐Ÿ‡ฒ๐Ÿ‡ฉ",
339
+ Georgia: "๐Ÿ‡ฌ๐Ÿ‡ช",
340
+ "Sri Lanka": "๐Ÿ‡ฑ๐Ÿ‡ฐ",
341
+ "North Macedonia": "๐Ÿ‡ฒ๐Ÿ‡ฐ",
342
+ Chile: "๐Ÿ‡จ๐Ÿ‡ฑ",
343
+ China: "๐Ÿ‡จ๐Ÿ‡ณ",
344
+ Peru: "๐Ÿ‡ต๐Ÿ‡ช",
345
+ Kosovo: "๐Ÿ‡ฝ๐Ÿ‡ฐ",
346
+ Japan: "๐Ÿ‡ฏ๐Ÿ‡ต",
347
+ Kazakhstan: "๐Ÿ‡ฐ๐Ÿ‡ฟ",
348
+ Luxembourg: "๐Ÿ‡ฑ๐Ÿ‡บ",
349
+ "Saudi Arabia": "๐Ÿ‡ธ๐Ÿ‡ฆ",
350
+ Oman: "๐Ÿ‡ด๐Ÿ‡ฒ",
351
+ Thailand: "๐Ÿ‡น๐Ÿ‡ญ",
352
+ Uruguay: "๐Ÿ‡บ๐Ÿ‡พ",
353
+ Jordan: "๐Ÿ‡ฏ๐Ÿ‡ด",
354
+ "Costa Rica": "๐Ÿ‡จ๐Ÿ‡ท",
355
+ Kenya: "๐Ÿ‡ฐ๐Ÿ‡ช",
356
+ "Hong Kong": "๐Ÿ‡ญ๐Ÿ‡ฐ",
357
+ Malta: "๐Ÿ‡ฒ๐Ÿ‡น",
358
+ Malaysia: "๐Ÿ‡ฒ๐Ÿ‡พ",
359
+ Singapore: "๐Ÿ‡ธ๐Ÿ‡ฌ",
360
+ Armenia: "๐Ÿ‡ฆ๐Ÿ‡ฒ",
361
+ Iraq: "๐Ÿ‡ฎ๐Ÿ‡ถ",
362
+ Azerbaijan: "๐Ÿ‡ฆ๐Ÿ‡ฟ",
363
+ "Syrian Arab Republic": "๐Ÿ‡ธ๐Ÿ‡พ",
364
+ "El Salvador": "๐Ÿ‡ธ๐Ÿ‡ป",
365
+ Indonesia: "๐Ÿ‡ฎ๐Ÿ‡ฉ",
366
+ Guatemala: "๐Ÿ‡ฌ๐Ÿ‡น",
367
+ Panama: "๐Ÿ‡ต๐Ÿ‡ฆ",
368
+ Philippines: "๐Ÿ‡ต๐Ÿ‡ญ",
369
+ "Dominican Republic": "๐Ÿ‡ฉ๐Ÿ‡ด",
370
+ Vietnam: "๐Ÿ‡ป๐Ÿ‡ณ",
371
+ "Viet Nam": "๐Ÿ‡ป๐Ÿ‡ณ",
372
+ "American Samoa": "๐Ÿ‡ฆ๐Ÿ‡ธ",
373
+ Antarctica: "๐Ÿ‡ฆ๐Ÿ‡ถ",
374
+ "Antigua and Barbuda": "๐Ÿ‡ฆ๐Ÿ‡ฌ",
375
+ Aruba: "๐Ÿ‡ฆ๐Ÿ‡ผ",
376
+ "Puerto Rico": "๐Ÿ‡ต๐Ÿ‡ท",
377
+ Bahamas: "๐Ÿ‡ง๐Ÿ‡ธ",
378
+ "Saint Lucia": "๐Ÿ‡ฑ๐Ÿ‡จ",
379
+ Jamaica: "๐Ÿ‡ฏ๐Ÿ‡ฒ",
380
+ "Trinidad and Tobago": "๐Ÿ‡น๐Ÿ‡น",
381
+ Barbados: "๐Ÿ‡ง๐Ÿ‡ง",
382
+ Belize: "๐Ÿ‡ง๐Ÿ‡ฟ",
383
+ Benin: "๐Ÿ‡ง๐Ÿ‡ฏ",
384
+ Bermuda: "๐Ÿ‡ง๐Ÿ‡ฒ",
385
+ Bhutan: "๐Ÿ‡ง๐Ÿ‡น",
386
+ Bolivia: "๐Ÿ‡ง๐Ÿ‡ด",
387
+ "Bouvet Island": "๐Ÿ‡ง๐Ÿ‡ป",
388
+ "British Indian Ocean Territory": "๐Ÿ‡ฎ๐Ÿ‡ด",
389
+ "Burkina Faso": "๐Ÿ‡ง๐Ÿ‡ซ",
390
+ Burundi: "๐Ÿ‡ง๐Ÿ‡ฎ",
391
+ Cambodia: "๐Ÿ‡ฐ๐Ÿ‡ญ",
392
+ Cameroon: "๐Ÿ‡จ๐Ÿ‡ฒ",
393
+ "Cape Verde": "๐Ÿ‡จ๐Ÿ‡ป",
394
+ "Cayman Islands": "๐Ÿ‡ฐ๐Ÿ‡พ",
395
+ "Central African Republic": "๐Ÿ‡จ๐Ÿ‡ซ",
396
+ Chad: "๐Ÿ‡น๐Ÿ‡ฉ",
397
+ Comoros: "๐Ÿ‡ฐ๐Ÿ‡ฒ",
398
+ "Congo, The Democratic Republic of the": "๐Ÿ‡จ๐Ÿ‡ฉ",
399
+ Congo: "๐Ÿ‡จ๐Ÿ‡ฌ",
400
+ Andorra: "๐Ÿ‡ฆ๐Ÿ‡ฉ",
401
+ Angola: "๐Ÿ‡ฆ๐Ÿ‡ด",
402
+ Anguilla: "๐Ÿ‡ฆ๐Ÿ‡ฎ",
403
+ "Equatorial Guinea": "๐Ÿ‡ฌ๐Ÿ‡ถ",
404
+ Eritrea: "๐Ÿ‡ช๐Ÿ‡ท",
405
+ Ethiopia: "๐Ÿ‡ช๐Ÿ‡น",
406
+ "Falkland Islands (Malvinas)": "๐Ÿ‡ซ๐Ÿ‡ฐ",
407
+ "Faroe Islands": "๐Ÿ‡ซ๐Ÿ‡ด",
408
+ Fiji: "๐Ÿ‡ซ๐Ÿ‡ฏ",
409
+ Gabon: "๐Ÿ‡ฌ๐Ÿ‡ฆ",
410
+ Gambia: "๐Ÿ‡ฌ๐Ÿ‡ฒ",
411
+ Ghana: "๐Ÿ‡ฌ๐Ÿ‡ญ",
412
+ Gibraltar: "๐Ÿ‡ฌ๐Ÿ‡ฎ",
413
+ Greenland: "๐Ÿ‡ฌ๐Ÿ‡ฑ",
414
+ Grenada: "๐Ÿ‡ฌ๐Ÿ‡ฉ",
415
+ Guadeloupe: "๐Ÿ‡ฌ๐Ÿ‡ต",
416
+ Guam: "๐Ÿ‡ฌ๐Ÿ‡บ",
417
+ Guinea: "๐Ÿ‡ฌ๐Ÿ‡ณ",
418
+ "Guinea-Bissau": "๐Ÿ‡ฌ๐Ÿ‡ผ",
419
+ Guyana: "๐Ÿ‡ฌ๐Ÿ‡พ",
420
+ Haiti: "๐Ÿ‡ญ๐Ÿ‡น",
421
+ "Heard Island and McDonald Islands": "๐Ÿ‡ญ๐Ÿ‡ฒ",
422
+ Honduras: "๐Ÿ‡ญ๐Ÿ‡ณ",
423
+ Iceland: "๐Ÿ‡ฎ๐Ÿ‡ธ",
424
+ "Cรดte dโ€™Ivoire": "๐Ÿ‡จ๐Ÿ‡ฎ",
425
+ "Christmas Island": "๐Ÿ‡จ๐Ÿ‡ฝ",
426
+ Kyrgyzstan: "๐Ÿ‡ฐ๐Ÿ‡ฌ",
427
+ Lao: "๐Ÿ‡ฑ๐Ÿ‡ฆ",
428
+ "Lao People's Democratic Republic": "๐Ÿ‡ฑ๐Ÿ‡ฆ",
429
+ Liberia: "๐Ÿ‡ฑ๐Ÿ‡ท",
430
+ Libya: "๐Ÿ‡ฑ๐Ÿ‡พ",
431
+ Liechtenstein: "๐Ÿ‡ฑ๐Ÿ‡ฎ",
432
+ Macao: "๐Ÿ‡ฒ๐Ÿ‡ด",
433
+
434
+ "Marshall Islands": "๐Ÿ‡ฒ๐Ÿ‡ญ",
435
+ Martinique: "๐Ÿ‡ฒ๐Ÿ‡ถ",
436
+ Mauritania: "๐Ÿ‡ฒ๐Ÿ‡ท",
437
+ Mauritius: "๐Ÿ‡ฒ๐Ÿ‡บ",
438
+ Mayotte: "๐Ÿ‡พ๐Ÿ‡น",
439
+ Micronesia: "๐Ÿ‡ซ๐Ÿ‡ฒ",
440
+ Monaco: "๐Ÿ‡ฒ๐Ÿ‡จ",
441
+ Mongolia: "๐Ÿ‡ฒ๐Ÿ‡ณ",
442
+ Montserrat: "๐Ÿ‡ฒ๐Ÿ‡ธ",
443
+ Mozambique: "๐Ÿ‡ฒ๐Ÿ‡ฟ",
444
+ Myanmar: "๐Ÿ‡ฒ๐Ÿ‡ฒ",
445
+ Namibia: "๐Ÿ‡ณ๐Ÿ‡ฆ",
446
+ Nauru: "๐Ÿ‡ณ๐Ÿ‡ท",
447
+ Nepal: "๐Ÿ‡ณ๐Ÿ‡ต",
448
+ Nicaragua: "๐Ÿ‡ณ๐Ÿ‡ฎ",
449
+ USA: "๐Ÿ‡บ๐Ÿ‡ธ",
450
+ Usa: "๐Ÿ‡บ๐Ÿ‡ธ",
451
+ Niger: "๐Ÿ‡ณ๐Ÿ‡ช",
452
+ Nigeria: "๐Ÿ‡ณ๐Ÿ‡ฌ",
453
+ Niue: "๐Ÿ‡ณ๐Ÿ‡บ",
454
+ "Norfolk Island": "๐Ÿ‡ณ๐Ÿ‡ซ",
455
+ Palau: "๐Ÿ‡ต๐Ÿ‡ผ",
456
+ "Papua New Guinea": "๐Ÿ‡ต๐Ÿ‡ฌ",
457
+ Paraguay: "๐Ÿ‡ต๐Ÿ‡พ",
458
+ Pitcairn: "๐Ÿ‡ต๐Ÿ‡ณ",
459
+ Rwanda: "๐Ÿ‡ท๐Ÿ‡ผ",
460
+ "Saint Helena, Ascension and Tristan da Cunha": "๐Ÿ‡ธ๐Ÿ‡ญ",
461
+ "Saint Kitts and Nevis": "๐Ÿ‡ฐ๐Ÿ‡ณ",
462
+ Bangladesh: "๐Ÿ‡ง๐Ÿ‡ฉ",
463
+ "Bonaire, Sint Eustatius and Saba": "๐Ÿ‡ง๐Ÿ‡ถ",
464
+
465
+ Botswana: "๐Ÿ‡ง๐Ÿ‡ผ",
466
+ "Brunei Darussalam": "๐Ÿ‡ง๐Ÿ‡ณ",
467
+ Cuba: "๐Ÿ‡จ๐Ÿ‡บ",
468
+ "Cรดte D'Ivoire": "๐Ÿ‡จ๐Ÿ‡ฎ",
469
+ Djibouti: "๐Ÿ‡ฉ๐Ÿ‡ฏ",
470
+ "Federated States of Micronesia": "๐Ÿ‡ซ๐Ÿ‡ฒ",
471
+ "Former Yugoslavia": "๐Ÿ‡ท๐Ÿ‡ธ",
472
+ "French Guiana": "๐Ÿ‡ฌ๐Ÿ‡ซ",
473
+ "French Polynesia": "๐Ÿ‡ต๐Ÿ‡ซ",
474
+ "Holy See (Vatican City State)": "๐Ÿ‡ป๐Ÿ‡ฆ",
475
+ Jersey: "๐Ÿ‡ฏ๐Ÿ‡ช",
476
+ "Korea, Democratic People's Republic of": "๐Ÿ‡ฐ๐Ÿ‡ต",
477
+ "Lao Peopleโ€™s Democratic Republic": "๐Ÿ‡ฑ๐Ÿ‡ฆ",
478
+ Lesotho: "๐Ÿ‡ฑ๐Ÿ‡ธ",
479
+ "Libyan Arab Jamahiriya": "๐Ÿ‡ฑ๐Ÿ‡พ",
480
+ Macau: "๐Ÿ‡ฒ๐Ÿ‡ด",
481
+ Malawi: "๐Ÿ‡ฒ๐Ÿ‡ผ",
482
+ Madagascar: "๐Ÿ‡ฒ๐Ÿ‡ฌ",
483
+ Maldives: "๐Ÿ‡ฒ๐Ÿ‡ป",
484
+ "Netherlands Antilles": "๐Ÿ‡ง๐Ÿ‡ถ",
485
+ "New Caledonia": "๐Ÿ‡ณ๐Ÿ‡จ",
486
+ "Northern Mariana Islands": "๐Ÿ‡ฒ๐Ÿ‡ต",
487
+ "Palestinian Territories, Occupied": "๐Ÿ‡ต๐Ÿ‡ธ",
488
+ "Palestinian Territory, occupied": "๐Ÿ‡ต๐Ÿ‡ธ",
489
+ Rรฉunion: "๐Ÿ‡ท๐Ÿ‡ช",
490
+ "Saint Martin": "๐Ÿ‡ฒ๐Ÿ‡ซ",
491
+ "Saint Vincent and the Grenadines": "๐Ÿ‡ป๐Ÿ‡จ",
492
+ "San Marino": "๐Ÿ‡ธ๐Ÿ‡ฒ",
493
+ Senegal: "๐Ÿ‡ธ๐Ÿ‡ณ",
494
+ Seychelles: "๐Ÿ‡ธ๐Ÿ‡จ",
495
+ "Sierra Leone": "๐Ÿ‡ธ๐Ÿ‡ฑ",
496
+ "Solomon Islands": "๐Ÿ‡ธ๐Ÿ‡ง",
497
+ Somalia: "๐Ÿ‡ธ๐Ÿ‡ด",
498
+ "South Georgia and the South Sandwich Islands": "๐Ÿ‡ฌ๐Ÿ‡ธ",
499
+ "South Korea": "๐Ÿ‡ฐ๐Ÿ‡ท",
500
+ "South Sudan": "๐Ÿ‡ธ๐Ÿ‡ธ",
501
+ Swaziland: "๐Ÿ‡ธ๐Ÿ‡ฟ",
502
+ Tajikistan: "๐Ÿ‡น๐Ÿ‡ฏ",
503
+ Tanzania: "๐Ÿ‡น๐Ÿ‡ฟ",
504
+ "Turkey (tรผrkiye)": "๐Ÿ‡น๐Ÿ‡ท",
505
+ "Tanzania, United Republic Of": "๐Ÿ‡น๐Ÿ‡ฟ",
506
+ "The Democratic Republic of the Congo": "๐Ÿ‡จ๐Ÿ‡ฉ",
507
+ "Timor-Leste": "๐Ÿ‡น๐Ÿ‡ฑ",
508
+ "Timor Leste": "๐Ÿ‡น๐Ÿ‡ฑ",
509
+ Togo: "๐Ÿ‡น๐Ÿ‡ฌ",
510
+ Uganda: "๐Ÿ‡บ๐Ÿ‡ฌ",
511
+ "United States Minor Outlying Islands": "๐Ÿ‡บ๐Ÿ‡ฒ",
512
+ Uzbekistan: "๐Ÿ‡บ๐Ÿ‡ฟ",
513
+ Vanuatu: "๐Ÿ‡ป๐Ÿ‡บ",
514
+ "Virgin Islands (U.S.)": "๐Ÿ‡ป๐Ÿ‡ฎ",
515
+ Yemen: "๐Ÿ‡พ๐Ÿ‡ช",
516
+ Zambia: "๐Ÿ‡ฟ๐Ÿ‡ฒ",
517
+ Zimbabwe: "๐Ÿ‡ฟ๐Ÿ‡ผ",
518
+ Europe: "๐Ÿ‡ช๐Ÿ‡บ",
519
+ Wales: "๐Ÿด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ",
520
+ Scotland: "๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ",
521
+ ENGLAND: "๐Ÿด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ",
522
+ World: "๐ŸŒ"
523
+ };
524
+
525
+ const countryName = formatName(country);
526
+ return countryEmojis[countryName] + "ย ย " + countryName;
527
+ };
528
+
529
+ export const debounce = (func: any, wait: any) => {
530
+ let timeout: any;
531
+ return function (...args: any) {
532
+ clearTimeout(timeout);
533
+ timeout = setTimeout(() => {
534
+ func.apply(this, args);
535
+ }, wait);
536
+ };
537
+ };
538
+
539
+ export const setColorStatus = (value: any) => {
540
+ switch (value) {
541
+ // EUCT
542
+ case "Authorised, recruiting":
543
+ return "lime";
544
+ case "Authorised, recruitment pending":
545
+ return "lime";
546
+ case "Ended":
547
+ return "teal";
548
+ case "Temporarily halted":
549
+ return "rose";
550
+ case "Ongoing, not yet recruiting":
551
+ return "purple";
552
+ case "Ongoing, recruiting":
553
+ return "yellow";
554
+ case "Ongoing, recruitment ended":
555
+ return "blue";
556
+ case "Expired":
557
+ return "gray";
558
+ case "Revoked":
559
+ return "rose";
560
+ case "Not authorised":
561
+ return "rose";
562
+
563
+ // GLOBAL CT
564
+ case "Active, not recruiting":
565
+ return "blue";
566
+ case "Approved for marketing":
567
+ return "gray";
568
+ case "Available":
569
+ return "lime";
570
+ case "Completed":
571
+ return "teal";
572
+ case "Enrolling by invitation":
573
+ return "yellow";
574
+ case "No longer available":
575
+ return "gray";
576
+ case "Not yet recruiting":
577
+ return "gray";
578
+ case "Recruiting":
579
+ return "yellow";
580
+ case "Suspended":
581
+ return "rose";
582
+ case "Temporarily not available":
583
+ return "gray";
584
+ case "Terminated":
585
+ return "rose";
586
+ case "Unknown status":
587
+ return "gray";
588
+ case "Withdrawn":
589
+ return "gray";
590
+ case "Withheld":
591
+ return "gray";
592
+ // PROTEIN STUDY
593
+ case "Experimental":
594
+ return "blue";
595
+ case "Predicted":
596
+ return "teal";
597
+ // :::::::::::::
598
+ default:
599
+ return "gray";
600
+ }
601
+ };
602
+
603
+ export const getSexe = (female?: boolean, male?: boolean): string | null => {
604
+ if (female && male) return 'Female - Male';
605
+ if (male) return 'Only male';
606
+ if (female) return 'Only female';
607
+ return null;
608
+ };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Sรฉlections rapides d'arg-complex-select (`smart_selection_table`, des
3
+ * `{ name, item }`) vers les `presets` de RmComplexSelect (`{ label, values }`).
4
+ */
5
+ export function toPresets(table: { name: string; item: string[] }[] | null | undefined) {
6
+ return table?.map((preset) => ({ label: preset.name, values: preset.item })) ?? null;
7
+ }