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)
Pip install¶
- 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
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