Skip to content

Conformance

OVF defines two conformance levels.

A conforming OVF Core document must satisfy all of the following:

  1. Contains format_version, exported_at, and patient at the top level
  2. The patient resource passes validation against the Patient schema
  3. Contains at least one additional resource array (e.g. encounters, conditions) with at least one valid entry

This is the minimum bar for a valid OVF document.

A conforming OVF Complete document must satisfy all of the following:

  1. Meets all OVF Core requirements
  2. Contains all 9 resource types: patient, encounters, conditions, observations, immunizations, procedures, allergies, medications, documents
  3. Each resource array contains at least one valid entry

The fastest way to validate:

Terminal window
npx ovf-validate my-record.json

The CLI reports the conformance level and any validation errors.

See the Installation guide for full TypeScript and Python validation examples.

  • Schema validation: Each resource is checked against its JSON Schema (required fields, types, enum values, formats)
  • Structural validation: The root document must have format_version, exported_at, and patient
  • Format checks: Date fields must be YYYY-MM-DD, datetime fields must be ISO 8601
  • Referential integrity: The validator does not check that patient_id values in child resources match patient.id
  • Business rules: Clinical validity (e.g. “encounter date must be after patient birth date”) is not enforced by the schema
  • Extension content: x_-prefixed fields are accepted but not validated

Valid (OVF Core) — patient + one encounter:

{
"format_version": "1.0.0",
"exported_at": "2026-03-30T12:00:00Z",
"patient": {
"resource_type": "Patient",
"id": "pet-001",
"name": "Burek",
"species": "dog"
},
"encounters": [
{
"resource_type": "Encounter",
"id": "enc-001",
"patient_id": "pet-001",
"status": "completed",
"date": "2026-03-30T10:00:00Z"
}
]
}

Invalid — missing species (required on Patient):

{
"format_version": "1.0.0",
"exported_at": "2026-03-30T12:00:00Z",
"patient": {
"resource_type": "Patient",
"id": "pet-001",
"name": "Burek"
}
}

Invalid — patient only, no resource arrays:

{
"format_version": "1.0.0",
"exported_at": "2026-03-30T12:00:00Z",
"patient": {
"resource_type": "Patient",
"id": "pet-001",
"name": "Burek",
"species": "dog"
}
}