-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a6e25a
commit 3db01b9
Showing
5 changed files
with
60 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
NUM_OF_PATIENTS=$(curl -X GET http://localhost:8080/fhir/Patient?_summary=count | jq .total) | ||
NUM_OF_CONDITIONS=$(curl -X GET http://localhost:8080/fhir/Condition?_summary=count | jq .total) | ||
NUM_OF_SPECIMENS=$(curl -X GET http://localhost:8080/fhir/Specimen?_summary=count | jq .total) | ||
# Check if a URL was provided as an argument | ||
if [ -z "$1" ]; then | ||
echo "Usage: $0 <base-url>" | ||
echo "Example: $0 http://localhost:8080/fhir" | ||
exit 1 | ||
fi | ||
|
||
# Get the base URL from the first argument | ||
BASE_URL="$1" | ||
|
||
NUM_OF_PATIENTS=$(curl -X GET ${BASE_URL}/Patient?_summary=count | jq .total) | ||
NUM_OF_CONDITIONS=$(curl -X GET ${BASE_URL}/fhir/Condition?_summary=count | jq .total) | ||
NUM_OF_SPECIMENS=$(curl -X GET ${BASE_URL}/fhir/Specimen?_summary=count | jq .total) | ||
if [ "$NUM_OF_PATIENTS" = 0 ] || [ "$NUM_OF_CONDITIONS" = 0 ] || [ "$NUM_OF_SPECIMENS" = 0 ]; then | ||
echo "The upload of resources failed." && exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters