Skip to content

Commit 08db7b0

Browse files
committed
Rename Shell Variables to Lowercase
Signed-off-by: Jonas Wagner <[email protected]>
1 parent 247da2b commit 08db7b0

File tree

148 files changed

+1502
-1502
lines changed

Some content is hidden

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

148 files changed

+1502
-1502
lines changed

.github/custom-search-parameters-test/create-patient.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22

3-
BASE="http://localhost:8080/fhir"
3+
base="http://localhost:8080/fhir"
44

55
patient() {
66
cat <<END
@@ -18,4 +18,4 @@ cat <<END
1818
END
1919
}
2020

21-
curl -fsH 'Content-Type: application/fhir+json' -d "$(patient)" -o /dev/null "$BASE/Patient"
21+
curl -fsH 'Content-Type: application/fhir+json' -d "$(patient)" -o /dev/null "$base/Patient"
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash -e
22

3-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
4-
. "$SCRIPT_DIR/../scripts/util.sh"
3+
script_dir="$(dirname "$(readlink -f "$0")")"
4+
. "$script_dir/../scripts/util.sh"
55

6-
BASE="http://localhost:8080/fhir"
6+
base="http://localhost:8080/fhir"
77

88
count() {
9-
curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$BASE/Patient?marital-status=M" | jq .total
9+
curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$base/Patient?marital-status=M" | jq .total
1010
}
1111

1212
test "number of patients" "$(count)" "1"

.github/scripts/admin-api/async-job.sh

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,60 @@
22

33
# issues an async request and inspects the resulting job
44

5-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
6-
. "$SCRIPT_DIR/../util.sh"
5+
script_dir="$(dirname "$(readlink -f "$0")")"
6+
. "$script_dir/../util.sh"
77

88
if [[ "$OSTYPE" == "darwin"* ]]; then
99
DATE_CMD="gdate"
1010
else
1111
DATE_CMD="date"
1212
fi
1313

14-
BASE="http://localhost:8080/fhir"
15-
HEADERS=$(curl -s -H 'Prefer: respond-async' -H 'Accept: application/fhir+json' -o /dev/null -D - "$BASE/Observation?code=http://loinc.org|8310-5&_summary=count")
16-
JOB_ID=$(echo "$HEADERS" | grep -i content-location | tr -d '\r' | cut -d '/' -f6)
14+
base="http://localhost:8080/fhir"
15+
headers=$(curl -s -H 'Prefer: respond-async' -H 'Accept: application/fhir+json' -o /dev/null -D - "$base/Observation?code=http://loinc.org|8310-5&_summary=count")
16+
job_id=$(echo "$headers" | grep -i content-location | tr -d '\r' | cut -d '/' -f6)
1717

1818
# wait to fetch the completed job
1919
sleep 1
20-
JOB=$(curl -s -H 'Accept: application/fhir+json' "$BASE/__admin/Task/$JOB_ID")
20+
job=$(curl -s -H 'Accept: application/fhir+json' "$base/__admin/Task/$job_id")
2121

22-
test "profile URL" "$(echo "$JOB" | jq -r '.meta.profile[]')" "https://samply.github.io/blaze/fhir/StructureDefinition/AsyncInteractionJob"
23-
test "status" "$(echo "$JOB" | jq -r '.status')" "completed"
22+
test "profile URL" "$(echo "$job" | jq -r '.meta.profile[]')" "https://samply.github.io/blaze/fhir/StructureDefinition/AsyncInteractionJob"
23+
test "status" "$(echo "$job" | jq -r '.status')" "completed"
2424

25-
AUTHORED_ON_ISO=$(echo "$JOB" | jq -r '.authoredOn')
26-
AUTHORED_ON_EPOCH_SECONDS=$($DATE_CMD -d "$AUTHORED_ON_ISO" +%s)
27-
NOW_EPOCH_SECONDS=$($DATE_CMD +%s)
28-
if ((NOW_EPOCH_SECONDS - AUTHORED_ON_EPOCH_SECONDS < 10)); then
25+
authored_on_iso=$(echo "$job" | jq -r '.authoredOn')
26+
authored_on_epoch_seconds=$($DATE_CMD -d "$authored_on_iso" +%s)
27+
now_epoch_seconds=$($DATE_CMD +%s)
28+
if ((now_epoch_seconds - authored_on_epoch_seconds < 10)); then
2929
echo "✅ the authoredOn dateTime is set and current"
3030
else
31-
echo "🆘 the authoredOn dateTime is $AUTHORED_ON_ISO, but should be a current dateTime"
31+
echo "🆘 the authoredOn dateTime is $authored_on_iso, but should be a current dateTime"
3232
exit 1
3333
fi
3434

35-
PARAMETER_URI="https://samply.github.io/blaze/fhir/CodeSystem/AsyncInteractionJobParameter"
35+
parameter_uri="https://samply.github.io/blaze/fhir/CodeSystem/AsyncInteractionJobParameter"
3636

3737
input_expr() {
38-
echo ".input[] | select(.type.coding[] | select(.system == \"$PARAMETER_URI\" and .code == \"$1\"))"
38+
echo ".input[] | select(.type.coding[] | select(.system == \"$parameter_uri\" and .code == \"$1\"))"
3939
}
4040

41-
test "t" "$(echo "$JOB" | jq -r "$(input_expr "t") | .valueUnsignedInt")" "1"
41+
test "t" "$(echo "$job" | jq -r "$(input_expr "t") | .valueUnsignedInt")" "1"
4242

43-
OUTPUT_URI="https://samply.github.io/blaze/fhir/CodeSystem/AsyncInteractionJobOutput"
43+
output_uri="https://samply.github.io/blaze/fhir/CodeSystem/AsyncInteractionJobOutput"
4444

4545
output_expr() {
46-
echo ".output[] | select(.type.coding[] | select(.system == \"$OUTPUT_URI\" and .code == \"$1\"))"
46+
echo ".output[] | select(.type.coding[] | select(.system == \"$output_uri\" and .code == \"$1\"))"
4747
}
4848

49-
PROCESSING_DURATION="$(echo "$JOB" | jq "$(output_expr "processing-duration") | .valueQuantity")"
50-
test "processing-duration unit system" "$(echo "$PROCESSING_DURATION" | jq -r .system)" "http://unitsofmeasure.org"
51-
test "processing-duration unit code" "$(echo "$PROCESSING_DURATION" | jq -r .code)" "s"
49+
processing_duration="$(echo "$job" | jq "$(output_expr "processing-duration") | .valueQuantity")"
50+
test "processing-duration unit system" "$(echo "$processing_duration" | jq -r .system)" "http://unitsofmeasure.org"
51+
test "processing-duration unit code" "$(echo "$processing_duration" | jq -r .code)" "s"
5252

5353
# History
54-
JOB_HISTORY=$(curl -s -H 'Accept: application/fhir+json' "$BASE/__admin/Task/$JOB_ID/_history")
55-
56-
test "history resource type" "$(echo "$JOB_HISTORY" | jq -r '.resourceType')" "Bundle"
57-
test "history bundle type" "$(echo "$JOB_HISTORY" | jq -r '.type')" "history"
58-
test "history total" "$(echo "$JOB_HISTORY" | jq -r '.total')" "3"
59-
test "history 0 status" "$(echo "$JOB_HISTORY" | jq -r '.entry[0].resource.status')" "completed"
60-
test "history 1 status" "$(echo "$JOB_HISTORY" | jq -r '.entry[1].resource.status')" "in-progress"
61-
test "history 2 status" "$(echo "$JOB_HISTORY" | jq -r '.entry[2].resource.status')" "ready"
54+
job_history=$(curl -s -H 'Accept: application/fhir+json' "$base/__admin/Task/$job_id/_history")
55+
56+
test "history resource type" "$(echo "$job_history" | jq -r '.resourceType')" "Bundle"
57+
test "history bundle type" "$(echo "$job_history" | jq -r '.type')" "history"
58+
test "history total" "$(echo "$job_history" | jq -r '.total')" "3"
59+
test "history 0 status" "$(echo "$job_history" | jq -r '.entry[0].resource.status')" "completed"
60+
test "history 1 status" "$(echo "$job_history" | jq -r '.entry[1].resource.status')" "in-progress"
61+
test "history 2 status" "$(echo "$job_history" | jq -r '.entry[2].resource.status')" "ready"
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/bin/bash -e
22

3-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
4-
. "$SCRIPT_DIR/../util.sh"
3+
script_dir="$(dirname "$(readlink -f "$0")")"
4+
. "$script_dir/../util.sh"
55

6-
CA_CERT_BLAZE="$SCRIPT_DIR/../../../modules/ingress/blaze-cert.pem"
7-
CA_CERT_KEYCLOAK="$SCRIPT_DIR/../../../modules/ingress/keycloak-cert.pem"
8-
ACCESS_TOKEN=$(curl -s -d 'grant_type=client_credentials' --cacert "$CA_CERT_KEYCLOAK" -u account:e11a3a8e-6e24-4f9d-b914-da7619e8b31f "https://keycloak.localhost/realms/blaze/protocol/openid-connect/token" | jq -r .access_token)
6+
ca_cert_blaze="$script_dir/../../../modules/ingress/blaze-cert.pem"
7+
ca_cert_keycloak="$script_dir/../../../modules/ingress/keycloak-cert.pem"
8+
access_token=$(curl -s -d 'grant_type=client_credentials' --cacert "$ca_cert_keycloak" -u account:e11a3a8e-6e24-4f9d-b914-da7619e8b31f "https://keycloak.localhost/realms/blaze/protocol/openid-connect/token" | jq -r .access_token)
99

10-
if [ -z "$ACCESS_TOKEN" ]; then
10+
if [ -z "$access_token" ]; then
1111
echo "Missing access token"
1212
exit 1;
1313
fi
1414

15-
BASE="https://blaze.localhost/fhir"
16-
COLUMN_FAMILY=$1
17-
ACTUAL_NAME=$(curl -sL --cacert "$CA_CERT_BLAZE" --oauth2-bearer "$ACCESS_TOKEN" "$BASE/__admin/dbs/index/column-families/$COLUMN_FAMILY/metadata" | jq -r .name)
15+
base="https://blaze.localhost/fhir"
16+
column_family=$1
17+
actual_name=$(curl -sL --cacert "$ca_cert_blaze" --oauth2-bearer "$access_token" "$base/__admin/dbs/index/column-families/$column_family/metadata" | jq -r .name)
1818

19-
test "column family name" "$ACTUAL_NAME" "$COLUMN_FAMILY"
19+
test "column family name" "$actual_name" "$column_family"

.github/scripts/admin-api/create-invalid-jobs.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#!/bin/bash -e
22

3-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
4-
. "$SCRIPT_DIR/../util.sh"
3+
script_dir="$(dirname "$(readlink -f "$0")")"
4+
. "$script_dir/../util.sh"
55

6-
BASE="http://localhost:8080/fhir"
6+
base="http://localhost:8080/fhir"
77

8-
ERROR_MESSAGE="$(curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' -d "{\"resourceType\": \"Patient\"}" "$BASE/__admin/Task" | jq -r '.issue[].diagnostics')"
9-
test "error message" "$ERROR_MESSAGE" "Incorrect resource type \`Patient\`. Expected type is \`Task\`."
8+
error_message="$(curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' -d "{\"resourceType\": \"Patient\"}" "$base/__admin/Task" | jq -r '.issue[].diagnostics')"
9+
test "error message" "$error_message" "Incorrect resource type \`Patient\`. Expected type is \`Task\`."
1010

11-
ERROR_MESSAGE="$(curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' -d "{\"resourceType\": \"Task\"}" "$BASE/__admin/Task" | jq -r '.issue[].details.text')"
12-
test "error message" "$ERROR_MESSAGE" "No allowed profile found."
11+
error_message="$(curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' -d "{\"resourceType\": \"Task\"}" "$base/__admin/Task" | jq -r '.issue[].details.text')"
12+
test "error message" "$error_message" "No allowed profile found."
1313

1414
re-index-job() {
1515
cat <<END
@@ -50,5 +50,5 @@ cat <<END
5050
END
5151
}
5252

53-
ERROR_MESSAGE="$(curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' -d "$(re-index-job)" "$BASE/__admin/Task" | jq -r '.issue[0].diagnostics')"
54-
test "error message" "$ERROR_MESSAGE" "Constraint failed: status-reason-on-hold: 'Assigns possible reasons to the 'on-hold' status.' (defined in https://samply.github.io/blaze/fhir/StructureDefinition/Job)"
53+
error_message="$(curl -s -H 'Content-Type: application/fhir+json' -H 'Accept: application/fhir+json' -d "$(re-index-job)" "$base/__admin/Task" | jq -r '.issue[0].diagnostics')"
54+
test "error message" "$error_message" "Constraint failed: status-reason-on-hold: 'Assigns possible reasons to the 'on-hold' status.' (defined in https://samply.github.io/blaze/fhir/StructureDefinition/Job)"

.github/scripts/authenticated-request.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
#!/bin/bash -e
22

3-
ACCESS_TOKEN=$(curl -s -d 'grant_type=client_credentials' -u account:e11a3a8e-6e24-4f9d-b914-da7619e8b31f http://localhost:8090/realms/blaze/protocol/openid-connect/token | jq -r .access_token)
3+
access_token=$(curl -s -d 'grant_type=client_credentials' -u account:e11a3a8e-6e24-4f9d-b914-da7619e8b31f http://localhost:8090/realms/blaze/protocol/openid-connect/token | jq -r .access_token)
44

5-
if [ -z "$ACCESS_TOKEN" ]; then
5+
if [ -z "$access_token" ]; then
66
echo "Missing access token"
77
exit 1;
88
fi
99

10-
BASE="http://localhost:8080/fhir"
10+
base="http://localhost:8080/fhir"
1111

12-
if [ "200" = "$(curl -s --oauth2-bearer "$ACCESS_TOKEN" -o /dev/null -w '%{response_code}' "$BASE")" ]; then
12+
if [ "200" = "$(curl -s --oauth2-bearer "$access_token" -o /dev/null -w '%{response_code}' "$base")" ]; then
1313
echo "✅ successful authenticated system search request"
1414
else
1515
echo "🆘 failed authenticated system search request"
1616
exit 1
1717
fi
1818

19-
if [ "200" = "$(curl -s --oauth2-bearer "$ACCESS_TOKEN" -H "Content-Type: application/fhir+json" -d @.github/openid-auth-test/batch-bundle.json "$BASE" | jq -r '.entry[].response.status')" ]; then
19+
if [ "200" = "$(curl -s --oauth2-bearer "$access_token" -H "Content-Type: application/fhir+json" -d @.github/openid-auth-test/batch-bundle.json "$base" | jq -r '.entry[].response.status')" ]; then
2020
echo "✅ successful authenticated batch request"
2121
else
2222
echo "🆘 failed authenticated batch request"

.github/scripts/batch-metadata.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# This script fetches the CapabilityStatement through a batch request.
55
#
66

7-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
8-
. "$SCRIPT_DIR/util.sh"
7+
script_dir="$(dirname "$(readlink -f "$0")")"
8+
. "$script_dir/util.sh"
99

10-
BASE="http://localhost:8080/fhir"
10+
base="http://localhost:8080/fhir"
1111

1212
bundle() {
1313
cat <<END
@@ -25,9 +25,9 @@ cat <<END
2525
}
2626
END
2727
}
28-
RESULT=$(curl -sH "Content-Type: application/fhir+json" -d "$(bundle)" "$BASE")
28+
result=$(curl -sH "Content-Type: application/fhir+json" -d "$(bundle)" "$base")
2929

30-
test "resource type" "$(echo "$RESULT" | jq -r .resourceType)" "Bundle"
31-
test "bundle type" "$(echo "$RESULT" | jq -r .type)" "batch-response"
32-
test "response status" "$(echo "$RESULT" | jq -r .entry[].response.status)" "200"
33-
test "response resource type" "$(echo "$RESULT" | jq -r .entry[].resource.resourceType)" "CapabilityStatement"
30+
test "resource type" "$(echo "$result" | jq -r .resourceType)" "Bundle"
31+
test "bundle type" "$(echo "$result" | jq -r .type)" "batch-response"
32+
test "response status" "$(echo "$result" | jq -r .entry[].response.status)" "200"
33+
test "response resource type" "$(echo "$result" | jq -r .entry[].resource.resourceType)" "CapabilityStatement"

.github/scripts/batch.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# This script creates a patient and tries to retrieve it through a batch request.
55
#
66

7-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
8-
. "$SCRIPT_DIR/util.sh"
7+
script_dir="$(dirname "$(readlink -f "$0")")"
8+
. "$script_dir/util.sh"
99

10-
BASE="http://localhost:8080/fhir"
11-
PATIENT_ID=$(curl -sH "Content-Type: application/fhir+json" \
10+
base="http://localhost:8080/fhir"
11+
patient_id=$(curl -sH "Content-Type: application/fhir+json" \
1212
-d '{"resourceType": "Patient"}' \
13-
"$BASE/Patient" | jq -r .id)
13+
"$base/Patient" | jq -r .id)
1414

1515
bundle() {
1616
cat <<END
@@ -21,17 +21,17 @@ cat <<END
2121
{
2222
"request": {
2323
"method": "GET",
24-
"url": "Patient/$PATIENT_ID"
24+
"url": "Patient/$patient_id"
2525
}
2626
}
2727
]
2828
}
2929
END
3030
}
31-
RESULT=$(curl -sH "Content-Type: application/fhir+json" -d "$(bundle)" "$BASE")
31+
result=$(curl -sH "Content-Type: application/fhir+json" -d "$(bundle)" "$base")
3232

33-
test "resource type" "$(echo "$RESULT" | jq -r .resourceType)" "Bundle"
34-
test "bundle type" "$(echo "$RESULT" | jq -r .type)" "batch-response"
35-
test "response status" "$(echo "$RESULT" | jq -r .entry[].response.status)" "200"
36-
test "response resource type" "$(echo "$RESULT" | jq -r .entry[].resource.resourceType)" "Patient"
37-
test "response resource ID" "$(echo "$RESULT" | jq -r .entry[].resource.id)" "$PATIENT_ID"
33+
test "resource type" "$(echo "$result" | jq -r .resourceType)" "Bundle"
34+
test "bundle type" "$(echo "$result" | jq -r .type)" "batch-response"
35+
test "response status" "$(echo "$result" | jq -r .entry[].response.status)" "200"
36+
test "response resource type" "$(echo "$result" | jq -r .entry[].resource.resourceType)" "Patient"
37+
test "response resource ID" "$(echo "$result" | jq -r .entry[].resource.id)" "$patient_id"

.github/scripts/cancel-async.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
#
44
# This script verifies the correct cancellation of async requests.
55

6-
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
7-
. "$SCRIPT_DIR/util.sh"
6+
script_dir="$(dirname "$(readlink -f "$0")")"
7+
. "$script_dir/util.sh"
88

9-
BASE="http://localhost:8080/fhir"
10-
HEADERS=$(curl -s -H 'Prefer: respond-async' -H 'Accept: application/fhir+json' -o /dev/null -D - "$BASE/Observation?date=lt2100&_summary=count")
11-
STATUS_URL=$(echo "$HEADERS" | grep -i content-location | tr -d '\r' | cut -d: -f2- | xargs)
9+
base="http://localhost:8080/fhir"
10+
headers=$(curl -s -H 'Prefer: respond-async' -H 'Accept: application/fhir+json' -o /dev/null -D - "$base/Observation?date=lt2100&_summary=count")
11+
status_url=$(echo "$headers" | grep -i content-location | tr -d '\r' | cut -d: -f2- | xargs)
1212

13-
STATUS_CODE=$(curl -s -XDELETE -o /dev/null -w '%{response_code}' "$STATUS_URL")
14-
test "cancel status code" "$STATUS_CODE" "202"
13+
status_code=$(curl -s -XDELETE -o /dev/null -w '%{response_code}' "$status_url")
14+
test "cancel status code" "$status_code" "202"
1515

16-
test "status code after cancel" "$(curl -s -o /dev/null -w '%{response_code}' "$STATUS_URL")" "404"
17-
RESPONSE="$(curl -s "$STATUS_URL")"
18-
test "after cancel resource type" "$(echo "$RESPONSE" | jq -r .resourceType)" "OperationOutcome"
19-
test "after cancel issue code" "$(echo "$RESPONSE" | jq -r '.issue[0].code')" "not-found"
16+
test "status code after cancel" "$(curl -s -o /dev/null -w '%{response_code}' "$status_url")" "404"
17+
response="$(curl -s "$status_url")"
18+
test "after cancel resource type" "$(echo "$response" | jq -r .resourceType)" "OperationOutcome"
19+
test "after cancel issue code" "$(echo "$response" | jq -r '.issue[0].code')" "not-found"
2020

21-
DIAGNOSTICS="$(curl -s -H 'Accept: application/fhir+json' "$STATUS_URL" | jq -r '.issue[0].diagnostics')"
22-
if [[ "$DIAGNOSTICS" =~ The\ asynchronous\ request\ with\ id\ \`[A-Z0-9]+\`\ is\ cancelled. ]]; then
21+
diagnostics="$(curl -s -H 'Accept: application/fhir+json' "$status_url" | jq -r '.issue[0].diagnostics')"
22+
if [[ "$diagnostics" =~ The\ asynchronous\ request\ with\ id\ \`[A-Z0-9]+\`\ is\ cancelled. ]]; then
2323
echo "✅ the diagnostics message is right"
2424
else
25-
echo "🆘 the diagnostics message is $DIAGNOSTICS, expected /The asynchronous request with id \`[A-Z0-9]\+\` is cancelled./"
25+
echo "🆘 the diagnostics message is $diagnostics, expected /The asynchronous request with id \`[A-Z0-9]\+\` is cancelled./"
2626
fi

.github/scripts/chaining-document-reference.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -e
22

3-
BASE="http://localhost:8080/fhir"
3+
base="http://localhost:8080/fhir"
44

55
bundle() {
66
cat <<END
@@ -149,29 +149,29 @@ cat <<END
149149
END
150150
}
151151

152-
curl -sfH "Content-Type: application/fhir+json" -d "$(bundle)" -o /dev/null "$BASE"
152+
curl -sfH "Content-Type: application/fhir+json" -d "$(bundle)" -o /dev/null "$base"
153153

154-
RESULT="$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$BASE/DocumentReference?author:Organization.identifier=system-105539|value-105542&_summary=count" | jq -r '.total')"
154+
result="$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$base/DocumentReference?author:Organization.identifier=system-105539|value-105542&_summary=count" | jq -r '.total')"
155155

156-
if [ "$RESULT" = "1" ]; then
156+
if [ "$result" = "1" ]; then
157157
echo "✅ chaining works"
158158
else
159159
echo "🆘 chaining doesn't work"
160160
exit 1
161161
fi
162162

163-
RESULT="$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$BASE/DocumentReference?identifier=system-111302|value-111304&author:Organization.identifier=system-105539|value-105542&_summary=count" | jq -r '.total')"
163+
result="$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$base/DocumentReference?identifier=system-111302|value-111304&author:Organization.identifier=system-105539|value-105542&_summary=count" | jq -r '.total')"
164164

165-
if [ "$RESULT" = "1" ]; then
165+
if [ "$result" = "1" ]; then
166166
echo "✅ chaining works"
167167
else
168168
echo "🆘 chaining doesn't work"
169169
exit 1
170170
fi
171171

172-
RESULT="$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$BASE/DocumentReference?author:Organization.identifier=system-105539|value-105542&identifier=system-111302|value-111304&_summary=count" | jq -r '.total')"
172+
result="$(curl -sH 'Prefer: handling=strict' -H 'Accept: application/fhir+json' "$base/DocumentReference?author:Organization.identifier=system-105539|value-105542&identifier=system-111302|value-111304&_summary=count" | jq -r '.total')"
173173

174-
if [ "$RESULT" = "1" ]; then
174+
if [ "$result" = "1" ]; then
175175
echo "✅ chaining works"
176176
else
177177
echo "🆘 chaining doesn't work"

0 commit comments

Comments
 (0)