nextgen_patient_query_algorithm
NextGen FHIR API query algorithm for patient data access.
This module implements an algorithm for querying patient data from NextGen's APIs. It provides functionality to:
- Authenticate with NextGen's FHIR, Enterprise, and SMART on FHIR APIs
- Query patient records based on ICD-10 and CPT-4 codes
Classes
NextGenPatientQueryAlgorithm
class NextGenPatientQueryAlgorithm( datastructure: DataStructure, icd10_codes: Collection[str], cpt4_codes: Collection[str], fhir_url: str = 'https://fhir.nextgen.com/nge/prod/fhir-api-r4/fhir/R4', enterprise_url: str = 'https://nativeapi.nextgen.com/nge/prod/nge-api/api', smart_on_fhir_url: Optional[str] = None, smart_on_fhir_resource_server_url: Optional[str] = None, **kwargs: Any,):
Algorithm for querying patient data from NextGen FHIR API.
Initialize the algorithm.
Arguments
datastructure
: The data structure definitionicd10_codes
: Set of ICD-10 diagnosis codes to matchcpt4_codes
: Set of CPT-4 procedure codes to matchfhir_url
: Optional custom FHIR API URLenterprise_url
: Optional custom Enterprise API URLsmart_on_fhir_url
: Optional custom SMART on FHIR service URLsmart_on_fhir_resource_server_url
: Optional custom SMART on FHIR resource server URL- **
**kwargs
**: Additional keyword arguments.
Ancestors
- BaseNonModelAlgorithmFactory
- BaseAlgorithmFactory
- abc.ABC
- bitfount.federated.roles._RolesMixIn
- bitfount.types._BaseSerializableObjectMixIn
Variables
- static
fields_dict : ClassVar[T_FIELDS_DICT]
Methods
modeller
def modeller( self, **kwargs: Any,) ‑> NoResultsModellerAlgorithm:
Modeller-side of the algorithm.
worker
def worker( self, hub: Optional[BitfountHub] = None, session: Optional[BitfountSession] = None, **kwargs: Any,) ‑> bitfount.federated.algorithms.ehr.nextgen_patient_query_algorithm._WorkerSide:
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: List[NextGenEnterpriseAppointmentsEntryJSON], 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],):
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
mailing_address : Optional[str]
- static
medical_record_number : Optional[str]
- static
next_appointment : Optional[datetime.date]
- static
previous_appointments : List[NextGenEnterpriseAppointmentsEntryJSON]