Skip to main content

HL7 FHIR Library

Project description

# Copyright (C) 2014 Luis Falcon <>
# Copyright (C) 2014 GNU Solidario <>

# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <>.

About the FHIR Python Package

The FHIR goal is to implement the HL7 FHIR[1] Reference in Python

The project was born to provide the backend to the GNU Health[2] FHIR modules, but it should work in other EMRs and clients.

You can get the latest development version at the Mercurial server in Savannah[3]


Sample use :

>>> from fhir import *

>>> query = RestfulFHIR().search('','Patient','name=Jimmy')

>>> print query
<Response [200]>

>>> print query.text

<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="">
<title>Search results for resource type Patient</title>
<link href="" rel="fhir-base" />
<link href=";name=Jimmy&amp;search-sort=_id" rel="self" />
<totalResults xmlns="">1</totalResults>
<entry xmlns="">
<title>Patient "233" Version "1"</title>
<link href="" rel="self" />
<content type="text/xml">
<Patient xmlns="">
<status value="generated"/>
<div xmlns="">Manning, Jimmy. MRN:&#x0A; 577552</div>
<label value="SSN"/>
<system value=""/>
<value value="577552"/>
<use value="official"/>
<family value="Manning"/>
<given value="Jimmy"/>
<system value=""/>
<code value="M"/>
<display value="Male"/>
<birthDate value="1975-06-07"/>
<reference value="Organization/1"/>
<active value="true"/>
<summary type="xhtml">
<div xmlns="">Manning, Jimmy. MRN:&#x0A; 577552</div>

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fhir, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size fhir-0.0.1.tar.gz (15.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page