External BMS

How can I integrate an external Battery Management System (BMS) that communicates through UART with PX4 using MAVLink, enabling Pixhawk to receive and utilize the data for flight control? Are there existing integration methods within the system that can facilitate this process?