If you get a positive test result on your pregnancy test, you can consider yourself pregnant. False-positive results are very rare, but an early loss or some very rare cancers can cause the test to detect hCG13.
Also, if you are on any fertility medication containing hCG, (usually given by injection) this can also affect your test results.
However, other medications like hormonal contraceptives or antibiotics won’t affect your hCG level13.