pat2vec.patvec_get_batch_methods.main_get_pat_batch_reports_docs_annotations
Functions
Retrieves or creates annotations for a patient's reports batch. |
- pat2vec.patvec_get_batch_methods.main_get_pat_batch_reports_docs_annotations.get_pat_batch_reports_docs_annotations(current_pat_client_id_code, config_obj, cat, t)[source]
Retrieves or creates annotations for a patient’s reports batch.
This function checks if an annotation file for the patient’s reports already exists. If so, it reads it. If not, it reads the raw reports 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 reports.