2016-06-14 23:45:55 +02:00
|
|
|
package info.nightscout.androidaps.interfaces;
|
|
|
|
|
2016-07-17 15:04:33 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2017-05-29 21:45:59 +02:00
|
|
|
import info.nightscout.androidaps.data.DetailedBolusInfo;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.androidaps.data.IobTotal;
|
2017-01-04 22:47:21 +01:00
|
|
|
import info.nightscout.androidaps.data.MealData;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.androidaps.db.ExtendedBolus;
|
2017-06-02 10:25:49 +02:00
|
|
|
import info.nightscout.androidaps.db.ProfileSwitch;
|
2017-05-23 23:56:53 +02:00
|
|
|
import info.nightscout.androidaps.db.TempTarget;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.androidaps.db.TemporaryBasal;
|
2016-07-17 15:04:33 +02:00
|
|
|
import info.nightscout.androidaps.db.Treatment;
|
2017-05-22 20:58:05 +02:00
|
|
|
import info.nightscout.utils.OverlappingIntervals;
|
2017-06-02 10:25:49 +02:00
|
|
|
import info.nightscout.utils.ProfileIntervals;
|
2016-06-14 23:45:55 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by mike on 14.06.2016.
|
|
|
|
*/
|
|
|
|
public interface TreatmentsInterface {
|
2016-06-19 13:17:16 +02:00
|
|
|
|
2017-05-11 18:54:50 +02:00
|
|
|
void updateTotalIOBTreatments();
|
2017-05-12 16:27:33 +02:00
|
|
|
void updateTotalIOBTempBasals();
|
|
|
|
|
2017-05-11 18:54:50 +02:00
|
|
|
IobTotal getLastCalculationTreatments();
|
|
|
|
IobTotal getCalculationToTimeTreatments(long time);
|
2017-05-12 16:27:33 +02:00
|
|
|
IobTotal getLastCalculationTempBasals();
|
|
|
|
IobTotal getCalculationToTimeTempBasals(long time);
|
|
|
|
|
2017-01-04 22:47:21 +01:00
|
|
|
MealData getMealData();
|
2017-05-12 16:27:33 +02:00
|
|
|
|
2017-05-26 15:33:42 +02:00
|
|
|
List<Treatment> getTreatmentsFromHistory();
|
|
|
|
List<Treatment> getTreatments5MinBackFromHistory(long time);
|
2017-05-12 16:27:33 +02:00
|
|
|
|
2017-05-26 15:33:42 +02:00
|
|
|
// real basals (not faked by extended bolus)
|
|
|
|
boolean isInHistoryRealTempBasalInProgress();
|
|
|
|
TemporaryBasal getRealTempBasalFromHistory(long time);
|
2017-05-16 09:46:09 +02:00
|
|
|
|
2017-05-26 15:33:42 +02:00
|
|
|
void addToHistoryTempBasalStart(TemporaryBasal tempBasal);
|
|
|
|
void addToHistoryTempBasalStop(long time);
|
2017-05-16 09:46:09 +02:00
|
|
|
|
|
|
|
// basal that can be faked by extended boluses
|
2017-05-12 21:07:29 +02:00
|
|
|
boolean isTempBasalInProgress();
|
2017-05-26 15:33:42 +02:00
|
|
|
TemporaryBasal getTempBasalFromHistory(long time);
|
|
|
|
double getTempBasalAbsoluteRateHistory();
|
|
|
|
double getTempBasalRemainingMinutesFromHistory();
|
|
|
|
OverlappingIntervals<TemporaryBasal> getTemporaryBasalsFromHistory();
|
|
|
|
|
|
|
|
boolean isInHistoryExtendedBoluslInProgress();
|
|
|
|
ExtendedBolus getExtendedBolusFromHistory(long time);
|
|
|
|
void addToHistoryExtendedBolusStart(ExtendedBolus extendedBolus);
|
|
|
|
void addToHistoryExtendedBolusStop(long time);
|
|
|
|
OverlappingIntervals<ExtendedBolus> getExtendedBolusesFromHistory();
|
|
|
|
|
2017-06-02 10:25:49 +02:00
|
|
|
void addToHistoryTreatment(DetailedBolusInfo detailedBolusInfo);
|
2017-05-29 13:07:58 +02:00
|
|
|
|
2017-05-26 15:33:42 +02:00
|
|
|
TempTarget getTempTargetFromHistory(long time);
|
|
|
|
OverlappingIntervals<TempTarget> getTempTargetsFromHistory();
|
2017-05-23 23:56:53 +02:00
|
|
|
|
2017-06-02 10:25:49 +02:00
|
|
|
ProfileSwitch getProfileSwitchFromHistory(long time);
|
|
|
|
ProfileIntervals<ProfileSwitch> getProfileSwitchesFromHistory();
|
|
|
|
void addToHistoryProfileSwitch(ProfileSwitch profileSwitch);
|
|
|
|
|
|
|
|
long oldestDataAvailable();
|
2017-05-12 16:27:33 +02:00
|
|
|
|
2016-06-14 23:45:55 +02:00
|
|
|
}
|