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