Skip to main content

A package to help FHIR searching with needed search parameters are not available

Reason this release was yanked:

Non-working package

Project description

FHIR Search Helper

PyPi Package Link Supported Python versions Downloads

A Python package to support FHIR Searching in contexts where needed search parameters are not supported

A Note on CapabilityStatements

In their current form, CapabilityStatements do not have a way to express when a search parameter for a resource is conditionally accepted. For example, in the Epic R4 CapabilityStatement, for the Condition resource, there exists a listed search parameter of code. In the description, there is a note that this search parameter is only accepted when the category is equal to infection. The only way that this conditional information would be known is by manual reading of the description. To alleviate this issue, and to avoid extreme custom handling in this package, currently you must edit the CapabilityStatement of any server with which you would like to use this package and add custom extensions to the search parameter. Keeping with the above example of the search parameter code for the Condition resource, here is what the CapabilityStatement.rest[0].resource.where(type = 'Condition').searchParam.where(name = 'code') element looks like:

{
    "name": "code",
    "type": "token",
    "documentation": "Search for Conditions with a specified code. This is only used when searching for infections.",
    "extension": [
        {
            "url": "true-when",
            "valueString": "category==infection"
        }
    ]
}

Here we have added an extension with a url of true-when that is a machine readable statement denoting when a search parameter is accepted by the server. It currently only supports == to show equality and in to show membership of a list (e.g. "category in [infection, health-problem]"). This also works for when a search parameter is limited in the values it will successfully search for. For example, here is what the CapabilityStatement.rest[0].resource.where(type = 'Condition').searchParam.where(name = 'category') element looks like:

{
    "name": "category",
    "type": "token",
    "documentation": "Search for Condition resources by category.",
    "extension": [
        {
            "url": "true-when",
            "valueString": "category in [dental-finding, encounter-diagnosis, genomics, health-concern, infection, medical-history, problem-list-item, reason-for-visit]"
        }
    ]
}

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

fhirsearchhelper-0.0.4.tar.gz (9.0 kB view hashes)

Uploaded Source

Built Distribution

fhirsearchhelper-0.0.4-py3-none-any.whl (9.0 kB view hashes)

Uploaded 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