Regarding the equality impact, this was ground 4 in the judgment, discussion begins at para 83.
https://www.bailii.org/cgi-bin/format.cgi?doc=%2Few%2Fcases%2FEWHC%2FAdmin%2F2023%2F1272.html
My basic understanding is that as a public authority, the home office is bound by the public sector equality duty which requires them to not only not unlawfully discriminate, but also to have 'due regard' to eliminating discrimination, advancing equality and fostering good relations.
The bog standard acceptable way to show you have had 'due regard' is to do an equality impact assessment but it's not mandatory and they didn't do one. They instead relied in court on earlier assessments conducted by the department of health and the HO in 2011, as well as other equality considerations and information-gathering exercises by both public bodies in later years.
These earlier impact assessments were for the purpose of implementing NHS charging itself, including for maternity care, and for implementing a policy of refusing visa applications for those with certain levels of NHS debt. They showed a marked, disproportionate impact on women. Having had 'due regard' to these impacts, the department of health and the home office were nevertheless free to continue with their policies because they judged them to be proportionate means of achieving legitimate aims and thus lawful indirect discrimination against women.
Unfortunately for the home office, this judicial review was not about NHS charging or refusing new visas because of NHS debt. It was about the lawfulness of detaining people at the border because they have NHS debt. All the evidence about the disproportionate impact on women is still true but the HO failed to show a legal basis for these detentions in the first place.
They have no legitimate aim so there can be no proportionate means. Therefore it is unlawful indirect discrimination against women and the HO failed to comply with the PSED.