 
 (def urls {:location "/locations"
            :individual "/individuals"
-           :socialgroup "/socialGroups"
+           :socialGroup "/socialGroups"
            :residency "/residencies"
            :membership "/memberships"
            :relationship "/relationships"

  (get-entity (bulk-url locations-url) :locations))


;;;;;;;;;;;;;;;;;;;;;;
;;;; Manual Tests ;;;;
(comment

  (create (map->Location {:name "test location"
                          :extId "test location"
                          :type "RURAL"
                          :collectionDateTime "2016-08-01T00:56:55.920Z"
                          :collectedByUuid "UNKNOWN_STATUS"}))



  (find-user {:username "user"
              :password "password"})

  (find-fieldworker {:username "fieldworker"
                     :password "password"})

  (create-location
   {:name "test location"
    :extId "test location"
    :type "RURAL"
    :collectionDateTime "2016-08-01T00:56:55.920Z"
    :collectedByUuid "UNKNOWN_STATUS"})
  )

(defrecord SocialGroup []
  Entity->Rest
  (create [this]
    (post-entity :socialGroup this))
  (fetch [this]
    (fetch-entity :socialGroup this)))

(defrecord Residency []
  Entity->Rest
  (create [this]
    (->> this
         (nest-uuid :individual)
         (nest-uuid :location)
         (post-entity :residency)))
  (fetch [this]
    (fetch-entity :residency this)))

(defrecord Membership []
  Entity->Rest
  (create [this]
    (->> this
         (nest-uuid :individual)
         (nest-uuid :socialGroup)
         (post-entity :membership)))
  (fetch [this]
    (fetch-entity :membership this)))

(defrecord Relationship []
  Entity->Rest
  (create [this]
    (->> this
         (nest-uuid :individualA)
         (nest-uuid :individualB)
         (post-entity :relationship)))
  (fetch [this]
    (fetch-entity :relationship this)))

