Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Auto complete widget #1398

Merged
Merged
2 changes: 0 additions & 2 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ object Dependencies {
}

const val androidJunitRunner = "androidx.test.runner.AndroidJUnitRunner"
const val flexBox = "com.google.android.flexbox:flexbox:${Versions.flexBox}"
const val junit = "junit:junit:${Versions.junit}"
const val mockitoKotlin = "org.mockito.kotlin:mockito-kotlin:${Versions.mockitoKotlin}"
const val mockitoInline = "org.mockito:mockito-inline:${Versions.mockitoInline}"
Expand Down Expand Up @@ -172,7 +171,6 @@ object Dependencies {
const val androidFhirCommon = "0.1.0-alpha03"
const val desugarJdkLibs = "1.1.5"
const val fhirUcum = "1.0.3"
const val flexBox = "3.0.0"
const val guava = "28.2-android"
const val hapiFhir = "5.4.0"
const val http = "4.9.1"
Expand Down
84 changes: 84 additions & 0 deletions catalog/src/main/assets/auto_complete_questionnaire.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"meta": {
"profile": [
"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire|2.7"
]
},
"status": "draft",
"resourceType": "Questionnaire",
"item": [
{
"type": "choice",
"code": [],
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
"valueCodeableConcept": {
"coding": [
{
"system": "http://hl7.org/fhir/questionnaire-item-control",
"code": "autocomplete",
"display": "Auto-complete"
}
],
"text": "Auto-complete"
}
}
],
"required": true,
"repeats": true,
"linkId": "1",
"text": "Do you have any existing conditions",
"answerOption": [
{
"valueCoding": {
"code": "asthma",
"display": "Asthma"
}
},
{
"valueCoding": {
"code": "copd",
"display": "Chronic Lung Disease"
}
},
{
"valueCoding": {
"code": "depression",
"display": "Depression"
}
},
{
"valueCoding": {
"code": "t2dm",
"display": "Diabetes"
}
},
{
"valueCoding": {
"code": "hypertension",
"display": "Hypertension"
}
},
{
"valueCoding": {
"code": "hypertension",
"display": "High Blood Pressure"
}
},
{
"valueCoding": {
"code": "hypercholesterolaemia",
"display": "High Cholesterol"
}
}
],
"initial": {
"valueCoding": {
"code": "asthma",
"display": "Asthma"
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,10 @@ class ComponentListViewModel(application: Application, private val state: SavedS
),
SLIDER(R.drawable.ic_slider, R.string.component_name_slider, "slider_questionnaire.json"),
IMAGE(R.drawable.ic_image, R.string.component_name_image, ""),
AUTO_COMPLETE(
R.drawable.ic_textfield,
R.string.component_name_auto_complete,
"auto_complete_questionnaire.json"
),
}
}
1 change: 1 addition & 0 deletions catalog/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<string name="component_name_slider">Slider</string>
<string name="component_name_dropdown">Dropdown</string>
<string name="component_name_image">Image</string>
<string name="component_name_auto_complete">Auto Complete</string>
<string name="layout_name_default_text">Default</string>
<string name="layout_name_paginated">Paginated</string>
<string name="layout_name_review">Review</string>
Expand Down
1 change: 0 additions & 1 deletion datacapture/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ dependencies {
implementation(Dependencies.Kotlin.stdlib)
implementation(Dependencies.Lifecycle.viewModelKtx)
implementation(Dependencies.material)
implementation(Dependencies.flexBox)
implementation(Dependencies.barcodeScanning)
implementation(Dependencies.lifecycleExtensions)
implementation(Dependencies.objectDetection)
Expand Down
Loading