An obstetrician performs the amniocentesis in a doctor's office or at a hospital. It is an outpatient procedure, which means you can go home after the test. It takes about 15 to 20 minutes. There are no special requirements before the test.