Commit Graph

28 Commits

Author SHA1 Message Date
zack3d 55ef5ce5aa Merge remote-tracking branch 'git/feature/detailed-organs' 2025-08-20 00:12:03 -07:00
google-labs-jules[bot] 7459435e25 feat: Add detailed simulation to remaining simple organs
This commit applies a detailed physiological model to all remaining simple organ classes, bringing them to a level of complexity consistent with the Heart, Lungs, and Brain.

Updates include:
- Esophagus: Simulates peristalsis and bolus movement.
- Stomach: Implements a gastric state machine for digestion.
- Intestines: Adds segments (duodenum, jejunum, etc.) and simulates absorption.
- Pancreas: Differentiates endocrine and exocrine functions.
- Gallbladder: Simulates storing, concentrating, and releasing bile.
- Kidneys: Models nephrons, GFR, and electrolyte balance.
- Bladder: Implements a micturition cycle with pressure dynamics.
- Spleen: Models red and white pulp for blood filtering and immunity.
2025-08-20 07:11:44 +00:00
google-labs-jules[bot] 278ef9fe8e feat: Add detailed simulation to Lungs and Brain
Applied the level of detail from the Heart simulation to the Lungs and Brain classes.

For the Lungs:
- Added anatomical structures for lobes and bronchi.
- Implemented a respiratory cycle with inspiration/expiration states.
- Simulated tidal volume, airway pressures, and gas exchange.
- Generated a capnography (etCO2) waveform.

For the Brain:
- Added structures for major brain regions.
- Simulated intracranial pressure (ICP) and cerebral perfusion pressure (CPP).
- Implemented a simplified Glasgow Coma Scale (GCS).
- Generated a basic EEG waveform.
2025-08-20 06:34:43 +00:00
zack3d e857592ab5 Merge remote-tracking branch 'git/feature/detailed-heart-simulation' 2025-08-19 23:22:36 -07:00
google-labs-jules[bot] dbe8490cb1 feat: Implement detailed mechanical heart simulation
This commit introduces a major enhancement to the heart simulation, adding a detailed mechanical model of the cardiac cycle that is synchronized with the existing EKG waveform.

Key features:
- The Heart class is refactored to include data structures for the four chambers (atria and ventricles) and four valves (mitral, tricuspid, aortic, pulmonary).
- The `update` method now simulates the phases of the cardiac cycle, including atrial and ventricular systole and diastole.
- Chamber pressures and volumes are dynamically updated based on the phase of the cycle.
- Valve statuses (open/closed) are determined by pressure gradients between chambers.
- Ejection Fraction is now calculated based on the simulated end-diastolic and end-systolic volumes of the left ventricle.
- The example program has been updated to display a live, detailed summary of the heart's mechanical status, showing pressures, volumes, and valve states as they change over time.
2025-08-20 06:22:24 +00:00
zack3d cd3a2a5a7e Merge remote-tracking branch 'git/add-organ-access-functions' 2025-08-19 21:12:23 -07:00
google-labs-jules[bot] c3432e4178 This commit enhances the Patient class by adding several helper functions to improve access to organ data.
- Adds `getOrganSummary` and `getPatientSummary` to retrieve human-readable string summaries of organ vitals.
- Adds a templated function `getOrgan<T>` which allows for type-safe, direct access to specific organ objects. This enables calling organ-specific methods to retrieve raw data values (e.g., `heart->getHeartRate()`).

The example `main.cpp` has been updated to demonstrate the usage of all new functions.
2025-08-20 02:11:03 +00:00
zack3d 62a04a76f6 Merge remote-tracking branch 'git/feature/major-organ-systems' 2025-08-19 17:58:09 -07:00
google-labs-jules[bot] 279abdd723 feat: Implement digestive, urinary, and other major organ systems
This commit significantly expands the patient simulation by adding models
for the full digestive and urinary systems, as well as the spleen and
spinal cord.

This builds on the polymorphic organ framework by adding 9 new organ
classes:
- Kidneys
- Bladder
- Stomach
- Intestines
- Gallbladder
- Pancreas
- Esophagus
- Spleen
- SpinalCord

Each new organ has its own header, a source file with simplified
simulation logic for its unique physiological properties, and is
integrated into the main patient model and simulation loop.

The build system and example application have been updated to include
and demonstrate this new, more comprehensive set of organs.
2025-08-20 00:57:05 +00:00
zack3d c6e7687f9a Merge remote-tracking branch 'git/improve-rtd-layout' 2025-08-18 22:24:26 -07:00
google-labs-jules[bot] 669228f147 Refactor Sphinx documentation for better structure.
This change improves the layout of the Read the Docs documentation by creating a dedicated API reference page.

Key changes:
- Created a new `docs/api.rst` file to contain all C++ API documentation generated from Doxygen.
- Added references to both `MedicalLib/MedicalLib.h` and `MedicalLib/Patient.h` in `api.rst`.
- Updated `docs/index.rst` to remove the inline API documentation and include a link to the new `api.rst` page in the `toctree`.

This results in a cleaner, more organized, and complete documentation site.
2025-08-19 05:23:46 +00:00
zack3d f79ead2cc3 Merge remote-tracking branch 'git/feature/migrate-to-read-the-docs' 2025-08-18 21:33:38 -07:00
google-labs-jules[bot] d27e8db2ca Fix: Use apt_packages for Doxygen installation in .readthedocs.yaml 2025-08-19 04:32:56 +00:00
zack3d f974d97dd4 Merge remote-tracking branch 'git/feature/migrate-to-read-the-docs'
Build and Test / build (push) Has been cancelled
2025-08-18 21:29:52 -07:00
google-labs-jules[bot] 3bc7b2f8f2 Fix .readthedocs.yaml configuration 2025-08-19 04:28:45 +00:00
zack3d d92d404012 Merge remote-tracking branch 'git/feature/migrate-to-read-the-docs'
Build and Test / build (push) Has been cancelled
2025-08-18 21:25:48 -07:00
google-labs-jules[bot] ae5c349cc8 Migrate documentation from Doxygen to Read the Docs 2025-08-19 00:34:19 +00:00
zack3d 94728e459b Merge remote-tracking branch 'git/doxygen-gitea-workflow'
Build and Test / build (push) Has been cancelled
2025-08-18 02:56:50 -07:00
google-labs-jules[bot] bfa583d574 feat: Add Doxygen documentation and Gitea workflow
This commit introduces Doxygen for documentation generation and a Gitea
workflow for continuous integration.

- Adds a `Doxyfile` to configure Doxygen to build a documentation
  website with diagrams.
- Updates `AGENTS.md` to require Doxygen-compatible comments for all
  code.
- Adds Doxygen comments to existing C++ source files to comply with
  the new standard.
- Creates a Gitea workflow (`.gitea/workflows/build.yml`) that:
  - Builds the project on every push.
  - Generates Doxygen documentation.
  - Uploads the compiled library and the documentation website as
    artifacts.
2025-08-18 09:56:29 +00:00
zack3d 043e89ddfe Merge remote-tracking branch 'git/feature/patient-refactor-and-updatestate' 2025-08-18 02:33:45 -07:00
google-labs-jules[bot] 5a79cc45cd feat: Refactor Patient and implement mean-reverting simulation
- Broke out the Patient struct and its related functions (initializePatient, updatePatient) into their own files (Patient.h, Patient.cpp) for better organization.

- Implemented the initial UpdateState logic in the updatePatient function using a mean-reverting model. This ensures that vital signs fluctuate realistically around a healthy baseline.

- Updated CMakeLists.txt to include the new Patient.cpp file in the build.
2025-08-18 09:33:33 +00:00
zack3d e8d64a3619 Merge remote-tracking branch 'git/feature/initial-medical-simulation' 2025-08-18 02:12:49 -07:00
google-labs-jules[bot] d0d42e10fe feat: Implement initial medical simulation
This commit introduces the initial framework for a medical simulation library.

It adds a `Patient` struct to hold vital signs, including:
- Blood Pressure (Systolic and Diastolic)
- Heart Rate
- Respiration Rate
- Body Temperature
- Oxygen Saturation

It also includes:
- An `initializePatient` function to create a patient with baseline healthy vitals.
- A placeholder `updatePatient` function for future simulation logic.
- An updated example to demonstrate the new functionality.
2025-08-18 09:12:21 +00:00
zack3d 957013959c Merge remote-tracking branch 'git/refactor/library-scaffolding' 2025-08-18 02:02:17 -07:00
google-labs-jules[bot] 518277356a Rename the project from "MyLibrary" to "MedicalLib" to better reflect its intended purpose as a library for medical simulations.
- Rename all files, directories, and internal project names to "MedicalLib".
- Replace the generic `add` function with a more domain-specific `calculateBMI` function as an initial example of the library's capabilities.
- Update the `AGENTS.md` file to describe the new purpose and scope of the MedicalLib library.
2025-08-18 09:02:01 +00:00
zack3d bdfed240f3 Merge remote-tracking branch 'origin/feature/add-build-scripts-and-gitignore' 2025-08-18 01:16:52 -07:00
google-labs-jules[bot] 3b29526b9e Add build scripts and update .gitignore
This commit introduces build scripts for both Windows (`build.bat`) and Linux/macOS (`build.sh`) to simplify the build process.

It also updates the `.gitignore` file to a more comprehensive version that includes common patterns for C++ projects and various IDEs.
2025-08-18 08:15:49 +00:00
matterleast 963c3a554b Initial commit 2025-08-18 00:41:41 -07:00