Skip to main content

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 definition
  • icd10_codes: Set of ICD-10 diagnosis codes to match
  • cpt4_codes: Set of CPT-4 procedure codes to match
  • fhir_url: Optional custom FHIR API URL
  • enterprise_url: Optional custom Enterprise API URL
  • smart_on_fhir_url: Optional custom SMART on FHIR service URL
  • smart_on_fhir_resource_server_url: Optional custom SMART on FHIR resource server URL
  • ****kwargs**: Additional keyword arguments.

Ancestors

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 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 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]