Swedish personal identity number
A Personal Identity number (if you have one) is used in all contacts with authorities, when signing any type of contract and other occasions where identifying yourself is important. The personal identity number gives you access to the Swedish health care system and social security (with some restrictions). You can only apply for a Swedish identity number if you plan to stay in Sweden more then 12 months.
You apply for the personal identity number by first registering as living in Sweden with the Swedish Tax Agency (skatteverket). For more information requirements and necessary documents, please consult the tax office website: Skatteverket.se
To apply for the Swedish personal number, you need to visit nearest Swedish Tax Agency and bring a valid ID.
Once you move from Sweden, you need to contact the Swedish Tax Agency and notify them about your move. Read more here: Moving from Sweden | Skatteverket
Or watch this short clip: Moving from Sweden short clip
You can read more about the Swedish social insurance at Forsakringskassan.se.