        :name (xml1-> item-group-def (attr :Name))}
       (assoc-when :desc (desc item-group-def))))
 
-(defn parse-item-group-def! [bus item-group-def]
+(s/defn parse-item-group-def! [bus item-group-def :- Xml]
   (publish!! bus :item-group-def (parse-item-group-def-head item-group-def))
   (doseq [item-ref (xml-> item-group-def :ItemRef)]
-    (parse-item-ref! bus item-ref)))
+    (parse-item-ref! bus (oid item-group-def) item-ref)))
 
 ;; ---- Item Def --------------------------------------------------------------
 

(defn parse-study-event-def! [bus study-event-def]
  (publish!! bus :study-event-def (parse-study-event-def-head study-event-def))
  (doseq [form-ref (xml-> study-event-def :FormRef)]
    (parse-form-ref! bus form-ref)))

;; ---- Item Group Ref --------------------------------------------------------------


       :mandatory (= "Yes" (xml1-> form-ref (attr :Mandatory)))}
      (assoc-when :order-number (xml1-> form-ref (attr :OrderNumber)))))

(s/defn parse-form-ref! [bus parent-id :- Str form-ref :- Xml]
  (->> (assoc (parse-form-ref form-ref) :parent-id parent-id)
       (publish!! bus :form-ref)))

;; ---- Study Event Def -------------------------------------------------------

