function getInstancesQueryComps($params, $logic, $order)
 {
     $res = parent::getInstancesQueryComps($params, $logic, $order);
     $res['from'] = '(' . $res['from'] . ') LEFT OUTER JOIN family family ON family_note.familyid = family.id';
     $res['select'][] = 'family.family_name as family_name';
     return $res;
 }
 function getInstancesQueryComps($params, $logic, $order)
 {
     $res = parent::getInstancesQueryComps($params, $logic, $order);
     $res['from'] = '(' . $res['from'] . ') LEFT OUTER JOIN person person ON person_note.personid = person.id';
     $res['select'][] = 'person.first_name as person_fn';
     $res['select'][] = 'person.last_name as person_ln';
     return $res;
 }