Skip to content

Formal Specification

This page summarizes the key aspects of the OVF specification. The full specification is available in the specification.md file in the repository.

The specification uses RFC 2119 keywords:

  • MUST / REQUIRED / SHALL — absolute requirement
  • MUST NOT / SHALL NOT — absolute prohibition
  • SHOULD / RECOMMENDED — there may be valid reasons to ignore, but implications must be understood
  • MAY / OPTIONAL — truly optional

An OVF document is a UTF-8 encoded JSON object with the following top-level structure:

FieldTypeRequiredDescription
format_versionstring (semver)MUSTSchema version, e.g. "1.0.0"
exported_atstring (ISO 8601 datetime)MUSTWhen the document was generated
patientPatientMUSTThe animal patient this document describes
exporterobjectSHOULDSoftware that produced the document (name, version)
encountersEncounter[]MAYClinical encounters
conditionsCondition[]MAYDiagnoses and health problems
observationsObservation[]MAYLab results, vital signs, clinical notes
immunizationsImmunization[]MAYVaccination records
proceduresProcedure[]MAYSurgical and clinical procedures
allergiesAllergyIntolerance[]MAYAllergies and intolerances
medicationsMedicationStatement[]MAYMedication records
documentsDocumentReference[]MAYAttached files and reports
  • Documents MUST be UTF-8 JSON
  • Documents MUST use the .json file extension
  • Documents SHOULD be pretty-printed with 2-space indentation

OVF follows a pragmatic approach to required fields:

  • Resource identity is always required: resource_type, id, patient_id (on child resources)
  • Clinical minimum is required per resource type (e.g. name + species on Patient, status + date on Encounter)
  • Everything else is optional, allowing partial records and incremental data enrichment

Each resource schema documents which fields are MUST vs MAY. See the Schema Reference for per-resource details.

OVF defines constrained enum values for fields that need interoperability. Key vocabularies include:

VocabularyValues
Speciesdog, cat, bird, rabbit, hamster, guinea_pig, fish, reptile, horse, other
Encounter statusplanned, in-progress, completed, cancelled
Encounter typeconsultation, emergency, follow-up, vaccination, surgery, dental, grooming, telehealth, other
Condition statusactive, recurrence, relapse, inactive, remission, resolved
Observation categoryvital-signs, laboratory, imaging, clinical-note, other
Severitymild, moderate, severe
Sexmale, female, unknown
Gender statusintact, neutered, spayed, unknown

The full list of all controlled vocabularies is in the specification.

  • Date: YYYY-MM-DD (ISO 8601, JSON Schema format: "date")
  • DateTime: YYYY-MM-DDThh:mm:ssZ (ISO 8601, JSON Schema format: "date-time")
  • Identifiers: All id fields SHOULD be UUIDs (RFC 4122) but MAY be any unique string

All OVF objects allow additional properties via the x_ prefix. See Extensions for details.