Human rights activists have gone to court to get Kenya's government to destroy data which lists children who are HIV positive.
They argue it violates the constitution that prohibits the recording of details about people living with HIV.
The president ordered the collection of the data in February, to help the provision of health services.
Children were required to list their names, schools, guardians and relatives possibly affected by their condition.
Activist groups Kenya Legal and Ethical Issues Network (Kelin), Children of God Relief Institute (Nyumbani) and two other parties jointly filed the petition.
he case began on Wednesday and its second hearing will be on 10 July.
According to the UN, more than 1.6 million people are living with HIV in Kenya, including 190,000 children aged 14 and under.
The activists fear the process used in collecting the data could push back the fight against stigmatisation.
Kelin's executive director, Allan Maleche, said the case would have far-reaching ramifications for HIV patients in terms of their privacy and confidentiality.
"We are worried and strongly feel that the method that was used in the collection of the names will be problematic because it would directly link the person's name and their HIV status, which would be contrary to the law," Mr Maleche said.
HIV in Kenya
- People of all ages living with HIV: 1.6m
- Children aged 0 to 14 living with HIV: 190,000
- Deaths due to Aids: 58,000
- Orphans due to Aids aged 0-17: 1.1m
The BBC's Anne Soy in the capital, Nairobi, says the activists raised concerns about the directive when it was first issued, so it is not clear how much data has been collected across Kenya's 47 counties.
The directive also requested that personal information be collected for pregnant women with HIV.