Skip to main content

Parse FHIR query string

Project description

A library to parse FHIR query strings.

  • Validates type and returns correct object

  • Parses modifiers and prefixes

Generally only have included Resources with maturity greater than 3. Some exceptions.

Usage

from fhir_parse_qs import Search
search = Search('Patient', 'name=bob') # Search(<endpoint>, <query_string>)

# what endpoint
search.endpoint --> 'Patient'

# each parameter/value pair gets parsed into a namedtuple
search.parsed[0] --> FHIRSearch(...)

# all the namedtuples
search.parsed --> [FHIRSearch(...)]

# get FHIRSearch with parameter as key
search['name'] --> FHIRSearch(...)

search.parsed[0].modifier --> None
search.parsed[0].prefix --> None
search.parsed[0].value --> 'bob'
search.parsed[0].paramater --> 'name'

# can iterate over the paramater/value pairs
for x in search:
     x --> FHIRSearch(...)

Project details


Download files

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

Source Distribution

fhir_parse_qs-0.1.1.tar.gz (2.4 kB view hashes)

Uploaded Source

Built Distribution

fhir_parse_qs-0.1.1-py2.py3-none-any.whl (2.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page