Added base condition. 
Change ecgService to query with conditions