                         THEN 1 ELSE 0
                     END AS all_8m_trans,
                     CASE WHEN contact_type = 'Infant' AND
-                        disposition = 'Moved' AND
+                        disposition IN (
+                            'Closed: Transferred to another state',
+                            'Closed: Left state (unable to transfer)',
+                            'Closed: Moved out of country'
+                        ) AND
                         (hepb_dose1_date <= dce.birth_date + INTERVAL '12 months' OR hepb_comvax1_date <= dce.birth_date + INTERVAL '12 months') AND
                         (hepb_dose2_date <= dce.birth_date + INTERVAL '12 months' OR hepb_comvax2_date <= dce.birth_date + INTERVAL '12 months') AND
                         (hepb_dose3_date <= dce.birth_date + INTERVAL '12 months' OR hepb_comvax4_date <= dce.birth_date + INTERVAL '12 months') AND

                    CASE WHEN contact_type != 'Infant' AND treatments_agg.total_doses >= 4 THEN 1 ELSE 0 END AS dose4_hs,
                    CASE WHEN contact_type != 'Infant' AND treatments_agg.total_doses >= 5 THEN 1 ELSE 0 END AS dose5_hs,
                    CASE WHEN contact_type != 'Infant' AND treatments_agg.total_doses >= 6 THEN 1 ELSE 0 END AS dose6_hs,
                    CASE WHEN contact_type = 'Infant' AND disposition = 'Moved' AND (hepb_dose1_date IS NOT NULL OR hepb_comvax1_date IS NOT NULL) AND hbig_vacc_date IS NOT NULL THEN 1 ELSE 0 END AS dose1_hbig_trans,
                    CASE WHEN contact_type = 'Infant' AND disposition = 'Moved' AND hepb_dose1_date IS NULL AND hepb_comvax1_date IS NULL AND hbig_vacc_date IS NOT NULL THEN 1 ELSE 0 END AS hbig_trans,
                    CASE WHEN contact_type = 'Infant' AND disposition = 'Moved' AND (hepb_dose1_date IS NOT NULL OR hepb_comvax1_date IS NOT NULL) AND hbig_vacc_date IS NULL THEN 1 ELSE 0 END AS dose1_trans,
                    CASE WHEN contact_type = 'Infant' AND disposition = 'Moved' AND hepb_dose1_date IS NULL AND hepb_comvax1_date IS NULL AND hbig_vacc_date IS NULL THEN 1 ELSE 0 END AS neither_trans,
                    CASE WHEN contact_type = 'Infant' AND
                        disposition = 'Moved' AND
                        (hepb_dose1_date <= dce.birth_date + INTERVAL '8 months' OR hepb_comvax1_date <= dce.birth_date + INTERVAL '8 months') AND
                        (hepb_dose2_date <= dce.birth_date + INTERVAL '8 months' OR hepb_comvax2_date <= dce.birth_date + INTERVAL '8 months') AND
                        (hepb_dose3_date <= dce.birth_date + INTERVAL '8 months' OR hepb_comvax4_date <= dce.birth_date + INTERVAL '8 months') AND

                    ) treatments_agg
                        ON (treatments_agg.contact_event_id = dce.id)
                WHERE
                    dme.disease_name = 'Hepatitis B Pregnancy Event' AND
                    (
                        dce.birth_date IS NOT NULL OR
                        dce.contact_type != 'Infant'
