Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#3505 closed enhancement (fixed)

Alerts 2.0 - Bring in drug dosage, drug allergy and other alert types.

Reported by: rwaitman Owned by: ssuman
Priority: major Milestone: heron-riverwalk-update
Component: data-repository Keywords: public-web
Cc: mhoag, ngraham, badagarla, dconnolly Blocked By: 3357
Blocking: 3676 Sensitive: no

Description

Yellow sticky from HeronProjectTimeline#May2015Planning:

How many people had a "FUROSEMIDE 10 MG/ML IJ SOLN: DOSE CHECKING CANNOT BE PERFORMED" interaction alert fired?

Bringing in medical alerts like drug dosage alerts, drug allergy alerts and other medical alert types and park them in alphabetic buckets

Tree:

  • Alerts
    • Med Interaction
      • Dose interaction alert
        • alpha folder (A, B...) based on first letter of alert description
          • alert description

Attachments (4)

med_alert_6.csv (33.5 MB) - added by ssuman 2 years ago.
med_alert_2.csv (62.6 KB) - added by ssuman 2 years ago.
ALerts2.docx (197.3 KB) - added by ssuman 2 years ago.
ALerts2.2.docx (197.3 KB) - added by ssuman 2 years ago.

Change History (29)

comment:1 Changed 3 years ago by ngraham

  • Owner set to ssuman
  • Sensitive unset
  • Status changed from new to assigned

Suman, Matt Dan and I don't know the scope of this. Could you talk with Russ and document a use case in the ticket description?

Ref HeronLoadDev#use-cases, CodeReviewNotes#StoryTellingandTestCases.

comment:2 Changed 2 years ago by badagarla

SS: Will schedule a design meeting. Also plan to attend the O2 IP Provider training to explore on EMR side.

comment:3 Changed 2 years ago by ngraham

  • Blocking set to 3592

comment:4 Changed 2 years ago by ngraham

  • Blocking 3592 deleted
  • Milestone changed from heron-calhoun-update to heron-riverwalk-update

heron-weekly:
DC: Postpone - design meeting should happen soon.

comment:5 Changed 2 years ago by ssuman

  • meeting scheduled

From: Suman Suman
Sent: Thursday, June 25, 2015 4:58 PM
To: Russ Waitman; Dan Connolly; Tamara McMahon?; Nathan Graham; Matthew Hoag
Subject: Discuss a process around identifying PHI in alert_desc and Scope #3505
When: Tuesday, June 30, 2015 1:00 PM-1:30 PM (UTC-06:00) Central Time (US & Canada).
Where: 3001D St Ctr

Proposal: Group the concepts derived from alert_desc for medical alerts in alphabetical folders (A, B, C, etc)

Alert_desc med_alert_type_c abbr
(volume)
316414 6 Dose
8828 10 Dup Med
2421 2 Allergy/Cont
2127 11 Pregnancy
1785 1 Drug-Drug………………… #3357 - Query by drug-drug interaction alert description (In Production)
1241 12 Lactation
628 5 Dup Therapy
176 14 TPN
1 23 ErrWhileChk

comment:6 Changed 2 years ago by badagarla

Suman met with Russ around the use case. (BA taking notes on her behalf).

Aim: Bringing in drug dosage alerts, drug allergy alerts and other medical alert types and park them in alphabetic buckets similar to drug-drug alerts.

Use Case:

  • How many people have a codeine allergy alert and the doctor still orders the drug?
    • Which alerts are bogus as in they are ignored. Is there noise created in the system due to bogus alerts firing. Either alert is wrong or it is configured incorrectly.
      • Which alerts are overridden frequently by the pharmacist or physician...and can be turned off.
      • Which alerts are important that improves the patient satisfaction.
  • Do "dose checking cannot be performed" or "high dose" alerts affect medication orders?
    • Do physicians/pharmacists still order drugs after these alerts.

She also shared the output of the following two queries:

Queries are executed in PROD_ID_DB and alert_desc are listed for medical alerts type 2 and 6
 
select count(distinct ca.alert_desc) as alertdescvolume, ca.med_alert_type_c  from CLARITY.ALERT  ca
group by med_alert_type_c
order by  alertdescvolume desc ;
 
select count(ca.alt_id) as alertvolume, ca.alert_desc
from CLARITY.ALERT  ca
where ca.med_alert_type_c=2
group by alert_desc
order by  alertvolume desc ;
 
select count(ca.alt_id) as alertvolume, ca.alert_desc
from CLARITY.ALERT  ca
where ca.med_alert_type_c=6
group by alert_desc
order by  alertvolume desc ;

SS: Dose details seem to not have PHI.
RW: Dose details can be shared. Nothing in there that seems PHI.

RW: Next step could be Tagging alerts with their RxNORM, NDFRT hierarchy (VA). Not part of this ticket. That is when a alert has Furosemide is it under the same class as the drug Furosemide (LOOP Diuretic) in Medication. (TODO: New ticket needed. TODO: Schedule a meeting with Rafia, Greg Ator, Brittany Melton, Nathan, Russ and Mei). If medical alerts (raw data) is available in system then researcher can map it to medication tree hierarchy or national standards (RxNORM, NDFRT (VA))

Changed 2 years ago by ssuman

Changed 2 years ago by ssuman

comment:7 Changed 2 years ago by ssuman

  • Cc badagarla added; ssuman removed

comment:8 Changed 2 years ago by dconnolly

  • Cc dconnolly removed

In heron-weekly, I hear that the use case for this was cleared up. I don't see it (description still says "Use case to follow in due course."), so I'll leave this to others.

comment:9 Changed 2 years ago by ssuman

Clarifying use case based on ticket:3505#comment:6

Use specific Dose interaction case and example tree organization based on ticket:578#comment:11:

How many people had a "FUROSEMIDE 10 MG/ML IJ SOLN: DOSE CHECKING CANNOT BE PERFORMED" interaction alert fired? Were the drugs still given afterwards?

Tree:

  • Alerts
    • Med Interaction
      • Dose interaction alert
        • alpha folder (A, B...) based on first letter of alert description
          • alert description

comment:10 Changed 2 years ago by mhoag

  • Blocking set to 3676

comment:11 Changed 2 years ago by ssuman

  • Checked in the source code (46e07b46ddad) branch:alerts2.0_3505 ...bring in drug dosage, drug allergy and other medical alert types. Doing a test: heron_etl_tiny_no_DBA/996

comment:12 Changed 2 years ago by ssuman

  • Cc dconnolly added

Adding Dan.

comment:13 Changed 2 years ago by dconnolly

Adding me for any particular reason?

The description still says "use case to follow in due course."

comment:14 Changed 2 years ago by ssuman

comment:15 Changed 2 years ago by ssuman

Dan,

I have updated the description...I was wondering if you could help with code review...I am executing heron_etl_tiny_no_DBA/999 for executing an automated test...Once completed, if I could assign the ticket to you for code-review.

Details:

Query for drug dosage alert in test:

Finished Query: "DEXTROSE 5% NA@11:28:09"
[1.4 secs]
Compute Time: 1 secs
Number of patients for "DEXTROSE 5% NA@11:28:09"
patient_count: 1


Finished Query: "DEXTROSE_AL9"
[1.3 secs]
Compute Time: 0 secs
Number of patients for "DEXTROSE_AL9"
patient_count: 1

capture_query:

ssuman@DEV_SERVER:~/bmidev/heron_load> python capture_query.py heron-test.ini 'DEXTROSE_AL9' 'DRUG_DOSAGE_3505'
INFO:capture_query.$find_query.deid.bmid:connect(ssuman, oracle://DEV_SERVER:1521/bmid)
INFO:capture_query.$find_query.deid.Statement:
$find_query:1:
INFO:capture_query.$find_query.deid:connection(deid)
INFO:capture_query.$find_query:run($find_query)

test_heron_query.py updates: (aa3cb5b260f9) added test_queries and updates to test_heron_query.py

Drug-Dosage Alerts (#3505)
***************************************
>>> ua.saved_query('DRUG_DOSAGE_3505',
...                '2015-08-12_839_demo') > 0
True

ssuman@DEV_SERVER:~/bmidev/heron_load> python test_heron_query.py http://.../i2b2/webclient/ --demo
INFO:__main__:opening Heron homepage...
INFO:__main__:Found page with title: i2b2 Web Client
INFO:__main__:Getting user configuration...
INFO:__main__:Got it.
INFO:__main__:
Testing: DRUG_DOSAGE_3505
INFO:__main__:Found: 1
INFO:__main__:timing: 2015-08-12 12:13:26.559351, 2015-08-12 12:13:26.974730, 0:00:00.415379
INFO:__main__:

comment:16 Changed 2 years ago by ssuman

  • Owner changed from ssuman to dconnolly

...completed automated test...assigning the ticket to Dan for code review

comment:17 Changed 2 years ago by dconnolly

  • Status changed from assigned to accepted

CodeReviewNotes in progress...

diff from default to branch.

heron_load/epic_alerts_transform.sql?rev=aa3cb5b260f9&annotate=blame

why parallel? add a comment?

alert_recs as
(select distinct /*+ parallel */

when (alr.alt_type_c <> 3 what does 3 mean?

Why select distinct on line 73? (from ab5b9438ea87)

Changed 2 years ago by ssuman

comment:18 Changed 2 years ago by dconnolly

  • Owner changed from dconnolly to ssuman
  • Status changed from accepted to assigned

Looks good. Merged in 0535dcf45a82.

I made one tweak: 9e4ef0b3c88a.

good to know you checked performance in production.

You'll take care of that magic 3 as we discussed and then merge again. And do attach that screenshot, please.

comment:19 Changed 2 years ago by ssuman

Thank you Dan!

...working on code review comments ...in progress...

I attached the screenshot, used parallel hint enabling a SQL statement to be simultaneously processed by multiple threads or processes...have attached relevant url
http://searchitchannel.techtarget.com/feature/Using-parallel-SQL-to-improve-Oracle-database-performance

Why select distinct on line 73? (from ab5b9438ea87)

will be removing distinct...since rows are already distinct in alert_recs

comment:20 Changed 2 years ago by ssuman

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

took care of the magic 3, checked first_char of alert_desc for alphanumeric, removed extra distinct, added alt_history table to clarity_import.par, checked in the code (982fe29a3330), ran heron_etl_tiny_no_DBA/1019, and merged to default...closing the ticket.

Changed 2 years ago by ssuman

comment:21 Changed 2 years ago by ssuman

  • Resolution fixed deleted
  • Status changed from closed to reopened

All facts use known concepts test fell over...reference ticket:3677#comment:6

comment:22 follow-up: Changed 2 years ago by ssuman

  • Resolution set to fixed
  • Status changed from reopened to closed

Concept_cd for non-alplanumeric alert_desc were missing, checked in the code (9a6f5a6f9efd)...Thanks Matt and Bhargav! Missing concept_cd are being created.

KUH|DI:A770BA495967B59BEEAE40D95DA771F81084CB3B\i2b2\Alerts\3\6\I\A770BA495967B59BEEAE40D95DA771F81084CB3B\
KUH|DI:38878B58F6E82DBB57303F18EB5714A01BF6A05F\i2b2\Alerts\3\10\I\38878B58F6E82DBB57303F18EB5714A01BF6A05F\

comment:23 in reply to: ↑ 22 Changed 2 years ago by mhoag

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to ssuman:

Concept_cd for non-alplanumeric alert_desc were missing, checked in the code (9a6f5a6f9efd)...Thanks Matt and Bhargav! Missing concept_cd are being created.

Suman, some of the code in (9a6f5a6f9efd) was not as we discussed, particularly the use of the first character bucketing being duplicated in two place. Additionally, there is a needless join in the construction of alert_concepts_with_alpha because al_hash_value already has the first_char.

I went ahead and fixed these issues in (c155eb0fa511), but I will re-open the ticket so that you can look it over before you merge it in.

Here is a successful build (heron_etl_tiny_no_DBA/1023) as well.

comment:24 Changed 2 years ago by ssuman

  • Resolution set to fixed
  • Status changed from reopened to closed

Thanks Matt!

I ran the block of code in PROD_ID_DB (ran in 174.464 sec ~2.9 min), missing concept_cd are being created, number of rows extracted is appropriate. Merged with heron-riverwalk (8bd89cbb60f8), and I will close the ticket.

comment:25 Changed 2 years ago by dconnolly

  • Keywords public-web added
Note: See TracTickets for help on using tickets.