        :mandatory (= "Yes" (xml1-> item-group-ref (attr :Mandatory)))}
       (assoc-when :order-number (xml1-> item-group-ref (attr :OrderNumber)))))
 
-(defn parse-item-group-ref! [bus item-group-ref]
-  (publish!! bus :item-group-ref (parse-item-group-ref item-group-ref)))
+(s/defn parse-item-group-ref! [bus parent-id :- Str item-group-ref :- Xml]
+  (->> (assoc (parse-item-group-ref item-group-ref) :parent-id parent-id)
+       (publish!! bus :item-group-ref)))
 
 ;; ---- Form 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 --------------------------------------------------------------


       :name (xml1-> form-def (attr :Name))}
      (assoc-when :desc (desc form-def))))

(s/defn parse-form-def! [bus form-def :- Xml]
  (publish!! bus :form-def (parse-form-def-head form-def))
  (doseq [item-group-ref (xml-> form-def :ItemGroupRef)]
    (parse-item-group-ref! bus (oid form-def) item-group-ref)))

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

