Closed stevemoser closed 7 years ago
I think that in order for multiple occurrences of an assessment on each day to work, time-based events will have to become a top priority. That's really the only way for this kind of thing to make logical sense. I guess you could have a (1) and (2) but that could come off as slightly confusing. For example, if I had a "Log Weight" assessment occur two times a day, it would say "Log Weight (1)" and "Log Weight (2)" From the user's perspective, that seems confusing.
@tktsubota I would very much like to see time-based events as well. Maybe a work around in the mean time could be an array of strings attached to the assessment that would better inform the user why there is an order to the occurrences. Such as a "morning" and "evening" or "first occurrence of pain" and "second occurrence of pain".
Something similar to Insights' axis titles, where you provide an optional title given an occurrence on each day (occurrenceIndexOfDay) could be implemented. Ex. OCKCareSchedule.weeklySchedule(withStartDate: startDate as DateComponents, occurrencesOnEachDay: [2, 2, 2, 2, 2, 2, 2], titles: [titleForFirstOccurrence, titleForSecondOccurrence])
. A simple implementation like that could be used at the current state without time-based events.
Time-based events have been requested before (#74, #111), though we'll have to brainstorm ideas on what would be most intuitive.
Great discussion here about time-based events if we are showing multiple occurrences on the same day for Assessments. I will close this issue since time-based events request is being tracked in #111 .
A quick test of the sample app (and tests) reveals that multiple occurrencesOnEachDay for assessments is allowed.
let schedule = OCKCareSchedule.weeklySchedule(withStartDate: startDate as DateComponents, occurrencesOnEachDay: [2, 2, 2, 2, 2, 2, 2])
Saw if someone wanted to record back pain in the morning and evening. However on the Symptom Tracker screen it appears as a dupe. And the sample app uses the first occurrence for the insight screen. Having multiple occurrencesOnEachDay for assessments is a corner case but I wonder if it would be better to denote the index of each in the Symptom Tracker screen to make it feel like less of a bug or dupe. Maybe a (1) and (2) and so forth. I don't think throwing on >1 occurrencesOnEachDay for assessments is a good idea. Thoughts?