Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (Select DISTINCT a.conditions from
- (select CASE
- WHEN medication like 'caduet'
- THEN 'Hypertension and Cholesterol'
- WHEN medication like '%actoplus%'
- OR medication like '%actos%'
- OR medication like '%amaryl%'
- THEN 'Diabetes'
- WHEN medication like '%altocor%'
- OR medication like '%altoprev%'
- OR medication like '%zocor%'
- THEN 'Cholesterol'
- WHEN medication like '%-nitro%'
- OR medication like '%accupril%'
- OR medication like '%zosin%'
- THEN 'Hypertension'
- ELSE NULL
- END as Conditions
- from prescriptions
- where patientid = @contactid
- and status = 'Active'
- ) a
- where a.conditions is not null) as 'Conditions'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement