i2b2 Developer's Forum
Space shortcuts
Space Tools

Versions Compared

Key

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

...

Patient_num

Encounter_num

Instance_num

Concept_cd

Start_date

Modifier_cd

ValType_Cd

Tval_char

Nval_num

123

107

1

cpt:59622

20060304

@

<null>

<null>

<null>

123

107

1

cpt:59622

20060304

cptmod:62

<null>

<null>

<null>

123

107

1

cpt:59622

20060304

cptmod:AA

<null>

<null>

<null>

123

107

1

cpt:59622

20060304

cptmod:TH

<null>

<null>

<null>

123

567

1

med:aspirin

20100404

@

<null>

<null>

<null>

123

567

1

med:aspirin

20100404

MED:DOSE

N

E

325

123

567

1

med:aspirin

20100404

MED:ROUTE

T

QD

<null>

123

567

1

med:aspirin

20100404

MED:FREQ

T

PO

<null>

123

567

2

med:aspirin

20100404

@

<null>

<null>

<null>

123

567

2

med:aspirin

20100404

MED:DOSE

N

E

83

123

567

2

med:aspirin

20100404

MED:ROUTE

T

BID

<null>

123

567

2

med:aspirin

20100404

MED:FREQ

T

PO

<null>

P_num|E_num|Instance_num|C_CD|S_d|Modifier_CD|ValType_CD|TVal|NVal------------------------------------------------------------------123|107|1|cpt:59622|20060304|@|<null>|<null>|<null>123|107|1|cpt:59622|20060304|cptmod:62|<null>|<null>|<null>123|107|1|cpt:59622|20060304|cptmod:AA|<null>|<null>|<null>123|107|1|cpt:59622|20060304|cptmod:TH|<null>|<null>|<null>123|567|1|med:aspirin|20100404|@|<null>|<null>|<null>123|567|1|med:aspirin|20100404|MED:DOSE|N|E|325123|567|1|med:aspirin|20100404|MED:FREQ|T|QD|<null>123|567|1|med:aspirin|20100404|MED:ROUTE|T|PO|<null>123|567|2|med:aspirin|20100404|@|<null>|<null>|<null>123|567|2|med:aspirin|20100404|MED:DOSE|N|E|83123|567|2|med:aspirin|20100404|MED:FREQ|T|BID|<null>123|567|2|med:aspirin|20100404|MED:ROUTE|T|PO|<null> Looking at the medications in the example above, there are two entries for the concept med:aspirin. The only way to distinguish whether the 325 mg dose is QD or BID is to look in the instance_num column. Since the 325 mg dose has instance_num = 1, it is associated with the frequency for instance_num = 1, which is QD.
By default, the value information and data in all the non-key columns will be assumed to pertain to the modified concept, so there should usually be included a row for the base concept with an "@" in the modifier column. This will allow value information to be applied to the base concept code. Note that the modifier code is also a way that value information could be attached to the provider code.
The only change to a standard i2b2 database to enable it to work with modifiers is to add an instance number to the instance_num column. Most databases will begin with only one row per observation, and in those cases all rows can be initialized with an instance_num of "1".
The Modifier_Dimension Table and Ontology Table
The modifier_cd is a data element that describes attributes of a fact and it is a dimension column in the fact table.   Information about the modifier is contained in a new dimension table in the i2b2 star schema, the modifier_dimension table.
MODIFIER_DIMENSION TABLE
Clustered primary key = modifier_path

...