The following macro will print a list of all those members with a rank of "patient" and who are online to the default chat frame:
Code:
/run for i = 1, GetNumGuildMembers(true) do n, r, _, _, _, _, c, _, o = GetGuildRosterInfo(i); if r=="patient" and o==1 then DEFAULT_CHAT_FRAME:AddMessage(n.." ("..c..")");end;end
If you'd like to turn this into an actual addon, then this should get you started...