-
Notifications
You must be signed in to change notification settings - Fork 0
/
mimic_3_extract.sql
7 lines (5 loc) · 2.99 KB
/
mimic_3_extract.sql
1
2
3
4
5
6
select * from noteevents,
(select * from diagnoses_icd where seq_num = 1) as prim_codes
where noteevents.hadm_id = prim_codes.hadm_id and prim_codes.icd9_code in (
'41401','0389','41071','4241','51881','431','486','5070','4280','4240','430','5849','41041','41011','5789','1983','5770','41519','43411','43491','42731','99859','03842','85221','25013','4373','42823','99662','56212','42833','49121','4271','5712','51884','29181','4321','43310','99811','03849','85220','03811','042','4414','1623','0380','5715','44101','4412','53240','3962','570','9654','5781','53140','44024','5761','5990','00845','5570','1628','99674','2252','51919','4210','41091','78039','56081','25011','41031','4260','41001','1550','42789','42843','5845','5722','4239','7746','9974','82021','1985','56211','25012','42741','80126','40301','0388','41021','9951','1625','44023','1970','4589','20500','49322','99661','39891','99681','3453','99672','85201','7455','99931','40391','1890','9982','49392','9694','51902','2910','5307','48241','7464','1510','42781','1570','85226','99664','2761','99682','5780','19889','99673','85206','0383','44103','80121','1977','27801','5191','99812','4829','43311','0382','4413','42831','80502','85200','85202','3963','8080','53783','3968','56985','1911','4275','51882','9351','20280','4329','5109','7907','9971','6826','1972','85222','80122','8052','5119','85181','85186','8082','1505','9690','1508','4821','03843','03812','1976','42732','8208','41402','25080','34982','99659','34590','73313','82101','53541','8600','86405','5609','1622','53200','03819','1888','1912','7802','5602','5711','51909','8054','V5811','42821','4417','44102','3241','44022','42091','44021','515','4010','2536','56723','5750','1830','7213','53551','80120','8024','43401','55321','85301','45829','07044','481','57400','41081','2767','53784','42090','44422','42830','99666','5579','41051','82022','27651','78659','57451','4372','85180','20300','71536','99671','99667','4019','96509','53100','85182','80600','9693','55221','51883','43330','4251','5723','9961','1913','3942','85225','5571','4568','2765','80125','5771','7806','86500','99602','72886','82009','1551','56983','3481','2851','5185','80501','4552','25060','30500','30301','9986','96501','25041','53440','7211','56969','56881','85205','85300','25040','42822','99649','1918','1536','5724','07054','41061','5772','86121','43889','99702','99604','1974','25063','03840','48242','73730','35801','99669','51181','40291','45341','1363','1533','0088','1578','9973','4254','86503','53021','2375','4870','25061','8604','1919','2113','3941','25082','34510','1541','2127','5762','2762','4590','56981','53081','57410','5856','9708','5920','27652','2273','V5812','3960','34839','185','40300','85306','25070','5523','43301','5533','7742','86504','193','85302','1748','3570','4168','56213','5728','80507','4238','99762','9663','78009','4232','3240','72402','4538','59010','80026','43331','41511','7847','5569','99601','25081','5566','1978','73819','8064','99831','82300','49391','4466','1984','1534','4411','5559','51189','96500','2920'
);