-
Notifications
You must be signed in to change notification settings - Fork 1
/
_runlibrary.sh
executable file
·48 lines (30 loc) · 1.7 KB
/
_runlibrary.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# run sep cleanup script
./_runcleanup.sh
# use refresh hack
sushi
# move vocabulary, libraries to the right place
cp fsh-generated/resources/CodeSystem-* input/vocabulary/codesystem/manual/
cp fsh-generated/resources/ValueSet-* input/vocabulary/valueset/manual/
cp fsh-generated/resources/Library-* input/resources/library/
bash _refresh.sh
bash _genonce.sh -no-sushi
# export FHIR="http://localhost:8080/cqf-ruler-r4/fhir"
export FHIR="https://cloud.alphora.com/sandbox/r4/cqm/fhir"
export HEADER="Content-Type: application/fhir+json"
cd output
# libaries
for FILE in Analytics FHIRHelpers FHIRCommon DASHConcepts DASHDataElements DASHStratifiers TXCURR TXNEW TXPVLS TXML HTSTST \
; do curl -X PUT -H "$HEADER" --data @output/Library-${FILE}.json $FHIR/Library/${FILE} | jq . ; done
# curl -X PUT -H "$HEADER" --data @output/Library-FHIRCommon.json $FHIR/Library/FHIRCommon | jq .
# curl -X PUT -H "$HEADER" --data @output/Library-DASHConcepts.json $FHIR/Library/DASHConcepts | jq .
# curl -X PUT -H "$HEADER" --data @output/Library-Analytics.json $FHIR/Library/Analytics | jq .
# must POST a transaction bundle of POST methods on each resource
for FILE in Bundle-Example-*.json ; do echo ${FILE} ; done
for FILE in Bundle-Example-*.json ; do curl -XPOST -H "$HEADER" --data @${FILE} $FHIR | jq . ; done
cd ../
# curl '${FHIR}/Patient/1520' | jq .
# curl https://cloud.alphora.com/sandbox/r4/cqm/fhir/Patient/89
# curl https://cloud.alphora.com/sandbox/r4/cqm/fhir/Library/Analytics/$evaluate?subject=Patient/89
# curl 'http://localhost:8080/cqf-ruler-r4/fhir/Library/Analytics/$evaluate?subject=21' | jq .
# curl 'http://localhost:8080/cqf-ruler-r4/fhir/Library/Analytics/$evaluate?subject=Patient/21' | jq .