     (ring-resp/response
       {:links
        (-> {:self {:href "/forms"}
-            :up {:href ""}}
+            :up {:href "/"}}
            (assoc-when :prev (when (< 1 page-num) (page-link (dec page-num))))
            (assoc-when :next (when next-page? (page-link (inc page-num)))))
        :forms

   (POST "/query" [db expr] (query db expr))

   (fn [_] (ring-resp/not-found
             {:links {:up {:href ""}}
              :error "Resource not found."}))))

(defn query [db expr]
  (let [visits (api/query db (edn/read-string expr))]
    (ring-resp/response
      {:links {:up {:href "/"}}
       :visit-count (count visits)
       :visit-count-by-study-event (visit-count-by-study-event visits)
       :subject-count (->> (map :visit/subject visits)
