Skip to content

Commit

Permalink
Merge pull request #1473 from samply/release/v0.24.0
Browse files Browse the repository at this point in the history
Release v0.24.0
  • Loading branch information
alexanderkiel authored Feb 6, 2024
2 parents 85fe9d2 + d657059 commit 13db1e2
Show file tree
Hide file tree
Showing 338 changed files with 7,667 additions and 4,443 deletions.
4 changes: 4 additions & 0 deletions .clj-kondo/root/config.edn
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
blaze.elm.compiler.external-data ed
blaze.elm.expression expr
blaze.executors ex
blaze.fhir.spec.references fsr
blaze.fhir.structure-definition-repo sdr
blaze.middleware.fhir.db db
blaze.rest-api.header header
blaze.scheduler sched
blaze.test-util tu
blaze.util u
Expand Down
10 changes: 10 additions & 0 deletions .github/scripts/check-capability-statement-caching.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8080/fhir"
ETAG=$(curl -sH 'Accept: application/fhir+json' -D - -o /dev/null "$BASE/metadata" | grep -i etag | cut -d: -f2)
STATUS="$(echo "If-None-Match:$ETAG" | curl -sH 'Accept: application/fhir+json' -H @- -o /dev/null -w "%{http_code}" "$BASE/metadata")"

test "status code" "$STATUS" "304"
36 changes: 36 additions & 0 deletions .github/scripts/check-resource-totals.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8080/fhir"
ACTUAL_TOTALS="$(curl -sH 'Accept: application/fhir+json' "$BASE/\$totals" | jq -r '.parameter[] | [.name, .valueUnsignedInt] | @csv')"
EXPECTED_TOTALS="$(cat <<END
"AllergyIntolerance",76
"CarePlan",540
"CareTeam",540
"Claim",9856
"Condition",1597
"Device",28
"DiagnosticReport",8229
"DocumentReference",4769
"Encounter",4769
"ExplanationOfBenefit",4769
"ImagingStudy",145
"Immunization",1616
"Location",194
"Medication",326
"MedicationAdministration",326
"MedicationRequest",5087
"Observation",42929
"Organization",194
"Patient",120
"Practitioner",195
"PractitionerRole",195
"Procedure",3608
"Provenance",120
"SupplyDelivery",1886
END
)"

test "resource totals" "$ACTUAL_TOTALS" "$EXPECTED_TOTALS"
3 changes: 2 additions & 1 deletion .github/scripts/check-total-number-of-resources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

test "total number of resources" "$(curl -sH 'Accept: application/fhir+json' http://localhost:8080/fhir | jq -r .total)" "$1"
BASE="http://localhost:8080/fhir"
test "total number of resources" "$(curl -sH 'Accept: application/fhir+json' "$BASE" | jq -r .total)" "$1"
39 changes: 39 additions & 0 deletions .github/scripts/search-observation-profile-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8080/fhir"
PROFILE_URL="http://example.com/fhir/StructureDefinition/$(uuidgen | tr '[:upper:]' '[:lower:]')"

observation() {
cat <<END
{
"resourceType": "Observation",
"meta" : {
"profile" : [
"$PROFILE_URL|$1"
]
}
}
END
}

create() {
curl -s -f -H "Content-Type: application/fhir+json" -H 'Accept: application/fhir+json' -d @- -o /dev/null "$BASE/Observation"
}

observation "1.2.3" | create
observation "1.3.4" | create
observation "2.1.6" | create

search() {
curl -s -H "Content-Type: application/fhir+json" "$BASE/Observation?_profile$1=$PROFILE_URL$2&_summary=count" | jq -r .total
}

test "Observation below v1 count" "$(search ":below" "|1")" "2"
test "Observation below v2 count" "$(search ":below" "|2")" "1"
test "Observation below all count" "$(search ":below" "")" "3"
# Patch version doesn't work with below
test "Observation below v1.2.3 count" "$(search ":below" "|1.2.3")" "0"
test "Observation exact v1.2.3 count" "$(search "" "|1.2.3")" "1"
10 changes: 4 additions & 6 deletions .github/scripts/search-observation-profile.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8080/fhir"
LAB_COUNT=$(curl -s "$BASE/Observation?_profile=http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab&_summary=count" | jq -r .total)

if [ "$LAB_COUNT" = "27218" ]; then
echo "OK 👍: lab count ($LAB_COUNT) equals the expected count"
else
echo "Fail 😞: lab count ($LAB_COUNT) != 27218"
exit 1
fi
test "lab count" "$LAB_COUNT" "27218"
Loading

0 comments on commit 13db1e2

Please sign in to comment.