FHIR Client

FHIR defines REST operations for interacting with a server.

In Gleam, for r4, r4b, r5:

Regardless of compilation target, the first step is to create a client with the FHIR server base url.

import fhir/r4_httpc

pub fn main() {
  //creating a client for a public FHIR server and reading a patient
  let client = r4_httpc.fhirclient_new("https://r4.smarthealthit.org/")
  let assert Ok(pat) =
    r4_httpc.patient_read("87a339d0-8cae-418e-89c7-8651e6aab3c6", client)
  echo pat
}
Search Document