Skip to content

FHIR and Interoperability

Ankit Upadhyay edited this page Jul 24, 2026 · 2 revisions

FHIR and Interoperability

Yosemite Crew models clinical data against FHIR R4 so it can interoperate with external lab and EHR systems instead of being locked into a proprietary schema. This is one of the two properties (with multi-tenancy) that shapes the architecture.

FHIR-first data modeling

  • Core clinical entities have FHIR R4 converters in packages/fhir; the FHIR type definitions live in packages/fhirtypes.
  • The convention (from the architecture guide) is that every core entity maps to a FHIR resource, and HL7 v2.5 messages (ADT / ORU / ORM) are exportable. This is why many backend routes are namespaced /fhir/v1/....
  • Keeping FHIR types in their own package lets web, mobile, and backend share one definition of a clinical resource rather than re-describing it per app.

The @yosemite-crew/types package must be mocked carefully in frontend tests — spread jest.requireActual or forms.ts fails to load. See Frontend Testing.

Lab integrations behind an interface

Lab connectivity sits behind the LabOrderAdapter interface (apps/backend/src/labs/types.ts, resolved via getLabOrderAdapter(); integration accounts resolve via getIntegrationAdapter() in src/integrations/) so no single lab vendor is load-bearing:

  • IDEXX is the live — and currently only — implementation (lab orders and results flow into the companion's clinical timeline).
  • Antech, Zoetis, and in-house analyzers are prospective future adapters behind the same seam; they are not modeled in code today.

Lab orders and result ingestion are async (BullMQ) and land in the unified companion history — see Backend: Integrations and Backend: Realtime, Chat, Jobs.

Clinical reference content: Merck

The mobile app integrates the Merck Veterinary Manual as clinical reference content (apps/mobileAppYC/src/features/merck/ plus a backend integration path). It is treated as a first-class integration domain in the contribution workflow.

Coding systems

Clinical records reference standard coding systems where they exist — ICD-11 / SNOMED (diagnoses), RxNorm / NDC / ATC (drugs), AAHA (chart of accounts / services), and DEA schedules (controlled substances). For other (non dog/cat/horse) species, free-text or custom codes are allowed where a standard code doesn't fit.

On the roadmap

Related

Product & Domain
Architecture
Applications
Design & Accessibility
Engineering Handbook
Decisions (ADRs)
Design Docs & Plans
Roadmap
Operations
Meta

Canonical code & docs: main repo · Auto-generated companion: DeepWiki

Clone this wiki locally