Section 13I. Whoever commits an assault or an assault and battery on an emergency medical technician, an ambulance operator, an ambulance attendant or a health care provider as defined in section 1 of chapter 111, while the technician, operator, attendant or provider is treating or transporting a person in the line of duty, shall be punished by imprisonment in the house of correction for not less than 90 days nor more than 2 and one-half years or by a fine of not less than $500 nor more than $5,000, or both.