Message-ID: <1114995045.8452.1711697225726.JavaMail.confluence@ip-172-30-4-17.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8451_1483266252.1711697225724" ------=_Part_8451_1483266252.1711697225724 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html Query Sample for Labs

Query Sample for Labs

If we wanted to get all the ages for patients have a Cholesterol= lab, we could run the following query:
<= span style=3D"color: rgb(0,0,255);">SELECT CONCEPT_CD
FROM OBSERVATION_FACT
WHERE CONCEPT_CD LIKE 'DEM|Age%'
AND PATIENT_NUM IN

(SELECT PATIENT_NUM
FROM OBSERVAT= ION_FACT
WHERE CONCEPT_CD <= span style=3D"color: rgb(128,128,128);">IN

(SELECT CONCEPT_CD
FROM CONCEPT= _DIMENSION
WHERE CONCEPT_PA= TH LIKE '%LAB(LLB16) Chemistry(LLB17) Lipid Tests\CHOL%' )
)

Notice how the path of the concept is used to quer= y all concept ids that fall into the cholesterol group. If we only wanted t= o query for patient with Plasma Cholesterol only we would use the same quer= y with the following path joined against C_FULLNAME:
'%LAB(LLB16) Chemistry(LLB= 17) Lipid Tests\CHOL\MCSQ-PCHOL%'
= OR
'= %LAB(LLB16) Chemistry(LLB17) Lipid Tests\CHOL\MCPCHOL%'

------=_Part_8451_1483266252.1711697225724--