Closed jklann closed 5 years ago
@matthewjoss implemented @sengupt 's temporary fix in 90090467b6d7460644af2e11486d9ed16cb48561 (mssql) and 081f17d5e2964f7060b01561a7df2f639c86f870 (oracle)
The Oracle version still needs to be tested.
Matt tested this.
Leaving issue open because a better fix would not involve removing normal ranges when present.
ffa6fe2e4d6da0c66bd24ae0fa8b05303b339010 fixed in MSSQL
Matt seems to have propagated to Oracle in commit 136c23f0dc297f68d9a79599b51ffdc39703e799
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,…