Set in the future, when all medicine is illegal, but technology has advanced to star-trek levels - most people live in free government provided acconmodations, and eat free food from public replicators, although it is only free as long as they agree to not have children.
A kid finds a crashed ambulance containing a laptop with a medical library and AI diagnostic software, so he starts teaching himself medicine, and then runs around curing people. Literally runs, in a few scenes. His interest in ill people is noticed, and he gets recruited to some sort of government team, whose purpose is to bring people comfort as they are dying and incidentally enforce the ban on medicine.
Eventually I think it ends badly - I vaguely remember him being executed at the end, although I might be mixing that up with another story.
There is an additional sub-plot about another kid whose parents were martian diplomats, who came to earth to negotiate something, but were killed in an "accident". He's trying to save enough money to pay for a flight back to mars. I remember a scene, of him selling some rare martian things at the side of the road, which is where the protagonist found him.
I also sort of remember the book having a green/blue cover, and the title "dark wings", but that is probably totally off as I've tried googling for variations on the name, and nothing came up, so it's probably called something completely different.
Any idea what book this was?