pat2vec.pat2vec_get_methods.get_method_report_annotations
Functions
|
Retrieves and processes report annotations for a patient. |
- pat2vec.pat2vec_get_methods.get_method_report_annotations.get_current_pat_report_annotations(current_pat_client_id_code, target_date_range, report_annotations, config_obj=None, t=None, cohort_searcher_with_terms_and_search=None, cat=None)[source]
Retrieves and processes report annotations for a patient.
This function filters a batch of pre-existing report 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.
report_annotations (Optional[pd.DataFrame]) – DataFrame containing report 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.