pat2vec.patvec_get_batch_methods.main_get_pat_batch_mct_docs_annotations

Functions

get_pat_batch_mct_docs_annotations(...)

Retrieves or creates annotations for a patient's MCT document batch.

pat2vec.patvec_get_batch_methods.main_get_pat_batch_mct_docs_annotations.get_pat_batch_mct_docs_annotations(current_pat_client_id_code, config_obj, cat, t)[source]

Retrieves or creates annotations for a patient’s MCT document batch.

This function checks if an annotation file for the patient’s MCT documents already exists. If so, it reads it. If not, it reads the raw document batch, generates annotations using the provided MedCAT model, and saves the result.

Parameters:
  • current_pat_client_id_code (str) – The patient’s unique identifier.

  • config_obj (Any) – The main configuration object.

  • cat (Any) – The loaded MedCAT CAT object.

  • t (Any) – The tqdm progress bar instance.

Return type:

Optional[DataFrame]

Returns:

A DataFrame containing the annotations for the patient’s MCT documents.