AUGUSTA — A new law will give about two-thirds of Maine’s population a choice on whether to keep their medical records on an independent computer database.

A compromise bill that quietly worked its way to enactment, requires that Maine residents whose medical records are stored in the HealthInfoNet database get an opportunity to opt out of the system. The nonprofit HealthInfoNet is a secure electronic system in which people’s complete medical records are stored, enabling health care providers to share medical data.

This way, complete medical records are available to doctors no matter where someone needs medical attention.

The compromise bill settles differences between those who were concerned about people being enrolled in the system without their knowledge and those who wanted to expand HealthInfoNet’s scope.