RE: Lab Normal Value Processing

2019-09-24 Thread Roush, Steffani
Hi Phillip,

Here’s an example of the code we use at Marshfield to extract numbers from 
messy lab values.
I’m not sure if it would work with ranges in the ‘1.0-10.0’ format, but this 
could be a start?

REGEXP_EXTRACT
 (
 TRIM
 (
 REGEXP_REPLACE
 (
 TRIM(UPPER(LOW)),
 '(^[>])|(^[> ])|(^[<])|(^[< ])|(^[=])|(^[= 
])|(^[*])|(^[* ])|([%]$)',
 ''
 )
 )
 ,'^[-+]?(([0-9]+[.]?[0-9]*)|([.][0-9]+))$'
 )
AS NORM_RANGE_LOW

FYI, the functions above are user-defined functions native to our IBM 
PureData/Netezza data warehouse.



Steff


From: Gpc-dev  On Behalf Of Phillip Reeder
Sent: Tuesday, September 24, 2019 9:37 AM
To: gpc-dev@listserv.kumc.edu
Subject: [EXTERNAL] Lab Normal Value Processing

We haven’t used the normal values associated with individual lab results in the 
past and while looking at the normal values, many of them are text with 
modifiers like <,> <=. Etc., along with some that are ranges like  1.0-10.0.   
Does anyone have SQL/regular expressions that will filter all of those out into 
the columns required for the PCORICDM?

Thanks,
Phillip




UT Southwestern


Medical Center



The future of medicine, today.



__
The contents of this message may contain private, protected and/or privileged 
information.  If you received this message in error, you should destroy the 
e-mail message and any attachments or copies, and you are prohibited from 
retaining, distributing, disclosing or using any information contained within.  
Please contact the sender and advise of the erroneous delivery by return e-mail 
or telephone.  Thank you for your cooperation.
___
Gpc-dev mailing list
Gpc-dev@listserv.kumc.edu
http://listserv.kumc.edu/mailman/listinfo/gpc-dev


Re: Lab Normal Value Processing

2019-09-24 Thread Dan Connolly
In our CDM, we don't seem to use normal ranges from individual results (yet) 
either; we us an age/sex adjusted table:
https://github.com/kumc-bmi/i2p-transform/blob/db7cf8809d810385d2e6d4e4f1e66ac7cb02ed57/curated_data/labnormal.csv
https://github.com/kumc-bmi/i2p-transform/blob/master/Oracle/lab_result_cm.sql

In i2b2, we do mark Hi / Lo results on an individual basis, but it looks like 
we filter out things other than plain numbers.
https://github.com/kumc-bmi/heron/blob/master/heron_load/epic_labs_transform.sql
 (private repository; see 
MultiSiteDev<https://informatics.gpcnetwork.org/trac/Project/wiki/MultiSiteDev> 
regarding access)

FWIW, there is some regular expression stuff in there to handle result values 
such as ">40". It also uses
 
https://github.com/kumc-bmi/heron/blob/master/heron_load/curated_data/lab_regex.csv




From: Gpc-dev  on behalf of Phillip Reeder 

Sent: Tuesday, September 24, 2019 9:36 AM
To: gpc-dev@listserv.kumc.edu 
Subject: Lab Normal Value Processing


We haven’t used the normal values associated with individual lab results in the 
past and while looking at the normal values, many of them are text with 
modifiers like <,> <=. Etc., along with some that are ranges like  1.0-10.0.   
Does anyone have SQL/regular expressions that will filter all of those out into 
the columns required for the PCORICDM?



Thanks,

Phillip





UT Southwestern

Medical Center

The future of medicine, today.
___
Gpc-dev mailing list
Gpc-dev@listserv.kumc.edu
http://listserv.kumc.edu/mailman/listinfo/gpc-dev


Lab Normal Value Processing

2019-09-24 Thread Phillip Reeder
We haven’t used the normal values associated with individual lab results in the 
past and while looking at the normal values, many of them are text with 
modifiers like <,> <=. Etc., along with some that are ranges like  1.0-10.0.   
Does anyone have SQL/regular expressions that will filter all of those out into 
the columns required for the PCORICDM?

Thanks,
Phillip




UT Southwestern


Medical Center



The future of medicine, today.

___
Gpc-dev mailing list
Gpc-dev@listserv.kumc.edu
http://listserv.kumc.edu/mailman/listinfo/gpc-dev