Index: firmware/App/Modes/ModePostTreat.h =================================================================== diff -u -r1942c708bc95f57e87b0bf6a472ebe824a3f38ed -r368e2fde80a5cc108f61c021830c684e05fb62d5 --- firmware/App/Modes/ModePostTreat.h (.../ModePostTreat.h) (revision 1942c708bc95f57e87b0bf6a472ebe824a3f38ed) +++ firmware/App/Modes/ModePostTreat.h (.../ModePostTreat.h) (revision 368e2fde80a5cc108f61c021830c684e05fb62d5) @@ -23,17 +23,69 @@ /** * @defgroup HDPostTreatmentMode HDPostTreatmentMode - * @brief Post-treatment Mode module. + * @brief Post-treatment Mode module. The post-treatment mode sends treatment data log to UI. + * This mode handles draining reservoirs and verifies disposable removal. * * @addtogroup HDPostTreatmentMode * @{ */ +// ********** public definitions ********** + +/// Record structure for a treatment log parameters payload. +typedef struct +{ + U32 bloodFlowRate_mL_min; ///< Blood flow rate (in mL/min) + U32 dialysateFlowRate_mL_min; ///< Dialysate flow rate (in mL/min) + U32 treatmentDuration_min; ///< Selected treatment duration (in min) + U32 actualTreatmentDur_min; ///< Actual treatment duration (in min) + + U32 acidConcentrate; ///< Acid concentrate option + U32 bicarbConcentrate; ///< Bicarbonate concentrate option + U32 potassiumConcentration; ///< Potassium concentration value in mEq/L. + U32 calciumConcentration; ///< Calcium concentration value in mEq/L. + U32 bicarbonateConcentration; ///< Bicarbonate concentration value in mEq/L. + U32 sodiumConcentration; ///< Sodium concentration value in mEq/L. + + F32 dialysateTemperature_degC; ///< Dialysate temperature (in deg C) + U32 dialyzerType; ///< Dialyzer type option + U32 treatmentDateAndTime; ///< Treatment date and time in epoch time (in seconds) + + F32 avgBloodFlow_mL_min; ///< Average blood flow rate during treatment (in mL/min) + F32 avgDialysateFlow_mL_min; ///< Average dialysate flow rate during treatment (in mL/min) + F32 dialysateVolumeUsed_L; ///< Dialysate volume used during treatment (in L) + F32 avgDialysateTemperature_degC; ///< Average dialysate temperature (in deg C) + + F32 targetUFVolume_L; ///< Target ultrafiltration volume (in L) + F32 actualUFVolume_L; ///< Actual ultrafiltration volume (in L) + F32 targetUFRate_mL_min; ///< Target ultrafiltration rate (in mL/min) + F32 actualUFRate_mL_min; ///< Actual ultrafiltration rate (in mL/min) + + U32 salineBolusVolume_mL; ///< Saline bolus volume (in mL) + U32 heparinType; ///< Heparin type + U32 heparinConcentration_IU_mL; ///< Heparin concentration (in IU/mL) + F32 heparinBolusVolume_mL; ///< Heparin bolus volume (in mL) + F32 heparinDispenseRate_mL_hr; ///< Heparin dispense rate (in mL/hr) + U32 heparinPreStop_min; ///< Heparin pre-stop time (in min) + F32 heparinDeliveredVolume_mL; ///< Heparin delivererd volume (in mL) + + F32 avgArterialPressure_mmHg; ///< Average arterial pressure (in mmHg) + F32 avgVenousPressure_mmHg; ///< Average venous pressure (in mmHg) + + U32 endTreatmentEarlyAlarm; ///< Alarm that causes treatment to end early + U32 deviceID; ///< Serial number or UID + U32 waterSampleTestResult; ///< Pass or fail +} TREATMENT_LOG_DATA_PAYLOAD_T; + // ********** public function prototypes ********** void initPostTreatmentMode( void ); // Initialize this module void transitionToPostTreatmentMode( void ); // Prepares for transition to post-treatment mode U32 execPostTreatmentMode( void ); // Execute the post-treatment mode state machine (call from OperationModes) + +void handleTreatmentLogDataRequest( void ); +void signalUserConfirmPatientDisconnection( void ); +void signalUserConfirmDisposableRemoval( void ); void signalAlarmActionToPostTreatmentMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for post-treatment mode /**@}*/