For Researchers

Querying Evidence

Every evidence assertion in OpenBio is filterable by trust layer, type, time range, and clinical code. Filters compose — combine as many as needed to retrieve exactly the evidence slice your study requires.

Filter by trust layer

Trust layers let you control the epistemic quality of the evidence you retrieve. For hypothesis generation, you might accept all layers. For a regulatory submission, you might restrict to source_fact only.

source_factSource Fact

Raw, unmodified data directly from the source system

normalized_factNormalized

Mapped to standard terminology (LOINC, SNOMED, ICD)

extracted_annotationExtracted

Derived from unstructured documents or images via NLP/AI

derived_featureDerived

Computed from other evidence assertions

model_outputModel Output

AI/ML model predictions with confidence scores

hypothesisHypothesis

Proposed clinical or research interpretations

typescript
// Retrieve only raw, unmodified source facts
const rawLabs = await client.evidence.bySubject({
  subjectId: 'james-58',
  trustLayer: ['source_fact'],
  type: 'lab_result',
});

// Retrieve normalized facts for standardized terminology
const normalizedLabs = await client.evidence.bySubject({
  subjectId: 'james-58',
  trustLayer: ['source_fact', 'normalized_fact'],
  type: 'lab_result',
});

// Include AI predictions (use with caution in clinical research)
const allEvidence = await client.evidence.bySubject({
  subjectId: 'james-58',
  trustLayer: ['source_fact', 'normalized_fact', 'derived_feature', 'model_output'],
});

Filter by evidence type

Evidence types map to clinical and research categories. Filter by one or more types to scope your retrieval.

TypeDescription
lab_resultQuantitative laboratory measurements
imaging_findingRadiology and imaging reports
genomic_variantSequence variants and annotations
medicationPrescribed and administered medications
diagnosisClinical diagnoses (ICD-10, SNOMED)
procedureClinical and surgical procedures
vital_signPhysiological measurements (HR, BP, temp)
typescript
// Single type
const genomics = await client.evidence.bySubject({
  subjectId: 'james-58',
  type: 'genomic_variant',
  trustLayer: ['source_fact', 'normalized_fact'],
});

// Multiple types
const clinicalPicture = await client.evidence.bySubject({
  subjectId: 'james-58',
  type: ['lab_result', 'diagnosis', 'medication'],
  trustLayer: ['source_fact'],
});

Filter by clinical code

OpenBio normalizes to standard terminologies. Query by LOINC, SNOMED CT, or ICD-10 code to find specific measurements or diagnoses.

typescript
// LOINC code for hemoglobin
const hemoglobin = await client.evidence.bySubject({
  subjectId: 'james-58',
  code: 'LOINC:718-7',
  trustLayer: ['source_fact', 'normalized_fact'],
});

// SNOMED CT diagnosis
const nsclcDiagnosis = await client.evidence.bySubject({
  subjectId: 'james-58',
  code: 'SNOMED:254637007', // Non-small cell carcinoma of lung
  type: 'diagnosis',
});

// ICD-10 code
const byIcd = await client.evidence.bySubject({
  subjectId: 'james-58',
  code: 'ICD10:C34.1', // Malignant neoplasm of upper lobe, bronchus or lung
  type: 'diagnosis',
});

Filter by time range

Constrain retrieval to a temporal window. Uses ISO 8601 timestamps. Combine with type and trust filters for precise cohort slices.

typescript
// Evidence from the past 6 months
const recent = await client.evidence.bySubject({
  subjectId: 'james-58',
  observedAfter: '2024-10-01T00:00:00Z',
  observedBefore: '2025-04-01T00:00:00Z',
  trustLayer: ['source_fact'],
});

// Combine: hemoglobin results from Q1 2025
const q1Hemoglobin = await client.evidence.bySubject({
  subjectId: 'james-58',
  code: 'LOINC:718-7',
  observedAfter: '2025-01-01T00:00:00Z',
  observedBefore: '2025-04-01T00:00:00Z',
  trustLayer: ['source_fact', 'normalized_fact'],
});