On 16/06/2007, at 8:17 PM, kuang oon wrote:
On 16/06/2007, at 5:12 PM, David Guest wrote:
Finding IHD Patients
SELECT DISTINCT
CM_PATIENT.SURNAME, CM_PATIENT.FIRST_NAME,
CM_PATIENT.DOB, CM_PATIENT.STATUS_CODE, CM_PATIENT.PHONE_HOME,
CM_PATIENT.STREET_LINE_1, CM_PATIENT.CITY,
CM_PATIENT.POSTCODE
FROM MD_HISTORY INNER JOIN
CM_PATIENT ON MD_HISTORY.PATIENT_ID =
CM_PATIENT.PATIENT_ID
WHERE (MD_HISTORY.HISTORY_CODE LIKE 'angip%') AND
(CM_PATIENT.STATUS_CODE = 'A') OR
(MD_HISTORY.HISTORY_CODE LIKE 'surg.coroa%') OR
Hi david,
Like '%coroa%' is probably better than LIKE 'surg.coroa%' as the
former picks up [EMAIL PROTECTED] surg.coroa [EMAIL PROTECTED]
[EMAIL PROTECTED] (occlusion coronary artery, surgery coronary artery,
surgery coronary artery graft and surgery coronary artery stent ) .
Sometimes a patient has an occlusion of a branch of the coronary
artery without clinical myocardial infarction. Any mention of a
"coronary artery" substring in one's diagnosis is, I guess ihd or
suspicion of ihd.
A more formal way is to locate all the species is to look up the
genuses of say myoci which happen to be ihd^ [EMAIL PROTECTED] and from
there collect the multitude of species belonging to the genuses.
(MD_HISTORY.HISTORY_CODE LIKE 'ihd%') OR
(MD_HISTORY.HISTORY_CODE LIKE 'myoci%')
ORDER BY CM_PATIENT.SURNAME, CM_PATIENT.FIRST_NAME
Hi David,
Good work. angip surg.coroa ihd myoci are DOCLE codes
respectively for angina pectoris, surgery coronary artery ,
ischemic heart disease and myocardial infarction.
Use of the SQL condition of: LIKE angip% will collect codes such
as [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]:[EMAIL PROTECTED] [EMAIL PROTECTED]@risk
[EMAIL PROTECTED]@risk
rather [EMAIL PROTECTED]:[EMAIL PROTECTED] [EMAIL PROTECTED]:[EMAIL PROTECTED]
(respresenting angina
prinzmetal , angina unstable and the various risk levels of
unstable angina. docle codes sits well with SQL searches because
of relentless refactoring of the string patterns. The docle live
tree exposing the linnean classification of docle codes running on
ROR/Ajax is reasonably stable as I have not needed to change a
single line of code since I put it up months ago at www.docle.com .
Please email me if there is any outages/problems.
Cheers
Kuang
Docle design principle No. 1
Clinical codes are wordful meanings and are intention revealing.
Cheers
Kuang
Docle design principle No. 2
Clinical codes are derived from ubiquitous health language in this
manner: if the health concept is one word then the first four
characters of the word else if it is two words then the first four
characters of the first word plus the first character of the second
word else the first characters of each word for the case of three or
more words.
_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk