-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path_load.sh
executable file
·24 lines (18 loc) · 1.06 KB
/
_load.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
#/usr/bin/env bash
# export FHIR="https://blaze.life.uni-leipzig.de/fhir"
export FHIR="https://cloud.alphora.com/sandbox/r4/cqm/fhir"
# export FHIR="http://localhost:8080/cqf-ruler-r4/fhir"
# load our revised file
echo "Loading revised file"
cat ./preparedsynthea.json | curl -X POST -H "Content-Type: application/fhir+json;charset=utf-8" --data @- ${FHIR}
# for testing also load on public hapi fhir since alphora can't be search-queried identifier
echo "Loading revised file"
cat ./preparedsynthea.json | curl -X POST -H "Content-Type: application/fhir+json;charset=utf-8" --data @- 'http://hapi.fhir.org/baseR4'
# rm output/fhir/hospital* || true
cat output/fhir/hospital*.json | curl -X POST -H "Content-Type: application/fhir+json;charset=utf-8" --data @- ${FHIR}
cat output/fhir/practitioner*.json | curl -X POST -H "Content-Type: application/fhir+json;charset=utf-8" --data @- ${FHIR}
# todo: loads org stuff twice, but doesn't hurt anything
for FILE in output/fhir/*.json
do
curl -s -X POST -H "Content-Type: application/fhir+json;charset=utf-8" -d @$FILE ${FHIR}
done