James Johnstone the Elder (1730–1802), MD