Denote those who truly have the disease as 'A', those who truly do not as 'B'. Subjects determined using an imperfect measure to have the disease, 'a' and those determined using an imperfect measure to be disease negative, 'b'.
Based on the above, we can say that:
a = TP + FP
or a = (Se)A + (1-Sp)(B)
b = (1-Se)A + (Sp)B
These equations can be re-arranged to calculate an estimate of the true prevalence:
A / (A+B)
from the observed prevalence:
a / (a+b)
and the error rates (Se and Sp). The adjusted prevalence should represent the population value resulting in the observed prevalence, given the misclassification rates.
For a more detailed discussion, and an example, see: Patten SB. Integrating Data from Clinical and Administrative Databases in Pharmacoepidemiological Research. Canadian Journal of Clinical Pharmacology 1998; 5(2): 92-97.