This repository contains examples of how to use the FhirProto platform at github.com/google/fhir. This repo contains a generate-synthea.sh
script for using Synthea to create a synthetic FHIR JSON dataset, and then shows some examples of parsing, printing, validating, profiling and querying. Some of these examples are left intentionally incomplete, to leave exercises to go along with this guide.
The rest of this README contains instructions for setting up an environment for working with FhirProto. For instructions on running the examples, check out EXAMPLES.md.
For a more comprehensive explanation of the platform, see the User Guide at the main repo
FhirProto uses Bazel as its dependency management/build tool. This is a declarative build system used by Google, Tensorflow, and many others. We require a minimum Bazel version of 2.2.0. Follow steps here to download and run the install script. Pro-tip: make sure not to drop the --user
flag when running the script. Verify that bazel is installed correctly by running bazel --version
.
You can always check what version of Bazel you have by running bazel --version
This repository also provides an example of Gradle integration with the published Java library on Google's Maven repository. See build.gradle
for how to set it up and ParsePatients.java
for how to run it.
Next, we’ll clone the example repository into a git directory. If you don’t have a directory you already use for git code, ~/git
is perfectly reasonable:
mkdir ~/git
cd ~/git
Then, clone this repo using
git clone https://github.com/google/fhir-examples.git
cd fhir-examples
Next, we’ll generate a synthetic FHIR JSON dataset, using Synthea, via the generate-synthea.sh
script. We’ll need a workspace directory for this dataset - here we’ll use ~/fhirdata/
WORKSPACE=~/fhirdata
./generate-synthea.sh $WORKSPACE
This will create three data directories:
$WORKSPACE/bundles/
contains 1000 patient bundles, each in its own JSON file$WORKSPACE/ndjson/
contains one NDJSON file per resource type, where each line represents a record of that type$WORKSPACE/analytic/
contains two files per resource type for use with Analytic SQL-on-FHIR: a.schema.json
file containing the analytic schema for each resource, and a.analytic.ndjson
file containing the resources printing according to the analytic schema. For more on this, see the Analytic Printing and BigQuery section in the User Guide.
At this point, we can validate that our bazel environment is set up correctly and our dataset is generated by running a simple test example:
bazel build //cc/google/fhir_examples:ParsePatients
bazel-bin/cc/google/fhir_examples/ParsePatients $WORKSPACE
This should parse all 1000 patients we generated into FhirProto, and print one out as an example.
Generating custom profiles and protos makes use of a couple of scripts defined by the FhirProto library. To add these to your bin
, run
curl https://raw.githubusercontent.com/google/fhir/v0.5.0/bazel/generate_protos_utils.sh > ~/bin/generate_protos_utils.sh && \
curl https://raw.githubusercontent.com/google/fhir/v0.5.0/bazel/generate_protos.sh > ~/bin/generate_protos.sh && \
curl https://raw.githubusercontent.com/google/fhir/v0.5.0/bazel/generate_definitions_and_protos.sh > ~/bin/generate_definitions_and_protos.sh && \
chmod +x ~/bin/generate_protos.sh && chmod +x ~/bin/generate_definitions_and_protos.sh
Finally, some examples show how to use Analytic SQL-on-FHIR with BigQuery, which is free to set up and provides a sandbox environment with pretty good quotas. There are some examples in shell directory that show how to upload data to BigQuery using th bq command line tool. Once it's there, you can either query it from the Cloud Console, or use the bq
tool as is done in run_queries.sh.
FHIR® is the registered trademark of HL7 and is used with the permission of HL7. Use of the FHIR trademark does not constitute endorsement of this product by HL7.
fhir-examples's People
Forkers
raghavpatnecha nickgeorge swamy-mudhbasalar tmc sttawm ymnliu isabella232 neotim hjseo7 sudev hadt0786 gthaker bxh mtyler68 drscarlat leajab jonnycrunch michael-lys-lark brucearctor tribe-health jonathan-consensyshealth zohrehj dlaz simranbhatt vnuzhnenko theshedman sherry-s-yuan haochunchang ghas-results ivannau homomorphicencryptionnexusfhir-examples's Issues
"bazel build //cc/google/fhir_examples:ParsePatients" seems to have an URL error
Hi, I was following the instructions to play around with examples for FhirProto. I ran "./generate-synthea.sh $WORKSPACE" and it seemed like I successfully generated $WORKSPACE/bundles/, $WORKSPACE/ndjson/, and $WORKSPACE/analytic/. However, when I was trying to validate that my bazel environment was correct by running "bazel build //cc/google/fhir_examples:ParsePatients", it gave me some errors that might include some invalid URL paths.
It looks like this:
Starting local Bazel server and connecting to it...
ERROR: no such package '@@bazel_tools//platforms': BUILD file not found in directory 'platforms' of external repository @@bazel_tools. Add a BUILD file to a directory to mark it as a package.
ERROR: /private/var/tmp/_bazel_jasonwang/5e6da5e0c0df3beebeb7eaebe5e37e83/external/com_google_absl/absl/BUILD.bazel:42:15: no such package '@@bazel_tools//platforms': BUILD file not found in directory 'platforms' of external repository @@bazel_tools. Add a BUILD file to a directory to mark it as a package. and referenced by '@@com_google_absl//absl:windows'
ERROR: /private/var/tmp/_bazel_jasonwang/5e6da5e0c0df3beebeb7eaebe5e37e83/external/com_google_absl/absl/cleanup/BUILD.bazel:39:11: errors encountered resolving select() keys for @@com_google_absl//absl/cleanup:cleanup
ERROR: Analysis of target '//cc/google/fhir_examples:ParsePatients' failed; build aborted: Analysis failed
INFO: Elapsed time: 10.373s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
Fetching repository @@bazel_toolscc_configure_extensionlocal_config_cc; starting
Fetching repository @@nlohmann_json; starting
Fetching repository @@Icu; starting
Fetching repository @@protobuf~; starting
Fetching /private/var/tmp/_bazel_jasonwang/5e6da5e0c0df3beebeb7eaebe5e37e83/external/protobuf~; Extracting protobuf-all-21.7.zip
Fetching repository @@maven; starting
Fetching repository @@rules_javatoolchains~remotejdk11_macos_aarch64; startingtoolchains~remote_java_tools_darwin_arm64; starting ... (11 fetches)
Fetching repository @@rules_java
Any help would be appreciated, thank you!
generate_protos_from_config.sh does not exist
(It's the file used to convert profiles to protos in the third example.)
Broken link to user guide in README.md
There is a broken link referring to the user guide in README.md#L7. I believe the correct destination should be https://github.com/google/fhir-examples/blob/master/USERGUIDE.md
.
Replacement suggestion:
For a more comprehensive explanation of the platform, see the [**User Guide**](https://github.com/google/fhir-examples/blob/master/USERGUIDE.md).
Broken links in USERGUIDE.md
There are a lot of broken links in the user guide, e.g. https://github.com/google/fhir/blob/master/proto/profile_config.proto which does not resolve
running "bazel build //cc/google/fhir_examples:ParsePatients" on Ubuntu creates errors
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository fhir_bazel_pip_dependencies instantiated at:
/home/h/fhir-examples/WORKSPACE:23:12: in
/home/h/.cache/bazel/_bazel_h/53cd8c1ffe775ea94a7e4204fd2a4fc0/external/rules_python/python/pip.bzl:128:15: in pip3_import
Repository rule pip_import defined at:
/home/h/.cache/bazel/_bazel_h/53cd8c1ffe775ea94a7e4204fd2a4fc0/external/rules_python/python/pip.bzl:51:29: in
ERROR: An error occurred during the fetch of repository 'fhir_bazel_pip_dependencies':
Traceback (most recent call last):
File "/home/h/.cache/bazel/_bazel_h/53cd8c1ffe775ea94a7e4204fd2a4fc0/external/rules_python/python/pip.bzl", line 49, column 13, in _pip_import_impl
fail("pip_import failed: %s (%s)" % (result.stdout, result.stderr))
Error in fail: pip_import failed: (Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in run_code
exec(code, run_globals)
File "/home/h/.cache/bazel/bazel_h/53cd8c1ffe775ea94a7e4204fd2a4fc0/external/rules_python/tools/piptool.par/main.py", line 71, in
File "/tmp/tmpusr4m7d/pip-tmp/pip/init.py", line 43, in
from pip.utils import get_installed_distributions, get_prog
File "/tmp/tmpusr4m7d/pip-tmp/pip/utils/init.py", line 23, in
from pip.locations import (
File "/tmp/tmpusr4m7d/pip-tmp/pip/locations.py", line 9, in
from distutils import sysconfig
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.8/distutils/init.py)
)
ERROR: no such package '@fhir_bazel_pip_dependencies//': pip_import failed: (Traceback (most recent call last):
File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "/usr/lib/python3.8/runpy.py", line 87, in run_code
exec(code, run_globals)
File "/home/h/.cache/bazel/bazel_h/53cd8c1ffe775ea94a7e4204fd2a4fc0/external/rules_python/tools/piptool.par/main.py", line 71, in
File "/tmp/tmpusr4m7d/pip-tmp/pip/init.py", line 43, in
from pip.utils import get_installed_distributions, get_prog
File "/tmp/tmpusr4m7d/pip-tmp/pip/utils/init.py", line 23, in
from pip.locations import (
File "/tmp/tmpusr4m7d/pip-tmp/pip/locations.py", line 9, in
from distutils import sysconfig
ImportError: cannot import name 'sysconfig' from 'distutils' (/usr/lib/python3.8/distutils/init.py)
)
Following the guide gives errors when running ./generate_synthea.sh
I tried following the guide available on this repo's README.
I am using a ubuntu virtual machine on virtualbox.
Encountering errors such as:
'''
INFO: Call stack for the definition of repository 'fhir_bazel_pip_dependencies' which is a pip_import (rule definition at /home/zhihaotan/.cache/bazel/_bazel_zhihaotan/9b5b980c5e264403b4ce49ee1b642806/external/rules_python/python/pip.bzl:42:14):
- /home/zhihaotan/.cache/bazel/_bazel_zhihaotan/9b5b980c5e264403b4ce49ee1b642806/external/com_google_fhir/bazel/workspace.bzl:10:5
- /home/zhihaotan/git/fhir-examples/WORKSPACE:18:1
ERROR: An error occurred during the fetch of repository 'fhir_bazel_pip_dependencies':
pip_import failed: ()
ERROR: no such package '@fhir_bazel_pip_dependencies//': pip_import failed: ()
ERROR: no such package '@fhir_bazel_pip_dependencies//': pip_import failed: ()
INFO: Elapsed time: 18.796s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
./generate-synthea.sh: line 38: bazel-bin/external/com_google_fhir/java/SplitBundleMain: No such file or directory
mkdir: cannot create directory ‘/home/zhihaotan/fhirdata/analytic/’: File exists
mv: cannot stat '/home/zhihaotan/fhirdata/ndjson/.schema.json': No such file or directory
mv: cannot stat '/home/zhihaotan/fhirdata/ndjson/.analytic.ndjson': No such file or directory
Done
'''
Could I please get some help on this as well as on the tensorflow's guide?
Issue building: No matching distribution found for fhir_bazel_pip_dependencies
Example error below:
~/bin/generate_definitions_and_protos.sh //proto/myprofile:myprofile
INFO: Repository fhir_bazel_pip_dependencies instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule pip_import defined at:
/private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/rules_python/python/pip.bzl:51:29: in <toplevel>
ERROR: An error occurred during the fetch of repository 'fhir_bazel_pip_dependencies':
pip_import failed: Collecting apache_beam>=2.14.0 (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/17/92/1975c3f3a880f409b1b06a600f9afab8569c9f1d65e2db56336dc0bae6a6/apache_beam-2.23.0-cp38-cp38-macosx_10_9_x86_64.whl
Saved ./apache_beam-2.23.0-cp38-cp38-macosx_10_9_x86_64.whl
Collecting funcsigs (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Saved ./funcsigs-1.0.2-py2.py3-none-any.whl
Collecting google-cloud-bigquery (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/41/2c/e4da0278a5fd8e71710cfded98c13a5ed2ecb66c704fc4feb3734e8c027d/google_cloud_bigquery-1.27.2-py2.py3-none-any.whl
Saved ./google_cloud_bigquery-1.27.2-py2.py3-none-any.whl
Collecting nose>=1.3.7 (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/15/d8/dd071918c040f50fa1cf80da16423af51ff8ce4a0f2399b7bf8de45ac3d9/nose-1.3.7-py3-none-any.whl
Saved ./nose-1.3.7-py3-none-any.whl
Collecting protobuf (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/eb/79/feb55f5a6c8bd48d79beeb80c11299eb0d378c6df8ca0f33f91d8eda637b/protobuf-3.13.0-cp38-cp38-macosx_10_9_x86_64.whl
Saved ./protobuf-3.13.0-cp38-cp38-macosx_10_9_x86_64.whl
Collecting python-dateutil>=2.8.1 (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Saved ./python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting request (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 7))
( Could not find a version that satisfies the requirement request (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 7)) (from versions: )
No matching distribution found for request (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 7))
)
ERROR: no such package '@fhir_bazel_pip_dependencies//': pip_import failed: Collecting apache_beam>=2.14.0 (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 1))
Using cached https://files.pythonhosted.org/packages/17/92/1975c3f3a880f409b1b06a600f9afab8569c9f1d65e2db56336dc0bae6a6/apache_beam-2.23.0-cp38-cp38-macosx_10_9_x86_64.whl
Saved ./apache_beam-2.23.0-cp38-cp38-macosx_10_9_x86_64.whl
Collecting funcsigs (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 2))
Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Saved ./funcsigs-1.0.2-py2.py3-none-any.whl
Collecting google-cloud-bigquery (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 3))
Using cached https://files.pythonhosted.org/packages/41/2c/e4da0278a5fd8e71710cfded98c13a5ed2ecb66c704fc4feb3734e8c027d/google_cloud_bigquery-1.27.2-py2.py3-none-any.whl
Saved ./google_cloud_bigquery-1.27.2-py2.py3-none-any.whl
Collecting nose>=1.3.7 (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 4))
Using cached https://files.pythonhosted.org/packages/15/d8/dd071918c040f50fa1cf80da16423af51ff8ce4a0f2399b7bf8de45ac3d9/nose-1.3.7-py3-none-any.whl
Saved ./nose-1.3.7-py3-none-any.whl
Collecting protobuf (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 5))
Using cached https://files.pythonhosted.org/packages/eb/79/feb55f5a6c8bd48d79beeb80c11299eb0d378c6df8ca0f33f91d8eda637b/protobuf-3.13.0-cp38-cp38-macosx_10_9_x86_64.whl
Saved ./protobuf-3.13.0-cp38-cp38-macosx_10_9_x86_64.whl
Collecting python-dateutil>=2.8.1 (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 6))
Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Saved ./python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting request (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 7))
( Could not find a version that satisfies the requirement request (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 7)) (from versions: )
No matching distribution found for request (from -r /private/var/tmp/_bazel_emilylewis/6ed13ea54d141d16d801a31bd3ba8818/external/com_google_fhir/bazel/requirements.txt (line 7))
)
INFO: Elapsed time: 3.056s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)```
Gradle is not working
Gradle integration is not working.
I've downloaded latest version and can see below error:
fhir-examples ) ./gradlew build
Downloading https://services.gradle.org/distributions/gradle-7.4-bin.zip
...........10%...........20%...........30%...........40%...........50%...........60%...........70%...........80%...........90%...........100%
Welcome to Gradle 7.4!
Here are the highlights of this release:
- Aggregated test and JaCoCo reports
- Marking additional test source directories as tests in IntelliJ
- Support for Adoptium JDKs in Java toolchains
For more details see https://docs.gradle.org/7.4/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* Where:
Build file '$HOME/fhir-examples/build.gradle' line: 38
* What went wrong:
A problem occurred evaluating root project 'fhirexamples'.
> Could not find method testCompile() for arguments [{group=junit, name=junit, version=4.12}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 8s
<-------------> 0% WAITING
> IDLE
Go: How to iterate through contained resource
Thanks for the great examples. With the Go parse patients example, can you give a hint on how to iterate through all patients that have been unmarshalled? I only see one, and the usual output of Patient.ndjson from Synthea is multiple. I only see the first one and I don't see a function to choose an index/slice.
The `ParsePatients` path needs to be updated
The build path of bazel build cc:ParsePatients
should be updated as bazel build //cc/google/fhir_examples:ParsePatients
in the README.md
.
The thing is similar for bazel-bin/ParsePatients $WORKSPACE
which I found eventually working as:
bazel-bin/cc/google/fhir_examples/ParsePatients.runfiles/com_google_fhir_examples/cc/google/fhir_examples/ParsePatients $WORKSPACE
errors in generate-synthea.sh: Cannot find Java binary
Hi, My Ubuntu 20.04 system info is as follows:
$ uname -a
Linux <hostname> 5.10.0-1038-oem #40-Ubuntu SMP Fri Jul 16 15:08:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)
$ bazel --version
bazel 4.2.0
I am encountering following errors. Any pointers on how to get resolve these? Thanks.
└─ $ ▶ ./generate-synthea.sh $WORKSPACE
~/fhirdata ~/gocode/github.com/google/fhir-examples
Cloning into 'synthea'...
<redacted... lots of lines in between>
BUILD SUCCESSFUL in 1m 20s
4 actionable tasks: 4 executed
~/gocode/github.com/google/fhir-examples
Finished generating Synthea dataset. Running SplitBundle...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/local_jdk/BUILD.bazel:3:10: in fail_rule rule @local_jdk//:jdk:
Traceback (most recent call last):
File "/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/jdk/fail_rule.bzl", line 19, column 13, in _fail_rule_impl
fail("%s %s" % (ctx.attr.header, ctx.attr.message))
Error in fail: Auto-Configuration Error: Cannot find Java binary bin/java in /home/<username>/.cache/bazel/_bazel_<username>/install/96e7556c3bbfa3fa31016b638fdff086/embedded_tools/tools/jdk/nosystemjdk; either correct your JAVA_HOME, PATH or specify embedded Java (e.g. --javabase=@bazel_tools//tools/jdk:remote_jdk11)
INFO: Repository rules_proto instantiated at:
/home/<username>/gocode/github.com/google/fhir-examples/WORKSPACE:14:23: in <toplevel>
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/com_google_fhir/bazel/dependencies.bzl:37:17: in fhirproto_dependencies
Repository rule http_archive defined at:
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository remote_java_tools_linux instantiated at:
/DEFAULT.WORKSPACE.SUFFIX:223:6: in <toplevel>
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository maven instantiated at:
/home/<username>/gocode/github.com/google/fhir-examples/WORKSPACE:20:20: in <toplevel>
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/com_google_fhir/bazel/workspace.bzl:8:18: in fhirproto_workspace
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/rules_jvm_external/defs.bzl:36:19: in maven_install
Repository rule coursier_fetch defined at:
/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/rules_jvm_external/coursier.bzl:559:33: in <toplevel>
ERROR: Analysis of target '@com_google_fhir//java/com/google/fhir/examples:SplitBundle' failed; build aborted: Analysis of target '@local_jdk//:jdk' failed
INFO: Elapsed time: 42.634s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (21 packages loaded, 191 targets configured)
currently loading: @com_google_fhir//proto/google/fhir/proto/r4/core/resources ... (2 packages)
./generate-synthea.sh: line 42: bazel-bin/external/com_google_fhir/java/com/google/fhir/examples/SplitBundle: No such file or directory
mv: cannot stat '/home/<username>/fhirdata/ndjson/*.schema.json': No such file or directory
mv: cannot stat '/home/<username>/fhirdata/ndjson/*.analytic.ndjson': No such file or directory
Done
Error when running example 3: /usr/bin/zip: Argument list too long
When running generate_protos.sh proto/google/fhir_examples/myprofile:myprofile
, I get:
ERROR: /private/var/tmp/_bazel_sttawm/af784bd1a9c84e41a49e63c2d22f20ae/external/com_google_fhir/spec/BUILD:28:13: Executing genrule @com_google_fhir//spec:_genrule_fhir_stu3_package failed (Exit 1) bash failed: error executing command /bin/bash bazel-out/darwin-fastbuild/bin/external/com_google_fhir/spec/_genrule_fhir_stu3_package.genrule_script.sh
Use --sandbox_debug to see verbose messages from the sandbox
bazel-out/darwin-fastbuild/bin/external/com_google_fhir/spec/_genrule_fhir_stu3_package.genrule_script.sh: line 2: /usr/bin/zip: Argument list too long
Maybe passing a directory to zip would fix it?
I'm on a mac (ios 10.15) which gives:
sttawm$ bazel --version
bazel 3.3.0-homebrew
sttawm$ zip -v
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon. Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.
Compiled with gcc 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.29.20) (-macos10.15-objc-selector-opts) for Unix (Mac OS X) on Apr 17 2020.
Zip special compilation options:
USE_EF_UT_TIME (store Universal Time)
SYMLINK_SUPPORT (symbolic links supported)
LARGE_FILE_SUPPORT (can read and write large files on file system)
ZIP64_SUPPORT (use Zip64 to store large files in archives)
STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
UIDGID_16BIT (old Unix 16-bit UID/GID extra field also used)
[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)
Encryption notice:
The encryption code of this program is not copyrighted and is
put in the public domain. It was originally written in Europe
and, to the best of our knowledge, can be freely distributed
in both source and object forms from any country, including
the USA under License Exception TSU of the U.S. Export
Administration Regulations (section 740.13(e)) of 6 June 2002.
Zip environment options:
ZIP: [none]
ZIPOPT: [none]
upload_resource.sh script producing error
./upload_resource.sh $WORKSPACE
Dataset 'protofhir:fhirexamples' successfully created.
Uploading ...
BigQuery error in load operation: Cannot determine table described by fhirexamples.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.