    [clojure.pprint :as pprint]
    [clojure.string :as str]
    [clojure.set :as set]
-   [clojure.java.io :as io])
+   [clojure.java.io :as io]
+   [flatland.ordered.map :refer [ordered-map]])
   (:import java.util.Date))
 
 (deps/add-deps 

      ""])))

(defn ordensgruppe-typ [ordensgruppe]
  (cond
    (str/includes? ordensgruppe "Konvent") "Konvent"
    (str/includes? ordensgruppe "Aufbaukollegium") "Aufbaukollegium"
    (str/includes? ordensgruppe "Kollegium") "Kollegium"))

(defn ordensgruppe-types-sql [ordensgruppe-types]
  (-> 

      (update :todestag parse-date)
      (update :nrw #(Boolean/parseBoolean %))
      (update :nicht_abdrucken #(Boolean/parseBoolean %))
      (update :stand #(get stand-map % nil))))

(defmulti format-value type)
(defmethod format-value String [value]
  (str "'" value "'"))
(defmethod format-value Boolean [value] value)
(defmethod format-value nil [_] "NULL")

(defn adress-sql [address old-id]
  (let [fields (keys address)
