idi.diplom.linda.logic
Class AlarmLogic

java.lang.Object
  extended by idi.diplom.linda.logic.AlarmLogic

public class AlarmLogic
extends java.lang.Object


Constructor Summary
AlarmLogic()
           
 
Method Summary
 void addPacketToDismissedAlarms(MedPacket mp, Patient p)
          NOT IN USE IN THIS VERSION
 void checkForAlarms(Patient p, MedPacket mp)
          Checks if medpacket contains abnormal vital sign values and creates alarms
 void dismissAlarm(Alarm a)
          Dismisses the specified alarm
 Alarm getAlarmFromTrigger(Patient p, int s)
          Gets an alarm on specified patient with specified vital sign
 Alarm[] getAllActiveAlarms(Patient p)
          Gets all active alarms (alarms that have not been dismissed) on patient p
 Alarm[] getAllAlarms()
           
 void saveAlarm(Alarm a)
          Saves an alarm
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlarmLogic

public AlarmLogic()
Method Detail

getAllAlarms

public Alarm[] getAllAlarms()
                     throws DatabaseException,
                            GeneralException
Throws:
DatabaseException
GeneralException

getAllActiveAlarms

public Alarm[] getAllActiveAlarms(Patient p)
                           throws DatabaseException,
                                  GeneralException
Gets all active alarms (alarms that have not been dismissed) on patient p

Parameters:
patient - to get alarms from
Returns:
Alarm[] alarmArray
Throws:
DatabaseException
GeneralException

getAlarmFromTrigger

public Alarm getAlarmFromTrigger(Patient p,
                                 int s)
                          throws DatabaseException,
                                 GeneralException
Gets an alarm on specified patient with specified vital sign

Parameters:
patient - to get alarm from
sensornumber -
Returns:
Alarm alarm
Throws:
DatabaseException
GeneralException

checkForAlarms

public void checkForAlarms(Patient p,
                           MedPacket mp)
                    throws DatabaseException,
                           GeneralException
Checks if medpacket contains abnormal vital sign values and creates alarms

Parameters:
patient - to check for alarms on
medpacket - to check for abnormal values
Throws:
DatabaseException
GeneralException

saveAlarm

public void saveAlarm(Alarm a)
               throws DatabaseException,
                      GeneralException
Saves an alarm

Parameters:
alarm - to be saved
Throws:
DatabaseException
GeneralException

addPacketToDismissedAlarms

public void addPacketToDismissedAlarms(MedPacket mp,
                                       Patient p)
                                throws DatabaseException,
                                       GeneralException
NOT IN USE IN THIS VERSION

Parameters:
mp -
p -
Throws:
DatabaseException
GeneralException

dismissAlarm

public void dismissAlarm(Alarm a)
                  throws DatabaseException,
                         GeneralException
Dismisses the specified alarm

Parameters:
alarm - to be dismissed
Throws:
DatabaseException
GeneralException