Skip to content

v0.6.0: Parsing, Printing and Validating in Python

Compare
Choose a tag to compare
@nickgeorge nickgeorge released this 06 Oct 02:51
· 689 commits to master since this release

This release adds Python implementations of some of the core FhirProto libraries: Parsing raw JSON into FhirProto, Printing FhirProtos into JSON, and Validating FhirProtos for FHIR data requirements such as required fields and Value Set bindings. These APIs support FHIR versions STU3 and R4.

Examples of this usage (using both Bazel and Pip) can be found in the fhir-examples repo

Proto Package Change

This release contains a backwards compatibility-breaking change to the import paths and file locations of protos. In order to provide better namespacing and parallelism with other languages, proto files have been moved from

//proto/... to //proto/google/fhir/proto/

This means that BUILD deps must be updated:

@com_google_fhir//proto/... to @com_google_fhir//proto/google/fhir/proto/...

Similarly, some source files will have to update import statements. Examples of these changes can be found in the changes to fhir-examples.

PyPi Distribution

FhirProto for Python is available on pypi.org under the package google-fhir. The PyPi package is installable via the pip package manager. The google-fhir package includes the same support for parsing, printing, and validation, as what is present in the source repository and available via bazel for FHIR versions STU3 and R4.

We recommend installing into a Python3 virtual environment such as venv to install google-fhir along with your other project requirements. See the instructions at https://pypi.org/project/google-fhir/ for installation.

Note that *_test.py modules and accompanying data files are not included in the PyPi distribution as a means to help reduce the package size. If you need the test modules or the accompanying data files themselves, both are available in the raw source code and executable via the bazel project. See https://github.com/google/fhir for more details on how to execute via supported versions of bazel.

Machine Learning and FhirProto

The code for generating TensorFlow sequence examples, as well as the code for labeling and modeling with Fhir SeqEx has been removed from the core FhirProto library. Its new home will be https://github.com/google/fhir-ml. This provides better separation of core functionality vs uses of FhirProto, as well as helping to keep binary size and compile times down. Keep an eye out for the initial commit of code to that repo very soon.

Other changes

  • google::fhir::Status and google::fhir::StatusOr have been removed in favor of absl::Status and absl::StatusOr

Upcoming Changes

We intend to have a fast-follow v0.6.1 that will contain a few patch improvements:

  • Merge in some performance improvements to Python parsing
  • Provide a Maven jar for including Java code in build systems like Gradle without Bazel