Hospitals may soon have to post their standard prices for patients online, under a proposed rule unveiled Tuesday by the Trump administration.

Also, the administration is seeking comments on how to stop so-called surprise billing — when patients are charged after unknowingly being seen by out-of-network providers — and how to give patients better information about the out-of-pocket costs they will face.

And officials are ramping up pressure on hospitals to give patients better access to their medical records electronically or face a penalty.

The proposed rule is the Centers for Medicare & Medicaid Services’ latest effort to give patients more information about the cost of health care and about their own medical history. The guidance applies mainly to Medicare patients and providers, but officials expect it will influence practices across the nation’s health care system. It would take effect in 2019.

Related: Trump wants to make it easier for you to access your medical records

The initiative builds on the Obama administration’s efforts to increase transparency. Hospitals are already required to provide either a list of their standard charges or their policies for allowing the public to view the prices. Trump officials want hospitals to post this information on the Internet and make it available in a way that third-party app developers can access.

The administration is also pressing providers to increase the sharing of information among hospitals so patients could see all their records, regardless of where they go for care. Currently, a hospital often gives patients access to their data through its own online portal.

“Our administration is serious about ensuring that when a patient leaves a hospital, they are able to get their medical information electronically,” said Seema Verma, the agency’s administrator.