          (for [mt o2registers]
            ^{:key (.-id mt)} [:tr
                               [:td (.-serialnumber mt)]
-                              [:td (.-tehsil mt)]
+                              [:td (.-subdivisionname mt)]
                               [:td (.-dateofinstitution mt)]
                               [:td (.-sourceofreceipt mt)]
                               [:td (.-villagename mt)]

  (let [add-data (r/atom {:isactive true})
        focus (r/atom nil)]
    (fn [] [o2register-template 
          "o2register Add Form" 
            add-data focus
             #(o2register-add-form-onclick add-data focus)])))

(defn o2register-update-template [id dmt]
  (let [update-data (r/atom {:id (int id)
                             :serialnumber (.-serialnumber dmt)
                             :dateofinstitution (.-dateofinstitution dmt)
                             :villageid (.-villageid dmt)
                             :villagename (.-villagename dmt)
                             :tehsil (.-tehsil dmt)
                             :sourceofreceipt (.-sourceofreceipt dmt)
                             :nameofthefirstparty (.-nameofthefirstparty dmt)
                             :dateofreceiptfrompanchayat (.-dateofreceiptfrompanchayat dmt)


(defroute o4register-add-path "/o4register/add" []
  (let [onres (fn[json](
                       (set-key-value :villages (getdata json))
                       (set-page! [o4register-add-template])))
        ono4resp (fn [json] ((set-key-value :o4mutations
                                           (clj->js (cons {:id 0 :o4number "select"} (js->clj (getdata json)))))))]
    (http-get (str serverhost "mutations/o4numbers/search") ono4resp)
    (http-get (str serverhost "villages") onres)))

(defroute o4register-upd-path "/o4register/update/:id" [id]
  (let [ono4resp (fn [json] ((set-key-value :o4mutations
                                           (clj->js (cons {:id 0 :o4number "select"} (js->clj (getdata json)))))))]
    (http-get (str serverhost "mutations/o4numbers/search") ono4resp)
    (set-page! [o4register-update-template id
                (first (filter (fn[obj]
                                 (=(.-id obj) (.parseInt js/window id))) (get-value! :o4registers)))])))



