Skip to main content

medOS Diagnostics

Lab and imaging orders and results, specimen management, and the diagnosis / ICD coding masters.

Scope: ever-api-diagnostics · Stack: NestJS + Moleculer + MongoDB

medOS Diagnostics owns the clinical knowledge and result surfaces that sit between an order and a coded outcome. It manages the diagnosis records on an encounter, the ICD-10 / ICD-9 coding masters and disease groupings used for reporting, imaging study and body-site templates, observation capture, and the specimen transport chain that moves samples toward the lab. All modules communicate over NATS as part of the Moleculer service mesh and persist to MongoDB as the system of record.

~16
Modules
ICD-10 / 9
Coding masters
NATS
Transport
MongoDB
Store

Responsibilities

  • Diagnosis records — primary/secondary diagnoses attached to encounters, plus reusable diagnosis templates.
  • Coding masters — ICD-10, ICD-9 and disease-group tables with locale labels, used by typeahead and reporting.
  • Observations — transient (temporary) observation capture and promotion into permanent observation records.
  • Imaging templates — body-site / organ and human-figure templates that back imaging study annotation.
  • Specimen transport — tracking the movement and custody of specimens toward the diagnostic lab.
  • Encounter close enumerations — discharge status and discharge type masters consumed when an encounter is finalized.
  • Allergy & intolerance — coded substance registry for clinical safety checks.
  • Physical examination — exam template catalog for structured documentation.

Major modules

ModulePurpose
diagnosisPer-encounter diagnosis records (primary / secondary).
diagnosisTemplateReusable diagnosis sets for common presentations.
icd10ICD-10 master with locale labels and typeahead search.
icd9ICD-9-CM procedure / legacy code master.
diseaseGroupGrouping of diagnoses for reporting and case-mix.
observationPermanent, validated observation records.
observationTemporaryTransient observations awaiting validation/promotion.
imagingStudyImaging study records and result linkage.
imageStandardHumanTemplateHuman-figure templates for image annotation.
imageStandardHumanCategoryCategorization of standard human templates.
organBody-site / organ catalog used by imaging templates.
specimenTransportSpecimen custody and transport tracking.
allergyIntoleranceCoded allergy / intolerance registry.
physicalExaminatePhysical examination template catalog.
treatmentDoctorTreating-doctor association for diagnostic records.
dischargeStatus / dischargeTypeEnumerations applied at encounter close.
Codes

icd10 / icd9 / diseaseGroup

Diagnosis code tables with grouping for reporting and case-mix.

icd10icd9diseaseGroup
Diagnosis

diagnosis / diagnosisTemplate

Per-encounter diagnosis records plus reusable templates.

diagnosisdiagnosisTemplate
Specimen

specimenTransport

Custody and transport tracking as samples move toward the lab.

specimenTransport
Observations

observation / observationTemporary

Transient capture promoted into validated observations.

observationobservationTemporary
Imaging

imagingStudy / templates / organ

Imaging studies plus body-site templates for annotation.

imagingStudyimageStandardHumanTemplateorgan
Safety & Exam

allergyIntolerance / physicalExaminate

Coded allergy registry and physical-exam template catalog.

allergyIntolerancephysicalExaminate

Flow

Encounter ──▶ diagnosis.upsert ──▶ icd10 / icd9 master lookup

├──▶ observationTemporary ──validate──▶ observation

└──▶ imagingStudy ──annotate──▶ imageStandardHumanTemplate / organ

Specimen ──▶ specimenTransport (custody / transit / arrival)

Encounter close ──▶ dischargeStatus / dischargeType

Events & integration

The service ships a small set of internal cache-invalidation events (diagnostic.cache.clean.*) so that masters such as ICD tables stay consistent across the mesh after edits. Diagnosis, observation and imaging records emitted here are projected into the read-model layer that powers worklists and journey caches; coded diagnoses are also consumed by downstream coding and claims surfaces. ICD coding masters and disease groupings are bilingual (local language plus English) so the same data serves every supported locale.

For specimen handling that spans services, see the bounded-context split between patient transport and specimen transport in the platform architecture.

Key actions

  • diagnosis.upsert — add / update a diagnosis on an encounter.
  • icd10.search — typeahead over ICD-10 with locale labels.
  • observationTemporary.validate — promote a transient observation to permanent.
  • dx-* — diagnosis and ICD coding master entities.
  • obs-* — observation capture and validation.
  • img-* — imaging study and body-site template entities.
  • spec-* — specimen transport tracking.