David Guest wrote:

> P.S. Anyone got a list of useful LOINC codes? I see HbA1c is 17856-6,
> but glucose, chols and trigs and probably a few others would be good to
> have somewhere.


The test names are in the table so you could just run a query for
testname and code to display the full list.

The ones I use are in the query below - I just forget which one is which
but it returns the commonly used ones in a single set grouped by
testname and ordered by date eg

13/06/2007 Blood HbA1c Fraction 6.0
13/12/2006 Blood HbA1c Fraction 7.8
23/11/2006 Cholesterol 5.0
23/11/2006 eGFR 75
23/11/2006 HDL (protective) 0.97 -
23/11/2006 LDL (atherogenic) 3.37 +
23/11/2006 Prostate Specific Antigen 1.10
23/11/2006 Serum Creatinine 90
23/11/2006 Triglycerides 1.3
23/11/2006 Urea 5.6
13/06/2007 Urine Albumin 18

(note it also preserves the flags if they are in the result)

This query is in whatever version of SQL MS Access uses - will need work
if used directly against SQLServer

SELECT DISTINCTROW First(dbo_MD_PATHOLOGY_ATOM.RESULT_DATE) AS
FirstOfRESULT_DATE, First(dbo_MD_PATHOLOGY_ATOM.TEST_NAME) AS
FirstOfTEST_NAME, dbo_MD_PATHOLOGY_ATOM.RESULT,
dbo_MD_PATHOLOGY_ATOM.ABNORMAL_FLAGS FROM dbo_MD_PATHOLOGY RIGHT JOIN
dbo_MD_PATHOLOGY_ATOM ON dbo_MD_PATHOLOGY.PATHOLOGY_ID =
dbo_MD_PATHOLOGY_ATOM.PATHOLOGY_ID GROUP BY dbo_MD_PATHOLOGY.PATIENT_ID,
dbo_MD_PATHOLOGY_ATOM.RESULT, dbo_MD_PATHOLOGY_ATOM.LOINC,
dbo_MD_PATHOLOGY_ATOM.ABNORMAL_FLAGS HAVING
(((dbo_MD_PATHOLOGY.PATIENT_ID)= " & vPATIENT_ID & " ) AND
((First(dbo_MD_PATHOLOGY_ATOM.RESULT_DATE)) Is Not Null) AND
((dbo_MD_PATHOLOGY_ATOM.LOINC)='14749-6' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='14937-7' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='14682-9' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='14647-2' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='14927-8' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='14646-4' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='22748-8' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='33914-3' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='1754-1' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='4548-4' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='3016-3' Or
(dbo_MD_PATHOLOGY_ATOM.LOINC)='2857-1')) ORDER BY
First(dbo_MD_PATHOLOGY_ATOM.TEST_NAME),
First(dbo_MD_PATHOLOGY_ATOM.RESULT_DATE) DESC;

Tony


_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk

Reply via email to