Consentimiento completo
							parent
							
								
									ea5b250776
								
							
						
					
					
						commit
						6e217d812a
					
				
											
												Binary file not shown.
											
										
									
								@ -0,0 +1,99 @@
 | 
			
		||||
//
 | 
			
		||||
//  ConsentTask.swift
 | 
			
		||||
//  RK-Journals
 | 
			
		||||
//
 | 
			
		||||
//  Created by Juan David Lopez Regalado on 12/11/24.
 | 
			
		||||
//
 | 
			
		||||
 | 
			
		||||
import UIKit
 | 
			
		||||
import ResearchKit
 | 
			
		||||
 | 
			
		||||
public var ConsentTask: ORKOrderedTask {
 | 
			
		||||
 | 
			
		||||
    var steps = [ORKStep]()
 | 
			
		||||
 | 
			
		||||
    // Visualización de secciones
 | 
			
		||||
    
 | 
			
		||||
    let consentDocument = ConsentDocument
 | 
			
		||||
    
 | 
			
		||||
    // Sección 1: Bienvenido
 | 
			
		||||
    let section1 = ORKInstructionStep(identifier: "consentSection1InstructionStep")
 | 
			
		||||
    section1.title = "Bienvenido"
 | 
			
		||||
    section1.iconImage = UIImage(systemName: "hand.wave")
 | 
			
		||||
    section1.detailText = "Sección 1: Bienvenido. Este estudio trata sobre..."
 | 
			
		||||
    steps += [section1]
 | 
			
		||||
    
 | 
			
		||||
    // Sección 2: Recopilación de datos
 | 
			
		||||
    let section2 = ORKInstructionStep(identifier: "consentSection2InstructionStep")
 | 
			
		||||
    section2.title = "Recopilación de datos"
 | 
			
		||||
    section2.iconImage = UIImage(systemName: "doc.text")
 | 
			
		||||
    section2.detailText = "Sección 2: Recopilación de datos. Este estudio recopilará datos..."
 | 
			
		||||
    steps += [section2]
 | 
			
		||||
 | 
			
		||||
    // Sección 3: Privacidad
 | 
			
		||||
    let section3 = ORKInstructionStep(identifier: "consentSection3InstructionStep")
 | 
			
		||||
    section3.title = "Privacidad"
 | 
			
		||||
    section3.iconImage = UIImage(systemName: "lock.shield")
 | 
			
		||||
    section3.detailText = "Sección 3: Privacidad. Valoramos su privacidad..."
 | 
			
		||||
    steps += [section3]
 | 
			
		||||
 | 
			
		||||
    // Sección 4: Uso de datos
 | 
			
		||||
    let section4 = ORKInstructionStep(identifier: "consentSection4InstructionStep")
 | 
			
		||||
    section4.title = "Uso de datos"
 | 
			
		||||
    section4.iconImage = UIImage(systemName: "chart.bar")
 | 
			
		||||
    section4.detailText = "Sección 4: Uso de datos. Los datos recopilados se utilizarán para..."
 | 
			
		||||
    steps += [section4]
 | 
			
		||||
 | 
			
		||||
    // Sección 5: Compromiso de tiempo
 | 
			
		||||
    let section5 = ORKInstructionStep(identifier: "consentSection5InstructionStep")
 | 
			
		||||
    section5.title = "Compromiso de tiempo"
 | 
			
		||||
    section5.iconImage = UIImage(systemName: "clock")
 | 
			
		||||
    section5.detailText = "Sección 5: Compromiso de tiempo. Este estudio le llevará aproximadamente..."
 | 
			
		||||
    steps += [section5]
 | 
			
		||||
 | 
			
		||||
    // Sección 6: Encuesta del estudio
 | 
			
		||||
    let section6 = ORKInstructionStep(identifier: "consentSection6InstructionStep")
 | 
			
		||||
    section6.title = "Encuesta del estudio"
 | 
			
		||||
    section6.iconImage = UIImage(systemName: "list.bullet.rectangle")
 | 
			
		||||
    section6.detailText = "Sección 6: Encuesta del estudio. Para este estudio, deberá completar una encuesta..."
 | 
			
		||||
    steps += [section6]
 | 
			
		||||
 | 
			
		||||
    // Sección 7: Tareas del estudio
 | 
			
		||||
    let section7 = ORKInstructionStep(identifier: "consentSection7InstructionStep")
 | 
			
		||||
    section7.title = "Tareas del estudio"
 | 
			
		||||
    section7.iconImage = UIImage(systemName: "pencil.and.outline")
 | 
			
		||||
    section7.detailText = "Sección 7: Tareas del estudio. Se le solicitará que realice estas tareas..."
 | 
			
		||||
    steps += [section7]
 | 
			
		||||
 | 
			
		||||
    // Sección 8: Retiro
 | 
			
		||||
    let section8 = ORKInstructionStep(identifier: "consentSection8InstructionStep")
 | 
			
		||||
    section8.title = "Retiro"
 | 
			
		||||
    section8.iconImage = UIImage(systemName: "arrow.backward.circle")
 | 
			
		||||
    section8.detailText = "Sección 8: Retiro. Para retirarse del estudio..."
 | 
			
		||||
    steps += [section8]
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    // Revisar y firmar
 | 
			
		||||
    let signature = consentDocument.signatures!.first!
 | 
			
		||||
    let reviewConsentStep = ORKConsentReviewStep(identifier: "ConsentReviewStep", signature: signature, in: consentDocument)
 | 
			
		||||
    reviewConsentStep.title = "Revision"
 | 
			
		||||
    reviewConsentStep.text = "Revise el formulario de consentimiento."
 | 
			
		||||
    reviewConsentStep.reasonForConsent = "Consentimiento para unirse al estudio"
 | 
			
		||||
    steps += [reviewConsentStep]
 | 
			
		||||
    
 | 
			
		||||
    // Passcode/TouchID Protection
 | 
			
		||||
    let passcodeStep = ORKPasscodeStep(identifier: "Passcode")
 | 
			
		||||
    passcodeStep.iconImage = UIImage(systemName: "lock.circle")
 | 
			
		||||
     passcodeStep.text = "Ahora creará un código de acceso para identificarse en la aplicación y proteger la información ingresada."
 | 
			
		||||
     steps += [passcodeStep]
 | 
			
		||||
    
 | 
			
		||||
    // Completion
 | 
			
		||||
    let completionStep = ORKCompletionStep(identifier: "CompletionStep")
 | 
			
		||||
    completionStep.iconImage = UIImage(systemName: "checkmark.seal")
 | 
			
		||||
    completionStep.title = "Bienvenido a bordo"
 | 
			
		||||
    completionStep.text = "Gracias por unirse a este estudio."
 | 
			
		||||
    steps += [completionStep]
 | 
			
		||||
 | 
			
		||||
    return ORKOrderedTask(identifier: "ConsentTask", steps: steps)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 107 KiB  | 
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 160 KiB  | 
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 114 KiB  | 
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 110 KiB  | 
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 94 KiB  | 
											
												Binary file not shown.
											
										
									
								| 
		 After Width: | Height: | Size: 120 KiB  | 
					Loading…
					
					
				
		Reference in New Issue