-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing conditions in parse_reply
method
#127
Comments
The issue is that the The client can parse different FHIR versions, but it does not monkey-patch any of the So, when you explicitly call 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. |
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 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 ):
In other words:
|
I am having troubles reading the
CommunicationRequest.requester.agent
(please find an example ofpayload here).
Our client uses the
STU3
version. We call the methoduse_stu3
on our client. We usually read CommunicationRequest using the syntaxFHIR::CommunicationRequest.read("123456")
. I realized that to be able to read the attributerequester.agent
, I had to use the syntaxFHIR::STU3::Communication.read("123456")
.Should the method used to parse the fhir payload not be based on the fhir_version of the client in priority ? So that I can call
FHIR::CommunicationRequest.read("123456")
and the resource will be read correctly according to the client version.The text was updated successfully, but these errors were encountered: