So ever since season 9 ended, i only had one question about the entire season. if Philip really was Dwight’s son, why did the doctor come out with the results saying that it was not his? i did some research and found something that might solve this little issue. it was posted on theoffice.wikia.
“Initially, Dwight believes that Philip is his own son, and in “Free Family Portrait Studio”, he steals one of Philip’s diapers and takes it for paternity testing. The results of the test eventually proved that Philip is, in fact, not Dwight’s son. In “A.A.R.M." Angela reveals to Dwight that Philip is indeed his son. It is currently unclear how Angela was able to make Dwight believe that he was not the father after paternity testing, but, considering the fact that Jim and Pam’s children were also in the office at the time that Dwight stole the diaper, it is likely that he simply brought the wrong diaper for testing."