I am working on a project to predict Septic Shock on the MIMIC III data set.

I am using the following ICD9-CODes to detect Sepsis but not sure how to get the date + time stamp when the patient was diagnosed. diagnoses_icd table does not have a date and time stamp.

"99591";"Sepsis" "99592";"Severe sepsis" "78552";"Septic shock"

Not sure how the diagnoses_icd table was linked to the Date and Time for the patients, say Septic Shock.

  • Did you identify how to resolve this?
    – Diya
    Aug 8, 2018 at 14:37
  • I have the same issue here and I am trying to find the time when the diagnosis of sepsis has been made.. any hint on this would be appreciated .. May 28, 2019 at 10:42

2 Answers 2


It is important to be aware that the ICD-9 codes are assigned to hospital stays primarily for billing purposes. The codes are recorded by a coding team upon patient discharge, following a review of the health records. No specific time or date is associated with the codes.

Two relevant timestamps are the admission and discharge times associated with the hospital stay ID ('hadm_id'). If you would like to find more specific time points associated with ICD-related events, one option would be to review the nursing notes.

  • Thank you Tomp. I looked at the noteevents and looks like not a reliable way to find out when the septic shock happened or onset of septic shock happened. Not sure how to find the onset (date & time) of the septic shock. any pointers is much appreciated.
    – Sara
    Mar 29, 2016 at 16:35
  • @Sara Did you find any other way?
    – partizanos
    May 23, 2022 at 0:20

Within DIAGNOSES_ICD.csv.gz there is a column called HADM_ID which is hospital admission ID and it's unique for each admission for each patient. Similarly, there is also a column called HADM_ID in ADMISSIONS.csv.gz and associated admission time and so on. Simply do an inner join of the two dataframes on this columns and there you have each ICD for each patient associated with the unique admission time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.