Opened 5 years ago

Last modified 3 years ago

#2318 assigned enhancement

refactor medication modifiers so "items instance will be the same" will work

Reported by: rwaitman Owned by: ngraham
Priority: minor Milestone: heron-menomonee-update
Component: data-repository Keywords: public-web
Cc: dconnolly, tmcmahon Blocked By:
Blocking: Sensitive: no

Description

If you want to search for
warfarin tablet, dose > 5mg AND a "Dispensed Medications" for the same instance, it won't work and return 0.

similar > 5 mg and "Historical Medication" or "MAR"
This is because we made the instance_num our unique primary key for observation fact but in fact, we'd want it to link across for the same "fact" when you want to know the dose was >5 when the item was administered

Another example would be "Find all morphine orders with a dose greater than 10mg that are also PRN"

This will take some serious thinking. The challenge is the order_med_id is the natural thing to put in the instance slot but we have multiple children of an order across order, dispense(s) and administration(s).

Change History (22)

comment:1 Changed 5 years ago by rwaitman

comment:2 Changed 5 years ago by dconnolly

  • Component changed from dev-framework to data-repository

comment:3 Changed 5 years ago by ngraham

  • Milestone changed from heron-toronto-update to heron-beaver-update
  • Priority changed from major to minor

Didn't get around to thinking much about this - postponing. Also demoting as I don't believe we consider this a high-level goal (it hasn't been treated as such so far).

comment:4 Changed 4 years ago by ngraham

In ticket:2353#comment:3, we noticed that having the last couple of digits in the instance number to represent whether the fact is an order, dispense, administer, etc is potentially redundant with the modifier_cd. The same instance number functionality might just work if we remove those digits.

comment:5 Changed 4 years ago by ngraham

  • Owner changed from ngraham to mhoag
  • Status changed from new to assigned

During a meeting with Matt, Dan and Nathan we got the impression from SQLDeveloper that currently we aren't using modifier_cd as part of the unique key for observation_fact. However, we found that it is used as part of the key in the source we get from i2b2.org (crc_create_datamart_oracle.sql).

I have some vague recollection of removing the modifier_cd from the key while working on performance with Arvinder (IOU: ticket/version control reference).

It turns out it was there all along:
source:heron_load/i2b2_facts_index.sql:

alter table "&&star".observation_fact
  add constraint observation_fact_pk
  unique(ENCOUNTER_NUM, CONCEPT_CD, PROVIDER_ID, START_DATE, MODIFIER_CD,INSTANCE_NUM)
  exceptions into "&&star".exceptions;

comment:6 Changed 4 years ago by ngraham

  • Keywords public-web added
  • Owner changed from mhoag to ngraham
  • Sensitive unset

comment:7 Changed 4 years ago by dconnolly

  • Milestone changed from heron-verdigris-update to heron-kanopolis-update

postponing tickets other than those identified as Verdigris priorities in today's heron-weekly meeting

comment:8 Changed 4 years ago by dconnolly

  • Milestone changed from heron-kanopolis-update to dconnolly

Milestone renamed

comment:9 Changed 4 years ago by dconnolly

  • Milestone changed from dconnolly to heron-kanopolis-update

Milestone renamed

comment:10 Changed 3 years ago by dconnolly

  • Milestone changed from heron-kanopolis-update to dconnolly

Milestone renamed

comment:11 Changed 3 years ago by dconnolly

  • Milestone changed from dconnolly to heron-kanopolis-update

Milestone renamed

comment:12 Changed 3 years ago by dconnolly

  • Milestone changed from heron-kanopolis-update to heron-webster-update

closing Kanopolis, postponing remaining minor tickets without discussion

comment:13 Changed 3 years ago by ngraham

In #2353 (order numbers are not de-identified), we replaced the instance_num with a sequence number during de-identification. Therefore, the "items instance will be the same" will likely require a rework of the de-identification approach. See also ticket:3254 (encounter uniqueness design resulted in PHI (pat_enc_csn_id) in de-id heron (instance_num column)).

comment:14 Changed 3 years ago by ngraham

  • Milestone changed from heron-webster-update to heron-mcmillan-marsh-update

Ticket retargeted after milestone closed

comment:15 Changed 3 years ago by dconnolly

  • Milestone changed from heron-mcmillan-marsh-update to heron-cheyenne-bottoms-update

Ticket retargeted after milestone closed

comment:16 Changed 3 years ago by ngraham

  • Milestone changed from heron-cheyenne-bottoms-update to heron-quivira-update

Postponing tickets not promoted in heron-weekly today.

comment:17 Changed 3 years ago by mhoag

  • Milestone changed from heron-quivira-update to heron-jamestown-update

Ticket retargeted after milestone closed

comment:18 Changed 3 years ago by ngraham

  • Milestone changed from heron-jamestown-update to heron-calhoun-update

Ticket retargeted after milestone closed

comment:19 Changed 3 years ago by ngraham

  • Milestone changed from heron-calhoun-update to heron-riverwalk-update

Ticket retargeted after milestone closed

comment:20 Changed 3 years ago by mhoag

  • Milestone changed from heron-riverwalk-update to heron-ray-hubbard-update

Ticket retargeted after milestone closed

comment:21 Changed 3 years ago by ngraham

  • Milestone changed from heron-ray-hubbard-update to heron-michigan-update

Ticket retargeted after milestone closed

comment:22 Changed 3 years ago by ngraham

  • Milestone changed from heron-michigan-update to heron-menomonee-update

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.