ehr_patient_query_algorithm
Generic EHR query algorithm for patient data access.
This module implements a generic algorithm for querying patient data from EHR systems. It provides functionality to:
- Work with NextGen's FHIR, Enterprise, and SMART on FHIR APIs
- Work with generic FHIR R4 compatible systems
Classes
EHRPatientQueryAlgorithm
class EHRPatientQueryAlgorithm(datastructure: DataStructure, **kwargs: Any):
Algorithm for querying patient data from EHR systems.
Initialize the algorithm.
Arguments
datastructure
: The data structure definition- **
**kwargs
**: Additional keyword arguments.
Ancestors
- BaseNonModelAlgorithmFactory
- BaseAlgorithmFactory
- abc.ABC
- bitfount.federated.roles._RolesMixIn
- bitfount.types._BaseSerializableObjectMixIn
- typing.Generic
Variables
- static
fields_dict : ClassVar[dict[str, marshmallow.fields.Field]]
Methods
modeller
def modeller( self, *, context: Optional[ProtocolContext] = None, **kwargs: Any,) ‑> NoResultsModellerAlgorithm:
Inherited from:
BaseNonModelAlgorithmFactory.modeller :
Modeller-side of the algorithm.
worker
def worker( self, *, hub: Optional[BitfountHub] = None, session: Optional[BitfountSession] = None, context: Optional[ProtocolContext] = None, **kwargs: Any,) ‑> bitfount.federated.algorithms.ehr.ehr_patient_query_algorithm._WorkerSide:
Inherited from:
BaseNonModelAlgorithmFactory.worker :
Worker-side of the algorithm.
PatientDetails
class PatientDetails( bitfount_patient_id: str, dob: str | date, given_name: Optional[str] = None, family_name: Optional[str] = None,):
Patient identifying information.
Variables
- static
bitfount_patient_id : str
- static
dob : str | datetime.date
- static
family_name : Optional[str]
- static
given_name : Optional[str]
PatientQueryResults
class PatientQueryResults( codes: PatientCodeDetails, next_appointment: Optional[date], previous_appointments: Optional[List[EHRAppointment]], id: Optional[str], given_name: Optional[str], family_name: Optional[str], date_of_birth: Optional[str | date], gender: Optional[str], home_numbers: List[str], cell_numbers: List[str], emails: List[str], mailing_address: Optional[str], medical_record_number: Optional[str], latest_practitioner_name: Optional[str],):
Container indicating the results of the various queries for a given patient.
Variables
- static
cell_numbers : List[str]
- static
codes : PatientCodeDetails
- static
date_of_birth : Union[str, datetime.date, ForwardRef(None)]
- static
emails : List[str]
- static
family_name : Optional[str]
- static
gender : Optional[str]
- static
given_name : Optional[str]
- static
home_numbers : List[str]
- static
id : Optional[str]
- static
latest_practitioner_name : Optional[str]
- static
mailing_address : Optional[str]
- static
medical_record_number : Optional[str]
- static
next_appointment : Optional[datetime.date]
- static
previous_appointments : Optional[List[EHRAppointment]]