For Researchers

Cohort Exploration

Build cohorts from multi-criteria evidence queries. Combine any evidence types, trust layers, and subject types — including cross-species — in a single query. Every cohort result carries full provenance on each included assertion.

Multi-criteria selection

Cohort criteria are ANDed: a subject must match all criteria to be included. Each criterion specifies an evidence type, optional clinical code, and optional value constraint.

Criterion shape

FieldTypeDescription
typestringEvidence type (e.g. lab_result)
codestring?LOINC, SNOMED CT, ICD-10 code
value{ lt?, gt?, eq? }?Numeric value constraint
typescript
const cohort = await client.cohorts.query({
  criteria: [
    // Must have EGFR L858R mutation
    { type: 'genomic_variant', code: 'EGFR_L858R' },
    // AND hemoglobin below 10 g/dL
    { type: 'lab_result', code: 'LOINC:718-7', value: { lt: 10 } },
    // AND NSCLC diagnosis
    { type: 'diagnosis', code: 'SNOMED:254637007' },
  ],
  subjectTypes: ['human', 'canine'],
  trustLayers: ['source_fact', 'normalized_fact'],
});

// Returns:
// {
//   subjects: Subject[]           // Matching subjects with summary stats
//   totalCount: number            // Total matches (before pagination)
//   criteria: CohortCriteria[]    // Echo of applied criteria
// }

Cross-species cohorts

OpenBio's evidence model is species-agnostic. The same hemoglobin assertion type exists for a human patient and a Golden Retriever. Set subjectTypes to include any combination of organism types.

typescript
// Find all subjects — human, canine, and primate — with anemia and NSCLC
const crossSpecies = await client.cohorts.query({
  criteria: [
    { type: 'lab_result', code: 'LOINC:718-7', value: { lt: 10 } },
    { type: 'diagnosis', code: 'SNOMED:254637007' },
  ],
  subjectTypes: ['human', 'canine', 'primate'],
  trustLayers: ['source_fact', 'normalized_fact'],
});

// Each Subject in the result includes:
// { id, name, subjectType, evidenceCount, matchingAssertions }

Export

Export cohort results as JSON or flat CSV for downstream analysis in R, Python, or any statistical tooling.

const cohort = await client.cohorts.query({
  criteria: [
    { type: 'genomic_variant', code: 'EGFR_L858R' },
    { type: 'lab_result', code: 'LOINC:718-7', value: { lt: 10 } },
  ],
  subjectTypes: ['human', 'canine'],
  trustLayers: ['source_fact', 'normalized_fact'],
});

// Export as structured JSON
const json = JSON.stringify(cohort, null, 2);
// → { subjects: Subject[], totalCount: number, criteria: CohortCriteria[] }