Yes, this should be possible, and MA does it internally:
Tick-borne Disease Visit: International Statistical Classification of Diseases and Related Health Problems, 10th Revision (ICD-10) query of the first three diagnostic codes assigned to the ED visit for: Lyme disease (A69.2), babesiosis (B60.0), anaplasmosis (A77.49), and other tick-borne diseases (A68.1, A68.9, A77.40, and A93.8).
Yes, this should be possible, and MA does it internally:
See reports at https://www.mass.gov/lists/monthly-tickborne-disease-reports