-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to determine IV start/end time? Ambiguity in dose. #347
Comments
My guess it was confusion on my part. It seems that continuous IV in ordercategorydescription implies intermittent iv. And vancomycin is administered only via bolus (rate is always 0). Theoretically "Vancomycin powder for solution for infusion must be administered intravenously. Each dose should be administered at a rate not exceeding 10 mg/min or over a period of time of at least 60 minutes (whichever is longer)." The goal of my project includes fitting vancomycin PK profiles to compartmental model and therefore any insight on vancomycin administration is appreciated. Also I found that with itemid=225798 (vancomycin) there non IV administration events (row_id=907304). So mystery remains:
Thanks a lot. L |
On the page describing inputevents_mv there is a note:
This is what you're observing - I think vanco is always given as a bolus so you will always see a 1 minute duration. Regarding the unit of measurement, you just have to deal with what you get. A simple count of the amounts showed that ~95% of the time the amount == 1, likely that they were documenting 1 dose. In the case you mention, presumably they documented 500 implying 500mg, but it appears to us as "500 doses" because the unit of measurement is fixed for the itemid. One suggestion is to check out the Oral administration is not recorded in this table, typically. One suggestion I would make is to cross-reference this table with the prescriptions table, which will have prescriptions of vancomycin and perhaps more detail about the formulation. It will require a bit of clever coding to match them up (since prescriptions only has resolution to the day), and be careful about joining on |
Thanks a lot. I figured an procedure how to find the dose for each IV. Sometimes they use bags, sometimes vials so there is a way to figure out the dose. I can share the mysql query if it is of interest. I am still concerned about bolus. The recommended way is to IV for 1+ hr no to get red-mans syndrome. Another concern is that there is inconsistency in vanco levels. For example for patient 16590 the IV of 1000 mg (frozen bag) was administered on 6/6/2181 based on inputevents_mv but vanco levels were 16.1 ug/mL on 6/7/2181 5:35 (based on labevents) and 21.1 ug/mL on 6/8/2181 4:33 - it looks vanco levels grow although there is no IV. There are more cases like this. To make sure that I am not missing dose administration I selected all events from chartevents, inputevents_mv, inputevents_cv, labevents for patient 16590 but wasn't able to explain the apparent increase in vanco levels over 24hr without IV. Fitting the data gave 3L/kg volume of distribution (literature reports 1L/kg as well as experience on data from some other hospital) and very small clearance. Is it possible that some IV data is MISSING? Thanks for any insight, |
Absolutely we are very interested in queries for new concepts. We can help make it both MySQL/postgres compliant if you make a pull request. Regarding the IV, I can't think of a reason why any data would be systematically missing. There is some reorganization of the data going from raw to MIMIC, mainly trying to harmonize ITEMIDs together, but this is a non destructive transform. If this kind of issue happens in a large amount of cases, I'd definitely be interested in a query extracting patients with "missing" IV so that I could investigate the raw data and perhaps discuss a case or two with clinicians at the BI. Finally, might I suggest cross referencing with the prescriptions table? That table is from the hospital provider order entry system and should have all ordered meds. Prescriptions aren't guaranteed to be administered, but it could she'd some light on the situation you encountered. |
Thanks a lot for your reply. Sorry for my long comment. Since I didn't have success with postgres I rewrote all queries in MySQL. The procedure to determine dose I am talking about is: if(VI.AMOUNTUOM='mg', I will let you know about more "missing" IV data. So far I have confirmed the one in the previous post. L |
Those are likely prescriptions which are intended for administration on
that date.
…On Dec 21, 2017 6:38 PM, "lmockus" ***@***.***> wrote:
Thanks a lot for your reply. Sorry for my long comment.
Since I didn't have success with postgres I rewrote all queries in MySQL.
The procedure to determine dose I am talking about is:
if(VI.AMOUNTUOM='mg',
VI.AMOUNT,
if(VI.AMOUNTUOM='dose',
if(VI.FORM_UNIT_DISP='VIAL',
VI.AMOUNT*VI.FORM_VAL_DISP*
substring_index(VI.PROD_STRENGTH,'mg',1),
if(VI.FORM_UNIT_DISP='BAG',
VI.AMOUNT*VI.FORM_VAL_DISP*
substring_index(VI.PROD_STRENGTH,'g',1)*1000,0)
),0)
where VI is some join of inputevents_mv and prescriptions. Before joining
them I have to "clean" prescriptions by removing ambiguous entries. In
other words I matched startime with start date and end date. However there
are prescriptions for which startdate=enddate. I don't know how to deal
with those. I wanted to match inputevents_mv on 2116-06-12 08:35:00 for
patient 99836 with prescriptions and would love to get your input.
I will let you know about more "missing" IV data. So far I have confirmed
the one in the previous post.
L
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOSdASPDZnYg4hdy5dULbPNGWObhbxJks5tCuv5gaJpZM4Q1laJ>
.
|
Cool. For patient 97920 labevents show:
but the latest entry from inputevents_mv is:
This is a substantial increase in vanco level which can be explained by "missing" IV, entry error... Based on your comments for prescription dates (end date implies that prescription is valid for all day) the queries to build the dose amount/time are:
# VANCO_AMBIG_INIT=rows in VANCO_INPUTS
# match to 1) multiple precriptions with
# different doses but are for the same window
# or to 2) multiple prescriptions that have the
# same dose but are for different windows or
# to 3) single prescription
# also there are rows which doesn't match
# 1) implies ambiguous dose
DROP TABLE IF EXISTS VANCO_AMBIG_INIT CASCADE;
CREATE TABLE VANCO_AMBIG_INIT
(
ROW_ID INT NOT NULL,
# TIME DATETIME NOT NULL,
# STARTDATE DATETIME,
# ENDDATE DATETIME,
PROD_STRENGTH VARCHAR(120),
DOSE_VAL_RX VARCHAR(120),
DOSE_UNIT_RX VARCHAR(120),
FORM_VAL_DISP VARCHAR(120),
FORM_UNIT_DISP VARCHAR(120)
) ;
# joining by hadm_id & icustay_id doesn't work
# since prescriptions may use different
# icustay_id than inputevents_mv
# transfer table shows how patient is
# being transfered and prescription written
# before patient is transferred may be valid
# after patient is transferred
# an example is patient 16590 who changed
# wards while staying in the same care unit
# TSICU
insert into VANCO_AMBIG_INIT
select distinct IE.ROW_ID,
P.PROD_STRENGTH,
P.DOSE_VAL_RX,P.DOSE_UNIT_RX,
P.FORM_VAL_DISP,P.FORM_UNIT_DISP
from VANCO_INPUTS as IE
left join VANCO_PRESCRIPTIONS as P on
(P.SUBJECT_ID=IE.SUBJECT_ID)
where
P.STARTDATE<=IE.STARTTIME
and ADDDATE(P.ENDDATE,INTERVAL 1 DAY)>=
IE.STARTTIME;
# some prescriptions
# were administered on the end date
# row_id corresponds to vanco_inputs
# VANCO_AMBIG=rows in VANCO_AMBIG_INIT
# that correspond to 1)
DROP TABLE IF EXISTS VANCO_AMBIG CASCADE;
CREATE TABLE VANCO_AMBIG (
ROW_ID INT NOT NULL,
primary key (ROW_ID)
) ;
insert into VANCO_AMBIG
select T.ROW_ID from
(select ROW_ID,COUNT(ROW_ID) as c
from VANCO_AMBIG_INIT
group by ROW_ID having c>1) as T;
# VANCO_UNAMBIG=rows in VANCO_AMBIG_INIT
# that corresponds to 2) and 3)
DROP TABLE IF EXISTS VANCO_UNAMBIG CASCADE;
CREATE TABLE VANCO_UNAMBIG like VANCO_AMBIG_INIT;
alter table VANCO_UNAMBIG
add primary key (ROW_ID);
insert into VANCO_UNAMBIG
select VAI.ROW_ID,VAI.PROD_STRENGTH,
VAI.DOSE_VAL_RX,VAI.DOSE_UNIT_RX,
VAI.FORM_VAL_DISP,VAI.FORM_UNIT_DISP
from VANCO_AMBIG_INIT as VAI
left join VANCO_AMBIG as VA on
(VA.ROW_ID=VAI.ROW_ID)
where VA.ROW_ID is null;
# VANCO_AMBIG1=patients with ambiguous vanco doses
DROP TABLE IF EXISTS VANCO_AMBIG1 CASCADE;
CREATE TABLE VANCO_AMBIG1
(
SUBJECT_ID INT NOT NULL,
primary key (SUBJECT_ID)
);
insert into VANCO_AMBIG1
select distinct SUBJECT_ID
from VANCO_INPUTS as VI
inner join VANCO_AMBIG as VA on
(VA.ROW_ID=VI.ROW_ID); L |
The query to display the history of IV and labs is: set @subj=94864;
SELECT STARTTIME as time,AMOUNT as val,AMOUNTUOM as uom FROM INPUTEVENTS_MV
where subject_id=@subj and ITEMID=225798
union
SELECT CHARTTIME as time,VALUENUM as val,VALUEUOM as uom FROM LABEVENTS
where subject_id=@subj and ITEMID=51009
order by time; For this particular patient it looks vanco levels are rising while there is no IV to support:
There are a lot of such patients - I wrote a script in R to extract those: 1709 1709 4962 4966 16590 19412 22788 29328 29959 30659 40526 42473 L |
I also found a bunch of patients that have vanco levels before first dose was administered. One of them is 357. The first vanco measurement is recorded in chartevents and labevents on 12/12/2197 7:31. There was no obvious vanco administration before. The first vanco prescription is two years later:
L |
I finally found some time to look into this. I added a notebook with my work to the repo - see commit above or click here: https://github.com/MIT-LCP/mimic-code/blob/9e7f6aea2ff17086cac51101860d5a70ed5942ef/notebooks/vancomycin-dosing.ipynb Here's my take.
|
Tanks a lot for your input. I also did similar history for each patient. It
seems you imply that there may be no vanco labs outside ICU. Is it true?
Also, for PK analysis all dosing/vanco/Scr level events are needed.
Technically I have to "forget" the patients for which we are not sure that
data is correct. I would like to invite you to co-author on vanco PK
analysis using MIMIC data since I didn't see such.
L
…On Mon, Jan 8, 2018 at 1:06 PM, Alistair Johnson ***@***.***> wrote:
I finally found some time to look into this. I added a notebook with my
work to the repo - see commit above or click here:
https://github.com/MIT-LCP/mimic-code/blob/9e7f6aea2ff17086cac51101860d5a
70ed5942ef/notebooks/vancomycin-dosing.ipynb
Here's my take.
subject_id 97920
This one is totally as we'd expect:
- Prescription on the 18th
- Admitted to the ICU on the 18th (1am)
- IV infusion on the 18th (9am, 8pm)
- Prescription on the 19th-21st
- Measured vanco on 19th
- IV on the 19th (8am, 4pm)
- Discharged from the ICU
- POE/lab measurements continue from 20th onward, but no IV data since
they are outside the ICU
subject_id 94864
The only inconsistency is a rise from 15.7 to 16.8 between the 15th/16th
morning labs.
- Admitted on the 10th
- Prescribed vanco 11th-15th with reasonable rising/falling of
measured values
- Level rises between 15th/16th with no explanation
- Discharged ICU 18th
Her notes indicate an 8-day course so likely she received vanco between
15th/16th, unsure why it's not documented in the chart.
subject_id 357
Two issues at play here. (1) Patients admitted under the CareVue database
system didn't have their antibiotics charted in the flowsheet - as a result
you don't see anything in inputevents_cv, (2) I think you have missed a
prescription. I have a prescription for vancomycin for this patient on
2198-08-07 to 2198-08-10 which matches their lab data.
Hopefully this explains most patients. Not sure what happened with
subject_id 94864 but perhaps it is an infrequent case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JpmlaoOjqykT5z_df4mCSdphW2pnks5tIlkLgaJpZM4Q1laJ>
.
|
Happy to support research! In fact the opposite is true; vanco labs are available outside the ICU. It is the IV delivery that is unavailable outside the ICU. I also noticed that, while the actual numeric value stored in the chartevents data is a duplicate of the labevents data (which we expect, because chartevents sources lab data from the lab database, which is labevents), the label in chartevents gives more information ("Trough", "Peak", and "Random"). Might be useful for your work. So to recap:
|
Thanks. Is it fair to assume that vanco IV was not administered outside ICU?
L
…On Mon, Jan 8, 2018 at 3:11 PM, Alistair Johnson ***@***.***> wrote:
Happy to support research!
In fact the opposite is true; vanco labs are available outside the ICU. It
is the IV delivery that is unavailable outside the ICU. I also noticed
that, while the actual numeric value stored in the chartevents data is a
duplicate of the labevents data (which we expect, because chartevents
sources lab data from the lab database, which is labevents), the label in
chartevents gives more information ("Trough", "Peak", and "Random"). Might
be useful for your work.
So to recap:
1. Lab data is available outside the ICU
2. Prescriptions are available outside the ICU, but have limited time
resolution (on the day)
3. IV administration is available *only* inside the ICU, but has good
time resolution
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JiTEBDgHyYJDv7v2e1rBoCKGY1tXks5tInZdgaJpZM4Q1laJ>
.
|
No unfortunately not, I'm sure they administered it in the ED among other
places.
…On Jan 8, 2018 5:10 PM, "lmockus" ***@***.***> wrote:
Thanks. Is it fair to assume that vanco IV was not administered outside
ICU?
L
On Mon, Jan 8, 2018 at 3:11 PM, Alistair Johnson ***@***.***
>
wrote:
> Happy to support research!
>
> In fact the opposite is true; vanco labs are available outside the ICU.
It
> is the IV delivery that is unavailable outside the ICU. I also noticed
> that, while the actual numeric value stored in the chartevents data is a
> duplicate of the labevents data (which we expect, because chartevents
> sources lab data from the lab database, which is labevents), the label in
> chartevents gives more information ("Trough", "Peak", and "Random").
Might
> be useful for your work.
>
> So to recap:
>
> 1. Lab data is available outside the ICU
> 2. Prescriptions are available outside the ICU, but have limited time
> resolution (on the day)
> 3. IV administration is available *only* inside the ICU, but has good
> time resolution
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#347 (comment)
>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/Af_
3JiTEBDgHyYJDv7v2e1rBoCKGY1tXks5tInZdgaJpZM4Q1laJ>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABOSdK1EcdrctCiaCaw0ZgDbyv0LtYGQks5tIpJjgaJpZM4Q1laJ>
.
|
Fantastic. Just to reiterate - IV outside of ICU is not recorded in
inpupevents_mv. Right?
I saw that you have used chartevents. Technically all vanco level
measurements are in labevents. Does chartevents add anything?
L
On Mon, Jan 8, 2018 at 5:13 PM, Alistair Johnson <notifications@github.com>
wrote:
… No unfortunately not, I'm sure they administered it in the ED among other
places.
On Jan 8, 2018 5:10 PM, "lmockus" ***@***.***> wrote:
> Thanks. Is it fair to assume that vanco IV was not administered outside
> ICU?
>
> L
>
> On Mon, Jan 8, 2018 at 3:11 PM, Alistair Johnson <
***@***.***
> >
> wrote:
>
> > Happy to support research!
> >
> > In fact the opposite is true; vanco labs are available outside the ICU.
> It
> > is the IV delivery that is unavailable outside the ICU. I also noticed
> > that, while the actual numeric value stored in the chartevents data is
a
> > duplicate of the labevents data (which we expect, because chartevents
> > sources lab data from the lab database, which is labevents), the label
in
> > chartevents gives more information ("Trough", "Peak", and "Random").
> Might
> > be useful for your work.
> >
> > So to recap:
> >
> > 1. Lab data is available outside the ICU
> > 2. Prescriptions are available outside the ICU, but have limited time
> > resolution (on the day)
> > 3. IV administration is available *only* inside the ICU, but has good
> > time resolution
> >
> > —
> > You are receiving this because you authored the thread.
> > Reply to this email directly, view it on GitHub
> > <#347#
issuecomment-356081899
> >,
> > or mute the thread
> > <https://github.com/notifications/unsubscribe-auth/Af_
> 3JiTEBDgHyYJDv7v2e1rBoCKGY1tXks5tInZdgaJpZM4Q1laJ>
> > .
> >
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#347 (comment)
>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/
ABOSdK1EcdrctCiaCaw0ZgDbyv0LtYGQks5tIpJjgaJpZM4Q1laJ>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JqVwsrcjhasWE8aBbpZ_-ZtsV7D7ks5tIpMHgaJpZM4Q1laJ>
.
|
Yes, you're correct about the IV. I checked chartevents just in case - you're right, all vanco measurements are in labevents. The only addition that chartevents adds is the label sometimes states "Trough", "Random", or "Peak", which can help you infer some things about when the patient was dosed. Otherwise it's a straight duplicate of labevents. |
Thanks a lot.
There are bunch of mysteries. One of them is # of admit to icu <> # of
discharge from icu. for example patient 5738, 23829. There are a lot of
such patients. Do you have an idea what is happening?
L
…On Tue, Jan 9, 2018 at 10:47 AM, Alistair Johnson ***@***.***> wrote:
Yes, you're correct about the IV.
I checked chartevents just in case - you're right, all vanco measurements
are in labevents. The only addition that chartevents adds is the label
sometimes states "Trough", "Random", or "Peak", which can help you infer
some things about when the patient was dosed. Otherwise it's a straight
duplicate of labevents.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JooC5ixx_m3ycdLTWKcFG-1msgGbks5tI4oXgaJpZM4Q1laJ>
.
|
Could you provide more detail on what you're wondering? Is this still related to vancomycin? If not it's worth raising a new issue. |
It is related to vanco. I reworked your queries to mysql and now have a
huge table for all patients. For example I am getting below. It seems
patient was admitted from MICU but wasn't discharged. Also the same
increasing levels of vanco with no apparent IV, see
23829, 149357, lab, Vancomycin, 2173-07-21 17:48:00, , 17.5, 17.5,
23829, 149357, lab, Vancomycin, 2173-07-30 07:45:00, , 24.5, 24.5,
Possibly the second row occurred after discharge while in the hospital.
SUBJECT_ID, HADM_ID, SOURCE, LABEL, CHARTTIME, ENDTIME, VALUE, VALUEUOM,
PATIENTWEIGHT
23829, 158842, poe, Vancomycin HCl, 2173-01-01 00:00:00, 2173-01-02
00:00:00, IV, 1000,
23829, 158842, lab, Vancomycin, 2173-01-01 14:00:00, , 5.7, 5.7,
23829, 158842, lab, Vancomycin, 2173-01-03 06:00:00, , 17.0, 17,
23829, 158842, poe, Vancomycin HCl, 2173-01-04 00:00:00, 2173-01-05
00:00:00, IV, 1000,
23829, 158842, poe, Vancomycin HCl, 2173-01-04 00:00:00, 2173-01-04
00:00:00, IV, 1000,
23829, 158842, lab, Vancomycin, 2173-01-04 08:00:00, , 14.2, 14.2,
23829, 158842, lab, Vancomycin, 2173-01-05 09:25:00, , 30.8, 30.8,
23829, 158842, lab, Vancomycin, 2173-01-06 06:10:00, , 25.6, 25.6,
23829, 158842, lab, Vancomycin, 2173-01-07 06:00:00, , 17.1, 17.1,
23829, 158842, lab, Vancomycin, 2173-01-08 03:30:00, , 16.5, 16.5,
23829, 158842, lab, Vancomycin, 2173-01-09 03:30:00, , 15.5, 15.5,
23829, 158842, poe, Vancomycin HCl, 2173-01-10 00:00:00, 2173-01-11
00:00:00, IV, 1000,
23829, 158842, lab, Vancomycin, 2173-01-10 03:00:00, , 12.5, 12.5,
23829, 158842, lab, Vancomycin, 2173-01-11 05:22:00, , 27.1, 27.1,
23829, 158842, lab, Vancomycin, 2173-01-12 03:30:00, , 20.2, 20.2,
23829, 158842, lab, Vancomycin, 2173-01-13 06:30:00, , 19.0, 19,
23829, 158842, lab, Vancomycin, 2173-01-13 15:25:00, , 17.2, 17.2,
23829, 158842, poe, Vancomycin HCl, 2173-01-14 00:00:00, 2173-01-15
00:00:00, IV, 1000,
23829, 158842, lab, Vancomycin, 2173-01-14 11:30:00, , 10.4, 10.4,
23829, 158842, lab, Vancomycin, 2173-01-15 12:15:00, , 27.2, 27.2,
23829, 158842, lab, Vancomycin, 2173-01-17 04:00:00, , 20.6, 20.6,
23829, 158842, lab, Vancomycin, 2173-01-18 08:00:00, , 19.9, 19.9,
23829, 158842, lab, Vancomycin, 2173-01-19 06:15:00, , 15.3, 15.3,
23829, 149357, poe, Vancomycin HCl, 2173-07-18 00:00:00, 2173-07-21
00:00:00, IV, 1000,
23829, 149357, icu admit, 244994, 2173-07-19 00:25:56, , MICU, ,
23829, 149357, lab, Vancomycin, 2173-07-19 18:57:00, , 8.7, 8.7,
23829, 149357, poe, Vancomycin HCl, 2173-07-21 00:00:00, 2173-07-31
00:00:00, IV, 1000,
23829, 149357, lab, Vancomycin, 2173-07-21 17:48:00, , 17.5, 17.5,
23829, 149357, lab, Vancomycin, 2173-07-30 07:45:00, , 24.5, 24.5,
23829, 0, lab, Vancomycin, 2173-10-08 09:30:00, , 2.5, 2.5,
23829, 0, lab, Vancomycin, 2173-10-11 18:45:00, , 15.6, 15.6,
23829, 0, lab, Vancomycin, 2173-10-12 20:25:00, , 27.4, 27.4,
23829, 0, lab, Vancomycin, 2173-10-13 06:45:00, , 27.6, 27.6,
23829, 0, lab, Vancomycin, 2173-10-15 17:35:00, , 18.5, 18.5,
23829, 0, lab, Vancomycin, 2173-10-19 00:04:00, , 15.4, 15.4,
23829, 151928, icu admit, 274504, 2174-12-22 23:58:05, , MICU, ,
23829, 151928, icu disch, 0, 2174-12-23 18:50:10, , , ,
23829, 151928, icu admit, 274504, 2174-12-24 10:38:16, , CSRU, ,
23829, 151928, icu disch, 0, 2174-12-24 12:59:49, , , ,
23829, 133755, icu admit, 275132, 2175-03-07 18:57:04, , SICU, ,
23829, 133755, icu disch, 0, 2175-03-12 22:39:35, , , ,
23829, 196691, icu admit, 256728, 2175-06-07 01:15:15, , MICU, ,
23829, 196691, lab, Vancomycin, 2175-06-07 01:55:00, , 5.7, 5.7,
23829, 196691, icu disch, 0, 2175-06-08 17:11:55, , , ,
23829, 185247, icu admit, 287191, 2175-07-07 23:52:56, , MICU, ,
23829, 185247, lab, Vancomycin, 2175-07-09 16:29:00, , 12.3, 12.3,
23829, 185247, lab, Vancomycin, 2175-07-10 01:42:00, , 11.7, 11.7,
23829, 185247, icu disch, 0, 2175-07-12 17:02:15, , , ,
…On Tue, Jan 9, 2018 at 8:26 PM, Alistair Johnson ***@***.***> wrote:
Could you provide more detail on what you're wondering? Is this still
related to vancomycin? If not it's worth raising a new issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JgCOmsPxpFvrWsXZBJKZcD4H-pp-ks5tJBGvgaJpZM4Q1laJ>
.
|
Thanks a lot. I think the vanco investigation script helped immensely with resolving this issue. L |
Ah, glad it helped! Good luck in your project! |
Will you be able to help me to figure out why for some patients # of admits
to icu is different from # of dischs from icu? There are lot of patients
like this.
L
…On Wed, Jan 10, 2018 at 4:58 PM, Alistair Johnson ***@***.***> wrote:
Ah, glad it helped! Good luck in your project!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JjvTzgIMM2ZUBvu48BLZMMlrI45xks5tJTKUgaJpZM4Q1laJ>
.
|
@imockus this issue appears to be unrelated to your original question. Please raise a new issue and provide code for reproducing the list of patients that you've found. |
@tompollard I didn't realize it immediately either but I think this is about the https://github.com/MIT-LCP/mimic-code/blob/dedd0faed8273748f0db6034088713d62f226305/notebooks/vancomycin-dosing.ipynb code I made the assumption in that code that an ICU discharge event in the transfers table would have a select hadm_id, event_type
, prev_careunit, curr_careunit
, prev_wardid, curr_wardid
, intime, outtime
from transfers
where hadm_id = 149357;
So I guess the admission/discharge/transfer table doesn't include some transfers (either that or the patient magically teleported from ward 52 to ward 36). Just revised the code to not make this assumption. Things should make more sense now. |
Awesome. I will test it out. Do you want me to open another issue so you have a good history or just be informal? L |
That's ok - no need for a new issue for the solved problem - but if something else comes up it's worth raising a new one. |
Cool. I will open another issue if I encounter problems.
Just to close all tabs. I have modified your code slightly to select admits
and discharges based on eventtype. Now I have only 13 missed
admits/discharges. Evidently some rush. I won't worry about this.
select subject_id,hadm_id,'icu admit',icustay_id,intime,null,
curr_careunit,null,null
from VANCO_ADMIN_TRANS
where eventtype='admit'
union
select subject_id,hadm_id,'icu disch',icustay_id,intime,null,
curr_careunit,null,null
from VANCO_ADMIN_TRANS
where eventtype='discharge'
L
…On Wed, Jan 10, 2018 at 6:09 PM, Alistair Johnson ***@***.***> wrote:
That's ok - no need for a new issue for the solved problem - but if
something else comes up it's worth raising a new one.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#347 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Af_3JqGtGFx-SOMIGapfTaMkBkegWdMIks5tJUM7gaJpZM4Q1laJ>
.
|
Hi,
For vancomycin inputevents_mv row_id=429 gives starttime at 8 and endtime at 8:01. How to determine actual administration duration?
In row_id=462 amount is 500. What does it mean? Perhaps this came from half 1g frozen bag or 500mg vial? For row_id=429 the amount=1 dose which is quite ambiguous as well.
In both cases rate=0.
Thanks in advance for any suggestions.
L
The text was updated successfully, but these errors were encountered: