{
@@ -3072,17 +3181,6 @@ const MapProject = () => {
setSearchText(val || ''))} />
-
- onMatchTypeChange('very_high')} />}
- label={t('map_project.auto_match')}
- />
-
setScoreBucketSortBy(scoreBucketSortBy === 'desc' ? 'asc' : 'desc')}
diff --git a/src/components/map-projects/Score.jsx b/src/components/map-projects/Score.jsx
index 399ec8c..44df55f 100644
--- a/src/components/map-projects/Score.jsx
+++ b/src/components/map-projects/Score.jsx
@@ -1,6 +1,6 @@
import React from 'react'
import { useTranslation } from 'react-i18next';
-import { MATCH_TYPES, SCORES_COLOR } from './constants'
+import { SCORES_COLOR } from './constants'
import ListItem from '@mui/material/ListItem'
import ListItemButton from '@mui/material/ListItemButton'
import ListItemIcon from '@mui/material/ListItemIcon'
@@ -75,13 +75,11 @@ const Score = ({concept, setShowHighlights, sx, isAIRecommended, candidatesScore
rerankScore,
algoScore
} = getScoreDetails(concept, candidatesScore)
- const { color } = MATCH_TYPES[concept?.search_meta?.match_type || 'no_match']
return (
{
diff --git a/src/components/map-projects/algorithms.jsx b/src/components/map-projects/algorithms.jsx
index 1ef2589..f4f0dab 100644
--- a/src/components/map-projects/algorithms.jsx
+++ b/src/components/map-projects/algorithms.jsx
@@ -1,6 +1,52 @@
import React from 'react'
import MatchingIcon from '@mui/icons-material/DeviceHub';
+// Canonical concept-identity config per algorithm type
+// (plans/unified-mapper-model.md). Single source of truth shared between
+// algorithms defined here (ocl-semantic, ocl-search) and algorithms loaded
+// from the OCL Online API (ocl-bridge, ocl-ciel-bridge, ocl-scispacy);
+// MapProject's getAlgoDef merges the missing concept_identity at lookup time.
+export const CONCEPT_IDENTITY_BY_TYPE = {
+ 'ocl-semantic': {
+ 'reference_source': 'target_repo',
+ 'code_field': 'id',
+ 'ocl_url_field': 'url'
+ },
+ 'ocl-search': {
+ 'reference_source': 'target_repo',
+ 'code_field': 'id',
+ 'ocl_url_field': 'url'
+ },
+ 'ocl-bridge': {
+ 'reference_source': 'bridge_repo',
+ 'code_field': 'id',
+ 'ocl_url_field': 'url',
+ 'cascade_target': {
+ 'reference_source': 'target_repo',
+ 'code_field': 'cascade_target_concept_code',
+ 'ocl_url_field': 'cascade_target_concept_url'
+ }
+ },
+ 'ocl-ciel-bridge': {
+ 'reference_source': 'bridge_repo',
+ 'code_field': 'id',
+ 'ocl_url_field': 'url',
+ 'cascade_target': {
+ 'reference_source': 'target_repo',
+ 'code_field': 'cascade_target_concept_code',
+ 'ocl_url_field': 'cascade_target_concept_url'
+ }
+ },
+ // Scispacy returns LOINC codes only — fixed canonical, no OCL URL on the
+ // result. fromScispacyResultsToConcepts in MapProject.jsx maps LOINC_NUM
+ // into `id` before normalization, so code_field='id' resolves correctly.
+ 'ocl-scispacy': {
+ 'reference_source': 'fixed',
+ 'canonical_url': 'http://loinc.org',
+ 'code_field': 'id'
+ }
+}
+
export const useAlgos = (t, toggles) => {
const algos = [
{
@@ -18,14 +64,7 @@ export const useAlgos = (t, toggles) => {
'disabled': !toggles.SEMANTIC_SEARCH_TOGGLE,
'allow_multiple': false,
'lookup_required': false,
- // Canonical concept identity (plans/unified-mapper-model.md). Concepts
- // returned by ocl-semantic come from the project's target repo, so the
- // canonical URL of each concept is the target repo's canonical URL.
- 'concept_identity': {
- 'reference_source': 'target_repo',
- 'code_field': 'id',
- 'ocl_url_field': 'url'
- }
+ 'concept_identity': CONCEPT_IDENTITY_BY_TYPE['ocl-semantic']
},
{
'id': 'ocl-search',
@@ -39,11 +78,7 @@ export const useAlgos = (t, toggles) => {
'disabled': false,
'allow_multiple': false,
'lookup_required': false,
- 'concept_identity': {
- 'reference_source': 'target_repo',
- 'code_field': 'id',
- 'ocl_url_field': 'url'
- }
+ 'concept_identity': CONCEPT_IDENTITY_BY_TYPE['ocl-search']
},
]
return algos
diff --git a/src/components/map-projects/constants.jsx b/src/components/map-projects/constants.jsx
index 9a9aaed..869ba21 100644
--- a/src/components/map-projects/constants.jsx
+++ b/src/components/map-projects/constants.jsx
@@ -3,10 +3,6 @@ import ListIcon from '@mui/icons-material/FormatListNumbered';
import UnMappedIcon from '@mui/icons-material/LinkOff';
import MappedIcon from '@mui/icons-material/Link';
import ReviewedIcon from '@mui/icons-material/FactCheckOutlined';
-import AutoMatchIcon from '@mui/icons-material/MotionPhotosAutoOutlined';
-import MediumMatchIcon from '@mui/icons-material/Rule';
-import LowMatchIcon from '@mui/icons-material/DynamicForm';
-import NoMatchIcon from '@mui/icons-material/RemoveRoad';
import { RECOMMEND_COLOR, AVAILABLE_COLOR, UNRANKED_COLOR } from '../../common/colors'
const ID_HEADER = {id: 'id', label: 'ID', description: 'Exact match on concept ID'}
@@ -56,34 +52,6 @@ export const VIEWS = {
},
}
-export const MATCH_TYPES = {
- very_high: {
- label: 'Auto Match',
- icon: ,
- color: 'primary',
- },
- high: {
- label: 'High Match',
- icon: ,
- color: 'warning',
- },
- medium: {
- label: 'Medium Match',
- icon: ,
- color: 'warning',
- },
- low: {
- label: 'Low Match',
- icon: ,
- color: 'secondary',
- },
- no_match: {
- label: 'No Match',
- icon: ,
- color: 'error',
- },
-}
-
export const DECISION_TABS = ['candidates', 'search', 'propose', 'discuss']
export const SCORES_COLOR = {