This repository is a
docker-containerised,
{targets}-based,
{renv}-enabled
R workflow for the design, development,
and deployment of the Seychelles Oncology Unit Patient Survey
Questionnaire in KoboToolbox.
The research project is entitled Establishing Quality Indicators for Cancer Care: A Readiness Assessment of the Oncology Unit, Ministry of Health (MoH) Seychelles.
This project seeks to assess existing quality of care structures or frameworks within the Oncology Unit to serve as a crucial first step in understanding the gaps in quality measurement and improvement processes. Findings from this research will inform next steps - i.e. the development and implementation of actionable standards and quality indicators or KPIs that are both relevant and feasible within the resource constraints of Seychelles’ health system.
This project also places a renewed focus on capturing patient views and experiences to address patient-centred care issues and integrate user feedback into future quality improvement initiatives within the Oncology Unit.
The design and development of the survey questionnaire is described here. This repository contains the code and tools (and their documentation) for deploying and implementing an electronic data collection system for the survey questionnaire using Kobotoolbox.
KoboToolbox is a free and open-source suite of tools for data collection, particularly designed for field data collection in challenging environments. It is widely used in humanitarian, development, research, and non-profit sectors.
The project repository is structured as follows:
sc-ca-patient-survey-questionnaire
|-- .github/
|-- forms/
|-- R/
|-- renv/
|-- _targets.R
|-- .Rprofile
|-- packages.R
|-- renv.lock
-
.githubcontains project testing and automated deployment of outputs workflows via continuous integration and continuous deployment (CI/CD) using GitHub Actions. -
formscontains archived and release versions of the survey questionnaire XLSForms and their associated media files. -
Rcontains functions developed/created specifically for use in this workflow. -
renvcontains{renv}package specific files and directories used by the package for maintaining R package dependencies within the project. The directoryrenv/library, is a library that contains all packages currently used by the project. This directory, and all files and sub-directories within it, are all generated and managed by the{renv}package. Users should not change/edit these manually. -
_targets.Rfile defines the steps in the workflow’s data ingest, data processing, data analysis, and reporting pipeline. -
.Rprofilefile is a project R profile generated when initiating{renv}for the first time. This file is run automatically every time R is run within this project, and{renv{}uses it to configure the R session to use the{renv}project library. -
packages.Rfile lists out all R package dependencies required by the workflow. -
renv.lockfile is the{renv}lockfile which records enough metadata about every package used in this project that it can be re-installed on a new machine. This file is generated by the{renv}package and should not be changed/edited manually.
This project was built using R 4.5.0. To manage R versions, it is
recommended to use the rig software to
be able to install multiple versions of R and switch between them as
needed.
This project uses the {renv} framework to record R package
dependencies and versions. Packages and versions used are recorded in
renv.lock and code used to manage dependencies is in the renv
directory and other files in the root project directory.
On starting an R session in the working directory of this repository, first run
renv::restore()to install R package dependencies.
To be able to run this workflow, the following environment variables need to be declared beforehand:
A GitHub personal access token (GitHub PAT) is needed to interface with the GitHub API for retrieving information from this project repository. This is used in the GitHub release forms workflow. To create your GitHub PAT, you can follow these instructions or this guide.
Once you have created your GitHub PAT, store it in your .Renviron file
as:
GITHUB_PAT=YOUR_GITHUB_PAT_HERE
A KoboToolbox token is needed to interface with the KoboToolbox API for retrieving information from the project’s KoboToolbox server. This will require a KoboToolbox account from its EU server where the project’s survey forms are hosted. Once you have a KoboToolbox EU server account and are logged in, you can retrieve your token from here or by visiting here.
Once you have retrieved your token, you should store it in your
.Renviron file as:
KOBOTOOLBOX_TOKEN=YOUR_KOBOTOOLBOX_TOKEN_HERE
You will need to restart your R session in order for these new environment variables to be sourced and available.
This workflow archives all deployed versions of the patient survey
questionnaire on KoboToolbox. The archives are stored in the directory
path forms/archive with each version stored in their own directory
named with the version number of the deployed form.
Currently, the following forms are available from the archive:
#> [1] "forms/archive/hcw/v1/onco_hcw_questionnaire.xls"
#> [2] "forms/archive/hcw/v10/onco_hcw_questionnaire.xls"
#> [3] "forms/archive/hcw/v11/onco_hcw_questionnaire.xls"
#> [4] "forms/archive/hcw/v12/onco_hcw_questionnaire.xls"
#> [5] "forms/archive/hcw/v2/onco_hcw_questionnaire.xls"
#> [6] "forms/archive/hcw/v3/onco_hcw_questionnaire.xls"
#> [7] "forms/archive/hcw/v4/onco_hcw_questionnaire.xls"
#> [8] "forms/archive/hcw/v5/onco_hcw_questionnaire.xls"
#> [9] "forms/archive/hcw/v6/onco_hcw_questionnaire.xls"
#> [10] "forms/archive/hcw/v7/onco_hcw_questionnaire.xls"
#> [11] "forms/archive/hcw/v8/onco_hcw_questionnaire.xls"
#> [12] "forms/archive/hcw/v9/onco_hcw_questionnaire.xls"
#> [13] "forms/archive/patient/v1/onco_patient_questionnaire.xls"
#> [14] "forms/archive/patient/v10/onco_patient_questionnaire.xls"
#> [15] "forms/archive/patient/v11/onco_patient_questionnaire.xls"
#> [16] "forms/archive/patient/v12/onco_patient_questionnaire.xls"
#> [17] "forms/archive/patient/v13/onco_patient_questionnaire.xls"
#> [18] "forms/archive/patient/v14/onco_patient_questionnaire.xls"
#> [19] "forms/archive/patient/v15/onco_patient_questionnaire.xls"
#> [20] "forms/archive/patient/v16/onco_patient_questionnaire.xls"
#> [21] "forms/archive/patient/v17/onco_patient_questionnaire.xls"
#> [22] "forms/archive/patient/v18/onco_patient_questionnaire.xls"
#> [23] "forms/archive/patient/v19/onco_patient_questionnaire.xls"
#> [24] "forms/archive/patient/v2/onco_patient_questionnaire.xls"
#> [25] "forms/archive/patient/v20/onco_patient_questionnaire.xls"
#> [26] "forms/archive/patient/v21/onco_patient_questionnaire.xls"
#> [27] "forms/archive/patient/v22/onco_patient_questionnaire.xls"
#> [28] "forms/archive/patient/v23/onco_patient_questionnaire.xls"
#> [29] "forms/archive/patient/v24/onco_patient_questionnaire.xls"
#> [30] "forms/archive/patient/v25/onco_patient_questionnaire.xls"
#> [31] "forms/archive/patient/v26/onco_patient_questionnaire.xls"
#> [32] "forms/archive/patient/v27/onco_patient_questionnaire.xls"
#> [33] "forms/archive/patient/v28/onco_patient_questionnaire.xls"
#> [34] "forms/archive/patient/v29/onco_patient_questionnaire.xls"
#> [35] "forms/archive/patient/v3/onco_patient_questionnaire.xls"
#> [36] "forms/archive/patient/v30/onco_patient_questionnaire.xls"
#> [37] "forms/archive/patient/v31/onco_patient_questionnaire.xls"
#> [38] "forms/archive/patient/v32/onco_patient_questionnaire.xls"
#> [39] "forms/archive/patient/v33/onco_patient_questionnaire.xls"
#> [40] "forms/archive/patient/v34/onco_patient_questionnaire.xls"
#> [41] "forms/archive/patient/v35/onco_patient_questionnaire.xls"
#> [42] "forms/archive/patient/v36/onco_patient_questionnaire.xls"
#> [43] "forms/archive/patient/v37/onco_patient_questionnaire.xls"
#> [44] "forms/archive/patient/v38/onco_patient_questionnaire.xls"
#> [45] "forms/archive/patient/v39/onco_patient_questionnaire.xls"
#> [46] "forms/archive/patient/v4/onco_patient_questionnaire.xls"
#> [47] "forms/archive/patient/v5/onco_patient_questionnaire.xls"
#> [48] "forms/archive/patient/v6/onco_patient_questionnaire.xls"
#> [49] "forms/archive/patient/v7/onco_patient_questionnaire.xls"
#> [50] "forms/archive/patient/v8/onco_patient_questionnaire.xls"
#> [51] "forms/archive/patient/v9/onco_patient_questionnaire.xls"
To run the archive forms workflow, the following command should be run in R console:
tar_make(dplyr::contains("version_xls"))This workflow deploys the current patient survey questionnaire version to KoboToolbox. To run the deploy forms workflow, the following command should be run in R console:
tar_make(dplyr::starts_with("kobo_deploy"))This workflow creates a GitHub release of the current deployed patient survey questionnaire version. To run the release forms workflow, the following command should be run in R console:
tar_make(dplyr::starts_with("github_release"))- Dr Johanna Rapanarilala - Oncology Unit, Ministry of Health, Seychelles
- Dr Sylvie Pool - Ministry of Health, Seychelles and University of Oxford
- Dr Nyasha Manyeruke - University of Oxford
- Dr Ernest Guevarra - University of Oxford
