Comments (8)
@dukemike Just want to confirm if discontinue
means end
an activity? If so, that's straight forward, just set the end date on the schedule of the activity.
But deferring an event or events could be much more complex, because it involves the scheduling.
For example, an weekly repeated schedule, should it be deferred to next day or next week?
And how to track the deferring in the care plan store and so on.
from carekit.
Another idea that in my head is to support swipe action menus in the table view of care card or tracker. Basically, the menu option can be provided by developer through delegate, and the action is up to the developer as well.
from carekit.
Yes, I am proposing that swiping on the row in the card card would cause the activity's end date to be set to now or to tomorrow at 0:00. Deferring an event would have many more edges which I could see as rescheduling.
Do you think that allowing the developer to specify the menu would be better than adding a '...canDefer...' to supporting ending the activity only?
from carekit.
@dukemike It was great meeting with you at WWDC. I think this will be a great addition to the Care Card.
We probably don't want to add an extra flag to the activity model.
This will create data migration issues.
Here's how I think we should proceed for this feature:
- We should instead add a method to the existing Care Card Delegate, something like:
-(BOOL)careCardViewController:(OCKCareCardViewController *)viewController userCanDiscontinueActivity:(OCKCarePlanActivity *)activity;
- Then inside CareCardViewController, we should check the return value for this method and based on it allow the discontinue button to be shown on each table view cell (using the table view delegate/data source)
- By default, the cell will not show the discontinue button.
Let me know what you think! :)
from carekit.
@umerkhan-apple: Do we need user in the method name? Would canDiscontinueActivity
be sufficient?
Are equivalents for tableView: willBeginEditingRowAtIndexPath
and tableView:didEndEditingRowAtIndexPath:
necessary?
from carekit.
@dukemike We can proceed with canDiscontinueActivity
and just confirm the name with everyone else during the PR review process. I don't think those tableView equivalents are necessary.
Since the Care Card already has a table view delegate, you would just override the following methods inside OCKCareCardViewController.h
:
tableView(_:canEditRowAtIndexPath:)
- This method will return the value from
canDiscontinueActivity
.
tableView(_:commitEditingStyle:forRowAtIndexPath:)
- This method will find the activity at the indexPath and call
setEndDate
with the current date.
from carekit.
pull request #80 opened
from carekit.
Closing out this issue. The requested feature has been implemented as part of CareKit 2.0
The new OCKSchedule
struct now has an end
property that fulfills this requirement.
from carekit.
Related Issues (20)
- Warning when uploading App HOT 7
- Occurrence circles HOT 29
- Error when building on latest Xcode and macOS Ventura HOT 1
- Carekit_CareKitStore emitted errors HOT 1
- Compile Errors HOT 1
- How do you save an CareKit OCKOutcomeValue for an array of ResearchKit ORKChoiceQuestionResults HOT 12
- ORKTextChoice + ORKPredicateStepNavigationRule + CareKit + ResearchKit HOT 10
- Bar chart changes every time i close and reopen the application HOT 9
- Problems integrating HealthKit data into an OCKCartesianChartViewController HOT 1
- CareKitStore-CoreData-NSReadOnlyPersistentStoreOption-ErrorMessage HOT 1
- Create monthly charts HOT 3
- Trying to schedule a notification based on the caloriesBurned only if they are less than a certain amount (with query to the health store) HOT 6
- Creating PDF with charts and data from more than one View HOT 1
- Sample app for v3? HOT 1
- CareKit live streaming crashes with multithreaded violations HOT 4
- Updated Content HOT 16
- Watch remote synchronization fails with duplicate Outcome.
- CareKit cannot compile with Xcode 15(beta 2) HOT 1
- Adding a detailed description to the nausea card HOT 3
- Issue with OCKSynchronizedStoreManager HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carekit.