                                :Country country})
     ))
 
-(defn- make-adj-list-node [query-result]
+(defn- old-make-adj-list-node [query-result]
   (let [adjudicator-infos (map first query-result)]
     (xml/element
       :AdjList
       {:Qty (count adjudicator-infos)}
-      (map make-adjudicator-node (sort-by :adjudicator/id adjudicator-infos)))
+      (map old-make-adjudicator-node (sort-by :adjudicator/id adjudicator-infos)))
     ))
 
-(defn- export-adj-list [db]
+(defn- old-export-adj-list [db]
   (let [query-result (d/q '[:find (pull ?id [*])
                             :where
                             [?id :adjudicator/id]] db)]
-    (make-adj-list-node query-result)))
+    (old-make-adj-list-node query-result)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; AdjPanelList/PanelList
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defn- make-panel-adj-node [query-result seq-number]
+(defn- old-make-panel-adj-node [query-result seq-number]
   (xml/element
     :PanelAdj
     {:Seq seq-number
      :AdjNumber (:adjudicator/id query-result)}))
 
-(defn- make-panel-node [panel seq-number]
+(defn- old-make-panel-node [panel seq-number]
   (let [adjudicator-infos (:adjudicator-panel/adjudicators panel)]
     (xml/element
       :Panel
       {:Seq seq-number
        :Qty (count adjudicator-infos)}
       (reduce
-        (fn [state adj-info] (conj state (make-panel-adj-node adj-info (count state))))
+        (fn [state adj-info] (conj state (old-make-panel-adj-node adj-info (count state))))
         []
         adjudicator-infos))))
 
-(defn- make-panel-list-node [adjudicator-panels]
+(defn- old-make-panel-list-node [adjudicator-panels]
   (xml/element
     :PanelList
     {:Qty (count adjudicator-panels)}
     (reduce (fn [elements panel]
-              (conj elements (make-panel-node panel (count elements))))
+              (conj elements (old-make-panel-node panel (count elements))))
             []
             adjudicator-panels)
   ))
 
-(defn- export-panel-list [db]
+(defn- old-export-panel-list [db]
   (let [qr (d/q '[:find (pull ?id [{:adjudicator-panel/adjudicators
                                                             [:adjudicator/id]}])
                                           :where

    (d/transact! conn [(uidb/sanitize data)])
    (d/db conn)))

(defn- export-dance-perfect [db]
  (xml/element
      :DancePerfect
      {:Version "4.1"}
      [(export-adj-panel-list db)
       (export-panel-list db)]
      ))

(defn export [data]
  (let [db (get-db data)]
    (export-dance-perfect db) ;; TODO: def queries in file and pass in query result
    ))

(xml/indent-str
  (export u/expected-small-example))


        n (- 30 (count adjudicator-panels))
        padded-panels (repeat n {:adjudicator-panel/adjudicators []})
        all-panels (into adjudicator-panels padded-panels)]
    (old-make-panel-list-node all-panels)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; AdjPanelList
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn- old-export-adj-panel-list [db]
  (xml/element
    :AdjPanelList
    {}
    (old-export-adj-list db)))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Utils
