Ibn Abi Hatim reported: Ash-Shafi’ee, may Allah have mercy on him, said, “Indeed, knowledge is of two types: knowledge of the religion and knowledge of the world. The knowledge of religion is to achieve understanding (fiqh) and the knowledge of the world is medicine. Do not settle in a land in which there is no scholar to inform you about your religion, nor a doctor to inform you about your body.”
Source: Adab Ash-Shafi’ee 1/244
عن بن أبي حاتم عَنِ الشَّافِعِيِّ رَحِمَهُ اللَّهُ قَالَ إِنَّمَا الْعِلْمُ عِلْمَانِ عِلْمُ الدِّينِ وَعِلْمُ الدُّنْيَا فَالْعِلْمُ الَّذِي لِلدِّينِ هُوَ الْفِقْهُ وَالْعِلْمُ الَّذِي لِلدُّنْيَا هُوَ الطِّبُّ لا تَسْكُنَنَّ بَلَدًا لا يَكُونُ فِيهِ عَالِمٌ يُفْتِيكَ عَنْ دِينِكَ وَلا طَبِيبٌ يُنْبِئُكَ عَنْ أَمْرِ بَدَنِكَ
1/244 آداب الشافعي ومناقبه قَوْلُ الشَّافِعِيِّ فِي الطِّبِّ
Source: Daily Hadith