Comments (2)
The issue is that the FHIR::
module contains R4 resources only, and the FHIR::STU3::
module contains STU3 resources only, and the FHIR::DSTU2::
module contains DSTU2 resources only.
The client can parse different FHIR versions, but it does not monkey-patch any of the FHIR
modules.
So, when you explicitly call FHIR::CommunicationRequest...
you are explicitly saying "use R4 CommunicationRequest."
Apologies if this was not obvious or a point of confusion. We hope to improve the documentation and examples for this gem in the future. This should be a topic we cover.
from fhir_client.
Thanks @jawalonoski for the quick reply. The problem is that the behaviour is not the same for each client version. If we look more closely to the parse_reply
method:
fhir_client/lib/fhir_client/client.rb
Lines 320 to 338 in 59ccd55
It appears that the behaviour is as follows (assuming that the format is
xml
- same behaviour for json
):
- case (i) if the client version is
dstu2
I would go throughFHIR::DSTU2::Xml.from_xml
anyway - case (ii) if the client version is
r4
I would go throughFHIR::Xml.from_xml
, except if I explicitly callFHIR::DSTU2::...Read
, in which case I would go throughFHIR::DSTU2::Xml.from_xml
- case (iii) if the client version is
stu3
it depends only on the module I call theread
method on:
•FHIR::DSTU2::...Read
->FHIR::DSTU2::Xml.from_xml
•FHIR::...Read
->FHIR::Xml.from_xml
•FHIR::STU3::...Read
->FHIR::STU3::Xml.from_xml
In other words:
- case (i) The client version takes precedence over the module called
- case (ii) No clear priority between the client version and the module called
- case (iii) The module takes precedence over the client version
from fhir_client.
Related Issues (20)
- Can't run rake fhir:console HOT 3
- bundle exec rake fhir:console (error) HOT 11
- Unable to obtain Access Token from Authorization Code HOT 3
- unable to get AllergyIntolerence from FHIR for a patient HOT 1
- fhir::count task fails on R4 server HOT 1
- Is there any option to get patient information from NHS server HOT 2
- Can't modify frozen String
- Using with SMART on FHIR Integration HOT 3
- Gem::InstallError: zeitwerk requires Ruby version >= 2.4.4.
- Client response body conversion to JSON
- NoMethodError: undefined method `has_key?' for nil:NilClass HOT 6
- SMART on FHIR
- OAuth2 access token is not passed to `client.client_credentials.get_token`
- oauth2 gem used by fhir_client is EOL
- set_tls_auth
- Search crashing instead of paginating
- Question: Underlying request details HOT 2
- Parser warning during search HOT 1
- Issues sifting through response from FHIR HOT 3
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 fhir_client.