New door in 47 inches wide corridor
This is a condensed version for a wall installation, but it should help a bit (I hope). The door should be centered in the width of the hallway. To do that you will need to build-out a wall to accommodate a 36 x 80 inch door. This is typically done with 2 x 4 inch stock. If it is pre-hung plan on a rough opening 1.5 inches wider and 2 inches higher than the door dimensions. Start by cutting 2 pieces of 2 x 4 to 47 inches. This is the bottom and top  plates. You will need to build out the side walls by about 5.5 inches on each side for the R.O width. Cut the studs closest to and on either side of the door to 81.5 inches for the R.O height. Cut a header to span the distance of the R.O plus 3 inches. Install header on top of the 81.5 inch (jack or cripple) studs.