Scala based adverse events analytics