Skip to content

Installation Guide

The fq utility, short for "fhir-query," is a command-line tool specifically designed to simplify the process of interacting with FHIR servers.

Requirements

  • terminal/command line
  • pip >= 25.0 (Install)

Suggested software

Pip install

  1. In your terminal type:
pip install fhir-aggregator-client

Working in the command line

set a variable to point to a FHIR server like FHIR-Aggregator:

FHIR_BASE=https://google-fhir.fhir-aggregator.org

Run fhir-query using the command fq, as in:

fq --help

Working in python

Start up python, and set an environment variable to point a FHIR server like FHIR-Aggregator:

%env FHIR_BASE=https://google-fhir.fhir-aggregator.org

FHIR-Aggregator is a command line package, so to run commands in local python file you will need to use export the fq command to the terminal using the os package:

import os

os.system('fq --help')

Working in an interactive python notebook

All of our documentation are available as jupyter notebooks. To start a notebook server, go to your command line/terminal and type:

jupyter notebook
This will launch an interactive notebook in your browser.

Set an environment variable to point a FHIR server like FHIR-Aggregator:

%env FHIR_BASE=https://google-fhir.fhir-aggregator.org

FHIR-Aggregator is a command line package, so to run commands in python in a jupytr notebook context you will need to add a ! in front of all your fq commands as in:

!fq --help