kuang oon wrote:
>> David Guest wrote:
>>> I think this identifies the patients we are after:-
>>> SELECT DISTINCT CM_PATIENT.SURNAME, CM_PATIENT.FIRST_NAME,
>>> CM_PATIENT.DOB, MD_HISTORY.CONDITION, MD_HISTORY.HISTORY_CODE
>>> FROM CM_PATIENT INNER JOIN
>>> MD_HISTORY ON CM_PATIENT.PATIENT_ID =
>>> MD_HISTORY.PATIENT_ID
>>> WHERE (MD_HISTORY.HISTORY_CODE LIKE '%diabm%' OR
>>> MD_HISTORY.HISTORY_CODE LIKE 'diabf%' OR
>>> MD_HISTORY.HISTORY_CODE LIKE 'nld%') AND (NOT
>>> (MD_HISTORY.HISTORY_CODE IN ('[EMAIL PROTECTED]', '[EMAIL PROTECTED]'))) AND
>>> (CM_PATIENT.DECEASED_DATE IS NULL) AND
>>> (CM_PATIENT.STATUS_CODE = 'A')
>>> ORDER BY CM_PATIENT.SURNAME, CM_PATIENT.FIRST_NAME
>>
> Praise the lord!
>
> Indeed, for David Guest. In his GP hands he cradles a small SQL
> slingshot that has the potential to be a howitzer in GP computing.
>
> Cheers
> Kuang
> 2 Corinthians 3:5
King James Version, II Corinthians 3:5: "Not that we are sufficient of
ourselves to think any thing as of ourselves"
Hmmm.
Tim C
_______________________________________________
Gpcg_talk mailing list
[email protected]
http://ozdocit.org/cgi-bin/mailman/listinfo/gpcg_talk