MedicationScheduleStore
public protocol MedicationScheduleStore
Protocol for storing MedicationSchedules.
-
Fetch any MedicationSchedule by provided TaskId
Declaration
Swift
func fetch(by taskID: ErxTask.ID) throws -> MedicationSchedule?Parameters
taskIDTaskID the medication Schedule is for
Return Value
The according MedicationSchedule if there is any for the given TaskID.
-
Fetch
MedicationScheduleandErxTaskby providedMedicationSchedule.Entry.idDeclaration
Swift
func fetch(byEntryId entryId: UUID, dateProvider: @escaping () -> Date) throws -> MedicationScheduleFetchByEntryIdResponse -
Fetches and returns all available Medication Schedules.
Declaration
Swift
func fetchAll() throws -> [MedicationSchedule]Return Value
A list of all available Medication Schedules.
-
Save the given
MedicationSchedules. Overwrites any existingMedicationSchedule.Declaration
Swift
func save(medicationSchedules: [MedicationSchedule]) throws -> [MedicationSchedule]Parameters
medicationSchedulesList of
MedicationSchedules to save.Return Value
The saved list of
MedicationSchedules. -
Delete the given
MedicationSchedules.Declaration
Swift
func delete(medicationSchedules: [MedicationSchedule]) throwsParameters
medicationSchedulesThe list of
MedicationSchedules do delete.
View on GitHub
MedicationScheduleStore Protocol Reference