Psalm 139:1–4 establishes the completeness of God's knowledge of a person: "O LORD, thou hast searched me, and known me. Thou knowest my downsitting and mine uprising, thou understandest my thought afar off." The Hebrew word for "searched" — chaqar — means to explore thoroughly, to investigate completely. What doctors miss, God has not missed. The wrong diagnosis is an error in human knowledge. It is not an error in divine knowledge.
James 1:5 offers a direct promise for the person who lacks understanding and does not know what to trust: "If any of you lack wisdom, let him ask of God, that giveth to all men liberally, and upbraideth not; and it shall be given him." The Greek word for "upbraideth not" — mē oneidizountos — means without reproach, without making the asker feel foolish for not knowing. God does not shame the person who comes not knowing what to do next after a wrong diagnosis has reorganized their life.
Commentary is from a charismatic Protestant perspective, drawing on KJV text and public-domain sources including Spurgeon, Andrew Murray, and Matthew Henry.