        :mandatory (= "Yes" (xml1-> form-ref (attr :Mandatory)))}
       (assoc-when :order-number (xml1-> form-ref (attr :OrderNumber)))))
 
-(defn parse-form-ref! [bus form-ref]
-  (publish!! bus :form-ref (parse-form-ref form-ref)))
+(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 -------------------------------------------------------
 

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

(defn parse-item-group-def! [bus item-group-def]
  (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)))

;; ---- Item Def --------------------------------------------------------------


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

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

;; ---- Item Group Def --------------------------------------------------------

