fhirpath.engine package¶
Submodules¶
fhirpath.engine.base module¶
- class fhirpath.engine.base.Engine(fhir_release, conn_factory, dialect_factory)[source]¶
Bases:
abc.ABC
Idea: # 1.) https://docs.sqlalchemy.org/en/13/core/ # connections.html#sqlalchemy.engine.Engine.connect 2.) https://docs.sqlalchemy.org/en/13/core/ connections.html#sqlalchemy.engine.Connection 3.) Dialect could have raw connection, query compiler 4.) Engine would have execute and result processing through provider, yes provider!
- class fhirpath.engine.base.EngineResult(header: fhirpath.engine.base.EngineResultHeader, body: fhirpath.engine.base.EngineResultBody)[source]¶
Bases:
object
- extract_references(search_param: fhirpath.fhirspec.spec.SearchParameter) → Dict[str, List[str]][source]¶
Takes a search parameter as input and extract all targeted references
Returns a dict like: {“Patient”: [“list”, “of”, “referenced”, “patient”, “ids”], “Observation”: []}
fhirpath.engine.es module¶
- class fhirpath.engine.es.AsyncElasticsearchEngine(fhir_release, conn_factory, dialect_factory)[source]¶
Bases:
fhirpath.engine.es.ElasticsearchEngineBase
Async Elasticsearch Engine
- class fhirpath.engine.es.ElasticsearchEngine(fhir_release, conn_factory, dialect_factory)[source]¶
Bases:
fhirpath.engine.es.ElasticsearchEngineBase
Elasticsearch Engine
- class fhirpath.engine.es.ElasticsearchEngineBase(fhir_release, conn_factory, dialect_factory)[source]¶
Bases:
fhirpath.engine.base.Engine
- generate_mappings(reference_analyzer: Optional[str] = None, token_normalizer: Optional[str] = None)[source]¶
You may use this function to build the ES mapping. Returns an object like: {
- “Patient”: {
- “properties”: {
- “identifier”: {
- “properties”: {
- “use”: {
“type”: “keyword”, “index”: true, “store”: false, “fields”: {
- “raw”: {
“type”: “keyword”
}
}
}
}
}
}
}
}
fhirpath.engine.fhirbase module¶
- class fhirpath.engine.fhirbase.FhirbaseEngine(fhir_release, conn_factory, dialect_factory)[source]¶
Bases:
fhirpath.engine.base.Engine
Module contents¶
Implementation, the medium result collected from ES server
- class fhirpath.engine.Connection(conn)[source]¶
Bases:
object
- classmethod from_prepared(conn)[source]¶
Connection instance creation, using already prepared RAW connection
- property raw_connection¶
- class fhirpath.engine.Engine(fhir_release, conn_factory, dialect_factory)[source]¶
Bases:
abc.ABC
Idea: # 1.) https://docs.sqlalchemy.org/en/13/core/ # connections.html#sqlalchemy.engine.Engine.connect 2.) https://docs.sqlalchemy.org/en/13/core/ connections.html#sqlalchemy.engine.Connection 3.) Dialect could have raw connection, query compiler 4.) Engine would have execute and result processing through provider, yes provider!
- class fhirpath.engine.EngineResult(header: fhirpath.engine.base.EngineResultHeader, body: fhirpath.engine.base.EngineResultBody)[source]¶
Bases:
object
- extract_references(search_param: fhirpath.fhirspec.spec.SearchParameter) → Dict[str, List[str]][source]¶
Takes a search parameter as input and extract all targeted references
Returns a dict like: {“Patient”: [“list”, “of”, “referenced”, “patient”, “ids”], “Observation”: []}