Multi-fact Table
Space shortcuts
Space Tools
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Update

The i2b2 star schema only allowed for one fact table and in the i2b2 database this is called the observation_fact table. Release 1.7.09 now allows for multiple fact tables. In order to use this feature you will need to update your Ontology tables so the i2b2 server knows it needs to search another fact table when running a query.

Need to update the value c_facttablecolumn name column. Currently it is just the column name. However if you want to redirect the system to search another fact table for that term you need to preface the column name with the table name. (see examples below).

 

Single fact table

This sample shows how the i2b2 metadata table is setup to work with a single fact table.

c_namec_basecodec_facttablecolumnc_tablenamec_columnname
Diabetes mellitusICD9:250.00concept_cdconcept_dimensionconcept_path
AmoxicillinNDC:559553071670concept_cdconcept_dimensionconcept_path
HematocritLOINC:4544-3concept_cdconcept_dimensionconcept_path
X-Ray ReportLCS-i2b2:XR_RPTconcept_cdconcept_dimensionconcept_path

 

Multiple fact tables

Need to update the metadata tables for each term you want redirected to an alternate fact table (one that is not named observation_fact). The c_facttablecolumn column in the i2b2 tab

For the purpose of this document, the diagnoses are still going to the observation_fact table, there are three new fact tables:

  1. medication_fact
  2. lab_fact
  3. diagnostic_fact

Using this example the i2b2 metadata table would look like.

c_namec_basecodec_facttablecolumnc_tablenamec_columnname
Diabetes mellitusICD9:250.00concept_cdconcept_dimensionconcept_path
AmoxicillinNDC:559553071670medication_fact.concept_cdconcept_dimensionconcept_path
HematocritLOINC:4544-3lab_fact.concept_cdconcept_dimensionconcept_path
X-Ray ReportLCS-i2b2:XR_RPTdiagnostic_fact.concept_cdconcept_dimensionconcept_path

 

In the above example, you will notice the entry for Diabetes does not have the prefix 'observation_fact.'. This is because it is not needed. If a prefix does not exist the system will automatically look to the observation_fact table.

 

 

 

  • No labels