pat2vec.pat2vec_get_methods.get_method_current_pat_annotations_mrc_cs
Functions
|
Retrieves and processes MRC document annotations for a patient. |
- pat2vec.pat2vec_get_methods.get_method_current_pat_annotations_mrc_cs.get_current_pat_annotations_mrc_cs(current_pat_client_id_code, target_date_range, batch_mct_docs_annotations, config_obj=None, t=None, cohort_searcher_with_terms_and_search=None, cat=None)[source]
Retrieves and processes MRC document annotations for a patient.
This function filters a batch of pre-existing MRC (Minimum-Risk-of-Bias Clinical Synopsis) document annotations for a specific patient within a given date range. It then calculates count-based features from the ‘pretty_name’ of the annotations.
- Parameters:
current_pat_client_id_code (str) – The unique identifier for the patient.
target_date_range (Tuple) – The date range to filter annotations by.
batch_mct_docs_annotations (Optional[pd.DataFrame]) – DataFrame containing MCT document annotations for a batch of patients.
config_obj (Optional[object]) – Configuration object with settings such as verbosity and start_time. Defaults to None.
t (Optional[object]) – A progress bar object for updating status. Defaults to None.
cohort_searcher_with_terms_and_search (Optional[Callable]) – Placeholder for a cohort searcher function, unused in this implementation. Defaults to None.
cat (Optional[object]) – Placeholder for a MedCAT object, unused in this implementation. Defaults to None.
- Returns:
- A DataFrame containing the calculated annotation features
for the specified patient. If no annotations are found, a DataFrame with only the ‘client_idcode’ is returned.
- Return type:
pd.DataFrame
- Raises:
ValueError – If config_obj is None.