add sql for patients and care relations