deductions in respect of his or her spouse. In addition, he or she is also eligible to sponsor his or her spouse for a dependant visa/entry permit for entry into Hong Kong." A Hong Kong court ruled in September 2017 that a lesbian expatriate worker could live in the territory with her partner as a dependant and ordered the government to issue her a spousal visa. The ruling was labelled "a big win" by Raymond Chan Chi-chuen, Hong Kong's first openly gay lawmaker. The Hong Kong Government appealed the ruling in November 2017, and it was upheld in July 2018 by the Court of Final Appeal in QT v Director of Immigration. The ruling became effective on 19 September 2018. In September 2020, the Hong Kong High Court ruled that same-sex couples should receive equal treatment under inheritance law. The case challenged the city's inheritance and intestacy laws which forbade a gay person from inheriting the estate of their partner without a will. Judge Anderson Chow Ka-ming ruled in Ng Hon Lam Edgar v Secretary for Justice that the policy was "unlawful discrimination". In May 2021, the Court of First Instance ruled in favor of equal parental rights over the children of lesbian couples in S v KG. The court ruled that following the breakdown of the relationship the non-biological mother should be granted joint custody, shared care and guardianship rights of her children with her ex-partner, despite not being legally recognized as the children's mother. Guardianship system In March 2017, the National People's Congress amended Chinese law so that "all adults of full capacity are given the liberty of appointing their own guardians by mutual agreement." Previously, only those over the age of 60 or with reduced mental capacity could nominate a legal guardian. Specifically, article 33 of the amended law, which went into effect on 1 October 2017, states: An adult with full capacity for civil conduct may, in prior consultation with his/her close relatives, or other individuals or organisations who are willing to act as his/her guardian, determine his/her guardian in writing. The agreed guardian shall perform the guardianship duties when such adult loses or partially loses his/her capacity for civil conduct. The system, called "legal guardianship" or "guardianship agreement" (, pinyin: , ), permits same-sex partners to make important decisions about medical and personal care, death and funeral, property management, and maintenance of rights and interests.