Association between independent practice time and patient outcomes in the emergency department: a retrospective study of residents in three urban hospitals in Taiwan

Background The purpose of the study was to investigate the relationship between the independent practice time of residents and the quality of care provided in the Emergency Department (ED) across three urban hospitals in Taiwan. The study focused on non-pediatric and non-obstetric complaints, aiming to provide insights into the optimal balance between resident autonomy and patient safety. Methods A comprehensive retrospective study was conducted using de-identified electronic health records (EHRs) from the hospital's integrated medical database (iMD) from August 2015 to July 2019. The independent practice time was defined as the duration from the first medical order by a resident to the first modifications by the attending physician. The primary outcome was revisits to the ED within 72 h following discharge. Statistical analysis was conducted using RStudio and pyGAM. Results The study identified several factors associated with shorter independent practice times (< 30 minutes), including older patient age, male sex, higher body temperature, higher heart rate, lower blood pressure, and the presence of certain comorbidities. Residents practicing independently for 30–120 minutes were associated with similar adjusted odds of patient revisits to the ED (OR 1.034, 95% CI 0.978–1.093) and no higher risk of 7-day mortality (OR 0.674, 95% CI 0.592–0.767) compared to the group with less autonomy. However, independent practice times exceeding 120 minutes were associated with higher odds of revisiting the ED within 72 h. For the group with 120–210 minutes of independent practice time, the OR was 1.113 (95% CI: 1.025–1.208, p = 0.011). For the group with > 210 minutes, the OR was 1.259 (95% CI: 1.094–1.449, p = 0.001), indicating an increased risk of adverse outcomes as the independent practice time increasing. Conclusions The study concludes that while providing residents an independent practice time between 30 to 120 minutes may be beneficial, caution should be exercised when this time exceeds 120 minutes. The findings underscore the importance of optimal supervision in enhancing patient care quality and safety. Further research is recommended to explore the long-term effects of different levels of resident autonomy on patient outcomes and the professional development of the residents themselves. Supplementary Information The online version contains supplementary material available at 10.1186/s12873-023-00877-9.


Introduction
Residency training is a critical phase in the professional development of physicians, shaping their clinical skills and competence for future independent practice [1].The balance between supervision and autonomy during this period is a delicate one, with both elements playing pivotal roles.Supervision is essential to reduce medical errors and ensure patient safety [2,3], while autonomy is crucial for residents to mature into independent practitioners [4][5][6][7][8].This balance is particularly challenging to achieve in various medical specialties [6,9,10], including the high-pressure environment of the emergency department (ED) [11].
The ED, characterized by diverse patient encounters and time-sensitive decisions, provides a unique setting for residents to hone their skills [12][13][14].However, the level of autonomy granted to residents in this setting is a complex issue.Excessive autonomy can lead to uncertainty in clinical decision-making, potentially reducing medical efficiency and compromising patient safety [9,15].Conversely, insufficient autonomy may impede the maturation of residents [7,8].Attending physicians in the ED face the intricate task of providing quality emergency care while supervising residents, a dual role that can impose stress and potentially impact their own practice efficiency [3,13,16,17].Consequently, there is considerable variability among attending physicians in the level of autonomy granted to residents [6].
As residents gain autonomy and practice independently, they face uncertainty in clinical decision-making, which can reduce medical efficiency and potentially lead to patient harm [9,15,18].These concerns might be addressed by increasing accessibility to attending physician advice or by providing resident proficiency-based entrustable professional activities (EPAs) [4,19].In the ED, EPAs are set by illness or complaint [20,21], but for those non-emergency residents and postgraduate year residents (PGYs) who rotate on a monthly basis, it is challenging for residents to treat patients with varying complaints and many times they may only have a single exposure to or treat a particular complaint once in the ED setting.In emergency medicine, residents are expected to have an attending physician present to provide full-time supervision at all times, and the advice of the attending physician is readily available, but supervision is sometimes too close [6].The intensity of supervision, namely, the residency autonomy, should be adjusted according to the quality of clinical care.Although some quality and safety indicators of the ED have been documented [22], such as the length of stay (LOS), proportion of return visits to the ED [23][24][25], and patient mortality [26], Van Leer et al. indicated that little is known about the effect of the amount of supervision on the quality of patient care in the ED [3].
The existing literature provides valuable insights into resident autonomy and supervision in the ED, highlighting the importance of this balance for both resident development and patient safety.However, there is a paucity of evidence-based guidelines to help attending physicians determine the optimal level of autonomy for residents in the ED.Addressing this gap is crucial, as it has implications for patient outcomes, healthcare costs, and the professional growth of residents.
In light of this, our study aims to investigate the association between independent practice time and the quality of care provided by residents in the ED.We hypothesize that there is an optimal level of independent practice time that balances the benefits of resident autonomy with the need for effective supervision.By examining this association, we aim to contribute to the existing body of research on resident training in emergency medicine and provide evidence-based insights that can guide attending physicians in their supervision of residents.
To achieve this, we conducted a retrospective analysis across three urban hospitals in Taiwan, including an academic tertiary hospital and two community-based secondary hospitals.We utilized de-identified electronic health records from the hospital's integrated medical database, spanning a four-year duration.The significance of this research lies in its potential to enhance patient safety and care quality in the ED, while also promoting the professional development of residents.We recognize the challenges associated with this study, including the variability in resident experience and the diversity of patient cases, and we have taken measures to address these issues in our research design.
In conclusion, our study addresses a critical issue in residency training in the ED -the balance between resident autonomy and supervision.By investigating the association between independent practice time and the patient outcomes, we aim to provide evidence-based insights that can inform supervision practices in the ED, ultimately enhancing patient safety and care quality.This study underscores the importance of optimal supervision in enhancing patient care quality and safety, and the potential implications of insufficient autonomy or inadequate supervision.We strive to enhance the scientific background and rationale for our investigation.Ultimately, our findings may inform the development of evidence-based guidelines that optimize resident training and improve the quality of care in the ED.

Study design and setting
This study was approved by National Taiwan University Hospital Research Ethics Committee (201902078RINB; 202107133RINA).We conducted a retrospective study of three urban hospitals, including the ED of an academic tertiary hospital in Taipei city with approximately 100,000 annual visits, and the EDs of two communitybased secondary hospitals in Hsinchu city and Yulin county with approximately 60,000 visits each.In the academic ED, there are typically 12 attending physicians who work with 26 residents and PGYs on a daily basis.In contrast, in a community ED, residents and PGYs are not regular monthly staff, and the ED patients are typically seen by approximately six shiftwork attending physicians on a daily basis.Attending physicians work 12-h shifts and then switch to the next shift; residents and PGYs work 8-h or 12-h shifts and hand patients over to the attending physician.For those patients initially evaluated by a resident physician or PGY, treatment planning and disposition are supervised by the attending physician in charge.
Each ED patient is triaged according to the emergency severity level and randomly assigned to an attending physician.The community EDs have only one area for patients, while in the academic ED, the patients are preassigned to general or critical areas based on their conditions, and the attending physicians who are responsible for a particular area evaluate and manage the patient accordingly (Fig. 1).The critical area is a dedicated intensive care area of the academic ED that provides expedited clinical services.It is staffed by attending physicians and senior emergency medicine residents specifically trained to care for patients requiring urgent treatment or resuscitation.These patients typically have severe conditions such as severe hypotension, tachy-or bradycardia, respiratory failure, myocardial ischemia, or stroke within a specific time window, which make them candidates for the critical area.The general area is staffed by attending physicians, PGYs, and emergency medicine, family medicine, and internal medicine residents.Except for the attending physician and ED residents, all other doctors rotate in the ED for one month.The academic year begins in August, with each PGY and resident earning a new title and starting the training process for the year.

Data collection
In this study, we utilized de-identified electronic health records (EHRs) from the hospital's integrated medical Fig. 1 ED patient visit process of community and academic hospitals.This figure showcases the stages involved in a patient's visit, such as triage, registration, assessment, and discharge.The main difference between the two types of EDs is the presence of a dedicated critical care area in academic EDs that is staffed by senior residents and attending physicians to provide prompt and efficient care.The time elapsed between triage/ registration and the first assessment by a physician is known as the waiting time, while the time elapsed between triage/registration and the patient's departure from the ED is referred to as the LOS database (iMD) spanning from August 2015 to July 2019, in which all records pertaining to patients or staff were anonymized, with only employee titles and seniority preserved.The requirement for consent was waived by the ethics committee due to the de-identified nature of the data.
The selection of this specific timeframe was underpinned by several considerations.Primarily, this period precedes the onset of the COVID-19 pandemic, which necessitated the implementation of stringent infection control measures that substantially altered patient management protocols, patient demographics, and the frequency of modifications in clinical procedures.These alterations could potentially introduce confounding variables into our study.Secondly, the commencement of our study period in 2015 corresponds with the five-year mark post the implementation of the EHR system within the hospital network.This ensured the availability of comprehensive and stable medical data.Moreover, during this period, the duration of the emergency medicine residency program was consistently 42 months.Prior to 2015, the training program had a different duration of 48 months, introducing an additional variable that could impact our study results.Lastly, the academic year in our institution commences in August, providing a logical basis for the selected start and end points of our study period.
Our patient population was derived from all patient visits registered in the iMD during the study period.We specifically targeted patients who accessed the hospital's healthcare resources through the emergency department, as indicated by a specific flag in their records.This flag served as our primary inclusion criterion, allowing us to focus on the population of interest.From this initial pool of patients, we applied further selection criteria to refine our study group.We included patients who were assigned to areas within the emergency department that were served by emergency physicians.This was determined based on the area assignment in their EHRs upon their arrival at the emergency department.
We focused on patients presenting with non-pediatric and non-obstetric complaints, with one notable exception.Children presenting with injuries or trauma were included in our study, as these patients would typically be assigned to areas served by emergency physicians rather than pediatricians.Patients who were assigned to areas primarily cared for or seen by pediatric or obstetric doctors, with the exception of those children presenting with injuries or trauma, were excluded from our study.These criteria were chosen to align with the scope of practice of the resident physicians in our study, who primarily handle adult, non-obstetric emergencies, and pediatric traumatic emergencies.
For patients with multiple visits within a 24-h period, we only included the first record in our analysis.We then applied several exclusion criteria to further refine our study population.Firstly, we excluded patients who experienced out-of-hospital cardiac arrests (OHCAs) or those who were assigned to the critical area.This decision was made because the management of cardiac arrest patients could conflict with the mortality outcomes we intended to observe in our study.Furthermore, our study aimed to determine an acceptable level of independent practice time for young doctors, which is a different context than the immediate and intensive medical intervention required for cardiac arrest patients.Secondly, we excluded patients who were initially seen by an attending physician.For each patient, we arranged all medical orders chronologically and identified the first order created by an attending physician.We utilized a binary variable to denote whether the first medical order was issued by an attending physician, which served as our exclusion criterion.
Lastly, we excluded patients with typos in their vital signs on the triage sheet.In this study, typos were defined as instances where the diastolic blood pressure was recorded as higher than the systolic blood pressure, systolic blood pressure exceeded 300 mmHg, heart rate was over 250 beats per minute, respiratory rate was above 50 breaths per minute, body temperature was recorded as higher than 48°C or lower than 10°C, and weight was recorded as over 400 kg.The rationale for excluding these typos is multifaceted.Firstly, these errors, likely due to human error during data entry, can significantly skew the data, especially as they often exceed the standard deviation by more than tenfold.This could potentially distort our analysis and lead to inaccurate results.Secondly, these typos are random occurrences, as our previous studies examined the nature and frequency of these data entry errors [26,27].Thirdly, given the large volume of data in our study, the exclusion of these random typos might not significantly impact the overall findings.Therefore, to maintain the integrity and reliability of our analysis, we opted to discard these anomalous data points.

Variables and outcome measurements
We collected the patient characteristics, first vital signs in the ED, comorbidities, chief complaints, emergency severity index, disposition, clinical time-stamped information, treatments, examinations, and final medical expenses.The characteristics included age, sex, and body weight; the vital signs included temperature, heart rate, respiratory rate, oxygen saturation, blood pressure, and levels of consciousness evaluated using the Glasgow Coma Scale (GCS).During the data collection process, we encountered instances of missing data due to the unavailability of certain variables for some patients.To address this challenge and maintain the integrity of our dataset, we employed the Expectation-Maximization algorithm [27,28].This statistical technique allowed us to estimate probable values for these missing data points based on the other available data, thereby ensuring a robust and complete dataset for our subsequent analyses.This approach upheld the integrity of our data, ensuring that our subsequent analyses and findings were based on a comprehensive and representative sample of our study cohort.
We selected comorbidities based on the Charlson Comorbidity Index (CCI) [29], including coronary artery disease, heart failure, hypertension, diabetes mellitus, chronic obstructive pulmonary disease (COPD), stroke, end-stage renal disease, liver cirrhosis, peptic ulcer disease, peripheral vascular disease, cancer, and rheumatic disease.To ensure the accuracy of our comorbidity identification process, we adopted an approach using patient medical record data.We focused on patient diagnostic history and specifically examined records up until the triage date, considering only relevant and valid entries.The coding process involved scanning the diagnostic text for key phrases related to each disease, relying on a variety of terms and abbreviations specific to each comorbidity to maximize detection accuracy.For instance, to identify patients with coronary artery disease, we searched for phrases like 'coronary artery disease' , 'POBAS' , 'CAD' , and 'ischemic heart' .Similar techniques were used for other conditions, using corresponding disease-specific terminologies.In situations where no valid diagnostic history was found, we assigned a default value of zero to the respective comorbidity category.
We defined the waiting time as the time interval between the completion of registration in the ED and the start of the diagnostic evaluation.The chief complaints were divided into two groups: trauma and non-trauma.Treatments and examinations were grouped by the prescriber's seniority and ordered chronologically.The time to first supervision was defined as the interval from the first plan of a resident or PGY to the first modifications or documentation by the attending physician; this was divided into independent practice time groups defined in 30-min increments.In this study, close supervision was defined as the physician initiating supervision within 30 min and was considered to be indicative of less resident autonomy due to independent practice < 30 min.In addition, the lack of modification or documentation by the attending physician before a patient's discharge from the ED was considered non-recorded.
The primary outcome of our study is centered on revisits to the ED within 72 h following the last ED discharge [23].An ED revisit is defined as a return to the ED that results in a new, separate encounter within the 72-h postdischarge window, irrespective of the complaint or condition triggering the revisit.Our secondary outcomes encompass several elements.The first one is mortality within seven days following the ED visit [26].Here, mortality refers to any death occurrence within seven days from the initial ED visit, regardless of the cause or location of death.Another secondary outcome is the LOS in the ED, defined as the duration of the patient's stay within the ED department, measured in minutes.The LOS is calculated as the time interval from the patient's recorded arrival time until the official departure from the ED.Departure could occur due to several reasons such as discharge, admission to the hospital, or transfer to another healthcare facility.Finally, the total medical expenses incurred during the ED visit constitute our last secondary outcome.These expenses encapsulate all the costs associated with the patient's care during their stay in the ED, inclusive of diagnostics, therapeutic procedures, medication, and facility charges.

Statistical analysis
Continuous variables are summarized as means with standard deviations (SDs) or medians with interquartile ranges (IQRs) and were examined using the one-way ANOVA and the Kruskal-Wallis test.Categorical variables are presented in case numbers and proportions and were analyzed using the Chi-square test.We applied a multivariable logistic regression model to investigate adjusted associations between independent practice time groups and binary outcomes by controlling for variables with statistical significance in the univariable regression analysis.Except for the reference group, adjacent independent practice time groups with similar odds ratios (ORs) for the primary outcome were merged into a supergroup.This approach was adopted to reduce the number of groups and to coherently analyze clusters of adjacent categories that demonstrated similar performance characteristics.We also adopted a multivariable linear regression model to examine adjusted associations between independent practice time groups and continuous outcomes.All ORs and beta-coefficients are presented with 95% confidence intervals (CIs).In this study, we also adopted a generalized additive model (GAM) to demonstrate the adjusted associations between variables and outcomes.
In this study, we subjected continuous variables to standardization, a process that transformed each variable to have a mean of 0 and a standard deviation of 1.This procedure not only enables a more direct comparison of the importance of different predictors in the model but also facilitates the interpretation of the model's results [30].The statistical analysis was conducted using RStudio (version 2022.07.1 + 554) based on R (version 4.2.1) and pyGAM (version 0.8.0) based on python (version 3.8.11).All p-values in this study were two-sided and were considered statistically significant when less than 0.05.To ensure the robustness of our statistical results, we performed a power analysis using the simulation method [31,32].

Results
During the 4-year study period, a total of 932,155 nonpediatric and non-obstetric emergency visits were recorded, of which 920,150 were unique visits (Fig. 2).The majority of visits in the academic ED (96%) were assigned to the general area, and 36% of these visits were seen directly by attending physicians.In contrast, in community EDs, 98% of patients were seen directly by attending physicians.There were some errors in the data, with typos occurring in 0.4% of visits, but these visits were excluded from the analysis, leaving 258,738 patient visits for analysis.

Characteristics of the study population
The majority of the study cohort was comprised of nontrauma patients, representing 85% (220,657 of 258,738) of the total patient population.These non-trauma patients were typically older (mean age of 55 years), predominantly female (53.1% compared to 48.1% in trauma patients), exhibited a higher prevalence of comorbidities (35.6% versus 13.8%), and had a higher likelihood of hospitalization (18.8% versus 11.1%) relative to their trauma counterparts.Detailed demographic and clinical characteristics are delineated in Table 1.The subgroup of discharged patients had a mean age of 50 years, with males constituting 46% of this population.Four percent of this subgroup did not have a determined independent practice time as there was a lack of modification or documentation by the attending physician before their discharge from the ED (Table 2).Eighty-three percent of patients presented to a resident or PGY practicing independently for < 120 min, and less than half presented to a resident practicing independently for < 30 min.In addition, patients with some emergency severity indices (1 and 5) tended to receive closer supervision by an attending Fig. 2 Study flow diagram.Our study began with all patient visits registered in the iMD from August 2015 to July 2019.We targeted patients accessing healthcare via the emergency department.For multiple visits within 24 hours, only the first record was analyzed.We excluded patients with out-of-hospital cardiac arrests, those initially seen by an attending physician, and those with typos in their vital signs This uptick in close supervision may be attributable to the influx of new medical personnel at the commencement of the academic year, among other contributing factors (Fig. 3).Furthermore, the study identified several patient characteristics and vital signs associated with close supervision.For instance, male patients were more likely to be closely supervised (OR = 1.193, p < 0.001), as were patients with higher heart rates (OR = 1.096, p < 0.001) and respiratory rates (OR = 1.111, p < 0.001).Conversely, patients with higher oxygen saturation and blood pressure were less likely to be closely supervised (OR = 0.951 and 0.967 respectively, p < 0.001 for both) (Table 3).
Comorbidities such as malignancy, heart failure, COPD, stroke, diabetes mellitus, and end-stage renal disease were also associated with increased odds of close supervision (p < 0.001 for all).Interestingly, patients presenting in community hospitals were twice as likely to be closely supervised compared to those in academic hospitals (OR = 2.004, p < 0.001).These findings suggest that a variety of factors, including patient demographics, vital signs, comorbidities, and the type of hospital, can influence the level of supervision provided in emergency settings.

Main results
In the multivariable analysis, a longer independent practice time was associated with higher revisit ORs even when other factors such as age, gender, and underlying medical conditions were controlled for (Appendix 1).
Factors such as older age, male sex, higher body temperature, higher heart rate, lower systolic blood pressure, and certain underlying medical conditions (such as cancer, heart failure, stroke, diabetes mellitus, end-stage renal disease, hypertension, liver cirrhosis, and rheumatic disease) were found to be independent predictors of an ED revisit within 72 h.
Patients who presented to the ED in the months of May, June, August, September, October, or November were found to have an increased risk of revisiting the ED within 72 h.Patients who presented to the ED on Thursdays, Fridays, or Saturdays also had an increased risk of revisiting the ED within 72 h.Furthermore, patients treated by a resident who practiced independently for more than 120 min had a higher OR for revisiting the ED within 72 h than those patients treated by a resident who practiced independently for less than 30 min, even when other factors were controlled for (Table 4).
The regression analyses of secondary outcomes revealed that patients who were treated by residents under close supervision were associated with the highest mortality OR, as well as a longer length of stay and higher cost than those patients who were practiced independently by residents within 30-210 min (Table 5).

Discussion
We noted a number of factors associated with less resident autonomy provided by attending physicians, including being in the first few months of the academic year and having patients with the highest or lowest emergency index.In this study, we obtained some evidence to determine that initial supervision of up to 120 min when a resident sees some ED patients provides sufficient resident autonomy without increasing the ED revisit rate.At the same time, an independent practice time of 30 to 120 min did not increase mortality, LOS, or medical costs.The   results indicate that an independent practice time of within 30-120 min is associated with a non-inferior odds of revisiting the ED within 72 h and no higher 7-day mortality than an independent practice time of < 30 min.Furthermore, there was a statistically significant association between an independent practice time > 120 min and an increased odds of revisiting the ED and higher beta-coefficients for total medical expenses.These results suggest that providing residents and PGYs with an appropriate level of autonomy while ensuring adequate supervision by attending physicians in the ED can lead to preferred patient outcomes without negative consequences.The degree of residency autonomy varies by situation, and Jenkin's research demonstrated this difference between community and university hospitals [33].In general, the condition of patients in university hospitals may be more complex, and patient safety issues may be more prominent, which limits the attainment of autonomy.Providing an environment for residents to practice independently requires proper planning.EPAs are proposed to provide autonomy based on the proficiency of employees [4,19].Jenkin indicated that teamwork and collective problem-solving provide interns with sufficient decision-making ownership while still allowing their superiors to fine-tune their decisions if necessary [33].In the EDs in this study, the attending physicians are legally responsible for the patients, and the residents and PGYs are treated as physician learners who share the workload of the attending physicians and learn through practice.The patients in this study in the university hospital ED were divided into two areas during triage.Critically ill patients could be treated immediately by senior residents and attending physicians, and relatively non-critical patients could be independently treated by resident physicians first, followed by the supervision of attending physicians.In the results, we noted that attending physicians delegated approximately two-thirds of patient care to residents and PGYs, and 45% of these patients (116,742 out of 258,738 academic ED patients) had close supervision while being treated by a resident.In contrast, 65% of patients (5,588 out of 8,643 community ED patients) were treated under close supervision by an attending physician in the community hospital.In general, this strategy allows attending physicians to intervene early in patient management and should reduce patient safety concerns, while it may increase attending physician  tension and reduce their productivity.In addition, such close supervision may interrupt residents' clinical thinking and treatment decisions, reducing autonomy.Close supervision did not yield lower mortality rates in the results, which may be due to more severe or critical conditions that residents identified earlier and sought early help from their attending physicians.Only some patients who were treated by a resident practicing independently for more than 400 min had an increased risk of mortality (Fig. 4).Those who were sicker may have been admitted rather than discharged, which may have interfered with the analysis of revisits, for which we only included those patients who were discharged.Approximately 42% of patients (84,709 of 203,864 discharged patients) were treated by a resident who was closely supervised, with no statistically significant difference in revisit rates compared with those treated by residents practicing independently for 30 to 120 min.According to different levels of residents, attending physicians may be able to give more experienced residents more time to practice independently (Fig. 4).This trust may be associated with less close supervision in the middle and later parts of the academic year (Fig. 3).The role of residents in patient care is crucial, and the level of autonomy should reflect their level of training, the supervising physician's confidence in their skills, and the complexity of the patient's medical situation.As a general rule, residents work under the guidance of an experienced attending physician.However, as they gain experience and knowledge, they may be given more independence in making decisions and managing patient care.The result of this study revealed that supervision occurred earlier during the initial months of the academic year and that there may be potential for increased autonomy as residents progress from PGY to R1 to R2 levels (Fig. 4), which aligns with the finding of previous research on the topic [9].It is essential for residents to be able to develop their clinical skills and judgment gradually through increased autonomy, while still receiving support and guidance from more seasoned physicians.The optimal timing of independent practice in the ED can vary depending on various factors, including the resident's level of training, the complexity of the patient's condition, and the attending physician's comfort level with the resident's abilities.The attending physician might provide close supervision during the early stages of the resident's training and for complex cases.As the resident gains experience and knowledge, he or she may be given more independence, but the attending physician should still be available for guidance and support as needed.

Limitations
This study has limitations, one of which is the lack of documentation, which may have affected the accuracy of the data regarding the independent practice time among residents.This could be due to the fast-paced and demanding environment in the ED, leading to retroactive documentation or oral orders being recorded later when there was more time.This issue can be seen from the fact that the group with missing documentation had the shortest median LOS compared with the other groups (Table 2).This is a common challenge in emergency medicine and highlights the need for further research and solutions to enhance the documentation process in EDs.
An additional source of potential bias in our study was the presence of typos, arising from human errors during data entry.In the dataset encompassing all subjects (n = 258,738), a total of 1074 (0.4%) cases exhibited such errors.These cases were subsequently excluded from the analysis to maintain data reliability.Upon examination, the distribution of these typos across different  groups, based on the duration of residents' independent practice, was not found to be statistically significant (p-value = 0.100) (Table 6).Thus, the exclusion of these cases might not introduce bias into our results.
Furthermore, the study only included data from three urban hospitals, and further studies are needed to replicate these findings and to examine the effect of supervision on other quality and safety indicators in the ED.Another limitation is that in a retrospective study, it is hard to determine whether active supervision was initiated by the attending physician or was due to a resident's call for help.The association of a shorter independent practice time with increased mortality may result from residents calling for help early when a patient's condition is concerning.Furthermore, patient safety and medical quality issues can be measured by indicators other than the revisit rate, mortality rate, and LOS.It is important to note that the level of independence given to residents  Fig. 4 Results of the adjusted analysis using aGAM of the time to first supervision and its relationship to patient outcomes according to the resident level.A Revisiting the ED within 72 hours.The trend with regard to resident experience level showed that as the residents gained more experience (PGY, R1, R2), the acceptable duration of supervision increased, with a negative log odds.B Mortality in sevendays after the ED visit.C LOS in the ED.D Total medical expenses during the ED visit.There was a noticeable peak within the first 60 minutes in the LOS and cost, while the first 100 minutes was associated with a higher log odds-on mortality.This may indicate that patients in poor condition requiring more care received care under supervision by an attending physician earlier, which could have been initiated by either the attending physician or the resident calling for help can vary based on various factors.These results should be considered in the context of these factors and may not be applicable to all situations.For future studies, we recommend a more in-depth exploration of the factors that contribute to the optimal range of independent practice time for residents.This could include investigating the impact of different supervision styles, the complexity of cases handled by residents, and the influence of specific training programs or educational interventions.
Additionally, longitudinal studies could provide valuable insights into the long-term effects of different levels of resident autonomy on patient outcomes and the professional development of the residents themselves.

Conclusion
This study suggests that the appropriate level of autonomy for residents in the ED may be an independent practice time of 30-120 min.A longer independent practice time was associated with negative outcomes such as higher revisit and mortality rates.In addition, the results from the analysis revealed that there might be an opportunity for increased autonomy for residents as they progress from PGY to R1 to R2 levels.Overall, it is important to strike a balance between providing sufficient supervision to ensure patient safety and allowing residents to gain the experience and independence they need to become fully licensed physicians while considering individual patient characteristics and disease factors.

Fig. 3
Fig. 3 Mosaic plot showing the results of a chi-square analysis exploring the correlation between the independent practice time group (as categorized by the number of minutes) and the month in which the patient visited the ED.It displays the standardized residuals of this analysis

Table 1
Baseline clinical characteristics of the included patients

Table 2
Discharged patient characteristics and clinical outcomes by the supervision group

Table 3
Factors associated with close supervision

Table 4
Factors associated with revisiting the ED within 72 h for patients discharged from the ED

Table 5
Regression analyses of secondary outcomes Indicates p-value < 0.05 *

Table 6
Proportional distribution of subjects exhibiting data entry errors ('typos') across various durations of resident independent practice time