                   "uuid"          "UUID"
                   "instanceID"    "Instance ID"
                   "phonenumber"   "Phone number"
-                  (:name field))
-                (case (:name field)
+                  name)
+                (case name
                   _submission_time "Submission time"
-                  _submitted_by "Submitted by"
+                  _submitted_by    "Submitted by"
                   ""))]
-    (if (:label field) field (assoc field :label label))))
+    (cond-> field (not label) (assoc :label label))))
 
 ;; UTILITY: Form Flattening
 (defn flatten-form


(defn relabel-meta-field
  "Try and produce a label for meta field if non-existent."
  [field]
  (let [label (if-let [type (:type field)]
                (case type
                  "start"         "Start time"
                  "end"           "End time"

(def currency-regex #"£|$")
(def newline-regex #"[\n\r]")
(def no-answer "No Answer")

(def submission-time-field
  {:name _submission_time
   :full-name _submission_time
   :label "Submission Time"
   :type "dateTime"})

(def submitted-by-field
  {:name _submitted_by
   :full-name _submitted_by
   :label "Submitted by"
   :type "text"})

(def last_edited
  {:name _last_edited
