Do not order HLA-B27 unless spondyloarthropathy is suspected based on clinical signs or symptoms.

Back pain is a common symptom relative to the incidence of spondyloarthropathy (SpA) in children. In addition, the prevalence of HLA-B27 is 2-8% in the general population, and individuals with a positive HLA-B27 have a low probability of developing SpA. As such, HLA-B27 testing is not useful as a single diagnostic test in a patient with low back pain without specific signs or symptoms of SpA (e.g., inflammatory back pain, peripheral arthritis, enthesitis, or acute anterior uveitis) or suggestive findings on MRI. Of note, patients with confirmed Juvenile Idiopathic Arthritis (JIA) may have HLA-B27 testing in order to classify their JIA subtype.
For more information:

Gran JT, Husby G. HLA-B27 and spondyloarthropathy: value for early diagnosis? J Med Genet. 1995;32(7):497-501. PMID: 7562959.

Reveille JD. Epidemiology of spondyloarthritis in North America. Am J Med Sci. 2011;341(4):284-6. PMID: 21430444.

Reveille JD, Hirsch R, Dillon CF, Carroll MD, Weisman MH. The prevalence of HLA-B27 in the US: data from the US National Health and Nutrition Examination Survey, 2009. Arthritis Rheum. 2012;64(5):1407-11. PMID: 22139851.