Files
medicallib/include/MedicalLib/Patient.h
T
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

41 lines
1.1 KiB
C++

#pragma once
#include <vector>
#include <memory>
// Forward-declare the Organ class to avoid circular dependencies
class Organ;
/**
* @brief Holds all the vital signs and other medical information for a patient.
*/
struct Patient {
int patientId;
std::vector<std::unique_ptr<Organ>> organs;
};
// Define MEDICAL_LIB_EXPORT for exporting symbols from the DLL
#if defined(_WIN32)
#if defined(MEDICAL_LIB_EXPORT)
#define MEDICAL_LIB_API __declspec(dllexport)
#else
#define MEDICAL_LIB_API __declspec(dllimport)
#endif
#else
#define MEDICAL_LIB_API
#endif
/**
* @brief Initializes a new patient with baseline vital signs.
* @param patientId The ID for the new patient.
* @return A Patient struct with default healthy values.
*/
MEDICAL_LIB_API Patient initializePatient(int patientId);
/**
* @brief Updates the patient's vital signs based on the time elapsed.
* @param patient The patient to update.
* @param deltaTime_s The time elapsed in seconds.
*/
MEDICAL_LIB_API void updatePatient(Patient& patient, double deltaTime_s);