As being pipe stress and vessel designer for years, none of the above replies are correct, or shall say only partially correct.
Any pipe or spool can be treated as vessels for specific reasons. I have done 12", 18", 24" pipe as vessels with code stamp. However, stamp is not mandatory if client is ok with that. It can comes with top ,bottom or body flanges, very common and not a big deal, same as the spool.
Snickster you are correct to model as B31.1 for the spool, which is very common to do so and shall do so. But you are not correct when a pipe spool is treated by a vessel code. You can only qualify up to the B31.1 mating flange, but for the body flange on the pipe spool, you will need to use UG-44(b) or equivalent pressure method to qualify. Equivalent pressure method is much more conservative than UG-44(b). Either method is fine. Keep in mind the equation in UG-44(b) is not mandatory. So many people have the wrong impression that that equation is mandatory. It is not. You can use other approaches to prove your flange is good for internal pressure plus external loading. CAESAR II has built-in function to check flange rating with external loading, which is completely different from UG-44(b) and we accept it such that vessel supplier does not need to perform UG-44(b). This is another simple concept but I won't waste time to address here.
For the pipe spool itself, since it will be treated as vessel, then must obtain the longitudinal tension and compressive stresses and compare with Section II, Part D and B factor compressive allowable respectively. If wind/seismic is included, the allowable stresses can be increased by 20%. The vessel code calculation is much complicate than B31.1 or B31.3.
So Kevin, get the external loading at the face of flange, and get a guy who is familiar with vessel code, and either model into PV Elite or Compress, or by hand calculation. This spool is very simple, hand calc can be done to check spool thickness due to internal pressure, the maximum longitudinal tension and compression stresses due to internal pressure (PR/2t), axial force and bending moment acting at the face of flange, than compare with two different allowable. Also to qualify the flange rating per UG-44(b). Very simple, not a big deal.