Is there a suitable package to be able to use the FHIR standard in Golang? There should be a small dependency on the Google Cloud.
Asked
Active
Viewed 2,177 times
1
-
You might find http://community.fhir.org/ more useful for this question. I see https://github.com/intervention-engine/fhir but it is not actively developed. – jkr Jul 09 '21 at 12:25
1 Answers
1
One way of using FHIR in Golang is the FHIR Protocol Buffers implementation: https://github.com/google/fhir
This includes a Golang parser/serializer for JSON to protobuf, which will get you language-specific data structures. It doesn't include a library for the FHIR REST API but you can use standard http libraries for that.

Paul Church
- 244
- 1
- 2
-
Can you expand on what you mean by "It doesn't include a library for the FHIR REST API but you can use standard http libraries for that." please? – alex Sep 22 '21 at 23:19
-
1Ultimately, FHIR rest operations are pretty much basic HTTP. For example, to search for FHIR patients, you just do something like: ``` GET /fhir/r4/Patient?family=smith&given=john ``` All of this is fully documented at https://www.hl7.org/fhir/http.html. The only big thing to know is that you can get a "CapabilityStatement" defining what the server offers by calling "/metadata". Also, most servers will return either XML or JSON depending on what you put in the `Accepts` header – Patrick Narkinsky Jan 29 '22 at 16:39