def filter_with_CNNPatientUI(self, CNNPatientUI: (str or List[str])):
    '\n        Check the list, only retain the relevant records with matching PatientID are retained.\n        :param dataset: CNBPIDs & record ID correspondence list.\n        :param CNNPatientUI:\n        :return:\n        '
    list_filtered = None
    filtered_field = 'cf_p_cnnpatientui'
    if (type(CNNPatientUI) is str):
        CNNPatientUI = [CNNPatientUI]
    list_filtered = filter_records(self.data, filtered_field, CNNPatientUI)
    return list_filtered
Check the list, only retain the relevant records with matching PatientID are retained.
:param dataset: CNBPIDs & record ID correspondence list.
:param CNNPatientUI:
:return:
def filter_with_CNNPatientUI(self, CNNPatientUI: (str or List[str])):
    '\n        Check the list, only retain the relevant records with matching PatientID are retained.\n        :param dataset: CNBPIDs & record ID correspondence list.\n        :param CNNPatientUI:\n        :return:\n        '
    list_filtered = None
    filtered_field = 'cf_p_cnnpatientui'
    if (type(CNNPatientUI) is str):
        CNNPatientUI = [CNNPatientUI]
    list_filtered = filter_records(self.data, filtered_field, CNNPatientUI)
    return list_filtered