We used to prevent our young unmarried women from going out. Then a woman arrived and stayed at the fortress of Banu Khalaf, and she related that her sister had been married to one of the companions of the Messenger of Allah ﷺ who had fought twelve military campaigns alongside the Messenger of Allah ﷺ, and her sister had accompanied him on six of them.She said, "We used to tend to the wounded and care for the sick…" and the rest of the hadith follows.
كنا نمنع عواتقنا أن يخرجن، فقدمت امرأة، فنزلت قصر بني خلف، فحدثت أن أختها كانت تحت رجل من أصحاب رسول الله ﷺ قد غزا مع رسول الله ﷺ ثنتي عشرة غزوة، وكانت أختي معه في ست غزوات قالت: كنا نداوي الكلمى ونقوم على المرضى… الحديث.
Bukhari narrated it in the Hajj chapter (1652) from Muammal bin Hisham, who said, Ismail told us, from Ayub, from Hafsa, who said, and she mentioned it. It includes the going out of menstruating women to the prayer place of Eid. It is also in Sahih Muslim in the chapter on the two Eid prayers (890) through other routes from Hafsa bint Sirin from Umm Atiya, but it does not mention the military expedition.