I am only familiar with the rules in my country. Here, all residents - also temporary residents like expats and exchange students receive free health care. Non-residents, i.e. tourists will receive free emergency heath care and released when their condition has no emergency status anymore. They will have to pay for repatriation themselves via insurance.