text: **Data Curation for Automated ED Note Generation**
  The EHR data were bifurcated into 2 datasets linked by the patient encounter number: 1 for the rule- 
  
  based pattern-matching approach and the other for the LLM fine-tuning discussed in further detail 
  
  in eAppendix 1 in Supplement 1. The rule-based framework was designed by the 3 board certified EM 
  
  physicians (M.M., A.F., and P.S.). Fine tuning of the pretrained LLM consisted of the notes in**Table 1**: 
  
  EM clinician notes, consultation notes, EM progress note entries, and EM procedure notes. The 
  
  EM-to-IP handoff notes were used as the labels. As the preexisting labels were of variable quality for 
  
  JAMA Network Open. 2024;7(12):e2448723. doi:10.1001/jamanetworkopen.2024.48723 (Reprinted) 