Add systemId to query before sending to DB