Skip to main content

Parse FHIR query string

Project description

A library to parse FHIR query strings.

  • Validates type and returns correct object

  • Built-in search parameters from FHIR standard

  • Parses modifiers and prefixes

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

Usage

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

# endpoint
search.endpoint --> 'Patient'

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

# index as key; each parameter/value pair gets parsed into a namedtuple
search[0] --> FHIRSearch(...)
search[0].modifier --> None
search[0].prefix --> None
search[0].value --> 'bob'
search[0].paramater --> 'name'
search[0].type_ --> 'string'

# act like dict with parameter as key (list if non-unique parameter)
search['name'] --> FHIRSearch(...)

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

# if does not recognize parameter, ignores it and adds to error
search = Search('Patient', 'random=test')
search.error --> [...]

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.3.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

fhir_parse_qs-0.1.3-py2.py3-none-any.whl (2.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: fhir_parse_qs-0.1.3.tar.gz
  • Upload date:
  • Size: 2.6 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.3.tar.gz
Algorithm Hash digest
SHA256 75ab3c9212dbcdd1d8bfd232122e5d9add19fb5261aae119a8203f4702b8fa57
MD5 287c0229e3bcef8db319d8fe01636719
BLAKE2b-256 97cfd8dd33c36114e67d5dd70e6fe40200531a8a87b31da4d04235277f518d27

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: fhir_parse_qs-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.3 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.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0bdd0b0687cab374b3550da982f911236b82d9ee792657694506da92812a683c
MD5 643b20a1021f932f5a378f1e95f40f71
BLAKE2b-256 42e33dd5226249d78857b8857266bfd3d0b1a1b50b756bff8d566ae49cb77507

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