This invention relates to a surgical device for the detection of the pedicle screws trajectories of a patient undergoing to scoliosis or spondylosis correction. The device is a patient specific and has information about screw size and position. The increased use of pedicle screws in scoliosis creates a challenge for accurate and safe placement of screw within the pedicle during the scoliosis surgery. Patient-specific templates (PST), is an alternative method to guide the surgeons for detecting the positions and trajectories of pedicle screws in scoliosis and spondylosis fixation surgery. This 3D model constructed during PST process can be also 3D printed as a physical model, which can help surgeons to develop an accurate and safe position of pedicle screws and its trajectories. This device has the ability to customize the placement and the size of each pedicle screw based on the unique morphology and landmarks of the vertebrae.