The CPT Assistant address this issue many years ago (October 2001) and the gist is that you use the code that represents the reason for the exam, not the result.
"Obstetrical Ultrasound Coding
To clarify, for female patients with an established diagnosis of pregnancy, determined by any method, and with indications for the ultrasound procedure that might be pregnancy related, it is appropriate to report an obstetrical ultrasound code from the 76805-76815 series.
For a patient with an established diagnosis of pregnancy (determined by any means), with signs and symptoms that could be pregnancy related and necessitating an ultrasound evaluation of the pelvis, the obstetrical ultrasound code(s) 76805-76815 should be reported, even if the outcome of the procedure is that the patient is now not pregnant or has an ultrasonic diagnosis that might be construed as being independent of the pregnancy (eg, acute appendicitis, torsed ovary, necrotic fibroid).
Pelvic Ultrasound Coding
If a female patient without an established diagnosis of pregnancy presents with gynecological problems necessitating ultrasound evaluation (eg, dysmenorrhea, oligomenorrhea, menstrual irregularity, pelvic pain, etc.), then it is appropriate to report a pelvic ultrasound code 76856 or 76857. The use of codes 76856 or 76857 is not predicated upon whether or not the outcome of the ultrasound procedure is the diagnosis of pregnancy or a complication related to a pregnancy."