Complex sentence: He tended the wounded patriots following the Battle of Bunker Hill and for the next year served alongside Massachusetts troops but he served out most of the war attached to the 1st Rhode Island Regiment.
Split into simpler sentences: He tended the wounded patriots following the Battle of Bunker Hill then for the next year served alongside Massachusetts troops. For the balance of the war he was attached primarily to the 1st Rhode Island Regiment.