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
(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 (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.
_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk