question regarding multi-fact tables and providers

Skip to first unread message

Jan 6, 2021, 6:48:10 PMJan 6
to i2b2 Install Help
I am trying to set up i2b2 to use multi fact tables. I've been following the instructions here:

Everything went well, I created several fact tables and updated the c_facttablecolumn column in ontology tables. I can run queries in the webclient etc.
However, when running queries that have terms from the Providers ontology, I noticed that the generated sql only looks for providers in the observation_fact table, so none of the other fact tables (see sql below). Needless to say, the patient count returned is incorrect.
Has anybody run into this issue? Is  there something I'm missing with the setup? 
Any suggestions are appreciated.
Thank you.

with t as ( 
 select  f.patient_num  
from i2b2crcdata.dbo.observation_fact f 
f.provider_id IN (select provider_id from  i2b2crcdata.dbo.provider_dimension   where provider_path LIKE '\i2b2\Providers\Hospitalist\%')   
group by  f.patient_num 
insert into #global_temp_table (patient_num, panel_count)
select  t.patient_num, 0 as panel_count  from t 
 insert into #dx (  patient_num   ) select * from ( select distinct  patient_num  from #global_temp_table where panel_count = 0 ) q

Jeff Klann

Jan 28, 2021, 5:44:43 PMJan 28
to i2b2 Install Help
Can you share a row from the provider ontology table?


M Morris

Jan 28, 2021, 5:58:24 PMJan 28
As Lori once reminded me. multifact table is only for fact table not the dimension tables.

You received this message because you are subscribed to the Google Groups "i2b2 Install Help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages