In a socialist society, the doctor would provide healthcare for individuals. But lets say he or she decides that the value of other labour is worth more. Wouldn't that break the idea of universal health care? How would it work?
That problem would exist (does exist) within capitalist societies too. A socialist society would presumably value and therefore protect each individual's right to change jobs. Indeed, a socialist society would make that easier because it would not link the particular work one does to the income one relies on. Income would in any case be shaped by the social circumstances for workers as a community and not on the individual circumstances of each person. Therefore, in a socialist society it would be necessary to construct medical care facilities to provide universal health care with enough personnel to enable no loss in public health service in the event some percentage of personnel decide to change jobs. And that would be true across the range of work tasks in the society.
The rigid linking of income to one's job is very much a creation of those economic systems (slavery, feudalism and capitalism) which pit a small group of directors (masters, lords, employers) against a large number of subordinated workers (slaves, serfs, employees). That linking has been presented as necessary, universal, etc., which is not true. The linking is a means of controlling the subordinated worker, making him/her work or else losing most or all of their income, the means to reproduce themselves. That kind of control has always been socially dangerous (since it invites and promotes control over the subordinates' minds and bodies in many other ways all too common for centuries) yet sustained because it is what capitalists believe they need to keep their system going.
In a socialist society - at least as I envision a 21st century socialism - that linkage would not be allowed precisely because of its unacceptable control function. No one person should be able to freely withdraw another's income and thus ability to live....that is as grievous an injury as many others (i.e. striking a person, slandering them, etc.) and, again, is just let go because it is needed by the economic system. If people change and wish to change jobs, if people cannot get along well working together, and so on, that can be handled in ways that do not require and should not allow one to deny income to the other. Mechanisms to facilitate job changes with income provided across the time, training, relocation, etc. associated with a job change.