fhirpath.dialects package

Submodules

fhirpath.dialects.base module

class fhirpath.dialects.base.DialectBase(connection=None)[source]

Bases: object

bind(connection)[source]
compile(query, mapping=None, root_replacer=None, **kwargs)[source]
static is_fhir_primitive_type(klass)[source]
pre_compile(query)[source]

xxx: validation placeholder

fhirpath.dialects.elasticsearch module

ElasticSearch Dialect

class fhirpath.dialects.elasticsearch.ElasticSearchDialect(connection=None)[source]

Bases: fhirpath.dialects.base.DialectBase

static apply_from_constraint(query, body_structure, resource_type, root_replacer=None)[source]

We force apply resource type boundary

static apply_limit(limit_clause, body_structure)[source]
static apply_nested(query, dotted_path)[source]
static apply_path_replacement(dotted_path, root_replacer)[source]
static apply_sort(sort_terms, body_structure, root_replacer=None)[source]
static apply_source_filter(query, body_structure, root_replacer=None)[source]

https://www.elastic.co/guide/en/elasticsearch/reference/ current/search-request-body.html#request-body-search-source-filtering

1.) we are using FHIR field data from ES server directly, unlike collective.

elasticsearch, where only path is retrieve, then using that set zcatalog brain, this patternt might good for general puporse but here we exclusively need fhir resource only which is already stored in ES. Our approach will be definately performance optimized!

2.) We might loose minor security (only zope specific),

because here permission is not checking while getting full object.

static attach_nested_on_demand(context, query_, root_replacer)[source]
static clean_up(body_structure)[source]
compile(query, calculate_field_index_name, get_mapping)[source]
compile_for_single_resource_type(query, resource_type, mapping=None, root_replacer=None)[source]
Param

query

Param

mapping: Elasticsearch mapping for FHIR resources.

Root_replacer

Path´s root replacer: Could be mapping name or index name in zope´s ZCatalog context

static create_contains_term(path, value)[source]

Create ES Regex Query

static create_dotted_path(term, root_replacer=None)[source]
static create_eb_term(path, value)[source]

Create ES Prefix Query

static create_sa_term(path, value)[source]

Create ES Prefix Query

static create_structure()[source]
static create_term(path, value, multiple=False, match_type=None, all_resources=False)[source]

Create ES Query term

static get_path_mapping_info(mapping, dotted_path)[source]
resolve_datetime_term(term, root_replacer=None)[source]
static resolve_exists_term(term, root_replacer=None)[source]
resolve_nonfhir_term(term)[source]
static resolve_numeric_term(term, root_replacer=None)[source]
static resolve_string_term(term, map_info, root_replacer=None)[source]
resolve_term(term, mapping, root_replacer)[source]
fhirpath.dialects.elasticsearch.escape_all(v)[source]
fhirpath.dialects.elasticsearch.escape_star(v)[source]

fhirpath.dialects.postgres module

RAW PostgresSQL Dialect for FHIRPath Engine

class fhirpath.dialects.postgres.PostgresDialect(connection=None)[source]

Bases: fhirpath.dialects.base.DialectBase

fhirpath.dialects.sqlalchemy module

class fhirpath.dialects.sqlalchemy.SqlAlchemyDialect(connection=None)[source]

Bases: fhirpath.dialects.base.DialectBase

Module contents