Skip to content

Commit

Permalink
Merge branch 'master' into sp/issue-2188-survey-button
Browse files Browse the repository at this point in the history
  • Loading branch information
santosh-pingle authored Oct 9, 2023
2 parents c408472 + 0818bd0 commit 3356bcf
Show file tree
Hide file tree
Showing 81 changed files with 3,013 additions and 641 deletions.
2 changes: 2 additions & 0 deletions .github/actions/commonSetup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ runs:
- name: "Setup Gradle"
uses: gradle/gradle-build-action@v2
with:
# See https://github.com/marketplace/actions/gradle-build-action#enable-dependency-graph-generation-for-a-workflow
dependency-graph: generate-and-submit
# Limit the size of the cache entry.
# These directories contain instrumented/transformed dependency jars which can be reconstructed relatively quickly.
gradle-home-cache-excludes: |
Expand Down
20 changes: 20 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
# Gotta Catch 'Em All! (i.e. don't wait and propose them only "trickled")
open-pull-requests-limit: 99

- package-ecosystem: gradle
directory: /
schedule:
interval: weekly
day: monday
time: "04:00"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
day: monday
time: "04:00"
51 changes: 51 additions & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "CodeQL"

on:
push:
branches: [ "master" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
schedule:
- cron: '32 13 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-22.04-64core
timeout-minutes: 60
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'java' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Switch to Java 17 from Eclipse Temurin distro
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# TODO: use Autobuild instead of ./gradlew after https://github.com/github/codeql-action/issues/1417 is fixed
# - name: Autobuild
# uses: github/codeql-action/autobuild@v2
- name: Build with Gradle
run: ./gradlew --scan --full-stacktrace -Dorg.gradle.dependency.verification=off compileDebugAndroidTestSources

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Android FHIR SDK

[![master](https://github.com/google/android-fhir/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/google/android-fhir/actions/workflows/build.yml) [![master](https://storage.googleapis.com/android-fhir-build-badges/build.svg)](https://storage.googleapis.com/android-fhir-build-badges/build.html) [![codecov](https://codecov.io/gh/google/android-fhir/branch/master/graph/badge.svg?token=PDSC4WRDTQ)](https://codecov.io/gh/google/android-fhir/branch/master) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://chat.fhir.org/#narrow/stream/276344-android)
[![master](https://github.com/google/android-fhir/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/google/android-fhir/actions/workflows/build.yml) [![codecov](https://codecov.io/gh/google/android-fhir/branch/master/graph/badge.svg?token=PDSC4WRDTQ)](https://codecov.io/gh/google/android-fhir/branch/master) [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![project chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://chat.fhir.org/#narrow/stream/276344-android)

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first
healthcare applications using the [HL7® FHIR® standard](https://www.hl7.org/fhir/) on Android. It
Expand All @@ -15,7 +15,7 @@ The SDK contains the following libraries:
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 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)| [wiki](https://github.com/google/android-fhir/wiki/Structured-Data-Capture-Library) | Android 7.0 (API level 24) | Collect, validate, and process healthcare data on Android |
| 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) | [wiki](https://github.com/google/android-fhir/wiki/FHIR-Engine-Library) | Android 7.0 (API level 24) | Store and manage FHIR resources locally on Android and synchronize with FHIR server |
| 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) | [wiki](https://github.com/google/android-fhir/wiki/Workflow-Library) | Android 8.0 (API level 26) | Provide decision support and analytics in clinical workflow on Android including implementation of specific FHIR operations ($measure_evaluate and $apply) |
| 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) | [wiki](https://github.com/google/android-fhir/wiki/Workflow-Library) | 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) |

## Demo apps

Expand All @@ -38,7 +38,7 @@ To contribute to the project, please see [Contributing](https://github.com/googl

You can create a [GitHub issue](https://github.com/google/android-fhir/issues) for bugs and feature requests.

In case you find any security bug, please do NOT create a Github issue. Instead, email us at <android-fhir-sdk-feedback@google.com>.
In case you find any security bug, please do NOT create a GitHub issue. Instead, email us at <android-fhir-sdk-feedback@google.com>.

If you want to provide any feedback or discuss use cases you can:
* email us at <android-fhir-sdk-feedback@google.com>
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repositories {
dependencies {
implementation("com.diffplug.spotless:spotless-plugin-gradle:6.21.0")

implementation("com.android.tools.build:gradle:8.1.1")
implementation("com.android.tools.build:gradle:8.1.2")

implementation("app.cash.licensee:licensee-gradle-plugin:1.3.0")
implementation("com.osacky.flank.gradle:fladle:0.17.4")
Expand Down
20 changes: 4 additions & 16 deletions buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,6 @@
import org.gradle.api.artifacts.Configuration
import org.gradle.kotlin.dsl.exclude

/*
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

object Dependencies {

object Androidx {
Expand Down Expand Up @@ -175,6 +159,9 @@ object Dependencies {
"$androidFhirGroup:$androidFhirEngineModule:${Versions.androidFhirEngine}"
const val androidFhirKnowledge = "$androidFhirGroup:knowledge:${Versions.androidFhirKnowledge}"

const val apacheCommonsCompress =
"org.apache.commons:commons-compress:${Versions.apacheCommonsCompress}"

const val desugarJdkLibs = "com.android.tools:desugar_jdk_libs:${Versions.desugarJdkLibs}"
const val fhirUcum = "org.fhir:ucum:${Versions.fhirUcum}"
const val gson = "com.google.code.gson:gson:${Versions.gson}"
Expand Down Expand Up @@ -259,6 +246,7 @@ object Dependencies {
const val androidFhirCommon = "0.1.0-alpha04"
const val androidFhirEngine = "0.1.0-beta03"
const val androidFhirKnowledge = "0.1.0-alpha01"
const val apacheCommonsCompress = "1.21"
const val desugarJdkLibs = "2.0.3"
const val caffeine = "2.9.1"
const val fhirUcum = "1.0.3"
Expand Down
1 change: 1 addition & 0 deletions catalog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ dependencies {
implementation(Dependencies.Navigation.navUiKtx)

implementation(project(path = ":datacapture"))
implementation(project(path = ":engine"))
implementation(project(path = ":contrib:barcode"))

testImplementation(Dependencies.junit)
Expand Down
1 change: 1 addition & 0 deletions catalog/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
/>

<application
android:name=".CatalogApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_card_file_box"
android:label="@string/app_name"
Expand Down
34 changes: 34 additions & 0 deletions catalog/src/main/assets/behavior_answer_expression.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"resourceType": "Questionnaire",
"item": [
{
"extension": [
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-answerExpression",
"valueExpression": {
"language": "application/x-fhir-query",
"expression": "Task?subject=Patient/P1&code=33879002&status=ready&_sort=period"
}
},
{
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-choiceColumn",
"extension": [
{
"url": "path",
"valueString": "description + ' - ' + reasonCode.coding.where(system='http://snomed.info/sct').display"
},
{
"url": "forDisplay",
"valueBoolean": true
}
]
}
],
"linkId": "vaccines",
"text": "Which vaccine tasks were completed?",
"type": "reference",
"required": true,
"repeats": true
}
]
}
2 changes: 1 addition & 1 deletion catalog/src/main/assets/component_open_choice.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
}
],
"text": "Do you have any pre-existing health conditions?",
"text": "Do you have any preexisting health conditions?",
"item": [
{
"linkId": "1.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"linkId": "1",
"text": "Do you have any pre-existing health conditions?",
"text": "Do you have any preexisting health conditions?",
"required": true,
"item": [
{
Expand Down
116 changes: 116 additions & 0 deletions catalog/src/main/assets/resource_data_bundle.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"resourceType": "Bundle",
"entry": [
{
"resource": {
"resourceType" : "Patient",
"id" : "P1"
}
},
{
"resource": {
"resourceType": "Task",
"id": "b8e13d21-1a62-4172-a9ef-57670e6ac238",
"status": "ready",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "33879002",
"display": "Vaccination routine"
}
]
},
"description": "BCG at birth",
"for": {
"reference": "Patient/P1"
},
"reasonCode": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "42284007",
"display": "BCG vaccine"
},
{
"system": "https://smartregister.org/immunization/vaccine-codes",
"code": "bcg",
"display": "BCG"
}
],
"text": "BCG"
}
}
},
{
"resource": {
"resourceType": "Task",
"id": "4090ba9a-fbbb-4634-a06d-0cbe938ab090",
"status": "cancelled",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "33879002",
"display": "Vaccination routine"
}
]
},
"description": "OPV 0 at birth",
"for": {
"reference": "Patient/P1"
},
"reasonCode": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "111164008",
"display": "Poliovirus vaccine"
},
{
"system": "https://smartregister.org/immunization/vaccine-codes",
"code": "opv0",
"display": "OPV 0"
}
],
"text": "OPV 0"
}
}
},
{
"resource": {
"resourceType": "Task",
"id": "087e82c6-e346-4725-8db1-7e10aec99be9",
"status": "ready",
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "33879002",
"display": "Vaccination routine"
}
]
},
"description": "OPV 1 at 6 weeks",
"for": {
"reference": "Patient/P1"
},
"reasonCode": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "111164008",
"display": "Poliovirus vaccine"
},
{
"system": "https://smartregister.org/immunization/vaccine-codes",
"code": "opv1",
"display": "OPV 1"
}
],
"text": "OPV 1"
}
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ class BehaviorListViewModel(application: Application) : AndroidViewModel(applica
R.string.behavior_name_calculated_expression,
"behavior_calculated_expression.json",
),
ANSWER_EXPRESSION(
R.drawable.ic_answers_behavior,
R.string.behavior_name_answer_expression,
"behavior_answer_expression.json",
),
CONTEXT_VARIABLES(
R.drawable.ic_context,
R.string.behavior_name_context_variables,
Expand Down
Loading

0 comments on commit 3356bcf

Please sign in to comment.