only consent
parent
d46e10f8e4
commit
e1cf6346fd
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "pcie-logo.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 645 KiB |
@ -1,24 +1,68 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
|
||||||
|
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
|
||||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<scenes>
|
<scenes>
|
||||||
<!--View Controller-->
|
<!--View Controller-->
|
||||||
<scene sceneID="tne-QT-ifu">
|
<scene sceneID="tne-QT-ifu">
|
||||||
<objects>
|
<objects>
|
||||||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController id="BYZ-38-t0r" customClass="ViewController" customModule="surveys_example" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
<subviews>
|
||||||
|
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="udU-YT-Wn2">
|
||||||
|
<rect key="frame" x="128" y="533" width="137" height="52"/>
|
||||||
|
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||||
|
<state key="normal" title="Start Survey"/>
|
||||||
|
<buttonConfiguration key="configuration" style="plain" title="Start Survey" titleAlignment="center">
|
||||||
|
<fontDescription key="titleFontDescription" style="UICTFontTextStyleTitle3"/>
|
||||||
|
</buttonConfiguration>
|
||||||
|
<connections>
|
||||||
|
<action selector="startSurveyTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="0G5-au-7td"/>
|
||||||
|
</connections>
|
||||||
|
</button>
|
||||||
|
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" fixedFrame="YES" text="Biomarker analysis study on Apple devices to detect the level of sedentary lifestyle." textAlignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="O9Y-Kh-XQC">
|
||||||
|
<rect key="frame" x="72" y="146" width="248" height="311"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<color key="textColor" systemColor="labelColor"/>
|
||||||
|
<fontDescription key="fontDescription" name="GillSans" family="Gill Sans" pointSize="36"/>
|
||||||
|
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
|
||||||
|
</textView>
|
||||||
|
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="pcie-logo" translatesAutoresizingMaskIntoConstraints="NO" id="jV5-Zs-y7v">
|
||||||
|
<rect key="frame" x="97" y="690" width="198" height="111"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
|
</imageView>
|
||||||
|
</subviews>
|
||||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||||
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstItem="udU-YT-Wn2" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="474" id="4Lv-uj-sfs"/>
|
||||||
|
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="udU-YT-Wn2" secondAttribute="trailing" constant="128" id="KxA-OY-V2k"/>
|
||||||
|
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="udU-YT-Wn2" secondAttribute="bottom" constant="233" id="q22-wR-4RZ"/>
|
||||||
|
<constraint firstItem="udU-YT-Wn2" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="128" id="sa7-Jh-KZz"/>
|
||||||
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
|
<point key="canvasLocation" x="55.725190839694655" y="3.5211267605633805"/>
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
|
<resources>
|
||||||
|
<image name="pcie-logo" width="3766" height="1429"/>
|
||||||
|
<systemColor name="labelColor">
|
||||||
|
<color white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
<systemColor name="systemBackgroundColor">
|
||||||
|
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</systemColor>
|
||||||
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
@ -0,0 +1,79 @@
|
|||||||
|
//
|
||||||
|
// ConsentManager.swift
|
||||||
|
// surveys-example
|
||||||
|
//
|
||||||
|
// Created by Juan David López Regalado on 12/06/24.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
import UIKit
|
||||||
|
import ResearchKit
|
||||||
|
|
||||||
|
class ConsentManager{
|
||||||
|
static let shared = ConsentManager()
|
||||||
|
|
||||||
|
func createConsentTask() -> ORKTask{
|
||||||
|
|
||||||
|
// Pagina de Welcome
|
||||||
|
let welcomeStep = ORKInstructionStep(identifier: "consentWelcomeInstructionStep")
|
||||||
|
welcomeStep.title = "Welcome!"
|
||||||
|
welcomeStep.iconImage = UIImage(systemName: "hand.wave")
|
||||||
|
welcomeStep.detailText = "Thank you for being part of the biomarker project aimed at determining the level of sedentary lifestyle. However, before accepting, please read the next part." // explain the consent
|
||||||
|
|
||||||
|
let sign = ORKInstructionStep(identifier: "signAccept")
|
||||||
|
sign.title = "Please Sign if you Accept"
|
||||||
|
|
||||||
|
|
||||||
|
// Pagina del before you join
|
||||||
|
let beforeYouJoin = ORKInstructionStep(identifier: "informedConsentInstructionStep")
|
||||||
|
beforeYouJoin.iconImage = UIImage(systemName: "doc.text.magnifyinglass")
|
||||||
|
beforeYouJoin.title = "Before You Join"
|
||||||
|
|
||||||
|
let sharingHealthDataBodyItem = ORKBodyItem(text: "The study will ask you to share some of your Health data.",
|
||||||
|
detailText: nil,
|
||||||
|
image: UIImage(systemName: "heart.fill"),
|
||||||
|
learnMoreItem: nil,
|
||||||
|
bodyItemStyle: .image)
|
||||||
|
|
||||||
|
let completingTasksBodyItem = ORKBodyItem(text: "You will be asked to complete various tasks over the duration of the study.",
|
||||||
|
detailText: nil,
|
||||||
|
image: UIImage(systemName: "checkmark.circle.fill"),
|
||||||
|
learnMoreItem: nil,
|
||||||
|
bodyItemStyle: .image)
|
||||||
|
|
||||||
|
let signatureBodyItem = ORKBodyItem(text: "Before joining, we will ask you to sign an informed consent document.",
|
||||||
|
detailText: nil,
|
||||||
|
image: UIImage(systemName: "signature"),
|
||||||
|
learnMoreItem: nil,
|
||||||
|
bodyItemStyle: .image)
|
||||||
|
|
||||||
|
let secureDataBodyItem = ORKBodyItem(text: "Your data is kept private and secure.",
|
||||||
|
detailText: nil,
|
||||||
|
image: UIImage(systemName: "lock.fill"),
|
||||||
|
learnMoreItem: nil,
|
||||||
|
bodyItemStyle: .image)
|
||||||
|
|
||||||
|
beforeYouJoin.bodyItems = [
|
||||||
|
sharingHealthDataBodyItem,
|
||||||
|
completingTasksBodyItem,
|
||||||
|
signatureBodyItem,
|
||||||
|
secureDataBodyItem
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
let instructionSteps = [sign]
|
||||||
|
|
||||||
|
let webViewStep = ORKWebViewStep(identifier: "WebViewStepIdentifier", instructionSteps:instructionSteps)
|
||||||
|
webViewStep.showSignatureAfterContent = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
let task = ORKOrderedTask(identifier: "ConsentTask", steps: [welcomeStep, beforeYouJoin, webViewStep /*other steps*/])
|
||||||
|
return task
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue