Original: Locke's medical knowledge was put to the test when Shaftesbury's liver infection became life-threatening.
Simplified: Locke's medical knowledge was put to the test when Shaftesbury's liver disease became worse until Shaftesbury was about to die.