From f7a629ccdee6c49e209f8a4dc9e3411b159e95f6 Mon Sep 17 00:00:00 2001 From: Daniel Ocks Date: Fri, 25 Jul 2025 11:17:02 +0200 Subject: [PATCH] Initialer Upload neues Unity-Projekt --- .gitattributes.txt | 31 + .gitignore | 15 + .gitignore.txt | 65 + .idea/.gitignore | 3 + .idea/.name | 1 + .idea/AndroidProjectSystem.xml | 6 + .idea/compiler.xml | 6 + .idea/deploymentTargetSelector.xml | 18 + .idea/gradle.xml | 19 + .idea/kotlinc.xml | 6 + .idea/migrations.xml | 10 + .idea/misc.xml | 9 + .idea/runConfigurations.xml | 17 + app/.gitignore | 1 + app/build.gradle.kts | 56 + app/proguard-rules.pro | 21 + .../com/dano/test1/ExampleInstrumentedTest.kt | 24 + app/src/main/AndroidManifest.xml | 38 + .../QuestionnaireDemographicInformation.txt | 39 + app/src/main/assets/QuestionnaireRHS.txt | 48 + .../main/assets/questionnaire_0_readme.json | 136 + ...estionnaire_1_demographic_information.json | 297 ++ app/src/main/assets/questionnaire_2_rhs.json | 137 + .../questionnaire_3_integration_index.json | 255 ++ .../questionnaire_4_consultation_results.json | 182 + .../questionnaire_5_final_interview.json | 84 + .../questionnaire_6_follow_up_survey.json | 349 ++ app/src/main/assets/questionnaire_order.json | 26 + .../main/java/com/dano/test1/AppDatabase.kt | 22 + .../java/com/dano/test1/CountriesSpinner.kt | 50 + app/src/main/java/com/dano/test1/Daos.kt | 88 + app/src/main/java/com/dano/test1/Entities.kt | 84 + .../com/dano/test1/HandlerClientCoachCode.kt | 116 + .../com/dano/test1/HandlerClientNotSigned.kt | 80 + .../java/com/dano/test1/HandlerDateSpinner.kt | 154 + .../dano/test1/HandlerGlassScaleQuestion.kt | 167 + .../java/com/dano/test1/HandlerLastPage.kt | 93 + .../test1/HandlerMultiCheckboxQuestion.kt | 104 + .../com/dano/test1/HandlerOpeningScreen.kt | 513 +++ .../com/dano/test1/HandlerRadioQuestion.kt | 136 + .../com/dano/test1/HandlerStringSpinner.kt | 93 + .../com/dano/test1/HandlerValueSpinner.kt | 97 + .../java/com/dano/test1/LanguageManager.kt | 2987 +++++++++++++++++ .../java/com/dano/test1/LocalizationHelper.kt | 64 + .../main/java/com/dano/test1/MainActivity.kt | 52 + .../main/java/com/dano/test1/MonthsSpinner.kt | 24 + app/src/main/java/com/dano/test1/MyApp.kt | 24 + .../java/com/dano/test1/QuestionHandler.kt | 8 + .../java/com/dano/test1/QuestionnaireBase.kt | 249 ++ .../com/dano/test1/QuestionnaireGeneric.kt | 59 + .../java/com/dano/test1/QuestionnaireItem.kt | 121 + .../res/drawable/ic_launcher_background.xml | 170 + .../res/drawable/ic_launcher_foreground.xml | 30 + .../res/layout/client_coach_code_question.xml | 94 + app/src/main/res/layout/client_not_signed.xml | 82 + app/src/main/res/layout/date_spinner.xml | 128 + .../main/res/layout/glass_scale_question.xml | 71 + app/src/main/res/layout/last_page.xml | 70 + .../res/layout/multi_check_box_question.xml | 81 + app/src/main/res/layout/opening_screen.xml | 69 + app/src/main/res/layout/radio_question.xml | 74 + app/src/main/res/layout/string_spinner.xml | 72 + app/src/main/res/layout/value_spinner.xml | 71 + .../main/res/mipmap-anydpi/ic_launcher.xml | 6 + .../res/mipmap-anydpi/ic_launcher_round.xml | 6 + app/src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 0 -> 1404 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 0 -> 2898 bytes app/src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 0 -> 982 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 0 -> 1772 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 0 -> 1900 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 0 -> 3918 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 0 -> 2884 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 0 -> 5914 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 0 -> 3844 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 0 -> 7778 bytes app/src/main/res/values-night/themes.xml | 7 + app/src/main/res/values/colors.xml | 5 + app/src/main/res/values/strings.xml | 3 + app/src/main/res/values/themes.xml | 9 + app/src/main/res/xml/backup_rules.xml | 13 + .../main/res/xml/data_extraction_rules.xml | 19 + app/src/main/res/xml/file_paths.xml | 4 + .../java/com/dano/test1/ExampleUnitTest.kt | 17 + build.gradle.kts | 6 + gradle.properties | 23 + gradle/libs.versions.toml | 26 + gradle/wrapper/gradle-wrapper.jar | Bin 0 -> 59203 bytes gradle/wrapper/gradle-wrapper.properties | 6 + gradlew | 185 + gradlew.bat | 89 + settings.gradle.kts | 23 + 91 files changed, 8743 insertions(+) create mode 100644 .gitattributes.txt create mode 100644 .gitignore create mode 100644 .gitignore.txt create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/AndroidProjectSystem.xml create mode 100644 .idea/compiler.xml create mode 100644 .idea/deploymentTargetSelector.xml create mode 100644 .idea/gradle.xml create mode 100644 .idea/kotlinc.xml create mode 100644 .idea/migrations.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/runConfigurations.xml create mode 100644 app/.gitignore create mode 100644 app/build.gradle.kts create mode 100644 app/proguard-rules.pro create mode 100644 app/src/androidTest/java/com/dano/test1/ExampleInstrumentedTest.kt create mode 100644 app/src/main/AndroidManifest.xml create mode 100644 app/src/main/assets/QuestionnaireDemographicInformation.txt create mode 100644 app/src/main/assets/QuestionnaireRHS.txt create mode 100644 app/src/main/assets/questionnaire_0_readme.json create mode 100644 app/src/main/assets/questionnaire_1_demographic_information.json create mode 100644 app/src/main/assets/questionnaire_2_rhs.json create mode 100644 app/src/main/assets/questionnaire_3_integration_index.json create mode 100644 app/src/main/assets/questionnaire_4_consultation_results.json create mode 100644 app/src/main/assets/questionnaire_5_final_interview.json create mode 100644 app/src/main/assets/questionnaire_6_follow_up_survey.json create mode 100644 app/src/main/assets/questionnaire_order.json create mode 100644 app/src/main/java/com/dano/test1/AppDatabase.kt create mode 100644 app/src/main/java/com/dano/test1/CountriesSpinner.kt create mode 100644 app/src/main/java/com/dano/test1/Daos.kt create mode 100644 app/src/main/java/com/dano/test1/Entities.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerClientCoachCode.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerClientNotSigned.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerDateSpinner.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerGlassScaleQuestion.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerLastPage.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerMultiCheckboxQuestion.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerOpeningScreen.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerRadioQuestion.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerStringSpinner.kt create mode 100644 app/src/main/java/com/dano/test1/HandlerValueSpinner.kt create mode 100644 app/src/main/java/com/dano/test1/LanguageManager.kt create mode 100644 app/src/main/java/com/dano/test1/LocalizationHelper.kt create mode 100644 app/src/main/java/com/dano/test1/MainActivity.kt create mode 100644 app/src/main/java/com/dano/test1/MonthsSpinner.kt create mode 100644 app/src/main/java/com/dano/test1/MyApp.kt create mode 100644 app/src/main/java/com/dano/test1/QuestionHandler.kt create mode 100644 app/src/main/java/com/dano/test1/QuestionnaireBase.kt create mode 100644 app/src/main/java/com/dano/test1/QuestionnaireGeneric.kt create mode 100644 app/src/main/java/com/dano/test1/QuestionnaireItem.kt create mode 100644 app/src/main/res/drawable/ic_launcher_background.xml create mode 100644 app/src/main/res/drawable/ic_launcher_foreground.xml create mode 100644 app/src/main/res/layout/client_coach_code_question.xml create mode 100644 app/src/main/res/layout/client_not_signed.xml create mode 100644 app/src/main/res/layout/date_spinner.xml create mode 100644 app/src/main/res/layout/glass_scale_question.xml create mode 100644 app/src/main/res/layout/last_page.xml create mode 100644 app/src/main/res/layout/multi_check_box_question.xml create mode 100644 app/src/main/res/layout/opening_screen.xml create mode 100644 app/src/main/res/layout/radio_question.xml create mode 100644 app/src/main/res/layout/string_spinner.xml create mode 100644 app/src/main/res/layout/value_spinner.xml create mode 100644 app/src/main/res/mipmap-anydpi/ic_launcher.xml create mode 100644 app/src/main/res/mipmap-anydpi/ic_launcher_round.xml create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-hdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-mdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp create mode 100644 app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp create mode 100644 app/src/main/res/values-night/themes.xml create mode 100644 app/src/main/res/values/colors.xml create mode 100644 app/src/main/res/values/strings.xml create mode 100644 app/src/main/res/values/themes.xml create mode 100644 app/src/main/res/xml/backup_rules.xml create mode 100644 app/src/main/res/xml/data_extraction_rules.xml create mode 100644 app/src/main/res/xml/file_paths.xml create mode 100644 app/src/test/java/com/dano/test1/ExampleUnitTest.kt create mode 100644 build.gradle.kts create mode 100644 gradle.properties create mode 100644 gradle/libs.versions.toml create mode 100644 gradle/wrapper/gradle-wrapper.jar create mode 100644 gradle/wrapper/gradle-wrapper.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 settings.gradle.kts diff --git a/.gitattributes.txt b/.gitattributes.txt new file mode 100644 index 0000000..5ebc158 --- /dev/null +++ b/.gitattributes.txt @@ -0,0 +1,31 @@ +# Bildformate +*.png filter=lfs diff=lfs merge=lfs -text +*.jpg filter=lfs diff=lfs merge=lfs -text +*.jpeg filter=lfs diff=lfs merge=lfs -text +*.gif filter=lfs diff=lfs merge=lfs -text +*.webp filter=lfs diff=lfs merge=lfs -text + +# Audioformate +*.mp3 filter=lfs diff=lfs merge=lfs -text +*.wav filter=lfs diff=lfs merge=lfs -text +*.ogg filter=lfs diff=lfs merge=lfs -text + +# Videoformate +*.mp4 filter=lfs diff=lfs merge=lfs -text +*.mov filter=lfs diff=lfs merge=lfs -text +*.webm filter=lfs diff=lfs merge=lfs -text + +# Fonts +*.ttf filter=lfs diff=lfs merge=lfs -text +*.otf filter=lfs diff=lfs merge=lfs -text + +# Große Binaries / Assets / Libraries +*.so filter=lfs diff=lfs merge=lfs -text +*.aar filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.dll filter=lfs diff=lfs merge=lfs -text + +# Archive / export +*.zip filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.7z filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa724b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/.gitignore.txt b/.gitignore.txt new file mode 100644 index 0000000..36e9b9a --- /dev/null +++ b/.gitignore.txt @@ -0,0 +1,65 @@ +# Gradle +.gradle/ +build/ +*/build/ +!gradle/wrapper/gradle-wrapper.jar + +# IDE +.idea/ +*.iml +*.ipr +*.iws + +# VS Code +.vscode/ + +# OS +.DS_Store +Thumbs.db + +# Signing / secrets +*.jks +*.keystore +local.properties +*.pem +*.key + +# Android specific +captures/ +.externalNativeBuild/ +.cxx/ + +# Misc +*.log +*.tmp +*.bak + +# Ignore generated files +generated/ +gen/ + +# APK / AAB +*.apk +*.ap_ +*.aab + +# Testing / coverage +test-results/ +coverage/ +*.ec + +# Lint and analysis +lint/reports/ +lint/intermediates/ + +# Crashlytics / Firebase +crashlytics-build.properties +fabric.properties + +# Gradle cache +.gradle/ +build/ + +# Ignore Google services config (if private) +google-services.json + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..e88ded9 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +Test1 \ No newline at end of file diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml new file mode 100644 index 0000000..4a53bee --- /dev/null +++ b/.idea/AndroidProjectSystem.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..b86273d --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml new file mode 100644 index 0000000..18278c6 --- /dev/null +++ b/.idea/deploymentTargetSelector.xml @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..639c779 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,19 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..c224ad5 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/migrations.xml b/.idea/migrations.xml new file mode 100644 index 0000000..f8051a6 --- /dev/null +++ b/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..b2c751a --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..16660f1 --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/app/.gitignore b/app/.gitignore new file mode 100644 index 0000000..42afabf --- /dev/null +++ b/app/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..8c5f749 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,56 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + id("kotlin-kapt") +} + +android { + namespace = "com.dano.test1" + compileSdk = 35 + + defaultConfig { + applicationId = "com.dano.test1" + minSdk = 29 + targetSdk = 35 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } +} + +val room_version = "2.6.1" + +dependencies { + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.appcompat) + implementation(libs.material) + implementation(libs.androidx.activity) + implementation(libs.androidx.constraintlayout) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + implementation("com.google.code.gson:gson:2.10.1") + implementation("androidx.room:room-runtime:$room_version") + kapt("androidx.room:room-compiler:$room_version") + implementation("androidx.room:room-ktx:$room_version") + implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") + implementation ("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro new file mode 100644 index 0000000..481bb43 --- /dev/null +++ b/app/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/app/src/androidTest/java/com/dano/test1/ExampleInstrumentedTest.kt b/app/src/androidTest/java/com/dano/test1/ExampleInstrumentedTest.kt new file mode 100644 index 0000000..a05dd25 --- /dev/null +++ b/app/src/androidTest/java/com/dano/test1/ExampleInstrumentedTest.kt @@ -0,0 +1,24 @@ +package com.dano.test1 + +import androidx.test.platform.app.InstrumentationRegistry +import androidx.test.ext.junit.runners.AndroidJUnit4 + +import org.junit.Test +import org.junit.runner.RunWith + +import org.junit.Assert.* + +/** + * Instrumented test, which will execute on an Android device. + * + * See [testing documentation](http://d.android.com/tools/testing). + */ +@RunWith(AndroidJUnit4::class) +class ExampleInstrumentedTest { + @Test + fun useAppContext() { + // Context of the app under test. + val appContext = InstrumentationRegistry.getInstrumentation().targetContext + assertEquals("com.dano.test1", appContext.packageName) + } +} \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..5dcd779 --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + diff --git a/app/src/main/assets/QuestionnaireDemographicInformation.txt b/app/src/main/assets/QuestionnaireDemographicInformation.txt new file mode 100644 index 0000000..9604f19 --- /dev/null +++ b/app/src/main/assets/QuestionnaireDemographicInformation.txt @@ -0,0 +1,39 @@ +Holen Sie die Einwilligung des Klienten / der Klientin ein: {X1} + +Code Klient: {X2} + +Code Coach: {X3} + +Unterkunft: {X4} + +Alter: {X5} + +Geschlecht: {X6} + +Herkunftsland: {X7} + +Herkunftsland verlassen: {X8} + +In Deutschland seit: {X9} + +Wie leben Sie hier?: {X10} + +Anzahl Familienmitglieder: {X11} + +Welche Sprachen sprechen Sie?: {X12} + +Wie stufen Sie Ihre Deutschkenntnisse ein?: {X13} + +Wie viele Jahre haben Sie die Schule besucht?: {X14} + +Wie viele Jahre haben Sie die Schule besucht? (im Heimatland): {X15} + +Wie viele Jahre haben Sie die Schule besucht? (auf Zwischenstation): {X16} + +Wie viele Jahre haben Sie die Schule besucht? (in Deutschland): {X17} + +Haben Sie eine Berufsausbildung?: {X18} + +Seit wann sind Sie in der vorläufigen Unterbringung?: {X19} + +Seit wann läuft Ihr Asylverfahren?: {X20} \ No newline at end of file diff --git a/app/src/main/assets/QuestionnaireRHS.txt b/app/src/main/assets/QuestionnaireRHS.txt new file mode 100644 index 0000000..92e3c5a --- /dev/null +++ b/app/src/main/assets/QuestionnaireRHS.txt @@ -0,0 +1,48 @@ +Code Klient: {X1} + +Code Coach: {X2} + +1. Frage: {X3} + +2. Frage: {X4} + +3. Frage: {X5} + +4. Frage: {X6} + +5. Frage: {X7} + +6. Frage: {X8} + +7. Frage: {X9} + +8. Frage: {X10} + +9. Frage: {X11} + +10. Frage: {X12} + +11. Frage: {X13} + +12. Frage: {X14} + +13. Frage: {X15} + +14. Frage: {X16} + +Wählen Sie die Nummer (0-10), die am besten beschreibt, wie viel Leid der +Befragte in der vergangenen Woche einschließlich heute fühlen muss.: {X17} + +Sind Sie jemals so schwer von anderen verletzt worden, dass Sie ärztliche +Unterstützung benötigt haben? (Arzt, Krankenhaus): {X18} + +Ist das ... passiert: {X19} + +In welchem Alter: mit ... Jahren?: {X20} + +Seitdem Sie in Deutschland sind, sind Sie jemals in gewalttätige Konflikte +(Prügelei, körperlich, und psychische Konflikte) geraten?: {X21} + +Ist das ... passiert: {X22} + +In welchem Alter: mit ... Jahren?: {X23} diff --git a/app/src/main/assets/questionnaire_0_readme.json b/app/src/main/assets/questionnaire_0_readme.json new file mode 100644 index 0000000..6716798 --- /dev/null +++ b/app/src/main/assets/questionnaire_0_readme.json @@ -0,0 +1,136 @@ +{ + "meta": { + "_comment": "Diese Zeiel erklärt im folgenden wie die einzelnen Fragetypen definiert werden können und was für features diese mit sich bringen.", + "id": "questionnaire_0_readme" + }, + "questions": [ + + + { + "id": "q1", + "_comment": "Frage mit Radio Buttons. In diesem Fragetypen kann man maximal eine Antwort wählen. Über nextQuestionId kann man die nächste Frage definieren., Über pointsMap kann man die Punkte für die Antwort der Frage festlegen.", + "layout": "radio_question", + "question": "consent_instruction", + "options": [ + { "key": "consent_signed"}, + { "key": "consent_not_signed", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + + + { + "id": "q2", + "_comment": "Frage nach dem Code des Coaches.", + "layout": "client_not_signed", + "textKey1": "no_consent_entered", + "textKey2": "no_consent_note", + "question": "coach_code_request", + "hint": "coach_code" + }, + + + { + "id": "q3", + "_comment": "Frage mit Spinner, dessen Antwortmöglichkeiten über options selbst definiert werden können.", + "layout": "string_spinner", + "question": "other_accommodation", + "options": ["Unterkunft 1", "Unterkunft 2", "Unterkunft 3"] + }, + + + { + "id": "q4", + "_comment": "Frage mit Spinner zur Auswahl des Datums", + "layout": "date_spinner", + "question": "departure_country" + }, + + + { + "id": "q5", + "_comment": "Frage mit Spinner zur Auswahl des Datums. Über constraints und notBefore und notAfter, ist es möglich das Datum nicht in der Zukunft oder Vergangenheit zu wählen.", + "layout": "date_spinner", + "question": "since_in_germany", + "constraints": { + "notBefore": "departure_country", + "notAfter": "departure_country" + } + }, + + + { + "id": "q6", + "_comment": "Frage mit Spinner, dessen Antwortmöglichkeiten über range selbst definiert werden können.", + "layout": "value_spinner", + "question": "number_family_members", + "range": { + "min": 1, + "max": 15 + } + }, + + + { + "id": "q7", + "_comment": "Frage nach dem Code des Klienten und den Code des Coaches.", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + + + { + "id": "q8", + "_comment": "Frage mit Checkboxen, dessen Antwortmöglichkeiten über options selbst definiert werden können. Über pointsMap können die Punkte für die jeweiligen Antworten festgelegt werden. Über minSelection kann die minimal Anzahl an auszufüllenden Antworten festgelegt werden.", + "layout": "multi_check_box_question", + "question": "languages_spoken", + "options": [ + { "key": "language_albanian" }, + { "key": "language_pashto" }, + { "key": "language_russian" }, + { "key": "language_other"} + ], + "pointsMap": { + "language_albanian": 1, + "language_pashto": 1, + "language_russian": 1, + "language_other": 1 + }, + "minSelection": 1 + }, + + + { + "id": "q9", + "_comment":"Glass scale frage, bei der es für jede Frage, welche über symptoms festgelegt werden kann eine Antwort festgelegt werden muss. Die Antwort ganz links gibt immer 0 Punkte und die Antwort ganz rechts gibt immer 4 Punkte.", + "layout": "glass_scale_question", + "question": "glass_explanation", + "symptoms": [ + "q1_symptom", + "q2_symptom", + "q3_symptom", + "q4_symptom", + "q5_symptom", + "q6_symptom", + "q7_symptom", + "q8_symptom", + "q9_symptom" + ] + }, + + + { + "id": "last_page", + "_comment":"Letzte Seite, welche den Abschluss des Fragebogens markiert.", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} diff --git a/app/src/main/assets/questionnaire_1_demographic_information.json b/app/src/main/assets/questionnaire_1_demographic_information.json new file mode 100644 index 0000000..9e34f2d --- /dev/null +++ b/app/src/main/assets/questionnaire_1_demographic_information.json @@ -0,0 +1,297 @@ +{ + "meta": { + "id": "questionnaire_1_demographic_information" + }, + "questions": [ + { + "id": "q1", + "layout": "radio_question", + "question": "consent_instruction", + "options": [ + { "key": "consent_signed", + "nextQuestionId": "q6"}, + { "key": "consent_not_signed", + "nextQuestionId": "q2"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + { + "id": "q2", + "layout": "client_not_signed", + "textKey1": "no_consent_entered", + "textKey2": "no_consent_note", + "question": "coach_code_request", + "hint": "coach_code" + }, + { + "id": "q28", + "layout": "radio_question", + "question": "accommodation", + "options": [ + { "key": "steinstrasse", + "nextQuestionId": "last_page"}, + { "key": "doerfle", + "nextQuestionId": "last_page"}, + { "key": "zoll_emmishofer", + "nextQuestionId": "last_page"}, + { "key": "other", + "nextQuestionId": "q4"} + ] + }, + { + "id": "q4", + "layout": "string_spinner", + "question": "other_accommodation", + "options": ["Unterkunft 1", "Unterkunft 2", "Unterkunft 3"] + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + }, + { + "id": "q6", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + { + "id": "q29", + "layout": "radio_question", + "question": "accommodation", + "options": [ + { "key": "steinstrasse", + "nextQuestionId": "q9"}, + { "key": "doerfle", + "nextQuestionId": "q9"}, + { "key": "zoll_emmishofer", + "nextQuestionId": "q9"}, + { "key": "other", + "nextQuestionId": "q8"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + { + "id": "q8", + "layout": "string_spinner", + "question": "other_accommodation", + "options": ["Unterkunft 1", "Unterkunft 2", "Unterkunft 3"] + }, + { + "id": "q9", + "layout": "value_spinner", + "question": "age", + "range": { + "min": 18, + "max": 122 + } + }, + { + "id": "q10", + "layout": "radio_question", + "question": "gender", + "options": [ + { "key": "gender_male"}, + { "key": "gender_female"}, + { "key": "gender_diverse"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + { + "id": "q11", + "layout": "string_spinner", + "question": "country_of_origin" + }, + { + "id": "q13", + "layout": "date_spinner", + "question": "departure_country" + }, + { + "id": "q14", + "layout": "date_spinner", + "question": "since_in_germany", + "constraints": { + "notBefore": "departure_country" + } + }, + { + "id": "q16", + "layout": "radio_question", + "question": "living_situation", + "options": [ + { "key": "alone", + "nextQuestionId": "q18"}, + { "key": "with_family", + "nextQuestionId": "q17"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + { + "id": "q17", + "layout": "value_spinner", + "question": "number_family_members", + "range": { + "min": 1, + "max": 15 + } + }, + { + "id": "q18", + "layout": "multi_check_box_question", + "question": "languages_spoken", + "options": [ + { "key": "language_albanian" }, + { "key": "language_pashto" }, + { "key": "language_russian" }, + { "key": "language_serbo" }, + { "key": "language_somali" }, + { "key": "language_tamil" }, + { "key": "language_tigrinya" }, + { "key": "language_turkish" }, + { "key": "language_ukrainian" }, + { "key": "language_urdu" }, + { "key": "language_arabic" }, + { "key": "language_dari_farsi" }, + { "key": "language_chinese" }, + { "key": "language_english" }, + { "key": "language_macedonian" }, + { "key": "language_kurmanji" }, + { "key": "language_hindi" }, + { "key": "language_french"}, + { "key": "language_other"} + ], + "pointsMap": { + "language_albanian": 0, + "language_pashto": 0, + "language_russian": 0, + "language_serbo": 0, + "language_somali": 0, + "language_tamil": 0, + "language_tigrinya": 0, + "language_turkish": 0, + "language_ukrainian": 0, + "language_urdu": 0, + "language_arabic": 0, + "language_dari_farsi": 0, + "language_chinese": 0, + "language_english": 0, + "language_macedonian": 0, + "language_kurmanji": 0, + "language_hindi": 0, + "language_french": 0, + "language_other": 0 + }, + "minSelection": 1 + }, + { + "id": "q19", + "layout": "radio_question", + "question": "german_skills", + "options": [ + { "key": "skill_none"}, + { "key": "skill_basic"}, + { "key": "skill_a1"}, + { "key": "skill_a2"}, + { "key": "skill_b1"}, + { "key": "skill_b2"}, + { "key": "skill_c1"}, + { "key": "skill_c2"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + { + "id": "q30", + "layout": "value_spinner", + "question": "school_years_total", + "range": { + "min": 0, + "max": 15 + }, + "options": [ + { "value": 0, "nextQuestionId": "q23" } + ] + }, + + { + "id": "q20", + "layout": "value_spinner", + "question": "school_years_origin", + "range": { + "min": 0, + "max": 15 + } + }, + { + "id": "q21", + "layout": "value_spinner", + "question": "school_years_transit", + "range": { + "min": 0, + "max": 15 + } + }, + { + "id": "q22", + "layout": "value_spinner", + "question": "school_years_germany", + "range": { + "min": 0, + "max": 15 + } + }, + { + "id": "q23", + "layout": "radio_question", + "question": "vocational_training", + "options": [ + { "key": "answer_no"}, + { "key": "answer_started"}, + { "key": "answer_completed"} + ], + "pointsMap": { + "consent_signed": 0, + "consent_not_signed": 0 + } + }, + { + "id": "q24", + "layout": "date_spinner", + "question": "provisional_accommodation_since", + "constraints": { + "notBefore": "since_in_germany" + } + }, + { + "id": "q25", + "layout": "date_spinner", + "question": "asylum_procedure_since", + "constraints": { + "notBefore": "since_in_germany" + } + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} diff --git a/app/src/main/assets/questionnaire_2_rhs.json b/app/src/main/assets/questionnaire_2_rhs.json new file mode 100644 index 0000000..511610c --- /dev/null +++ b/app/src/main/assets/questionnaire_2_rhs.json @@ -0,0 +1,137 @@ +{ + "meta": { + "id": "questionnaire_2_rhs" + }, + "questions": [ + { + "id": "q0", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + { + "id": "q3", + "layout": "glass_scale_question", + "question": "glass_explanation", + "symptoms": [ + "q1_symptom", + "q2_symptom", + "q3_symptom", + "q4_symptom", + "q5_symptom", + "q6_symptom", + "q7_symptom", + "q8_symptom", + "q9_symptom" + ] + }, + { + "id": "q4", + "layout": "glass_scale_question", + "question": "how_strong_past_month", + "symptoms": [ + "q10_reexperience_trauma", + "q11_physical_reaction", + "q12_emotional_numbness", + "q13_easily_startled" + ] + }, + { + "id": "q5", + "layout": "radio_question", + "textKey": "resilience_reflection_prompt", + "question": "q14_intro", + "options": [ + { "key": "resilience_fully_capable" }, + { "key": "resilience_mostly_capable" }, + { "key": "resilience_some_capable_some_not" }, + { "key": "resilience_mostly_not_capable" }, + { "key": "resilience_not_capable" } + ], + "pointsMap": { + "resilience_fully_capable": 0, + "resilience_mostly_capable": 1, + "resilience_some_capable_some_not": 2, + "resilience_mostly_not_capable": 3, + "resilience_not_capable": 4 + } + }, + { + "id": "q6", + "layout": "value_spinner", + "question": "pain_rating_instruction", + "range": { + "min": 0, + "max": 10 + } + }, + { + "id": "q7", + "layout": "radio_question", + "question": "violence_question_1", + "options": [ + { "key": "no", + "nextQuestionId": "q10"}, + { "key": "yes" } + ] + }, + { + "id": "q8", + "layout": "radio_question", + "question": "times_happend", + "options": [ + { "key": "once" }, + { "key": "multiple_times" } + ] + }, + { + "id": "q9", + "layout": "value_spinner", + "question": "age_at_incident", + "range": { + "min": 1, + "max": 122 + } + }, + { + "id": "q10", + "layout": "radio_question", + "question": "conflict_since_arrival", + "options": [ + { "key": "no", + "nextQuestionId": "last_page"}, + { "key": "yes" } + ] + }, + { + "id": "q11", + "layout": "radio_question", + "question": "times_happend", + "options": [ + { "key": "once" }, + { "key": "multiple_times" } + ] + }, + { + "id": "q12", + "layout": "value_spinner", + "question": "age_at_incident", + "range": { + "min": 1, + "max": 122 + } + }, + { + "id": "q25", + "layout": "date_spinner", + "question": "asylum_procedure_since" + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} diff --git a/app/src/main/assets/questionnaire_3_integration_index.json b/app/src/main/assets/questionnaire_3_integration_index.json new file mode 100644 index 0000000..a0498ab --- /dev/null +++ b/app/src/main/assets/questionnaire_3_integration_index.json @@ -0,0 +1,255 @@ +{ + "meta": { + "id": "questionnaire_3_integration_index" + }, + "questions": [ + { + "id": "q0", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + { + "id": "q1", + "layout": "radio_question", + "textKey": "intro_life_in_germany", + "question": "feeling_connected_to_germany_question", + "options": [ + { "key": "very_connected" }, + { "key": "quite_connected" }, + { "key": "moderately_connected" }, + { "key": "somewhat_loose" }, + { "key": "not_connected_at_all" } + ], + "pointsMap": { + "very_connected": 3, + "quite_connected": 4, + "moderately_connected": 5, + "somewhat_loose": 1, + "not_connected_at_all": 2 + } + }, + { + "id": "q2", + "layout": "radio_question", + "question": "understanding_political_issues", + "options": [ + { "key": "very_good" }, + { "key": "good" }, + { "key": "fairly_good" }, + { "key": "somewhat" }, + { "key": "not_at_all" } + ], + "pointsMap": { + "very_good": 1, + "good": 2, + "fairly_good": 3, + "somewhat": 4, + "not_at_all": 5 + } + }, + { + "id": "q3", + "layout": "radio_question", + "question": "unexpected_expense_question", + "options": [ + { "key": "expense_50" }, + { "key": "expense_100" }, + { "key": "expense_300" }, + { "key": "expense_500" }, + { "key": "expense_800" } + ], + "pointsMap": { + "expense_50": 1, + "expense_100": 2, + "expense_300": 3, + "expense_500": 4, + "expense_800": 5 + } + }, + { + "id": "q4", + "layout": "radio_question", + "question": "dining_with_germans_question", + "options": [ + { "key": "never" }, + { "key": "once_a_year" }, + { "key": "once_a_month" }, + { "key": "once_a_week" }, + { "key": "almost_every_day" } + ], + "pointsMap": { + "never": 1, + "once_a_year": 2, + "once_a_month": 3, + "once_a_week": 4, + "almost_every_day": 5 + } + }, + { + "id": "q5", + "layout": "radio_question", + "question": "reading_german_articles_question", + "options": [ + { "key": "very_good" }, + { "key": "good" }, + { "key": "moderately_good" }, + { "key": "not_good" }, + { "key": "not_at_all" } + ], + "pointsMap": { + "very_good": 1, + "good": 2, + "moderately_good": 3, + "not_good": 4, + "not_at_all": 5 + } + }, + { + "id": "q6", + "layout": "radio_question", + "question": "visiting_doctor_question", + "options": [ + { "key": "very_difficult" }, + { "key": "rather_difficult" }, + { "key": "neither_nor" }, + { "key": "rather_easy" }, + { "key": "very_easy" } + ], + "pointsMap": { + "very_difficult": 1, + "rather_difficult": 2, + "neither_nor": 3, + "rather_easy": 4, + "very_easy": 5 + } + }, + { + "id": "q7", + "layout": "radio_question", + "question": "feeling_as_outsider_question", + "options": [ + { "key": "never" }, + { "key": "rarely" }, + { "key": "sometimes" }, + { "key": "often" }, + { "key": "always" } + ], + "pointsMap": { + "never": 1, + "rarely": 2, + "sometimes": 3, + "often": 4, + "always": 5 + } + }, + { + "id": "q8", + "layout": "radio_question", + "question": "recent_occupation_question", + "options": [ + { "key": "employed" }, + { "key": "education" }, + { "key": "internship" }, + { "key": "unemployed_searching" }, + { "key": "unemployed_not_searching" }, + { "key": "sick_or_disabled" }, + { "key": "unpaid_housework" }, + { "key": "other_activity" } + ], + "pointsMap": { + "employed": 1, + "education": 2, + "internship": 3, + "unemployed_searching": 4, + "unemployed_not_searching": 8, + "sick_or_disabled": 5, + "unpaid_housework": 6, + "other_activity": 7 + } + }, + { + "id": "q9", + "layout": "radio_question", + "question": "discussing_politics_question", + "options": [ + { "key": "never" }, + { "key": "once_a_year" }, + { "key": "once_a_month" }, + { "key": "once_a_week" }, + { "key": "almost_every_day" } + ], + "pointsMap": { + "never": 1, + "once_a_year": 2, + "once_a_month": 3, + "once_a_week": 4, + "almost_every_day": 5 + } + }, + { + "id": "q10", + "layout": "radio_question", + "question": "contact_with_germans_question", + "options": [ + { "key": "zero" }, + { "key": "one_to_three" }, + { "key": "three_to_six" }, + { "key": "seven_to_fourteen" }, + { "key": "fifteen_or_more" } + ], + "pointsMap": { + "zero": 1, + "one_to_three": 2, + "three_to_six": 3, + "seven_to_fourteen": 4, + "fifteen_or_more": 5 + } + }, + { + "id": "q11", + "layout": "radio_question", + "question": "speaking_german_opinion_question", + "options": [ + { "key": "very_good" }, + { "key": "good" }, + { "key": "moderately_good" }, + { "key": "not_good" }, + { "key": "not_at_all" } + ], + "pointsMap": { + "very_good": 1, + "good": 2, + "moderately_good": 3, + "not_good": 4, + "not_at_all": 5 + } + }, + { + "id": "q12", + "layout": "radio_question", + "question": "job_search_question", + "options": [ + { "key": "very_difficult" }, + { "key": "rather_difficult" }, + { "key": "neither_nor" }, + { "key": "rather_easy" }, + { "key": "very_easy" } + ], + "pointsMap": { + "very_difficult": 1, + "rather_difficult": 2, + "neither_nor": 3, + "rather_easy": 4, + "very_easy": 5 + } + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} diff --git a/app/src/main/assets/questionnaire_4_consultation_results.json b/app/src/main/assets/questionnaire_4_consultation_results.json new file mode 100644 index 0000000..b8a32aa --- /dev/null +++ b/app/src/main/assets/questionnaire_4_consultation_results.json @@ -0,0 +1,182 @@ +{ + "meta": { + "id": "questionnaire_4_consultation_results" + }, + "questions": [ + { + "id": "q0", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + { + "id": "q1", + "layout": "date_spinner", + "question": "date_consultation_health_interview_result" + }, + { + "id": "q2", + "layout": "radio_question", + "question": "consultation_decision", + "options": [ + { + "key": "green", + "nextQuestionId": "q3"}, + {"key": "yellow", + "nextQuestionId": "q4"}, + { "key": "red", + "nextQuestionId": "q9"} + ], + "pointsMap": { + "green": 0, + "yellow": 0, + "red": 0 + } + }, + { + "id": "q3", + "layout": "radio_question", + "question": "consent_conversation_in_6_months", + "options": [ + { "key": "yes", + "nextQuestionId": "last_page"}, + { "key": "no", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "q4", + "layout": "radio_question", + "question": "participation_in_coaching", + "options": [ + {"key": "yes", + "nextQuestionId": "q5"}, + {"key": "no", + "nextQuestionId": "q6"}, + {"key": "time_to_think_about_it", + "nextQuestionId": "q7"} + ], + "pointsMap": { + "yes": 0, + "no": 0, + "time_to_think_about_it": 0 + } + }, + { + "id": "q5", + "layout": "radio_question", + "question": "consent_coaching_given", + "options": [ + {"key": "consent_yes", + "nextQuestionId": "q3"}, + {"key": "consent_no", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "consent_yes": 0, + "consent_no": 0 + } + }, + { + "id": "q6", + "layout": "radio_question", + "question": "consent_conversation_in_6_months", + "options": [ + { "key": "yes", + "nextQuestionId": "last_page"}, + { "key": "no", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "q7", + "layout": "date_spinner", + "question": "decision_after_reflection_period" + }, + { + "id": "q8", + "layout": "radio_question", + "question": "consent_conversation_in_6_months", + "options": [ + { "key": "yes", + "nextQuestionId": "last_page"}, + { "key": "no", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "q9", + "layout": "radio_question", + "question": "professional_referral", + "options": [ + { "key": "yes"}, + { "key": "no"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "q10", + "layout": "radio_question", + "question": "confidentiality_agreement" , + "options": [ + { "key": "available_yes"}, + { "key": "available_no", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "q11", + "layout": "radio_question", + "question": "health_insurance_card", + "options": [ + { "key": "yes"}, + { "key": "no"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "q12", + "layout": "radio_question", + "question": "consent_conversation_in_6_months", + "options": [ + { "key": "yes", + "nextQuestionId": "last_page"}, + { "key": "no", + "nextQuestionId": "last_page"} + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} \ No newline at end of file diff --git a/app/src/main/assets/questionnaire_5_final_interview.json b/app/src/main/assets/questionnaire_5_final_interview.json new file mode 100644 index 0000000..e017b65 --- /dev/null +++ b/app/src/main/assets/questionnaire_5_final_interview.json @@ -0,0 +1,84 @@ +{ + "meta": { + "id": "questionnaire_5_final_interview" + }, + "questions": [ + { + "id": "q0", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + { + "id": "q1", + "layout": "radio_question", + "question": "consent_followup_6_months", + "options": [ + { "key": "yes" }, + { "key": "no" } + ] + }, + { + "id": "q2", + "layout": "date_spinner", + "question": "date_final_interview" + }, + { + "id": "q3", + "layout": "value_spinner", + "question": "amount_nat_appointments", + "range": { + "min": 0, + "max": 20 + } + }, + { + "id": "q4", + "layout": "value_spinner", + "question": "amount_session_flowers", + "range": { + "min": 0, + "max": 20 + } + }, + { + "id": "q5", + "layout": "value_spinner", + "question": "amount_session_stones", + "range": { + "min": 0, + "max": 20 + } + }, + { + "id": "q6", + "layout": "radio_question", + "question": "termination_nat_coaching", + "options": [ + {"key": "termination_nat_regular", + "nextQuestionId": "last_page"}, + {"key": "termination_nat_referral", + "nextQuestionId": "last_page"}, + {"key": "termination_nat_dropout", + "nextQuestionId": "q7"} + ] + }, + { + "id": "q7", + "layout": "radio_question", + "question": "client_canceled_NAT", + "options": [ + {"key": "after_meeting"}, + {"key": "without_giving_reasons"}, + {"key": "with_reasons_given"} + ] + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} diff --git a/app/src/main/assets/questionnaire_6_follow_up_survey.json b/app/src/main/assets/questionnaire_6_follow_up_survey.json new file mode 100644 index 0000000..8680a7e --- /dev/null +++ b/app/src/main/assets/questionnaire_6_follow_up_survey.json @@ -0,0 +1,349 @@ +{ + "meta": { + "id": "questionnaire_6_follow_up_survey" + }, + "questions": [ + { + "id": "q0", + "layout": "client_coach_code_question", + "question": "client_code_entry_question", + "hint1": "client_code", + "hint2": "coach_code" + }, + { + "id": "q1", + "layout": "radio_question", + "question": "follow_up", + "options": [ + { + "key": "follow_up_completed", + "nextQuestionId": "q2" + }, + { + "key": "follow_up_failed_contact", + "nextQuestionId": "last_page" + }, + { + "key": "follow_up_consent_withdrawn", + "nextQuestionId": "last_page" + } + ], + "pointsMap": { + "follow_up_completed": 0, + "follow_up_failed_contact": 0, + "follow_up_consent_withdrawn": 0 + } + }, + { + "id": "q2", + "layout": "radio_question", + "question": "special_burden_question", + "options": [ + { "key": "yes" }, + { "key": "no" } + ], + "pointsMap": { + "yes": 0, + "no": 0 + } + }, + + { + "id": "q3", + "layout": "glass_scale_question", + "question": "glass_explanation", + "symptoms": [ + "q1_symptom", + "q2_symptom", + "q3_symptom", + "q4_symptom", + "q5_symptom", + "q6_symptom", + "q7_symptom", + "q8_symptom", + "q9_symptom" + ] + }, + { + "id": "q4", + "layout": "glass_scale_question", + "question": "how_strong_past_month", + "symptoms": [ + "q10_reexperience_trauma", + "q11_physical_reaction", + "q12_emotional_numbness", + "q13_easily_startled" + ] + }, + { + "id": "q5", + "layout": "radio_question", + "textKey": "resilience_reflection_prompt", + "question": "q14_intro", + "options": [ + { "key": "resilience_fully_capable" }, + { "key": "resilience_mostly_capable" }, + { "key": "resilience_some_capable_some_not" }, + { "key": "resilience_mostly_not_capable" }, + { "key": "resilience_not_capable" } + ], + "pointsMap": { + "resilience_fully_capable": 0, + "resilience_mostly_capable": 0, + "resilience_some_capable_some_not": 0, + "resilience_mostly_not_capable": 0, + "resilience_not_capable": 0 + } + }, + { + "id": "q6", + "layout": "value_spinner", + "question": "pain_rating_instruction", + "range": { + "min": 0, + "max": 10 + } + }, + { + "id": "q7", + "layout": "radio_question", + "textKey": "intro_life_in_germany", + "question": "feeling_connected_to_germany_question", + "options": [ + { "key": "very_connected" }, + { "key": "quite_connected" }, + { "key": "moderately_connected" }, + { "key": "somewhat_loose" }, + { "key": "not_connected_at_all" } + ], + "pointsMap": { + "very_connected": 0, + "quite_connected": 0, + "moderately_connected": 0, + "somewhat_loose": 0, + "not_connected_at_all": 0 + } + }, + { + "id": "q8", + "layout": "radio_question", + "question": "understanding_political_issues", + "options": [ + { "key": "very_good" }, + { "key": "good" }, + { "key": "fairly_good" }, + { "key": "somewhat" }, + { "key": "not_at_all" } + ], + "pointsMap": { + "very_good": 0, + "good": 0, + "fairly_good": 0, + "somewhat": 0, + "not_at_all": 0 + } + }, + { + "id": "q9", + "layout": "radio_question", + "question": "unexpected_expense_question", + "options": [ + { "key": "expense_50" }, + { "key": "expense_100" }, + { "key": "expense_300" }, + { "key": "expense_500" }, + { "key": "expense_800" } + ], + "pointsMap": { + "expense_50": 0, + "expense_100": 0, + "expense_300": 0, + "expense_500": 0, + "expense_800": 0 + } + }, + { + "id": "q10", + "layout": "radio_question", + "question": "dining_with_germans_question", + "options": [ + { "key": "never" }, + { "key": "once_a_year" }, + { "key": "once_a_month" }, + { "key": "once_a_week" }, + { "key": "almost_every_day" } + ], + "pointsMap": { + "never": 0, + "once_a_year": 0, + "once_a_month": 0, + "once_a_week": 0, + "almost_every_day": 0 + } + }, + { + "id": "q11", + "layout": "radio_question", + "question": "reading_german_articles_question", + "options": [ + { "key": "very_good" }, + { "key": "good" }, + { "key": "moderately_good" }, + { "key": "not_good" }, + { "key": "not_at_all" } + ], + "pointsMap": { + "very_good": 0, + "good": 0, + "moderately_good": 0, + "not_good": 0, + "not_at_all": 0 + } + }, + { + "id": "q12", + "layout": "radio_question", + "question": "visiting_doctor_question", + "options": [ + { "key": "very_difficult" }, + { "key": "rather_difficult" }, + { "key": "neither_nor" }, + { "key": "rather_easy" }, + { "key": "very_easy" } + ], + "pointsMap": { + "very_difficult": 0, + "rather_difficult": 0, + "neither_nor": 0, + "rather_easy": 0, + "very_easy": 0 + } + }, + { + "id": "q13", + "layout": "radio_question", + "question": "feeling_as_outsider_question", + "options": [ + { "key": "never" }, + { "key": "rarely" }, + { "key": "sometimes" }, + { "key": "often" }, + { "key": "always" } + ], + "pointsMap": { + "never": 0, + "rarely": 0, + "sometimes": 0, + "often": 0, + "always": 0 + } + }, + { + "id": "q14", + "layout": "radio_question", + "question": "recent_occupation_question", + "options": [ + { "key": "employed" }, + { "key": "education" }, + { "key": "internship" }, + { "key": "unemployed_searching" }, + { "key": "unemployed_not_searching" }, + { "key": "sick_or_disabled" }, + { "key": "unpaid_housework" }, + { "key": "other_activity" } + ], + "pointsMap": { + "employed": 0, + "education": 0, + "internship": 0, + "unemployed_searching": 0, + "unemployed_not_searching": 0, + "sick_or_disabled": 0, + "unpaid_housework": 0, + "other_activity": 0 + } + }, + { + "id": "q15", + "layout": "radio_question", + "question": "discussing_politics_question", + "options": [ + { "key": "never" }, + { "key": "once_a_year" }, + { "key": "once_a_month" }, + { "key": "once_a_week" }, + { "key": "almost_every_day" } + ], + "pointsMap": { + "never": 0, + "once_a_year": 0, + "once_a_month": 0, + "once_a_week": 0, + "almost_every_day": 0 + } + }, + { + "id": "q16", + "layout": "radio_question", + "question": "contact_with_germans_question", + "options": [ + { "key": "zero" }, + { "key": "one_to_three" }, + { "key": "three_to_six" }, + { "key": "seven_to_fourteen" }, + { "key": "fifteen_or_more" } + ], + "pointsMap": { + "zero": 0, + "one_to_three": 0, + "three_to_six": 0, + "seven_to_fourteen": 0, + "fifteen_or_more": 0 + } + }, + { + "id": "q17", + "layout": "radio_question", + "question": "speaking_german_opinion_question", + "options": [ + { "key": "very_good" }, + { "key": "good" }, + { "key": "fairly_good" }, + { "key": "not_good" }, + { "key": "not_at_all" } + ], + "pointsMap": { + "very_good": 0, + "good": 0, + "fairly_good": 0, + "not_good": 0, + "not_at_all": 0 + } + }, + { + "id": "q18", + "layout": "radio_question", + "question": "job_search_question", + "options": [ + { "key": "very_difficult" }, + { "key": "rather_difficult" }, + { "key": "neither_nor" }, + { "key": "rather_easy" }, + { "key": "very_easy" } + ], + "pointsMap": { + "very_difficult": 0, + "rather_difficult": 0, + "neither_nor": 0, + "rather_easy": 0, + "very_easy": 0 + } + }, + { + "id": "last_page", + "layout": "last_page", + "textKey": "finish_data_entry", + "question": "data_final_warning" + } + ] +} diff --git a/app/src/main/assets/questionnaire_order.json b/app/src/main/assets/questionnaire_order.json new file mode 100644 index 0000000..eac5793 --- /dev/null +++ b/app/src/main/assets/questionnaire_order.json @@ -0,0 +1,26 @@ +[ + { + "file": "questionnaire_1_demographic_information.json" + }, + { + "file": "questionnaire_2_rhs.json" + }, + { + "file": "questionnaire_3_integration_index.json" + }, + { + "file": "questionnaire_4_consultation_results.json" + }, + { + "file": "questionnaire_5_final_interview.json", + "condition": { + "questionnaire": "questionnaire_4_consultation_results", + "questionId": "consultation_decision", + "operator": "==", + "value": "yellow" + } + }, + { + "file": "questionnaire_6_follow_up_survey.json" + } +] diff --git a/app/src/main/java/com/dano/test1/AppDatabase.kt b/app/src/main/java/com/dano/test1/AppDatabase.kt new file mode 100644 index 0000000..2cbc0ee --- /dev/null +++ b/app/src/main/java/com/dano/test1/AppDatabase.kt @@ -0,0 +1,22 @@ +package com.dano.test1.data + +import androidx.room.Database +import androidx.room.RoomDatabase + +@Database( + entities = [ + Client::class, + Questionnaire::class, + Question::class, + Answer::class, + CompletedQuestionnaire::class + ], + version = 10 +) +abstract class AppDatabase : RoomDatabase() { + abstract fun clientDao(): ClientDao + abstract fun questionnaireDao(): QuestionnaireDao + abstract fun questionDao(): QuestionDao + abstract fun answerDao(): AnswerDao + abstract fun completedQuestionnaireDao(): CompletedQuestionnaireDao +} diff --git a/app/src/main/java/com/dano/test1/CountriesSpinner.kt b/app/src/main/java/com/dano/test1/CountriesSpinner.kt new file mode 100644 index 0000000..439d171 --- /dev/null +++ b/app/src/main/java/com/dano/test1/CountriesSpinner.kt @@ -0,0 +1,50 @@ +package com.dano.test1 + +object Countries { + fun getAllCountries(languageID: String): List { + val prompt = LanguageManager.getText(languageID, "choose_answer") + val countries = listOf( + "Afghanistan", "Albanien", "Algerien", "Andorra", "Angola", + "Antigua und Barbuda", "Argentinien", "Armenien", "Australien", + "Österreich", "Aserbaidschan", "Bahamas", "Bahrain", "Bangladesch", + "Barbados", "Belgien", "Belize", "Benin", "Bhutan", "Bolivien", + "Bosnien und Herzegowina", "Botswana", "Brasilien", "Brunei", + "Bulgarien", "Burkina Faso", "Burundi", "Cabo Verde", "Cambodia", + "Kamerun", "Kanada", "Zentralafrikanische Republik", "Tschad", + "Chile", "China", "Kolumbien", "Komoren", "Kongo (Dem. Rep.)", + "Kongo (Rep.)", "Costa Rica", "Kroatien", "Kuba", "Zypern", + "Tschechien", "Dänemark", "Djibouti", "Dominica", + "Dominikanische Republik", "Ecuador", "Ägypten", "El Salvador", + "Äquatorialguinea", "Eritrea", "Estland", "Eswatini", "Äthiopien", + "Fiji", "Finnland", "Frankreich", "Gabon", "Gambia", "Georgien", + "Deutschland", "Ghana", "Griechenland", "Grenada", "Guatemala", + "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Ungarn", + "Island", "Indien", "Indonesien", "Irak", "Iran", "Irland", + "Israel", "Italien", "Jamaika", "Japan", "Jordanien", "Kasachstan", + "Kenia", "Kiribati", "Korea (Nord)", "Korea (Süd)", "Kuwait", + "Kyrgyzstan", "Laos", "Lesotho", "Latvia", "Lebanon", "Liberia", + "Libyen", "Liechtenstein", "Litauen", "Luxemburg", "Madagaskar", + "Malawi", "Malaysia", "Maldiven", "Mali", "Malta", "Marokko", + "Marshallinseln", "Mauritius", "Mauritanien", "Mexiko", "Mikronesien", + "Moldawien", "Monaco", "Mongolei", "Montenegro", "Mozambique", + "Namibia", "Nauru", "Nepal", "Nicaragua", "Niger", "Nigeria", + "Nordmazedonien", "Norwegen", "Oman", "Pakistan", "Palau", "Panama", + "Papua-Neuguinea", "Paraguay", "Peru", "Philippinen", "Polen", + "Portugal", "Ruanda", "Rumänien", "Russland", "Salomonen", "Sambia", + "Samoa", "San Marino", "Sao Tome und Principe", "Saudi-Arabien", + "Senegal", "Serbien", "Seychellen", "Sierra Leone", "Singapur", + "Slowakei", "Slowenien", "Solomonen", "Südafrika", "Südkorea", + "Südsudan", "Spanien", "Sri Lanka", "St. Kitts und Nevis", + "St. Lucia", "St. Vincent und die Grenadinen", "Sudan", "Suriname", + "Syrien", "São Tomé und Príncipe", "Schweden", "Schweiz", "Simbabwe", + "Tadschikistan", "Taiwan", "Tansania", "Togo", "Trinidad und Tobago", + "Tonga", "Tunisien", "Türkei", "Turkmenistan", "Tuvalu", "Uganda", + "Ukraine", "Uruguay", "Usbekistan", "Vanuatu", "Venezuela", + "Vereinigte Arabische Emirate", "Vereinigte Staaten", + "Vereinigtes Königreich", "Vietnam", "Wallis und Futuna", + "Westjordanland", "Westsahara", "Yemen", "Zentralafrika", "Zypern", + "Zimbabwe" + ) + return listOf(prompt) + countries + } +} diff --git a/app/src/main/java/com/dano/test1/Daos.kt b/app/src/main/java/com/dano/test1/Daos.kt new file mode 100644 index 0000000..369e488 --- /dev/null +++ b/app/src/main/java/com/dano/test1/Daos.kt @@ -0,0 +1,88 @@ +package com.dano.test1.data + +import androidx.room.* + +@Dao +interface ClientDao { + @Insert(onConflict = OnConflictStrategy.IGNORE) + suspend fun insertClient(client: Client) + + @Query("SELECT * FROM clients WHERE clientCode = :code LIMIT 1") + suspend fun getClientByCode(code: String): Client? + + //@Query("SELECT * FROM clients") + //suspend fun getAllClients(): List + + @Delete + suspend fun deleteClient(client: Client) +} + +@Dao +interface QuestionnaireDao { + @Insert(onConflict = OnConflictStrategy.IGNORE) + suspend fun insertQuestionnaire(questionnaire: Questionnaire) + + @Query("SELECT * FROM questionnaires WHERE id = :id LIMIT 1") + suspend fun getById(id: String): Questionnaire? + + //@Query("SELECT * FROM questionnaires") + //suspend fun getAllQuestionnaires(): List +} + + +@Dao +interface QuestionDao { + @Insert(onConflict = OnConflictStrategy.IGNORE) + suspend fun insertQuestions(questions: List) + + @Insert(onConflict = OnConflictStrategy.IGNORE) + suspend fun insertQuestion(question: Question) + + @Query("SELECT * FROM questions WHERE questionId = :id LIMIT 1") + suspend fun getById(id: String): Question? + + @Query("SELECT * FROM questions WHERE questionnaireId = :questionnaireId") + suspend fun getQuestionsForQuestionnaire(questionnaireId: String): List + + //@Query("SELECT * FROM questions") + //suspend fun getAllQuestions(): List // <-- HIER NEU +} + + + +@Dao +interface AnswerDao { + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertAnswers(answers: List) + + @Query(""" + SELECT a.* FROM answers a + INNER JOIN questions q ON a.questionId = q.questionId + WHERE a.clientCode = :clientCode AND q.questionnaireId = :questionnaireId + """) + suspend fun getAnswersForClientAndQuestionnaire( + clientCode: String, + questionnaireId: String + ): List + + @Query("SELECT * FROM answers WHERE clientCode = :clientCode") + suspend fun getAnswersForClient(clientCode: String): List + +} + +@Dao +interface CompletedQuestionnaireDao { + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insert(entry: CompletedQuestionnaire) + + @Query("SELECT * FROM completed_questionnaires WHERE clientCode = :clientCode AND questionnaireId = :questionnaireId LIMIT 1") + suspend fun getStatus(clientCode: String, questionnaireId: String): CompletedQuestionnaire? + + @Query("SELECT * FROM completed_questionnaires WHERE clientCode = :clientCode") + suspend fun getAllForClient(clientCode: String): List + + @Query("SELECT questionnaireId FROM completed_questionnaires WHERE clientCode = :clientCode") + suspend fun getCompletedQuestionnairesForClient(clientCode: String): List +} + + diff --git a/app/src/main/java/com/dano/test1/Entities.kt b/app/src/main/java/com/dano/test1/Entities.kt new file mode 100644 index 0000000..7aeebd5 --- /dev/null +++ b/app/src/main/java/com/dano/test1/Entities.kt @@ -0,0 +1,84 @@ +package com.dano.test1.data + +import androidx.room.* + +@Entity(tableName = "clients") +data class Client( + @PrimaryKey val clientCode: String, +) + +@Entity(tableName = "questionnaires") +data class Questionnaire( + @PrimaryKey val id: String, +) + +@Entity( + tableName = "questions", + foreignKeys = [ + ForeignKey( + entity = Questionnaire::class, + parentColumns = ["id"], + childColumns = ["questionnaireId"], + onDelete = ForeignKey.CASCADE + ) + ], + indices = [Index("questionnaireId")] +) +data class Question( + @PrimaryKey val questionId: String, + val questionnaireId: String, + val question: String = "" +) + +@Entity( + tableName = "answers", + primaryKeys = ["clientCode", "questionId"], + foreignKeys = [ + ForeignKey( + entity = Client::class, + parentColumns = ["clientCode"], + childColumns = ["clientCode"], + onDelete = ForeignKey.CASCADE + ), + ForeignKey( + entity = Question::class, + parentColumns = ["questionId"], + childColumns = ["questionId"], + onDelete = ForeignKey.CASCADE + ) + ], + indices = [Index("clientCode"), Index("questionId")] +) +data class Answer( + val clientCode: String, + val questionId: String, + val answerValue: String = "" +) + +@Entity( + tableName = "completed_questionnaires", + primaryKeys = ["clientCode", "questionnaireId"], + foreignKeys = [ + ForeignKey( + entity = Client::class, + parentColumns = ["clientCode"], + childColumns = ["clientCode"], + onDelete = ForeignKey.CASCADE + ), + ForeignKey( + entity = Questionnaire::class, + parentColumns = ["id"], + childColumns = ["questionnaireId"], + onDelete = ForeignKey.CASCADE + ) + ], + indices = [Index("clientCode"), Index("questionnaireId")] +) +data class CompletedQuestionnaire( + val clientCode: String, + val questionnaireId: String, + val timestamp: Long = System.currentTimeMillis(), + val isDone: Boolean, + val sumPoints: Int? = null +) + diff --git a/app/src/main/java/com/dano/test1/HandlerClientCoachCode.kt b/app/src/main/java/com/dano/test1/HandlerClientCoachCode.kt new file mode 100644 index 0000000..b179cbf --- /dev/null +++ b/app/src/main/java/com/dano/test1/HandlerClientCoachCode.kt @@ -0,0 +1,116 @@ +package com.dano.test1 + +import android.view.View +import android.widget.* +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch +import kotlinx.coroutines.withContext + +class HandlerClientCoachCode( + private val answers: MutableMap, + private val languageID: String, + private val goToNextQuestion: () -> Unit, + private val goToPreviousQuestion: () -> Unit, + private val showToast: (String) -> Unit, +) : QuestionHandler { + + private lateinit var question: QuestionItem.ClientCoachCodeQuestion + private lateinit var layout: View + + override fun bind(layout: View, question: QuestionItem) { + if (question !is QuestionItem.ClientCoachCodeQuestion) return + + this.layout = layout + this.question = question + + // Bind UI components + val clientCodeField = layout.findViewById(R.id.client_code) + val coachCodeField = layout.findViewById(R.id.coach_code) + val questionTextView = layout.findViewById(R.id.question) + + // Fill question text using language manager + questionTextView.text = question.question?.let { + LanguageManager.getText(languageID, it) + } ?: "" + + // Load last used client code if available + val lastClientCode = GlobalValues.LAST_CLIENT_CODE + if (!lastClientCode.isNullOrBlank()) { + clientCodeField.setText(lastClientCode) + clientCodeField.isEnabled = false + } else { + clientCodeField.setText(answers["client_code"] as? String ?: "") + clientCodeField.isEnabled = true + } + + // Load saved coach code + coachCodeField.setText(answers["coach_code"] as? String ?: "") + + // Set click listener for Next button + layout.findViewById