-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Ensure History Changes only if Resource Changes
This change introduces a new transaction command called "keep" that just means: "Keep the resource of it is not changed in between." Unlike "put", "keep" will not introduce a new history entry. The command "keep" is always conditional because the detection of no changes will be done outside of the transaction. This is work in progress, because two things are missing: the detection of no changes inside the transaction for normal "put" commands and the retry if "keep" will fail. Closes: #777
- Loading branch information
1 parent
d5e17ff
commit 5e1b05b
Showing
30 changed files
with
813 additions
and
280 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash -e | ||
|
||
# | ||
# This script tests that an update without changes of the resource content | ||
# doesn't create a new history entry. | ||
# | ||
|
||
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" | ||
. "$SCRIPT_DIR/util.sh" | ||
|
||
BASE="http://localhost:8080/fhir" | ||
PATIENT_IDENTIFIER="X79746011X" | ||
PATIENT=$(curl -sH "Accept: application/fhir+json" "$BASE/Patient?identifier=$PATIENT_IDENTIFIER" | jq -r '.entry[0].resource') | ||
ID="$(echo "$PATIENT" | jq -r .id)" | ||
VERSION_ID="$(echo "$PATIENT" | jq -r .meta.versionId)" | ||
RESULT=$(curl -sXPUT -H "Content-Type: application/fhir+json" -d "$PATIENT" "$BASE/Patient/$ID") | ||
RESULT_VERSION_ID="$(echo "$RESULT" | jq -r .meta.versionId)" | ||
|
||
test "versionId" "$RESULT_VERSION_ID" "$VERSION_ID" | ||
|
||
HISTORY_TOTAL=$(curl -sH "Accept: application/fhir+json" "$BASE/Patient/$ID/_history" | jq -r '.total') | ||
|
||
test "history total" "$HISTORY_TOTAL" "1" |
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 |
---|---|---|
|
@@ -2,5 +2,4 @@ target | |
classes | ||
.cpcache | ||
.cache | ||
blaze-load-tests/node_modules | ||
.nrepl-port |
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
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
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
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
Oops, something went wrong.