First of all, thank you so much for releasing this dataset. It is a life-saver for my PhD project!
This question is a bit unrelated to your code, but I hope you can answer it. You have divided the cases into inpatient and profee. How did you identify which cases are inpatient and which a profee? Manually or automatic? If automatic, how do you do it?