Developers Getting Started With i2b2
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

select change_schema_owner('i2b2demodata', 'i2b2');
select change_schema_owner('i2b2metadata', 'i2b2');
select change_schema_owner('i2b2pm', 'i2b2');
select change_schema_owner('i2b2hive', 'i2b2');

Some

...

additional

...

notes

...

on

...

running

...

on

...

OMOP

It is possible to run counts on OMOP tables through the ENACT-OMOP feature in i2b2 1.8. The new 1.8 totalnum procedure works on OMOP - simply load the file totalnum_usp/sqlserver/totalnum_fast_prep_OMOP.sql instead of totalnum_fast_prep.sql.

...


Oracle:     

begin
    RUNTOTALNUM('observation_fact','i2b2demodata');
end; 

You can optionally include a table name if you only want to count one ontology table (this IS case sensitive):
begin
  runtotalnum('observation_fact','i2b2demodata','I2B2');
end;

Note: If you get the error as: ERROR at line 1: ORA-01031: insufficient privilege, then run the command:
        grant create table to (DB USER)  

SQL server: exec RunTotalnum 'observation_fact','dbo','@'
Parameters are: 1) the observation table name (for multi-fact-table setups), 2) the schema name, 3) a single table name to run on a single ontology table or '@' to run on all, and 4) and a wildcard flag that will ignore multifact references in the ontology if 'Y'
PostgreSQL:  select RUNTOTALNUM('observation_fact','public')
Replace 'public' by the schema name for the fact table
If using a schema other than public for metadata, you might need to run "set search_path to 'i2b2metadata','public' " first as well

...


Output

The scripts produce three outputs:

  1. The c_totalnum columns in your ontology tables contain numbers (not nulls). These total counts will be visible in the ontology browser in the web client.
  2. The totalnum table will be appended with a row for each concept that was counted, with its count and the date. This can be used for analytics on totalnum counts.
  3. The totalnum_report will be truncated and populated with a row for each concept that was counted, with an obfuscated count using the same approach as SHRINE and the date. This can be used for sharing deidentified counts with collaborators (with IRB approval). (Note that the date is the date the script was run, and so it is not a HIPAA-protected date.)

Parent folders will get counts (of all patients with facts in the leaves) except for ontology folders derived from visit_dimension or patient_dimension. These cannot be rolled up because of the way these terms are defined in the ontology. They will have no count at all (not a zero).

...