Giter Site home page Giter Site logo

DSTU2 Support about bunsen HOT 9 OPEN

cerner avatar cerner commented on August 28, 2024 1
DSTU2 Support

from bunsen.

Comments (9)

rbrush avatar rbrush commented on August 28, 2024 1

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.

boristyukin avatar boristyukin commented on August 28, 2024

ideally to pass FHIR version number that will pick a proper HAPI model version

from bunsen.

rbrush avatar rbrush commented on August 28, 2024

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.

boristyukin avatar boristyukin commented on August 28, 2024

@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.

rbrush avatar rbrush commented on August 28, 2024

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.

rbrush avatar rbrush commented on August 28, 2024

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.

boristyukin avatar boristyukin commented on August 28, 2024

from bunsen.

rbrush avatar rbrush commented on August 28, 2024

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.

boristyukin avatar boristyukin commented on August 28, 2024

from bunsen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.