The diagnosis comes mostly from the history and examination, but the following special investigations may be involved: blood tests (vitamin deficiency, anemia, leukemia, Epstein-Barr virus, HIV infection, diabetes) microbiological swabs (infection), or urinalysis (diabetes). A biopsy (minor procedure to cut out a small sample of the ulcer to look at under a microscope) with or without immunofluorescence may be required, to rule out cancer, but also if a systemic disease is suspected. Ulcers caused by local trauma are painful to touch and sore. They usually have an irregular border with erythematous margins and the base is yellow. As healing progresses, a keratotic (thickened, white mucosa) halo may occur.