to know exactly what to do when they became ill 是谁的从句

问题描述:

to know exactly what to do when they became ill 是谁的从句
In the past,people tended to think that it was sufficient for good health to have a good doctor who could be relied on to know exactly what to do when they became ill.
在过去,人们倾向于认为,为了健康这样就够了:有一个可以信赖的医生,以准确地知道当他们生病的时候该怎么做.
还是
再过去,人们倾向于认为,为了健康有一个可信赖的医生就够了,以准确地知道当他们生病的时候该怎么做.
就是说 to know exactly what to do when they became ill 是跟 have doctor 连的?还是跟 it was sufficient 连的?

In the past, people tended to think that it was sufficient for good health to have a good doctor (who could be relied on )to know exactly what to do when they became ill.和doctor联接