@tekkare/romulus 0.1.250 โ 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/dist/runtime/components/BarChart.vue +1 -0
- package/dist/runtime/components/ChoroplethMap.vue +4 -1
- package/dist/runtime/internal/geo/fr-regions.json +1 -1
- package/dist/runtime/utils/chart.d.ts +6 -3
- package/dist/runtime/utils/chart.js +15 -2
- 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,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
|
+
}
|