Skip to content

Commit 714290d

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-release
2 parents d7036a9 + 87c3437 commit 714290d

File tree

73 files changed

+2103
-1527
lines changed

Some content is hidden

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

73 files changed

+2103
-1527
lines changed

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.6.0")
1313

14-
implementation("com.android.tools.build:gradle:8.0.2")
14+
implementation("com.android.tools.build:gradle:8.1.1")
1515

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

catalog/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ android {
3030
// Flag to enable support for the new language APIs
3131
// See https://developer.android.com/studio/write/java8-support
3232
isCoreLibraryDesugaringEnabled = true
33-
sourceCompatibility = javaVersion
34-
targetCompatibility = javaVersion
3533
}
3634

3735
packaging {
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"resourceType": "Questionnaire",
3+
"extension": [
4+
{
5+
"url": "http://hl7.org/fhir/StructureDefinition/variable",
6+
"valueExpression": {
7+
"name": "has-fever",
8+
"language": "text/fhirpath",
9+
"expression": "%resource.descendants().where(linkId='1').answer.value"
10+
}
11+
}
12+
],
13+
"item": [
14+
{
15+
"linkId": "1",
16+
"type": "boolean",
17+
"text": "Does patient has fever?",
18+
"item": [
19+
{
20+
"extension": [
21+
{
22+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
23+
"valueCodeableConcept": {
24+
"coding": [
25+
{
26+
"system": "http://hl7.org/fhir/questionnaire-display-category",
27+
"code": "instructions"
28+
}
29+
]
30+
}
31+
}
32+
],
33+
"linkId": "1.1",
34+
"text": "Define the questionnaire variable 'has-fever' based on the answer to the question 'Does the patient have a fever?",
35+
"type": "display"
36+
}
37+
]
38+
},
39+
{
40+
"linkId": "2",
41+
"text": "Since when?",
42+
"type": "date",
43+
"extension": [
44+
{
45+
"url": "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression",
46+
"valueExpression": {
47+
"language": "text/fhirpath",
48+
"expression": "%has-fever"
49+
}
50+
}
51+
],
52+
"item": [
53+
{
54+
"extension": [
55+
{
56+
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
57+
"valueCodeableConcept": {
58+
"coding": [
59+
{
60+
"system": "http://hl7.org/fhir/questionnaire-display-category",
61+
"code": "instructions"
62+
}
63+
]
64+
}
65+
}
66+
],
67+
"linkId": "2.1",
68+
"text": "Enabled if variable 'has-fever' evaluates to true",
69+
"type": "display"
70+
}
71+
]
72+
}
73+
]
74+
}
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"resourceType": "Questionnaire",
3+
"item": [
4+
{
5+
"linkId": "1.0",
6+
"type": "choice",
7+
"text": "Initially selected single choice",
8+
"answerOption": [
9+
{
10+
"valueCoding": {
11+
"code": "Y",
12+
"display": "Yes",
13+
"system": "custom"
14+
}
15+
},
16+
{
17+
"valueCoding": {
18+
"code": "N",
19+
"display": "No",
20+
"system": "custom"
21+
},
22+
"initialSelected": true
23+
},
24+
{
25+
"valueCoding": {
26+
"code": "unknown",
27+
"display": "Unknown",
28+
"system": "custom"
29+
}
30+
}
31+
]
32+
},
33+
{
34+
"linkId": "2.0",
35+
"type": "choice",
36+
"text": "Initially selected multiple choice",
37+
"repeats": true,
38+
"answerOption": [
39+
{
40+
"valueCoding": {
41+
"code": "1st",
42+
"display": "First",
43+
"system": "custom"
44+
}
45+
},
46+
{
47+
"valueCoding": {
48+
"code": "2nd",
49+
"display": "Second",
50+
"system": "custom"
51+
},
52+
"initialSelected": true
53+
},
54+
{
55+
"valueCoding": {
56+
"code": "3rd",
57+
"display": "Third",
58+
"system": "custom"
59+
},
60+
"initialSelected": true
61+
}
62+
]
63+
},
64+
{
65+
"linkId": "3.0",
66+
"type": "string",
67+
"text": "Initially provided text value",
68+
"initial": [
69+
{
70+
"valueString": "Here is a sample text"
71+
}
72+
]
73+
},
74+
{
75+
"linkId": "4.0",
76+
"type": "boolean",
77+
"text": "Initially provided boolean value",
78+
"initial": [
79+
{
80+
"valueBoolean": false
81+
}
82+
]
83+
},
84+
{
85+
"linkId": "5.0",
86+
"type": "date",
87+
"text": "Initially provided date value",
88+
"initial": [
89+
{
90+
"valueDate": "2022-01-22"
91+
}
92+
]
93+
},
94+
{
95+
"linkId": "6.0",
96+
"type": "quantity",
97+
"text": "Initially provided quantity value",
98+
"initial": [
99+
{
100+
"valueQuantity": {
101+
"value": 30,
102+
"unit": "$",
103+
"system": "http://measureunit.org",
104+
"code": "USD"
105+
}
106+
}
107+
]
108+
},
109+
{
110+
"linkId": "7.0",
111+
"type": "quantity",
112+
"text": "Initially provided quantity unit only",
113+
"initial": [
114+
{
115+
"valueQuantity": {
116+
"unit": "$",
117+
"system": "http://measureunit.org",
118+
"code": "USD"
119+
}
120+
}
121+
]
122+
}
123+
]
124+
}

catalog/src/main/java/com/google/android/fhir/catalog/BehaviorListViewModel.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Google LLC
2+
* Copyright 2022-2023 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.
@@ -48,6 +48,11 @@ class BehaviorListViewModel(application: Application) : AndroidViewModel(applica
4848
R.string.behavior_name_skip_logic,
4949
"behavior_skip_logic.json"
5050
),
51+
SKIP_LOGIC_WITH_EXPRESSION(
52+
R.drawable.ic_skiplogic_behavior,
53+
R.string.behavior_name_skip_logic_with_expression,
54+
"behavior_skip_logic_with_expression.json"
55+
),
5156
DYNAMIC_QUESTION_TEXT(
5257
R.drawable.ic_dynamic_text_behavior,
5358
R.string.behavior_name_dynamic_question_text,

catalog/src/main/java/com/google/android/fhir/catalog/ComponentListViewModel.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@ class ComponentListViewModel(application: Application, private val state: SavedS
140140
R.drawable.ic_item_answer_media,
141141
R.string.component_name_item_answer_media,
142142
""
143+
),
144+
INITIAL_VALUE(
145+
R.drawable.ic_initial_value_component,
146+
R.string.component_name_initial_value,
147+
"component_initial_value.json"
143148
)
144149
}
145150

@@ -164,5 +169,6 @@ class ComponentListViewModel(application: Application, private val state: SavedS
164169
ViewItem.ComponentItem(Component.HELP),
165170
ViewItem.ComponentItem(Component.ITEM_MEDIA),
166171
ViewItem.ComponentItem(Component.ITEM_ANSWER_MEDIA),
172+
ViewItem.ComponentItem(Component.INITIAL_VALUE),
167173
)
168174
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<vector
2+
xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="194dp"
4+
android:height="128dp"
5+
android:viewportWidth="194"
6+
android:viewportHeight="128"
7+
>
8+
<group>
9+
<clip-path
10+
android:pathData="M0,64C0,49.641 11.641,38 26,38H194V90H26C11.641,90 0,78.359 0,64V64Z"
11+
/>
12+
<path
13+
android:pathData="M66,52C66,48.134 69.134,45 73,45L195,45V83L73,83C69.134,83 66,79.866 66,76V52Z"
14+
android:strokeWidth="2"
15+
android:fillColor="#ffffff"
16+
android:strokeColor="#4285F4"
17+
/>
18+
<path
19+
android:pathData="M90.086,70V58.57H86.468V57.112H95.216V58.57H91.616V70H90.086ZM99.714,70.288C98.826,70.288 98.034,70.078 97.338,69.658C96.654,69.238 96.114,68.662 95.718,67.93C95.334,67.198 95.142,66.364 95.142,65.428C95.142,64.552 95.322,63.742 95.682,62.998C96.054,62.254 96.57,61.66 97.23,61.216C97.902,60.76 98.688,60.532 99.588,60.532C100.5,60.532 101.28,60.736 101.928,61.144C102.588,61.54 103.092,62.092 103.44,62.8C103.8,63.508 103.98,64.318 103.98,65.23C103.98,65.314 103.974,65.398 103.962,65.482C103.962,65.566 103.956,65.638 103.944,65.698H96.672C96.72,66.418 96.894,67.018 97.194,67.498C97.506,67.966 97.89,68.32 98.346,68.56C98.802,68.788 99.276,68.902 99.768,68.902C100.44,68.902 100.992,68.746 101.424,68.434C101.868,68.11 102.222,67.714 102.486,67.246L103.782,67.876C103.422,68.572 102.906,69.148 102.234,69.604C101.562,70.06 100.722,70.288 99.714,70.288ZM99.588,61.918C98.844,61.918 98.226,62.152 97.734,62.62C97.242,63.088 96.918,63.694 96.762,64.438H102.36C102.348,64.09 102.246,63.724 102.054,63.34C101.874,62.944 101.586,62.608 101.19,62.332C100.794,62.056 100.26,61.918 99.588,61.918ZM104.945,70L108.185,65.338L105.017,60.82H106.745L109.121,64.222L111.389,60.82H113.189L109.967,65.338L113.243,70H111.461L109.085,66.472L106.727,70H104.945ZM115.838,67.588V62.206H114.236V60.82H115.838V58.228H117.368V60.82H119.618V62.206H117.368V67.21C117.368,67.69 117.464,68.062 117.656,68.326C117.86,68.59 118.19,68.722 118.646,68.722C118.85,68.722 119.036,68.692 119.204,68.632C119.372,68.572 119.522,68.5 119.654,68.416V69.91C119.498,69.982 119.324,70.036 119.132,70.072C118.952,70.12 118.706,70.144 118.394,70.144C117.626,70.144 117.008,69.922 116.54,69.478C116.072,69.022 115.838,68.392 115.838,67.588Z"
20+
android:fillColor="#1A73E8"
21+
/>
22+
</group>
23+
</vector>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@
4141
<string name="layout_name_review">Review</string>
4242
<string name="layout_name_read_only">Read only</string>
4343
<string name="behavior_name_skip_logic">Skip logic</string>
44+
<string
45+
name="behavior_name_skip_logic_with_expression"
46+
>Skip logic with expression</string>
4447
<string
4548
name="behavior_name_skip_logic_info"
4649
>If Yes is selected, a follow-up question is displayed. If No is selected, no follow-up questions are displayed.</string>
4750
<string name="behavior_name_context_variables">Context variable</string>
4851
<string
4952
name="behavior_name_dynamic_question_text"
5053
>Dynamic question text</string>
54+
<string name="component_name_initial_value">Initial Value</string>
5155
<string
5256
name="behavior_name_calculated_expression_info"
5357
>Input age to automatically calculate birthdate until birthdate is updated manually.</string>

common/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ android {
2525
defaultConfig { minSdk = Sdk.minSdk }
2626
configureJacocoTestOptions()
2727
kotlin { jvmToolchain(11) }
28-
compileOptions {
29-
sourceCompatibility = javaVersion
30-
targetCompatibility = javaVersion
31-
}
3228
}
3329

3430
configurations { all { exclude(module = "xpp3") } }

contrib/barcode/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ android {
5252

5353
testOptions { animationsDisabled = true }
5454
kotlin { jvmToolchain(11) }
55-
compileOptions {
56-
sourceCompatibility = javaVersion
57-
targetCompatibility = javaVersion
58-
}
5955
}
6056

6157
configurations { all { exclude(module = "xpp3") } }

0 commit comments

Comments
 (0)