idi.diplom.linda.webservice
Class LifeShirtWebService

java.lang.Object
  extended by idi.diplom.linda.webservice.LifeShirtWebService

public class LifeShirtWebService
extends java.lang.Object


Constructor Summary
LifeShirtWebService()
           
 
Method Summary
 void dismissAlarm(Alarm a)
          Dismissed the specified alarm
 Alarm[] getAllActiveAlarms(Patient p)
          Gets all alarms saved on specified patient that are not yet dismissed
 Note[] getAllNotes(Patient p)
          Receives all notes saved on specified patient
 Patient[] getAllPatients()
          Gets all patients saved in database
 MedPacket getLastMedPacket(Patient p)
          Gets the last saved medpacket on specified patient
 MedPacket[] getPacketsBetweenDates(Patient p, java.util.Date fromTime, java.util.Date toTime, int resolution)
          Returns a list of medpackets saved on specified patient between specified time.
 void saveNewPatient(Patient p)
          Saves a new patient to the database
 void saveNote(Note n)
          Saves a note to the database
 void updatePatient(Patient p)
          Updates a patient's profile
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifeShirtWebService

public LifeShirtWebService()
Method Detail

getLastMedPacket

public MedPacket getLastMedPacket(Patient p)
                           throws DatabaseException,
                                  IllegalInputException,
                                  GeneralException
Gets the last saved medpacket on specified patient

Parameters:
patient - to get monitoring data from
Returns:
MedPacket medpacket
Throws:
DatabaseException
IllegalInputException
GeneralException

saveNewPatient

public void saveNewPatient(Patient p)
                    throws DatabaseException,
                           IllegalInputException,
                           GeneralException
Saves a new patient to the database

Parameters:
patient - to be saved
Throws:
DatabaseException
IllegalInputException
GeneralException

getAllPatients

public Patient[] getAllPatients()
                         throws DatabaseException,
                                GeneralException
Gets all patients saved in database

Returns:
a list of all patients
Throws:
DatabaseException
GeneralException

updatePatient

public void updatePatient(Patient p)
                   throws DatabaseException,
                          IllegalInputException,
                          GeneralException
Updates a patient's profile

Parameters:
patient - to be updated
Throws:
DatabaseException
IllegalInputException
GeneralException

saveNote

public void saveNote(Note n)
              throws DatabaseException,
                     IllegalInputException,
                     GeneralException
Saves a note to the database

Parameters:
note - to be saved
Throws:
DatabaseException
IllegalInputException
GeneralException

getAllNotes

public Note[] getAllNotes(Patient p)
                   throws DatabaseException,
                          IllegalInputException,
                          GeneralException
Receives all notes saved on specified patient

Parameters:
patient - to get notes on
Returns:
a list of all notes
Throws:
DatabaseException
IllegalInputException
GeneralException

dismissAlarm

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

Parameters:
alarm - to be dismissed
Throws:
DatabaseException
IllegalInputException
GeneralException

getAllActiveAlarms

public Alarm[] getAllActiveAlarms(Patient p)
                           throws DatabaseException,
                                  IllegalInputException,
                                  GeneralException
Gets all alarms saved on specified patient that are not yet dismissed

Parameters:
patient - to get alarms on
Returns:
a list of all active alarms
Throws:
DatabaseException
IllegalInputException
GeneralException

getPacketsBetweenDates

public MedPacket[] getPacketsBetweenDates(Patient p,
                                          java.util.Date fromTime,
                                          java.util.Date toTime,
                                          int resolution)
                                   throws DatabaseException,
                                          IllegalInputException,
                                          GeneralException
Returns a list of medpackets saved on specified patient between specified time. Every resolution packet is returned.

Parameters:
patient - to get monitoring data from
fromTime -
toTime -
a - number telling what packets should be returned
Returns:
an array of medpackets
Throws:
DatabaseException
IllegalInputException
GeneralException