The physician's estimate of the probability that a patient has a particular disease is a principal factor in the determination of whether to withhold treatment, obtain more data by testing, or treat without subjecting the patient to the risks of further diagnostic tests. Using the concepts of decision analysis, we have derived expressions for two threshold probabilities involved in this choice: a "testing" threshold and a "test-treatment" threshold. Values can be assigned to these thresholds from data on the reliability and potential risks of the diagnostic test and the benefits and risks of a specific treatment. Treatment should be withheld if the probability of disease is smaller than the testing threshold, and treatment should be given without further testing if the probability of disease is greater than the test-treatment threshold. The test should be performed (with treatment depending on the test outcome) only if the probability of disease is between the two thresholds. The method exposes important principles of decision making and helps the clinician develop a rational, quantitative approach to the use of diagnostic tests.