MIMIC Ⅳ数据库在MIMIC Ⅲ的基础上做了一些更新,收集了2008至2019年BIDMC收治的超过19万名患者、45万次住院记录的临床数据。
主要使用ggplot2来可视化icustay_detail视图,做一下数据探索
icustay_detail视图是官方代码生成的视图

由以下SQL生成,本章我们不讲解生成的SQL具体语义(后面进一步讲解mimic数据提取时候讲解)

关于如何生成官方物化视图查看以往文章
MIMIC-IV数据库衍生表格mimic_derived配置和使用
本章用到
数据源: postgresql数据库, mimic-iv数据
安装R Console
安装R Studio
R 安装包 : RODBC、 odbc、 RPostgres
1. 新建一个notebooks 用于数据探索
打开R stuido 点击 File - New File - R Notebook

1. 所有ICU患者年龄分布
变量来自admission_age


2. ICU患者出院时是否死亡
变量来自hospital_expire_flag


注意没有以上代码的话, 将没有计数


3. ICU患者住院时长分布
变量来自los_hospital


4. ICU患者ICU时长分布
变量来自los_icu


5. ICU患者住院次数
这个变量来自hospstay_seq。


这次不附代码了,图片里面有,比较简单。