Skip to content

🏥 Go FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Golang.

License

Notifications You must be signed in to change notification settings

Squirrel-Entreprise/go-fhir

Repository files navigation

Golang FHIR Client Esante

Go Reference

Introduction 🇫🇷

Bienvenue sur la librairie Go FHIR, une bibliothèque open-source développée par Squirrel pour faciliter la manipulation des données de santé en utilisant le format FHIR (Fast Healthcare Interoperability Resources). Cette librairie est conçue pour être performante et facile à utiliser, offrant une interface simple et intuitive pour interagir avec des serveurs FHIR.

Introduction 🇬🇧

Welcome to the Go FHIR library, an open-source library developed by Squirrel to facilitate the manipulation of health data using the FHIR (Fast Healthcare Interoperability Resources) format. This library is designed to be performant and easy to use, providing a simple and intuitive interface for interacting with FHIR servers.

Sample

visible into ./cmd/usecases/physioReunionMayotte/main.go

Initialization

apiKey := os.Getenv("ESANTE_API_KEY")
clientFhir := fhir.New("https://gateway.api.esante.gouv.fr/fhir", "ESANTE-API-KEY", apiKey, fhir.R4)
clientFhir.SetEntryLimit(500)
clientFhir.SetTimeout(30)

Searching PractitionerRole by Role and Active Status

Please note that we receive a prototype of the BundleResult struct, which is not yet complete, after executing the request.

bundleRes := clientFhir.
    Search(fhirInterface.PRACTITIONER_ROLE).
    Where(models_r4.PractitionerRole{}.
        Role.
        Contains().
        Value("70")).
    And(models_r4.PractitionerRole{}.
        Active.
        IsActive()).
    ReturnBundle().Execute()

Load the next page

res = clientFhir.LoadPage().Next(res).Execute()

Searching Organization by Id

organizationRaw := clientFhir.
    Search(fhirInterface.ORGANIZATION).
    ById(e[0].GetOrganizationReference()).
    ReturnRaw().
    Execute()

Credits

This package was inspired by the excellent HAPI FHIR Java library,

About

🏥 Go FHIR is a complete implementation of the HL7 FHIR standard for healthcare interoperability in Golang.

Topics

Resources

License

Stars

Watchers

Forks

Languages