Patients are identified in the database using three possible identifiers: subject_id, hadm_id, and stay_id. Every unique patient is assigned a unique subject_id, all unique hospitalizations are assigned a unique hadm_id, and finally all unique ward stays are assigned a unique transfer_id.
Should this transfer_id to be stay_id in the doc Doc