curl -X POST "https://api.omophub.com/v1/mappings/validate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mappings": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to"
},
{
"source_concept_id": 4182210,
"target_concept_id": 320128,
"mapping_type": "Maps to"
}
]
}'
import { OMOPHub } from '@omophub/omophub-node';
// Not yet exposed as a dedicated SDK method - use the typed low-level helper.
const client = new OMOPHub();
interface ValidationResult {
source_concept_id: number;
target_concept_id: number;
is_valid: boolean;
validation_score: number;
issues: string[];
}
const { data } = await client.post<ValidationResult[]>('/mappings/validate', {
mappings: [
{ source_concept_id: 201826, target_concept_id: 443735, mapping_type: 'Maps to' },
],
});
for (const validation of data ?? []) {
console.log(`${validation.source_concept_id} → ${validation.target_concept_id}`);
console.log(` Valid: ${validation.is_valid}, Score: ${validation.validation_score}`);
if (validation.issues.length > 0) {
console.log(` Issues: ${validation.issues.join(', ')}`);
}
}
import requests
response = requests.post(
"https://api.omophub.com/v1/mappings/validate",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"mappings": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to"
}
]
}
)
result = response.json()
for validation in result["data"]:
print(f"{validation['source_concept_id']} → {validation['target_concept_id']}")
print(f" Valid: {validation['is_valid']}, Score: {validation['validation_score']}")
if validation["issues"]:
print(f" Issues: {', '.join(validation['issues'])}")
{
"success": true,
"data": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to",
"is_valid": true,
"validation_score": 0.85,
"issues": [],
"recommendations": []
},
{
"source_concept_id": 4182210,
"target_concept_id": 320128,
"mapping_type": "Maps to",
"is_valid": false,
"validation_score": 0.40,
"issues": [
"No direct mapping relationship exists",
"Domain mismatch between concepts"
],
"recommendations": [
"Verify mapping relationship type is correct",
"Consider using a target concept in the same domain"
]
}
],
"meta": {
"request_id": "req_validate_abc123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.2"
}
}
Validate Mappings
Validate the accuracy and quality of OMOP concept mappings between vocabularies - verify translations before committing them to source_to_concept_map.
curl -X POST "https://api.omophub.com/v1/mappings/validate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mappings": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to"
},
{
"source_concept_id": 4182210,
"target_concept_id": 320128,
"mapping_type": "Maps to"
}
]
}'
import { OMOPHub } from '@omophub/omophub-node';
// Not yet exposed as a dedicated SDK method - use the typed low-level helper.
const client = new OMOPHub();
interface ValidationResult {
source_concept_id: number;
target_concept_id: number;
is_valid: boolean;
validation_score: number;
issues: string[];
}
const { data } = await client.post<ValidationResult[]>('/mappings/validate', {
mappings: [
{ source_concept_id: 201826, target_concept_id: 443735, mapping_type: 'Maps to' },
],
});
for (const validation of data ?? []) {
console.log(`${validation.source_concept_id} → ${validation.target_concept_id}`);
console.log(` Valid: ${validation.is_valid}, Score: ${validation.validation_score}`);
if (validation.issues.length > 0) {
console.log(` Issues: ${validation.issues.join(', ')}`);
}
}
import requests
response = requests.post(
"https://api.omophub.com/v1/mappings/validate",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"mappings": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to"
}
]
}
)
result = response.json()
for validation in result["data"]:
print(f"{validation['source_concept_id']} → {validation['target_concept_id']}")
print(f" Valid: {validation['is_valid']}, Score: {validation['validation_score']}")
if validation["issues"]:
print(f" Issues: {', '.join(validation['issues'])}")
{
"success": true,
"data": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to",
"is_valid": true,
"validation_score": 0.85,
"issues": [],
"recommendations": []
},
{
"source_concept_id": 4182210,
"target_concept_id": 320128,
"mapping_type": "Maps to",
"is_valid": false,
"validation_score": 0.40,
"issues": [
"No direct mapping relationship exists",
"Domain mismatch between concepts"
],
"recommendations": [
"Verify mapping relationship type is correct",
"Consider using a target concept in the same domain"
]
}
],
"meta": {
"request_id": "req_validate_abc123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.2"
}
}
Overview
This endpoint validates concept mappings between vocabularies, checking for concept validity, domain compatibility, and relationship correctness. It returns a validation score and identifies potential issues with each mapping.Request Body
Query Parameters
Response
Array of validation results matching the input order
Show data
Show data
curl -X POST "https://api.omophub.com/v1/mappings/validate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mappings": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to"
},
{
"source_concept_id": 4182210,
"target_concept_id": 320128,
"mapping_type": "Maps to"
}
]
}'
import { OMOPHub } from '@omophub/omophub-node';
// Not yet exposed as a dedicated SDK method - use the typed low-level helper.
const client = new OMOPHub();
interface ValidationResult {
source_concept_id: number;
target_concept_id: number;
is_valid: boolean;
validation_score: number;
issues: string[];
}
const { data } = await client.post<ValidationResult[]>('/mappings/validate', {
mappings: [
{ source_concept_id: 201826, target_concept_id: 443735, mapping_type: 'Maps to' },
],
});
for (const validation of data ?? []) {
console.log(`${validation.source_concept_id} → ${validation.target_concept_id}`);
console.log(` Valid: ${validation.is_valid}, Score: ${validation.validation_score}`);
if (validation.issues.length > 0) {
console.log(` Issues: ${validation.issues.join(', ')}`);
}
}
import requests
response = requests.post(
"https://api.omophub.com/v1/mappings/validate",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"mappings": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to"
}
]
}
)
result = response.json()
for validation in result["data"]:
print(f"{validation['source_concept_id']} → {validation['target_concept_id']}")
print(f" Valid: {validation['is_valid']}, Score: {validation['validation_score']}")
if validation["issues"]:
print(f" Issues: {', '.join(validation['issues'])}")
{
"success": true,
"data": [
{
"source_concept_id": 201826,
"target_concept_id": 443735,
"mapping_type": "Maps to",
"is_valid": true,
"validation_score": 0.85,
"issues": [],
"recommendations": []
},
{
"source_concept_id": 4182210,
"target_concept_id": 320128,
"mapping_type": "Maps to",
"is_valid": false,
"validation_score": 0.40,
"issues": [
"No direct mapping relationship exists",
"Domain mismatch between concepts"
],
"recommendations": [
"Verify mapping relationship type is correct",
"Consider using a target concept in the same domain"
]
}
],
"meta": {
"request_id": "req_validate_abc123",
"timestamp": "2024-12-22T10:00:00Z",
"vocab_release": "2025.2"
}
}
Validation Scoring
The validation score starts at 1.0 (100%) and is reduced based on issues found:| Issue | Score Reduction |
|---|---|
| Invalid source concept | -0.40 |
| Invalid target concept | -0.40 |
| Domain mismatch | -0.20 |
| Standard to non-standard mapping | -0.15 |
| No relationship exists between concepts | -0.25 |
validation_score >= 0.50.
Related Endpoints
- Get Concept Mappings - Get mappings for a concept
- Batch Map Concepts - Map multiple concepts at once
Was this page helpful?