def _fetch_mrns(self, limit: Optional[int]=None):
    'Fetches MRNs from the results of ``._create_query()``.'
    q = self._create_query()
    if limit:
        q = q.limit(limit)
    mrn_df = read_with_progress(q.statement, self.engine)
    if mrn_df.empty:
        mrn_df = pd.DataFrame(columns=['medical_record_number'])
    assert (len(mrn_df.columns) == 1), '_create_query must return only MRNs'
    result = set((mrn for mrn in mrn_df.iloc[:, 0]))
    return result
Fetches MRNs from the results of ``._create_query()``.
def _fetch_mrns(self, limit: Optional[int]=None):
    
    q = self._create_query()
    if limit:
        q = q.limit(limit)
    mrn_df = read_with_progress(q.statement, self.engine)
    if mrn_df.empty:
        mrn_df = pd.DataFrame(columns=['medical_record_number'])
    assert (len(mrn_df.columns) == 1), '_create_query must return only MRNs'
    result = set((mrn for mrn in mrn_df.iloc[:, 0]))
    return result