There's a criminal team side mission "Can you delivery these drugs for me?" in which, if there is a cop nearby, you gain wanted level for getting spotted by the cop. We can use a similar kind of script for medics i.e.
if there is a wanted player from Criminal Team within a radius of X meters AND if there is a player from Police Service within a radius of X meters, the same thing will happen to medics like when they enter an active Armed Robbery.
@LuaR