Elexis API documentation
Version 2.1.6 as of December 11 2011

ch.elexis.data
Class Reminder

java.lang.Object
  extended by ch.elexis.data.PersistentObject
      extended by ch.elexis.data.Reminder
All Implemented Interfaces:
IPersistentObject, ISelectable, java.lang.Comparable<Reminder>

public class Reminder
extends PersistentObject
implements java.lang.Comparable<Reminder>

Ein Reminder ist eine Erinnerung an etwas. Ein Reminder ist an einen Kontakt gebunden. Ein Reminder hat ein Fälligkeitsdatum und einen Status Es gibt mehrere Typen von Remindern:

Author:
Gerry

Nested Class Summary
static class Reminder.Status
           
static class Reminder.Typ
           
 
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject
PersistentObject.FieldType
 
Field Summary
static java.lang.String CREATOR
           
static java.lang.String DONE
           
static java.lang.String DUE
           
static java.lang.String KONTAKT_ID
           
static java.lang.String MESSAGE
           
static java.lang.String RESPONSIBLE
           
static java.lang.String STATE_DUE
           
static java.lang.String STATE_OVERDUE
           
static java.lang.String STATE_PLANNED
           
static java.lang.String STATUS
           
static java.lang.String TYPE
           
static java.lang.String[] TypText
           
static java.lang.String UNDONE
           
 
Fields inherited from class ch.elexis.data.PersistentObject
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START
 
Fields inherited from interface ch.elexis.core.data.IPersistentObject
FLD_DATE, FLD_DELETED, FLD_EXTINFO, FLD_ID, FLD_LASTUPDATE, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID
 
Constructor Summary
Reminder(Kontakt ident, java.lang.String due, Reminder.Typ typ, java.lang.String params, java.lang.String msg)
          Create a new Reminder.
 
Method Summary
 void addResponsible(Anwender a)
          Add a new user to the list of responsibles for that reminder, if not already in list.
 int compareTo(Reminder r)
          The comparator is used when reminders are inserted chronologically in a sorted set.
 boolean delete()
          Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted.
static java.util.List<Reminder> findForPatient(Patient p, Kontakt responsible)
          Alle Reminder zu einem Patienten holen
static java.util.List<Reminder> findForToday()
          Alle heute (oder vor heute) fälligen Reminder holen
static java.util.List<Reminder> findRemindersDueFor(Patient p, Anwender a, boolean bOnlyPopup)
          Alle Reminder holen, die bei einem bestimmten Patienten für einen bestimmten Anwender fällig sind
static java.util.List<Reminder> findToShowOnStartup(Anwender a)
          Alle Reminder holen, die beim Progammstart gezeigt werden sollen
 Anwender getCreator()
           
 TimeTool getDateDue()
           
 Patient getKontakt()
           
 java.lang.String getLabel()
          Einen menschenlesbaren Identifikationsstring für dieses Objet liefern
 java.lang.String getMessage()
           
 java.util.List<Anwender> getResponsibles()
           
 Reminder.Status getStatus()
           
 Reminder.Typ getTyp()
           
 boolean isDue()
           
 boolean isOverdue()
           
static Reminder load(java.lang.String id)
          Einen Reminder anhand seiner ID aus der Datenbank einlesen
 void removeResponsible(Anwender a)
          Removes a user from the list of responsibles for that reminder, if the user is in the list.
 void setStatus(Reminder.Status s)
           
 
Methods inherited from class ch.elexis.data.PersistentObject
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, deleteList, disconnect, equals, executeSQLScript, exists, exportData, fireChangeEvent, flatten, fold, get, get, getCacheTime, getConnection, getDefaultCacheLifetime, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isShowDeleted, isValid, lock, map, relock, removeChangeListener, removeFromList, removeFromList, removeSticker, resetCache, set, set, setDefaultCacheLifetime, setInt, setMap, setShowDeleted, setTrace, state, storeToString, tableExists, ts, undelete, unlock
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MESSAGE

public static final java.lang.String MESSAGE
See Also:
Constant Field Values

RESPONSIBLE

public static final java.lang.String RESPONSIBLE
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

STATUS

public static final java.lang.String STATUS
See Also:
Constant Field Values

DUE

public static final java.lang.String DUE
See Also:
Constant Field Values

CREATOR

public static final java.lang.String CREATOR
See Also:
Constant Field Values

KONTAKT_ID

public static final java.lang.String KONTAKT_ID
See Also:
Constant Field Values

STATE_PLANNED

public static final java.lang.String STATE_PLANNED
See Also:
Constant Field Values

STATE_DUE

public static final java.lang.String STATE_DUE
See Also:
Constant Field Values

STATE_OVERDUE

public static final java.lang.String STATE_OVERDUE
See Also:
Constant Field Values

DONE

public static final java.lang.String DONE
See Also:
Constant Field Values

UNDONE

public static final java.lang.String UNDONE
See Also:
Constant Field Values

TypText

public static final java.lang.String[] TypText
Constructor Detail

Reminder

public Reminder(Kontakt ident,
                java.lang.String due,
                Reminder.Typ typ,
                java.lang.String params,
                java.lang.String msg)
Create a new Reminder. Note: by default, the new reminder will have no responsible. @see addResponsible

Parameters:
ident - The contact (i.e. Patient) the reminder belongs to. If ident is null, the reminder will be attributed to the corrent user
due - A date string
typ - type of the reminder (@see enum Typ)
params - parameters depending on the type of the reminder
msg - Text for the reminder
Method Detail

addResponsible

public void addResponsible(Anwender a)
Add a new user to the list of responsibles for that reminder, if not already in list. The reminder will show up among the reminders, if one of its responsibles is logged in.

Parameters:
a - the user to add to the list of responsible users

removeResponsible

public void removeResponsible(Anwender a)
Removes a user from the list of responsibles for that reminder, if the user is in the list. If the user is not in the list, nothing is done.

Parameters:
a - the user to remove from the list of responsible users

load

public static Reminder load(java.lang.String id)
Einen Reminder anhand seiner ID aus der Datenbank einlesen


getLabel

public java.lang.String getLabel()
Description copied from class: PersistentObject
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern

Specified by:
getLabel in interface IPersistentObject
Specified by:
getLabel in class PersistentObject

getTyp

public Reminder.Typ getTyp()

getStatus

public Reminder.Status getStatus()

getMessage

public java.lang.String getMessage()

setStatus

public void setStatus(Reminder.Status s)

getDateDue

public TimeTool getDateDue()

isDue

public boolean isDue()

isOverdue

public boolean isOverdue()

getResponsibles

public java.util.List<Anwender> getResponsibles()

getCreator

public Anwender getCreator()

findForToday

public static java.util.List<Reminder> findForToday()
Alle heute (oder vor heute) fälligen Reminder holen

Returns:
eine Liste aller fälligen Reminder

findForPatient

public static java.util.List<Reminder> findForPatient(Patient p,
                                                      Kontakt responsible)
Alle Reminder zu einem Patienten holen

Parameters:
p - der Patient
responsible - der Verantwortliche oder null: Alle
Returns:
eine Liste aller offenen Reminder dieses Patienten

findToShowOnStartup

public static java.util.List<Reminder> findToShowOnStartup(Anwender a)
Alle Reminder holen, die beim Progammstart gezeigt werden sollen

Returns:

findRemindersDueFor

public static java.util.List<Reminder> findRemindersDueFor(Patient p,
                                                           Anwender a,
                                                           boolean bOnlyPopup)
Alle Reminder holen, die bei einem bestimmten Patienten für einen bestimmten Anwender fällig sind

Parameters:
p - der Patient
a - der Anwender
bOnlyPopup - nur die zeigen, die den Typ "Bei Auswahl popup" haben.
Returns:
eine Liste der fälligen Reminder dieses Patienten

getKontakt

public Patient getKontakt()

compareTo

public int compareTo(Reminder r)
The comparator is used when reminders are inserted chronologically in a sorted set. To allow multiple different reminders at the same day, we use the id to differentiate reminders with identical dates.

Specified by:
compareTo in interface java.lang.Comparable<Reminder>

delete

public boolean delete()
Description copied from class: PersistentObject
Ein Objekt und ggf. dessen XID's aus der Datenbank löschen the object is not deleted but rather marked as deleted. A purge must be applied to remove the object really

Overrides:
delete in class PersistentObject
Returns:
true on success

Elexis API documentation
Version 2.1.6 as of December 11 2011

Copyright 2005-2011 by Gerry Weirich, Elexis