2011-11-28 01:39:28 +00:00
|
|
|
/*
|
|
|
|
Custom CPAP/Oximetry Calculations Header
|
|
|
|
Copyright (c)2011 Mark Watkins <jedimark@users.sourceforge.net>
|
|
|
|
License: GPL
|
|
|
|
*/
|
|
|
|
#ifndef CALCS_H
|
|
|
|
#define CALCS_H
|
|
|
|
|
|
|
|
#include "day.h"
|
|
|
|
|
|
|
|
class Calculation
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Calculation(ChannelID id,QString name);
|
|
|
|
virtual ~Calculation();
|
|
|
|
virtual int calculate(Session *session)=0;
|
|
|
|
protected:
|
|
|
|
ChannelID m_id;
|
|
|
|
QString m_name;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CalcRespRate:public Calculation
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CalcRespRate(ChannelID id=CPAP_RespRate);
|
|
|
|
virtual int calculate(Session *session);
|
|
|
|
protected:
|
2011-11-30 15:19:31 +00:00
|
|
|
int filterFlow(EventList *in, EventList *out,EventList *tv, EventList *mv, double rate);
|
2011-11-28 01:39:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CalcAHIGraph:public Calculation
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
CalcAHIGraph(ChannelID id=CPAP_AHI);
|
|
|
|
virtual int calculate(Session *session);
|
|
|
|
protected:
|
|
|
|
};
|
|
|
|
|
2011-11-30 12:32:16 +00:00
|
|
|
int calcLeaks(Session *session);
|
|
|
|
|
2011-11-28 04:05:09 +00:00
|
|
|
int calcPulseChange(Session *session);
|
|
|
|
int calcSPO2Drop(Session *session);
|
|
|
|
|
2011-11-28 01:39:28 +00:00
|
|
|
EventDataType calcAHI(Session *session,qint64 start=0, qint64 end=0);
|
|
|
|
|
|
|
|
#endif // CALCS_H
|