Skip to content

Commit 37bac7d

Browse files
committed
Script to generate synthea patient data for benchmarking
1 parent 480fd79 commit 37bac7d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

engine/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/build
2+
/synthea

engine/generate_synthea.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
# Parameters
4+
POPULATION="${1:-3}"
5+
SCRIPT_DIR=$(dirname "$0")
6+
SYNTHEA_DIR="$SCRIPT_DIR"/synthea
7+
8+
if [ ! -d "$SYNTHEA_DIR" ]; then
9+
# build synthea according to https://github.com/synthetichealth/synthea
10+
git clone https://github.com/synthetichealth/synthea.git "$SYNTHEA_DIR"
11+
fi
12+
pushd "$SYNTHEA_DIR" || exit
13+
# generate valid R4 resources in output/fhir
14+
./run_synthea -m pregnancy -p "$POPULATION" --exporter.fhir.included_resources Patient --exporter.fhir.transaction_bundle false --exporter.years_of_history 1 --exporter.fhir.use_us_core_ig false --exporter.fhir.bulk_data true
15+
popd || exit
16+
17+
# Move to benchmark assets dir
18+
mkdir -p "$SCRIPT_DIR"/benchmark/src/androidTest/assets/bulk_data
19+
cp "$SYNTHEA_DIR"/output/fhir/Patient*.ndjson "$SCRIPT_DIR"/benchmark/src/androidTest/assets/bulk_data

0 commit comments

Comments
 (0)