Index: firmware/App/Controllers/SyringePump.c =================================================================== diff -u -r6e5e63c50a4e8806c2ad62fbbf66a8935f087a38 -r49533d4870aa10c1b20406dd5c013567fe854694 --- firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 6e5e63c50a4e8806c2ad62fbbf66a8935f087a38) +++ firmware/App/Controllers/SyringePump.c (.../SyringePump.c) (revision 49533d4870aa10c1b20406dd5c013567fe854694) @@ -367,7 +367,6 @@ accepted = TRUE; heparinDeliveryState = HEPARIN_STATE_PAUSED; stopSyringePump(); - sendTreatmentLogEventData( HEPARIN_PAUSE_RESUME_EVENT, HEPARIN_STATE_DISPENSING, HEPARIN_STATE_PAUSED ); } else { @@ -380,7 +379,6 @@ { accepted = TRUE; startHeparinContinuous(); - sendTreatmentLogEventData( HEPARIN_PAUSE_RESUME_EVENT, HEPARIN_STATE_PAUSED, HEPARIN_STATE_DISPENSING ); } else { @@ -1189,11 +1187,13 @@ else if ( TRUE == syringePumpBolusRequested ) { heparinDeliveryState = HEPARIN_STATE_INITIAL_BOLUS; + sendTreatmentLogEventData( HEPARIN_BOLUS_START_EVENT, 0.0, syringePumpSetRate ); result = SYRINGE_PUMP_HEP_BOLUS_STATE; } else if ( TRUE == syringePumpContinuousRequested ) { heparinDeliveryState = HEPARIN_STATE_DISPENSING; + sendTreatmentLogEventData( HEPARIN_START_RESUME_EVENT, 0.0, syringePumpSetRate ); result = SYRINGE_PUMP_HEP_CONTINUOUS_STATE; } else if ( TRUE == syringePumpDACVrefSetRequested ) @@ -1446,6 +1446,7 @@ if ( TRUE == stopPump ) { stopSyringePump(); + sendTreatmentLogEventData( HEPARIN_BOLUS_END_EVENT, syringePumpSetRate, 0.0 ); result = SYRINGE_PUMP_OFF_STATE; } @@ -1490,6 +1491,7 @@ if ( TRUE == stopPump ) { stopSyringePump(); + sendTreatmentLogEventData( HEPARIN_STOP_PAUSE_EVENT, syringePumpSetRate, 0.0 ); result = SYRINGE_PUMP_OFF_STATE; } Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r27a68f930508638f2eb6265ebb381c8918cbc37b -r49533d4870aa10c1b20406dd5c013567fe854694 --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 27a68f930508638f2eb6265ebb381c8918cbc37b) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 49533d4870aa10c1b20406dd5c013567fe854694) @@ -511,11 +511,11 @@ ( DIALYSIS_UF_STATE == currentDialysisState ) && ( UF_RUNNING_STATE == currentUFState ) ) { result = TRUE; + sendTreatmentLogEventData( UF_PAUSE_EVENT, setUFRate, 0.0 ); // Set outlet pump to dialysate rate setDialOutPumpTargetRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Go to UF paused state currentUFState = UF_PAUSED_STATE; - sendTreatmentLogEventData( UF_PAUSE_RESUME_EVENT, UF_RUNNING_STATE, UF_PAUSED_STATE ); } else { @@ -561,13 +561,13 @@ ( DIALYSIS_UF_STATE == currentDialysisState ) && ( UF_PAUSED_STATE == currentUFState ) ) { result = TRUE; + sendTreatmentLogEventData( UF_START_RESUME_EVENT, 0.0, setUFRate ); // Set outlet pump to dialysate rate + set UF rate setDialOutPumpTargetRate( setDialysateFlowRate + (S32)setUFRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Restart UF time accumulation for reference volume calculation lastUFTimeStamp = getMSTimerCount(); // Go to UF running state currentUFState = UF_RUNNING_STATE; - sendTreatmentLogEventData( UF_PAUSE_RESUME_EVENT, UF_PAUSED_STATE, UF_RUNNING_STATE ); } else { Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -r0bd1acff7222327c97897b4f9ab91bcc1d9d5816 -r49533d4870aa10c1b20406dd5c013567fe854694 --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 0bd1acff7222327c97897b4f9ab91bcc1d9d5816) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 49533d4870aa10c1b20406dd5c013567fe854694) @@ -740,6 +740,7 @@ // Kick dialysis sub-mode off setDialysisParams( getTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW ), getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), presMaxUFVolumeML, presUFRate ); + sendTreatmentLogEventData( UF_START_RESUME_EVENT, 0.0, presUFRate ); transitionToDialysis(); result = TREATMENT_DIALYSIS_STATE; } @@ -1186,6 +1187,7 @@ } else // Must be adjusting UF rate then { + sendTreatmentLogEventData( UF_RATE_CHANGE_EVENT, presUFRate, pendingUFRateChange ); presUFRate = pendingUFRateChange; } setDialysisParams( getTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW ), getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), Index: firmware/App/Modes/Rinseback.c =================================================================== diff -u -r27a68f930508638f2eb6265ebb381c8918cbc37b -r49533d4870aa10c1b20406dd5c013567fe854694 --- firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 27a68f930508638f2eb6265ebb381c8918cbc37b) +++ firmware/App/Modes/Rinseback.c (.../Rinseback.c) (revision 49533d4870aa10c1b20406dd5c013567fe854694) @@ -329,11 +329,14 @@ // Has user requested rinseback start? if ( TRUE == startRinsebackRequested ) { + if ( isTreatmentCompleted() != TRUE ) + { + sendTreatmentLogEventData( MID_TREATMENT_RINSE_BACK_EVENT, 0.0, rinsebackRate_mL_min ); + } setupForRinsebackDelivery( rinsebackRate_mL_min ); // From moment we start rinseback, we consider blood side of dialyzer no longer fully primed setBloodIsPrimed( FALSE ); result = RINSEBACK_RUN_STATE; - sendTreatmentLogEventData( MID_TREATMENT_RINSE_BACK_EVENT, 0.0, 0.0 ); } // Has user requested to return to treatment? else if ( TRUE == backToTreatmentRequested )