《宋史·本纪·卷四十一》
秋七月初五，下诏： 近年元兵两次进人利州、间州，逼近顺庆，承奉郎胡元淡代管郡事，能够收集散卒，安定居民，招谕叛将，保全郡土，因功劳特转官三资。 
秋七月甲申，诏： 近岁北兵再入利、阆，迫近顺庆，承奉郎胡元琰摄郡事，能收散卒，定居民，谕叛将，以全阖郡，以功特转官三资。 
On the fifth day of the seventh lunar month in autumn, an edict was issued: In recent years, the Mongol army entered Lizhou and Mianzhou twice and approached Shunqing. Hu Yuantan, the deputy governor in charge of county affairs, was able to gather scattered soldiers, stabilize residents, pacify rebellious generals, and preserve the county land. He was specially promoted to the third rank because of his contributions.