Restoring tasks
In clinical research studies, surveys may get lengthy and take a long time to complete. Also, in many cases, the users might have to find the information being asked from other places such as paper medical records, and so on. In these cases, it would be convenient if the users can save the partially completed survey and resume it later. ResearchKit provides a mechanism to save the partially completed surveys through the restorationData
property and other delegate methods in ORKTaskViewController
. Let's learn how to add a restorable survey in detail in this chapter.
In the following sections, we will be adding Restorable Survey
to the lists of tasks in the Softwareitis
project.
First, let's add the showRestorableSurvey
method in RestorableSurvey.swift
. This method replicates the survey created in Chapter 3, Building Surveys as showSurvey
with one difference: The identifier
of the survey task is set to "Restorable Survey", as shown in the following:
func...