Skip to content

Commit 18d0100

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-release
2 parents 3ef1357 + 7eac930 commit 18d0100

File tree

203 files changed

+71365
-871
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+71365
-871
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
// "platform": "33",
1919
// "build_tools": "33.0.1"
2020
// }
21-
}
21+
},
2222

2323
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2424
// "forwardPorts": [],
2525

2626
// Use 'postCreateCommand' to run commands after the container is created.
27-
// "postCreateCommand": "java -version",
27+
// See https://github.com/google/android-fhir/issues/2614, which is blocked by
28+
// https://github.com/akhildevelops/devcontainer-features/issues/9.
29+
"postCreateCommand": "sudo chown -R vscode:vscode /opt/android/"
2830

2931
// Configure tool-specific properties.
3032
// "customizations": {},

.github/workflows/codeql.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
- cron: "32 13 * * 2"
3030

3131
concurrency:
32-
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || || github.run_id }}
32+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref || github.run_id }}
3333
cancel-in-progress: true
3434

3535
jobs:

README.md

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,44 +7,7 @@ healthcare applications using the [HL7® FHIR® standard](https://www.hl7.org/fh
77
aims to accelerate the adoption of FHIR by making it easy to incorporate FHIR into new and existing
88
mobile applications.
99

10-
## Libraries
11-
12-
The SDK contains the following libraries:
13-
14-
| Library | Latest release | Code | Docs | Min SDK | Summary |
15-
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
16-
| Data Capture Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/data-capture/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:data-capture) | [code](https://github.com/google/android-fhir/tree/master/datacapture)| [docs](https://google.github.io/android-fhir/use/SDCL/) | Android 7.0 (API level 24) | Collect, validate, and process healthcare data on Android |
17-
| FHIR Engine Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/engine/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:engine) | [code](https://github.com/google/android-fhir/tree/master/engine) | [docs](https://google.github.io/android-fhir/use/FEL/) | Android 7.0 (API level 24) | Store and manage FHIR resources locally on Android and synchronize with FHIR server |
18-
| Workflow Library | [![Google Maven](https://badgen.net/maven/v/metadata-url/dl.google.com/dl/android/maven2/com/google/android/fhir/workflow/maven-metadata.xml)](https://maven.google.com/web/index.html?#com.google.android.fhir:workflow) | [code](https://github.com/google/android-fhir/tree/master/workflow) | [docs](https://google.github.io/android-fhir/use/WFL/) | Android 7.0 (API level 24) | Provide decision support and analytics in clinical workflow on Android including implementation of specific FHIR operations ($measure_evaluate and $apply) |
19-
20-
## Demo apps
21-
22-
This repository also contains the following demo apps:
23-
24-
| Demo app | Code | Docs |
25-
| ----------------------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------- |
26-
| FHIR Engine Demo App | [code](https://github.com/google/android-fhir/tree/master/demo) | [docs](https://google.github.io/android-fhir/use/FEL/Demo-app/) |
27-
| Structured Data Capture Catalog App | [code](https://github.com/google/android-fhir/tree/master/catalog) | [docs](https://google.github.io/android-fhir/use/SDCL/Demo-app/) |
28-
29-
**These applications are provided for demo purposes only. Do NOT use in production.**
30-
31-
## Contributing
32-
33-
The development of the SDK began as a collaborative effort between Google, [The World Health Organization](https://www.who.int/), and [Ona](https://ona.io/). Since then, a consortium of application developers have been contributing to the project.
34-
35-
To contribute to the project, please see [Contributing](https://google.github.io/android-fhir/contrib/) to get started.
36-
37-
## Feedback and getting help
38-
39-
You can create a [GitHub issue](https://github.com/google/android-fhir/issues) for bugs and feature requests.
40-
41-
In case you find any security bug, please do NOT create a GitHub issue. Instead, email us at <[email protected]>.
42-
43-
If you want to provide any feedback or discuss use cases you can:
44-
45-
* email us at <[email protected]>
46-
* start a [GitHub discussion](https://github.com/google/android-fhir/discussions)
47-
* start a new topic in [android](https://chat.fhir.org/#narrow/stream/276344-android), [questionnaire](https://chat.fhir.org/#narrow/stream/179255-questionnaire), [implementers](https://chat.fhir.org/#narrow/stream/179166-implementers), or [WHO SMART guidelines](https://chat.fhir.org/#narrow/stream/310477-who-smart-guidelines) stream in the [FHIR Zulip chat](https://chat.fhir.org/)
10+
See [documentation](https://google.github.io/android-fhir/).
4811

4912
## Disclaimer
5013

buildSrc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111
dependencies {
1212
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.22.0")
1313

14-
implementation("com.android.tools.build:gradle:8.1.4")
14+
implementation("com.android.tools.build:gradle:8.5.0")
1515

1616
implementation("app.cash.licensee:licensee-gradle-plugin:1.8.0")
1717
implementation("com.osacky.flank.gradle:fladle:0.17.4")

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ import org.gradle.api.artifacts.DependencyConstraint
1919
import org.gradle.kotlin.dsl.exclude
2020

2121
object Dependencies {
22-
object Cql {
23-
const val evaluator = "org.opencds.cqf.fhir:cqf-fhir-cr:${Versions.Cql.clinicalReasoning}"
24-
const val evaluatorFhirJackson =
25-
"org.opencds.cqf.fhir:cqf-fhir-jackson:${Versions.Cql.clinicalReasoning}"
26-
const val evaluatorFhirUtilities =
27-
"org.opencds.cqf.fhir:cqf-fhir-utility:${Versions.Cql.clinicalReasoning}"
28-
}
29-
3022
object HapiFhir {
3123
const val fhirBaseModule = "ca.uhn.hapi.fhir:hapi-fhir-base"
3224
const val fhirClientModule = "ca.uhn.hapi.fhir:hapi-fhir-client"
@@ -139,12 +131,8 @@ object Dependencies {
139131

140132
object Versions {
141133

142-
object Cql {
143-
const val clinicalReasoning = "3.0.0-PRE9-SNAPSHOT"
144-
}
145-
146134
const val androidFhirCommon = "0.1.0-alpha05-preview3-SNAPSHOT"
147-
const val androidFhirEngine = "1.0.0-preview11-SNAPSHOT"
135+
const val androidFhirEngine = "1.0.0-preview11-SNAPSHOT"
148136
const val androidFhirKnowledge = "0.1.0-alpha03-preview5-SNAPSHOT"
149137
const val apacheCommonsCompress = "1.21"
150138
const val desugarJdkLibs = "2.0.3"
@@ -194,16 +182,17 @@ object Dependencies {
194182
}
195183

196184
fun Configuration.removeIncompatibleDependencies() {
197-
exclude(module = "xpp3")
198-
exclude(module = "xpp3_min")
199-
exclude(module = "xmlpull")
185+
exclude(module = "hapi-fhir-caching-caffeine")
200186
exclude(module = "javax.json")
201187
exclude(module = "jcl-over-slf4j")
202-
exclude(group = "org.apache.httpcomponents")
203-
exclude(group = "org.antlr", module = "antlr4")
204-
exclude(group = "org.eclipse.persistence", module = "org.eclipse.persistence.moxy")
205-
exclude(module = "hapi-fhir-caching-caffeine")
188+
exclude(module = "xmlpull")
189+
exclude(module = "xpp3")
190+
exclude(module = "xpp3_min")
191+
exclude(group = "ch.qos.logback", module = "logback-classic")
206192
exclude(group = "com.github.ben-manes.caffeine", module = "caffeine")
193+
exclude(group = "org.eclipse.persistence", module = "org.eclipse.persistence.moxy")
194+
exclude(group = "org.antlr", module = "antlr4")
195+
exclude(group = "org.apache.httpcomponents")
207196
}
208197

209198
fun hapiFhirConstraints(): Map<String, DependencyConstraint.() -> Unit> {

buildSrc/src/main/kotlin/LicenseeConfig.kt

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,24 @@ fun Project.configureLicensee() {
7272
}
7373

7474
// Jakarta XML Binding API
75-
allowDependency("jakarta.xml.bind", "jakarta.xml.bind-api", "2.3.3") {
75+
allowDependency("jakarta.xml.bind", "jakarta.xml.bind-api", "4.0.1") {
7676
because("BSD 3-clause.")
7777
}
7878

7979
// Jakarta Activation API 2.1 Specification
80-
allowDependency("jakarta.activation", "jakarta.activation-api", "1.2.2") {
80+
allowDependency("jakarta.activation", "jakarta.activation-api", "2.1.2") {
8181
because(
8282
"Licensed under Eclipse Distribution License 1.0. http://www.eclipse.org/org/documents/edl-v10.php",
8383
)
8484
}
8585

86+
// Jakarta Annotation API 2.1 Specification
87+
allowDependency("jakarta.annotation", "jakarta.annotation-api", "2.1.1") {
88+
because(
89+
"Licensed under EPL 2.0",
90+
)
91+
}
92+
8693
// Javax Annotation API
8794
allowDependency("javax.annotation", "javax.annotation-api", "1.3.2") {
8895
because("Dual-licensed under CDDL 1.1 and GPL v2 with classpath exception.")
@@ -108,7 +115,7 @@ fun Project.configureLicensee() {
108115
because("BSD 3-clause. http://www.antlr.org/license.html")
109116
}
110117
// ANTLR 4
111-
allowDependency("org.antlr", "antlr4-runtime", "4.10.1") {
118+
allowDependency("org.antlr", "antlr4-runtime", "4.13.1") {
112119
because("BSD 3-clause. http://www.antlr.org/license.html")
113120
}
114121

@@ -195,6 +202,12 @@ fun Project.configureLicensee() {
195202
allowDependency("com.ibm.icu", "icu4j", "72.1") {
196203
because("BSD, part MIT and Apache 2.0. https://github.com/unicode-org/icu/blob/main/LICENSE")
197204
}
205+
206+
// Logback
207+
allowDependency("ch.qos.logback", "logback-classic", "1.4.14") { because("LGPL") }
208+
209+
// Logback
210+
allowDependency("ch.qos.logback", "logback-core", "1.4.14") { because("LGPL") }
198211
}
199212
}
200213

buildSrc/src/main/kotlin/Plugins.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ object Plugins {
4343
"com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:${Versions.kspPlugin}"
4444

4545
object Versions {
46-
const val androidGradlePlugin = "8.0.2"
46+
const val androidGradlePlugin = "8.5.0"
4747
const val benchmarkPlugin = "1.1.0"
4848
const val dokka = "1.9.20"
4949
const val kspPlugin = "1.9.22-1.0.18"

buildSrc/src/main/kotlin/Sdk.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023 Google LLC
2+
* Copyright 2023-2024 Google LLC
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,10 +15,10 @@
1515
*/
1616

1717
object Sdk {
18-
const val compileSdk = 33
19-
const val targetSdk = 31
18+
const val COMPILE_SDK = 33
19+
const val TARGET_SDK = 31
2020

2121
// Engine and SDC must support API 24.
2222
// Remove desugaring when upgrading it to 26.
23-
const val minSdk = 24
23+
const val MIN_SDK = 26
2424
}

catalog/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ configureRuler()
88

99
android {
1010
namespace = "com.google.android.fhir.catalog"
11-
compileSdk = Sdk.compileSdk
11+
compileSdk = Sdk.COMPILE_SDK
1212
defaultConfig {
1313
applicationId = Releases.Catalog.applicationId
14-
minSdk = Sdk.minSdk
15-
targetSdk = Sdk.targetSdk
14+
minSdk = Sdk.MIN_SDK
15+
targetSdk = Sdk.TARGET_SDK
1616
versionCode = Releases.Catalog.versionCode
1717
versionName = Releases.Catalog.versionName
1818
testInstrumentationRunner = Dependencies.androidJunitRunner

catalog/src/main/assets/behavior_calculated_expression.json

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,20 @@
22
"resourceType": "Questionnaire",
33
"item": [
44
{
5-
"linkId": "a-birthdate",
6-
"text": "Birth Date (select age to auto calculate if not known)",
7-
"type": "date",
8-
"extension": [
9-
{
10-
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
11-
"valueExpression": {
12-
"language": "text/fhirpath",
13-
"expression": "%resource.repeat(item).where(linkId='a-age-years' and answer.empty().not()).select(today() - answer.value)"
14-
}
15-
}
16-
]
5+
"linkId": "birthdate",
6+
"text": "Date of birth",
7+
"type": "date"
178
},
189
{
19-
"linkId": "a-age-years",
10+
"linkId": "age",
2011
"text": "Age",
21-
"type": "quantity",
12+
"type": "integer",
2213
"extension": [
2314
{
24-
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption",
25-
"valueCoding": {
26-
"system": "http://unitsofmeasure.org",
27-
"code": "years",
28-
"display": "years"
29-
}
30-
},
31-
{
32-
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption",
33-
"valueCoding": {
34-
"system": "http://unitsofmeasure.org",
35-
"code": "months",
36-
"display": "months"
37-
}
38-
}
39-
],
40-
"initial": [
41-
{
42-
"valueQuantity": {
43-
"value": 1,
44-
"unit": "months",
45-
"system": "http://unitsofmeasure.org",
46-
"code": "months"
15+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression",
16+
"valueExpression": {
17+
"language": "text/fhirpath",
18+
"expression": "%resource.repeat(item).where(linkId='birthdate' and answer.empty().not()).select(today().toString().substring(0,4).toInteger() - answer.value.toString().substring(0,4).toInteger() + iif(today().toString().substring(5,2) & today().toString().substring(8,2) > answer.value.toString().substring(5,2) & answer.value.toString().substring(8,2), 1, 0) - 1)"
4719
}
4820
}
4921
]

catalog/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<string name="component_name_initial_value">Initial Value</string>
5959
<string
6060
name="behavior_name_calculated_expression_info"
61-
>Input age to automatically calculate birthdate until birthdate is updated manually.</string>
61+
>Input date of birth to automatically calculate age until age is updated manually.</string>
6262
<string
6363
name="behavior_name_calculated_expression"
6464
>Calculated Expression</string>

codelabs/datacapture/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99

1010
defaultConfig {
1111
applicationId = "com.google.android.fhir.codelabs.datacapture"
12-
minSdk = 24
12+
minSdk = 26
1313
targetSdk = 34
1414
versionCode = 1
1515
versionName = "1.0"

codelabs/engine/app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ android {
99

1010
defaultConfig {
1111
applicationId = "com.google.android.fhir.codelabs.engine"
12-
minSdk = 24
12+
minSdk = 26
1313
targetSdk = 34
1414
versionCode = 1
1515
versionName = "1.0"

common/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ createJacocoTestReportTask()
2323

2424
android {
2525
namespace = "com.google.android.fhir.common"
26-
compileSdk = Sdk.compileSdk
27-
defaultConfig { minSdk = Sdk.minSdk }
26+
compileSdk = Sdk.COMPILE_SDK
27+
defaultConfig { minSdk = Sdk.MIN_SDK }
2828
configureJacocoTestOptions()
2929
kotlin { jvmToolchain(11) }
3030
}

contrib/barcode/build.gradle.kts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ createJacocoTestReportTask()
2323

2424
android {
2525
namespace = "com.google.android.fhir.datacapture.contrib.views.barcode"
26-
compileSdk = Sdk.compileSdk
26+
compileSdk = Sdk.COMPILE_SDK
2727
defaultConfig {
28-
minSdk = Sdk.minSdk
28+
minSdk = Sdk.MIN_SDK
2929
testInstrumentationRunner = Dependencies.androidJunitRunner
3030
// Need to specify this to prevent junit runner from going deep into our dependencies
3131
testInstrumentationRunnerArguments["package"] = "com.google.android.fhir.datacapture"
@@ -39,6 +39,12 @@ android {
3939
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
4040
}
4141
}
42+
compileOptions {
43+
// Flag to enable support for the new language APIs
44+
// See https://developer.android.com/studio/write/java8-support
45+
isCoreLibraryDesugaringEnabled = true
46+
}
47+
4248
packaging {
4349
resources.excludes.addAll(
4450
listOf(
@@ -68,6 +74,8 @@ dependencies {
6874
androidTestImplementation(libs.androidx.test.runner)
6975
androidTestImplementation(libs.truth)
7076

77+
coreLibraryDesugaring(Dependencies.desugarJdkLibs)
78+
7179
implementation(project(":datacapture"))
7280
implementation(Dependencies.Mlkit.barcodeScanning)
7381
implementation(Dependencies.Mlkit.objectDetection)

contrib/locationwidget/build.gradle.kts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ createJacocoTestReportTask()
2323

2424
android {
2525
namespace = "com.google.android.fhir.datacapture.contrib.views.locationwidget"
26-
compileSdk = Sdk.compileSdk
26+
compileSdk = Sdk.COMPILE_SDK
2727
defaultConfig {
28-
minSdk = Sdk.minSdk
28+
minSdk = Sdk.MIN_SDK
2929
testInstrumentationRunner = Dependencies.androidJunitRunner
3030
// Need to specify this to prevent junit runner from going deep into our dependencies
3131
testInstrumentationRunnerArguments["package"] = "com.google.android.fhir.datacapture"
@@ -39,6 +39,11 @@ android {
3939
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
4040
}
4141
}
42+
compileOptions {
43+
// Flag to enable support for the new language APIs
44+
// See https://developer.android.com/studio/write/java8-support
45+
isCoreLibraryDesugaringEnabled = true
46+
}
4247

4348
packaging {
4449
resources.excludes.addAll(
@@ -77,6 +82,8 @@ dependencies {
7782
implementation(libs.androidx.fragment)
7883
implementation(libs.kotlinx.coroutines.playservices)
7984

85+
coreLibraryDesugaring(Dependencies.desugarJdkLibs)
86+
8087
testImplementation(Dependencies.robolectric)
8188
testImplementation(libs.androidx.fragment.testing)
8289
testImplementation(libs.junit)

0 commit comments

Comments
 (0)