pat2vec.patvec_get_batch_methods.main
Functions
Retrieves a batch of appointments for a patient. |
|
|
Retrieves a batch of blood test observations for a patient. |
|
Retrieves a batch of BMI-related observations for a patient. |
|
Retrieves a batch of demographic information for a patient. |
Retrieves a batch of diagnostic orders for a patient. |
|
|
Retrieves a batch of medication orders for a patient. |
Retrieves a batch of EPR documents for a patient. |
|
Retrieves or creates annotations for a patient's EPR document batch. |
|
Retrieves a batch of MCT (MRC clinical notes) documents for a patient. |
|
Retrieves or creates annotations for a patient's MCT document batch. |
|
|
Retrieves a batch of NEWS score observations for a patient. |
|
Retrieves a batch of specific observations for a patient. |
Retrieves a batch of reports for a patient. |
|
Retrieves or creates annotations for a patient's reports batch. |
|
Retrieves or creates annotations for a patient's textual observation batch. |
|
Retrieves a batch of textual observation documents for a patient. |
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_obs(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of specific observations for a patient.
This function fetches observation data for a single patient, filtering by a specific search_term (e.g., ‘CORE_SmokingStatus’) within the globally defined time window. It includes logic to read from a cached file if it exists or query the data source otherwise.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The specific observation term to search for.config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of specified observations.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_news(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of NEWS score observations for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of NEWS observations.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_bmi(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of BMI-related observations for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of BMI-related observations.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_bloods(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of blood test observations for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of blood test observations.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_drugs(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of medication orders for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of medication orders.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_diagnostics(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of diagnostic orders for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of diagnostic orders.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_epr_docs(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of EPR documents for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of EPR documents.
- pat2vec.patvec_get_batch_methods.main.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.
- 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:
DataFrame
- Returns:
A DataFrame containing the annotations for the patient’s EPR documents.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_mct_docs_annotations(current_pat_client_id_code, config_obj, cat, t)[source]
Retrieves or creates annotations for a patient’s MCT document batch.
This function checks if an annotation file for the patient’s MCT 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.
- 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:
DataFrame
- Returns:
A DataFrame containing the annotations for the patient’s MCT documents.
- pat2vec.patvec_get_batch_methods.main.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:
DataFrame
- Returns:
A DataFrame containing the annotations for the patient’s textual observations.
- pat2vec.patvec_get_batch_methods.main.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:
DataFrame
- Returns:
A DataFrame containing the annotations for the patient’s reports.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_mct_docs(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of MCT (MRC clinical notes) documents for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of MCT documents.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_demo(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of demographic information for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of demographic information.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_reports(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of reports for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The specific report type to search for.config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of reports.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_textual_obs_docs(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of textual observation documents for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of textual observation documents.
- pat2vec.patvec_get_batch_methods.main.get_pat_batch_appointments(current_pat_client_id_code, search_term, config_obj, cohort_searcher_with_terms_and_search)[source]
Retrieves a batch of appointments for a patient.
- Parameters:
current_pat_client_id_code (
str
) – The patient’s unique identifier.search_term (
str
) – The term to search for (currently unused).config_obj (
Any
) – The main configuration object.cohort_searcher_with_terms_and_search (
Any
) – The search function to use.
- Return type:
DataFrame
- Returns:
A DataFrame containing the batch of appointments.