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
print(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:
    print(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.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

fhir_parse_qs-0.1.0-py2.py3-none-any.whl (2.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file fhir_parse_qs-0.1.0.tar.gz.

File metadata

  • Download URL: fhir_parse_qs-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for fhir_parse_qs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f6b2cfa702a56b6c1fb06d9448ab9dce8469031dacd48941c289d866e324d936
MD5 b97fae3acf5b935630278f771bde6a12
BLAKE2b-256 7956893dbef7e00242e1000c9c14e03240d6b82b7d03114055661109c4c4e030

See more details on using hashes here.

Provenance

File details

Details for the file fhir_parse_qs-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: fhir_parse_qs-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.6

File hashes

Hashes for fhir_parse_qs-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 09175b893e7572a58b810d459df023be7782b297322060eb0d07abcfbe605f1f
MD5 241b53a9f432a9992ac7359e4de7a5b9
BLAKE2b-256 b72b2690f0937483ddbe5acd42a11e81df3d091d302ed8f6854a4882a5697c87

See more details on using hashes here.

Provenance

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