I guess, the movie is set in the future, because we have no such devices yet. When a child is born, a doctor makes a pinch in a child's foot with a device that predicts the child's health.
There were two brothers. The device indicated one would be healthy, one would not. I don't remember whether the device predicted success or just health.
Their daddy loved the healthy child, the other was neglected.
As the story goes one, the poor kid actually becomes more physically fit and successful than his brother. The movie ends with the neglected kid going to space.
I watched this movie a long time ago and now want to watch it again. I don't remember the title. I tried Googling, but had no success.