Skip to main content

patient_id_exchange_algorithm

Patient ID Exchange algorithm for initial setup.

This algorithm handles the exchange of patient IDs from modeller to worker during the initial setup phase, before any batching occurs.

Classes

PatientIDExchangeAlgorithm

class PatientIDExchangeAlgorithm(    datastructure: DataStructure,    patient_ids: Optional[list[str]] = None,    patient_ids_file: Optional[os.PathLike | str] = None,    **kwargs: Any,):

Algorithm for exchanging patient IDs during initial setup.

This algorithm handles the exchange of patient IDs from modeller to worker during the initial setup phase, before any batching occurs. It should be used as the first algorithm in protocols that need to send patient IDs to workers.

Patient IDs can either be supplied as an explicit list of patient IDs or as a path to a file which contains one patient ID per line. These two options are mutually exclusive from each other.

Arguments

  • datastructure: The data structure definition.
  • patient_ids: List of patient ID strings to send to workers. Mutually exclusive with patient_ids_file.
  • patient_ids_file: Path to file containing patient ID strings, one per line. Mutually exclusive with patient_ids.
  • ****kwargs**: Additional keyword arguments.

Variables

Methods


modeller

def modeller(    self, *, context: ProtocolContext, **kwargs: Any,)> bitfount.federated.algorithms.ehr.patient_id_exchange_algorithm._ModellerSide:

Inherited from:

BaseNonModelAlgorithmFactory.modeller :

Modeller-side of the algorithm.

worker

def worker(    self, *, context: ProtocolContext, **kwargs: Any,)> bitfount.federated.algorithms.ehr.patient_id_exchange_algorithm._WorkerSide:

Inherited from:

BaseNonModelAlgorithmFactory.worker :

Worker-side of the algorithm.