Maine is piloting a project to use predictive modeling software to comb through nearly all of the state residents’ electronic health records to determine which patients are most at risk of visiting the emergency room, being admitted to the hospital, suffering a stroke or heart attack or developing type 2 diabetes.