Comments (9)
Related to this: we've released Bunsen 0.3.0, which supports both STU3 and early R4 builds. As part of this we moved some of the APIs into bunsen.stu3 packages to future proof usage, so users will need to switch. Some details here:
http://engineering.cerner.com/bunsen/fhir_versions.html
At this point I don't expect that we'll be able to easily add direct use for DSTU2, but the link above has some suggestions for converting that content to STU3 or R4.
from bunsen.
ideally to pass FHIR version number that will pick a proper HAPI model version
from bunsen.
Yeah, I think we can make it pretty easy to do that. There's a FhirVersionEnum from the HAPI API that would be a type-safe way for users to specify the version.
from bunsen.
@rbrush have you thought about this more, Ryan? I am curious about use cases then someone needs to work with multiple vendors who are on different versions of FHIR. Another use case if one keeps historical bundles on one version and then need to upgrade to another version, without migrating archived bundles (which would be a real pain). These are common scenarios with analytics / DW projects.
One way is to build different versions of bunsen for a proper FHIR version. But I think ideally to pass an optional parameter to bunsen parser methods with FHIR version
from bunsen.
I think we can support this, with DSTU2, 3, and (soon) R4 datasets in the same process....similarly to how HAPI separates them. It will take some refactoring of the code but I'll dig a bit deeper over the next few days.
from bunsen.
I took a look at adding DSTU2 support, but the DSTU2 classes in the HAPI library we use don't always follow the same JavaBean conventions as DSTU3 and R4 do. This is important because Spark encoders offer support for JavaBean-style getters and setters, but classes without them don't have a solid way to encode without mucking around in Spark internals that are subject to change.
To see examples of this, notice that the CodeableConcept in STU2 doesn't offer JavaBean-style setters like setCoding that Spark would use to set the coding field [1], but the setCoding as expected exists in STU3 and R4. [2,3]
Because of this, we'll be able to support STU3 and R4 and subsequent releases in the same Bunsen build, but DSTU2 is a challenge. I think the best way to get around this is to convert resources to STU3 or R4 as part of the load into Spark. For instance, if you have an RDD of bundles or resources (which could be pulled from a Hive table or external source), it should be possible to use the conversion function described at [4] to convert it to a newer version, then use the Bunsen-provided encoders to encode that, optionally saving it for future use. This also has the advantage that all queries will be able to use the same FHIR data model
[1]
http://hapifhir.io/apidocs-hl7org-dstu2/org/hl7/fhir/instance/model/CodeableConcept.html
[2]
http://hapifhir.io/apidocs-dstu3/org/hl7/fhir/dstu3/model/CodeableConcept.html
[3]
http://hapifhir.io/apidocs-r4/org/hl7/fhir/r4/model/CodeableConcept.html
[4]
http://hapifhir.io/doc_converter.html#Converting_from_DSTU2_to_DSTU3
from bunsen.
from bunsen.
Sounds good. The good news is that while working on this I managed to get most of the way to supporting R4, and am able to use both STU3 and R4 in a single Bunsen build in my local branch. I logged issue #21 to track the completion of that effort.
from bunsen.
from bunsen.
Related Issues (20)
- Certain schemas do not have a default value
- ID fields of converted Avro records are not expected to be fully qualified URLs. HOT 1
- There is a vulnerability in spark 2.4.4,upgrade recommended
- Log a proper error message when a valueset entry in a valuesets bundle doesn't contain version element
- SparkRowConverter for ImagingStudy will throw NPE on DSTU3
- release 0.4.9 missing
- Unable to extract QuestionnaireResponse resource from bundle HOT 1
- Is the Bunsen Python API still maintained? Issues with bunsen Python API (bunsen v 0.5.11) and pyspark v. 3.2.1
- archive this project
- Support Null Codes in String Conversions
- MultiValue & Containers clashing with Type Restrictions
- BroadcastableValueSets threading issue HOT 1
- Primitive Types with maximum cardinality is not supported
- Extension type element is not generated correctly with specified maximum cardinality of "*"
- modifierExtension element is missing in the generated Avro schema
- Issues while trying to query on Observation resource HOT 2
- Travis CI build failure
- [Question] Why is R4 support disabled on latest version (0.5.6)? HOT 1
- SparkRowConverter.forResource seems to not be thread-safe based on intermittent NullPointerException in cluster mode
- "Meta" element not updated in Avro and Spark converters. HOT 1
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.
from bunsen.