Jim,
I think I see your confusion.
The concept you show below is not a concept_dim entry but a metadata entry.
In addition it would not have a basecode of LOINC.
This is the sql your concept would generate :
select patient_num from patient_dimension where birth_date =
(sysdate-birth_date) *365.24
which would return 0 patients.
As a rule we don’t run queries for Age .. because in essence it asks “give me
patients with an age” … which is everyone.
However we DO the following:
To query for patients between 10 and 17 years of ag:
select patient_num from patient_dimension where birth_date between (sysdate -
(365.25*18) AND sysdate - (365.25*10)
concept
level3/level
key\\i2b2_DEMO\i2b2\Demographics\Age\10-17file:///\\i2b2_DEMO\i2b2\Demographics\Age\10-17
years old\/key
name 10-17 years old/name
synonym_cdN/synonym_cd
visualattributesFA /visualattributes
totalnum
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instancehttps://urldefense.proofpoint.com/v1/url?u=http://www.w3.org/2001/XMLSchema-instancek=PmKqfXspAHNo6iYJ48Q45A%3D%3D%0Ar=7jqROYnRJZ%2FRUK29eXLgd84I9Ih235HbTh2w98KlP4I%3D%0Am=pDdvQD%2Biwpb1alvTBMP8roYfCDj%2BfTL8t4gdGC2pkoo%3D%0As=4778eec22b046474c4106f51daabf2b698a49c0865ebeedc33c40bcfdfca45f9
xsi:nil=true /
facttablecolumnpatient_num/facttablecolumn
tablenamepatient_dimension/tablename
columnnamebirth_date/columnname
columndatatypeN/columndatatype
operatorBETWEEN/operator
dimcodesysdate - (365.25*18) AND sysdate - (365.25*10)
/dimcode
tooltipDemographics \ Age \ 10-17 years old/tooltip
/concept
Does this help?
Lori
From: Campbell, James R [mailto:campb...@unmc.edu]
Sent: Wednesday, July 30, 2014 8:38 AM
To: Apathy,Nate; Murphy, Shawn N.; Phillip Reeder; Phillips, Lori C.
Cc: gpc-dev@listserv.kumc.edu; Munns, Michael B; Klann, Jeffrey G.;
Meyer,Aaron; Hickman, Hubert B
Subject: RE: i2b2 Queries
Nate
It sounds like Jeff and Aaron are addressing my question. I may be overly dense
when trying to reapply Shawn's example. Does it work that the Concept_dimension
entry below returns the age of the patient in days with concept code
LOINC:30525-0 at query time WITHOUT an observation_fact being loaded for the
patient age?
Jim
concept
level3/level
c_fullname\PCORI\Demographics\Age\/c_fullname
c_nameAge/c_name
visualattributesLA/visualattributes
c_basecodeLOINC:30525-0c_basecode
facttablecolumnpatient_num/facttablecolumn
tablenamepatient_dimension/tablename
columnnameBirth_date/columnname
columndatatypeInteger/columndatatype
operator=/operator
dimcode(sysdate-Birth_date)*365.24/dimcode
tooltipPCORI\Demographics\Age/tooltip
\concept
From: Apathy,Nate [nate.apa...@cerner.com]
Sent: Tuesday, July 29, 2014 10:01 PM
To: Murphy, Shawn N.; Campbell, James R; Phillip Reeder; Phillips, Lori C.
Cc: gpc-dev@listserv.kumc.edumailto:gpc-dev@listserv.kumc.edu; Munns, Michael
B; Jeffrey Klann; Meyer,Aaron
Subject: Re: i2b2 Queries
For what it痴 worth, Jeff Klann and Aaron Meyer worked on building this age
demographics ontology table to accommodate pediatric clients and dynamically
calculate age at the time of query execution from the birth date (shifted birth
date for de-identified data). I知 not sure if this specifically addresses the
question at hand, but it might be valuable for additional approaches or at
least some context. User beware, though, we are all still finalizing our
production deployment of this ontology, so it isn稚 live with Cerner clients or
in any non-dev environments to my knowledge. I still figured it would be worth
sharing for this conversation.
Nate Apathy
Program Manager, Cerner Research
From: Murphy, Shawn N. snmur...@partners.orgmailto:snmur...@partners.org
Date: Tuesday, July 29, 2014 at 10:25 AM
To: campb...@unmc.edumailto:campb...@unmc.edu
campb...@unmc.edumailto:campb...@unmc.edu, Phillip Reeder
phillip.ree...@utsouthwestern.edumailto:phillip.ree...@utsouthwestern.edu,
Lori Phillips lcphill...@partners.orgmailto:lcphill...@partners.org
Cc: gpc-dev@listserv.kumc.edumailto:gpc-dev@listserv.kumc.edu
gpc-dev@listserv.kumc.edumailto:gpc-dev@listserv.kumc.edu, Munns, Michael
B mike.mu...@unmc.edumailto:mike.mu...@unmc.edu
Subject: RE: i2b2 Queries
Hi Jim
In the demo data instance we calculate it dynamically from birth_date, that is
not what you want?
Thanks,
Shawn.
From: Campbell, James R [mailto:campb...@unmc.edu]
Sent: Tuesday, July 29, 2014 11:23 AM
To: Phillip Reeder; Murphy, Shawn N.; Phillips, Lori C.
Cc: gpc-dev@listserv.kumc.edumailto:gpc-dev@listserv.kumc.edu; Munns, Michael
B
Subject: RE: i2b2 Queries
That was not precisely my question Phillip. I was wondering if we could avoid
loading Observation_fact for age since it is a dynamic variable, changing
daily, and define a function