ARCH-commons / i2p-transform

i2b2 to PCORnet Common Data Model Transformation - requires i2b2 PCORnet ontology
Other
3 stars 16 forks source link

lab transform will insert multiple rows due to the polyhierarchy #74

Closed jklann closed 5 years ago

jklann commented 6 years ago

The lab transform will insert multiple rows due to the polyhierarchy. The join with lab_normal will create multiple lines per fact. From @sengupt -

Some of these c_ont_parent_basecode join with popmednet.pmn_labnormal and others do not. As a result two rows are being created for each lab record in popmednet.pmnlab_result_cm table, one with actual NORM_RANGE_LOW, NORM_RANGE_HIGH, NORM_MODIFIER_LOW, NORM_MODIFIER_HIGH value and another with null or a default such as NI.

We have temporarily resolved this by changing the logic to populate these four columns as follows in our transform, but is not an ideal solution: …NULL as NORM_RANGE_LOW, 'UN' as norm_modifier_low, NULL as NORM_RANGE_HIGH, 'UN' as norm_modifier_high,…

jklann commented 6 years ago

@matthewjoss implemented @sengupt 's temporary fix in 90090467b6d7460644af2e11486d9ed16cb48561 (mssql) and 081f17d5e2964f7060b01561a7df2f639c86f870 (oracle)

The Oracle version still needs to be tested.

jklann commented 6 years ago

Matt tested this.

Leaving issue open because a better fix would not involve removing normal ranges when present.

jklann commented 6 years ago

ffa6fe2e4d6da0c66bd24ae0fa8b05303b339010 fixed in MSSQL

jklann commented 5 years ago

Matt seems to have propagated to Oracle in commit 136c23f0dc297f68d9a79599b51ffdc39703e799