PillRegimenResponse

public class PillRegimenResponse

PillRegimenResponse represents subscribers dosage prescription and reminder configuration.

See also: org.motechproject.pillreminder.service.PillReminderService.getPillRegimen(String)

Constructors

PillRegimenResponse

public PillRegimenResponse(Long pillRegimenId, String externalId, int reminderRepeatWindowInHours, int reminderRepeatIntervalInMinutes, int bufferOverDosageTimeInMinutes, List<DosageResponse> dosages)

Constructs a pill regimen response.

Parameters:
  • pillRegimenId – unique identifier of the pill regimen
  • externalId – the external ID associated with this regimen, can represent a patient
  • reminderRepeatWindowInHours – the number of hours during which reminders will be sent
  • reminderRepeatIntervalInMinutes – the interval between sending subsequent reminders in minutes
  • bufferOverDosageTimeInMinutes – the time in minutes after the first reminder will be sent, if no adherence confirmation was received for the regimen
  • dosages – medicine dosages in this pill regimen

Methods

getBufferOverDosageTimeInMinutes

public int getBufferOverDosageTimeInMinutes()

Returns the buffer over dosage time in minutes. The first reminder will be fired after this time passes from the dosage time if there was no adherence confirmation.

Returns:the time in minutes after the first reminder will be sent, if no adherence confirmation

getDosages

public List<DosageResponse> getDosages()
Returns:medicine dosages in this pill regimen

getExternalId

public String getExternalId()
Returns:the external ID associated with this regimen, can represent a patient

getPillRegimenId

public Long getPillRegimenId()
Returns:unique identifier of the pill regimen

getReminderRepeatIntervalInMinutes

public int getReminderRepeatIntervalInMinutes()
Returns:the interval between sending subsequent reminders in minutes

getReminderRepeatWindowInHours

public int getReminderRepeatWindowInHours()

Returns the time window in hours during which reminders for this regimen will be sent. No reminders should be sent after this time passes from the start of sending reminders.

Returns:the number of hours during which reminders will be sent

setBufferOverDosageTimeInMinutes

public void setBufferOverDosageTimeInMinutes(int bufferOverDosageTimeInMinutes)

Sets the buffer over dosage time in minutes. The first reminder will be fired after this time passes from the dosage time if there was no adherence confirmation.

Parameters:
  • bufferOverDosageTimeInMinutes – the time in minutes after the first reminder will be sent, if no adherence confirmation