This commit is contained in:
2025-09-21 02:14:44 -07:00
commit 0502c756c1
35 changed files with 1362 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
# Architecture Overview
- Crate facade in `src/lib.rs` re-exports curated types.
- Error handling with `thiserror` via `MedicalError` and `type Result<T>`.
- Core domain types in `src/types.rs` (e.g., `BloodPressure`, `Blood`).
- Organ system:
- Trait and common `OrganInfo` in `src/organs/mod.rs`
- Per-organ modules (Heart, Lungs, Brain, etc.) implement `Organ`
- `Patient` in `src/patient.rs` owns a vector of `Box<dyn Organ>` and coordinates updates.
- FFI (feature `ffi`) in `src/ffi.rs`, header `ffi/medicallib.h`.
- Examples in `examples/`, benches in `benches/` (criterion).
Inter-organ communication examples:
- Lungs SpO2 influences Heart rate.
- Kidneys GFR produces urine into Bladder volume.