Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#3133 closed defect (invalid)

IDX clinical facts could be mapped to incorrect encounters

Reported by: mhoag Owned by: mhoag
Priority: major Milestone: heron-mcmillan-marsh-update
Component: data-repository Keywords: encounter-mapping public-web
Cc: mhoag, dconnolly, tmcmahon, vleonardo Blocked By:
Blocking: 3309 Sensitive: no

Description

idx_clinical_facts_load.sql does not use the source_cd to delineate IDX encounter from other types of encounters (EPIC, UHC, etc) when loading facts.

Change History (10)

comment:1 Changed 3 years ago by mhoag

Saw this while review #2933 and simultaneously working on Sravani with #1965. I was about to put in wrong-results into the keywords, but realized that if the IDX clinical facts were ever mapped incorrectly (2 times or more) then ETL would fall over (because of invariants in the observation fact table).

Nevertheless, this does concern me after working on changing the representation of encounter_nums.

comment:2 Changed 3 years ago by mhoag

  • Owner changed from vleonardo to schandaka
  • Status changed from new to assigned

Maybe I will give this to Sravani to noodle on while I finish the review for #2933.

comment:3 Changed 3 years ago by dconnolly

  • Milestone changed from heron-kanopolis-update to dconnolly

Milestone renamed

comment:4 Changed 3 years ago by dconnolly

  • Milestone changed from dconnolly to heron-kanopolis-update

Milestone renamed

comment:5 Changed 3 years ago by dconnolly

  • Milestone changed from heron-kanopolis-update to heron-mcmillan-marsh-update
  • Owner changed from schandaka to mhoag

Chatted with Matt... Let's take care of this along with #333 in March, if not before.

comment:6 Changed 3 years ago by dconnolly

  • Keywords encounter-mapping added

comment:7 Changed 3 years ago by ngraham

  • Blocking set to 3309

comment:8 Changed 3 years ago by mhoag

  • Resolution set to invalid
  • Status changed from assigned to closed

After further investigation, I found that IDX clinical facts could not be mapped to incorrect clinical encounters. That is, inserts into the observation_fact table join explicitly on idx_encounter_mapping (not NightHeronData.encounter_mapping). And idx_encounter_mapping is a view generated from NightHeronData.encounter_mapping joined on

  join idx_audit_info aud
    on emap.encounter_ide_source = aud.source_cd
   and emap.encounter_ide_status = 'A';

This has been true since 59fd97e4fa72 or idx_load.sql?rev=555#L125 (though the file is now source:heron_load/idx_dimensions_load.sql)

Closing as invalid.

comment:9 Changed 3 years ago by mprittie

  • Keywords public-web added

comment:10 Changed 3 years ago by mprittie

  • Sensitive unset
Note: See TracTickets for help on using tickets.