pat2vec.patvec_get_batch_methods.main_get_pat_batch_epr_docs_annotations
Functions
Retrieves or creates annotations for a patient's EPR document batch. |
- pat2vec.patvec_get_batch_methods.main_get_pat_batch_epr_docs_annotations.get_pat_batch_epr_docs_annotations(current_pat_client_id_code, config_obj, cat, t)[source]
Retrieves or creates annotations for a patient’s EPR document batch.
This function checks if an annotation file for the patient’s EPR 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.
Args: current_pat_client_id_code: The patient’s unique identifier. config_obj: The main configuration object. cat: The loaded MedCAT CAT object. t: The tqdm progress bar instance.
Returns: A DataFrame containing the annotations for the patient’s EPR documents.
- Return type:
Optional[DataFrame]- Parameters:
current_pat_client_id_code (str)
config_obj (Any)
cat (Any)
t (Any)