TL;DR:
Book's official status within the Alliance (and therefore on his ident chip) was that of a retired Alliance commander.
This would result in VIP treatment at most Alliance facilities.
I'll outline his entire known history below.
Most of this is outlined in the comic " The Shepherd's Tale ", which is essentially Book reflecting back on his life while dying at Haven.
Spoilers!
Early Life Originally named Henry Evans, the man we know
as Derrial Book was born on a border planet to an abusive father.
At the age of ten, he ran away from home and became adept at survival on the streets.
He eventually garnered some reputation as a thief & criminal, but ended up joining the growing Independence Movement.
Life as a Browncoat
In the four years before his Alliance assignment, Evans quickly became known for his vicious skills in combat - easily (and brutally) taking down entire squads of Alliance soldiers during missions.
When the Browncoats began looking for a long-term operative who could infiltrate the Alliance military as a double agent, Evans volunteered.
He needed a new identity, so he murdered a random citizen named Derrial Book and took that name as his own.
Life in the Alliance
Once in the Alliance, Book began a "meteoric" rise through the ranks.
He was seen as totally committed to the cause and earned a reputation for using savage tactics against the Browncoats, quickly becoming known as a master interrogator.
Because of his rising rank & influence, Book found himself increasingly able to both damage the Alliance plans as well as cover up losses or information leaks.
He quickly became a vital asset for the Browncoats, but also one of their most guarded secrets.
Retirement Book eventually found himself in command (or perhaps XO) of the IAV Cortez , an Alliance cruiser which oversaw an operation intended to end the Unification War in a single stroke.
Book himself was in charge of the operation, which involved committing massive resources into striking multiple targets at once.
Due to Book's involvement, however, the operation was actually a huge ambush.
Numerous forces were lost, including the total destruction of the IAV Alexander and all 4000 crew.
Considered one of the largest defeats in Alliance history, the entire operation was swept under the rug and Derrial Book was quietly discharged from Alliance service.
Life at the Abbey With the Independent Movement crushed soon after, Book wasn't sure what to do with himself.
He wandered the outer territories, weary of his life and drowning his sorrows in alcohol.
At one point, he finds himself at a church and comes to see religion as a way to atone for the many people he had killed throughout his life.
It apparently worked, as he eventually ended up at the Southdown Abbey on Persephone.
Book finally found peace tending the Abbey's garden, but knew he couldn't stay there indefinitely.
Life on Serenity
After an unknown amount of time at the Abbey (but presumably several years), Book decided to leave and get back out into the galaxy.
The Abbey had access to the Cortex, and Book had tired of watching others suffer along the rim.
He announced his intention to carry the Lord's message out to others, and this leads us directly to his introduction in S01E01 "Serenity".
As for your specific question, his ident chip reflected his official status with the Alliance - a retired Captain or Commander.
Especially in a medical situation like that, a status like that would require any Alliance officer to render immediate assistance.
scifi.stackexchange.com/users/20557/Omegacron
Well, I did decide to get the book, and so here's the answer.
Spoilers!
Shepherd Book was abused as a boy, and lived on the street for a while.
He wasn't born under the name Shepherd Book, BTW.
He joined up with the independence movement, and volunteered to be a spy on the Alliance.
He was an officer until he led a brilliant defeat, after which he was discharged.
He later lived in a monastery for a time, and became the preacher we all know:-)
I'm not quite sure what I think of it, but there it is, so...
scifi.stackexchange.com/users/98/PearsonArtPhoto
The lead villain in Serenity commanded the respect from the alliance forces that Shepard Book did once they saw his ID.
I wonder if there is still something we don't know about him, perhaps he too was one of the fixers.
scifi.stackexchange.com/users/2398/mggates
Henry Evans had a troubled childhood and was a criminal for a time before enlisting with the independence movement.
As a member of The Independence he volunteered to spy on The Alliance.
He killed a man named Derrial Book assumed his identity to enlisted in the Alliance Military.
While still working as a spy for The Independence he quickly worked up the Alliance ranks to become a prominent officer.
At a key point during the war he intentionally lost a major battle dealing a crushing blow to the alliance and leading to him being discharged.
This loss was so crushing that the alliance made a point to wipe all record of it out.
Meaning on paper shepherd Book is nothing but a retired prominent Alliance officer.
After being discharged he "found god in a bowl of soup" while at a soup kitchen and decided to join an Abby.
He eventually left and ended up boarding Serenity.
scifi.stackexchange.com/users/17187/Jobe
From the episode with the bounty hunter it does make it seem like he was once him self a bounty hunter and then became a preacher.
That would also explain why the alliance gave him treatment.
He may have done some bounty work for the alliance, as you all know the bounty hunter does say " that man is not a preacher".
scifi.stackexchange.com/users/8987/Daniel
I think it's more plausible that he might be former Allience 'non-existing' agent, just like one that was chasing Firefly crew in 'Serenity' movie.. it would fit to how he was treated by cruiser crew and his skills in ( presumably) combat and firearms
scifi.stackexchange.com/users/16745/Hary
The one big question I've always had remaining about the Firefly series was, what was Shepherd Book's past? It's obvious he wasn't always a preacher, but what was he?
What was Shepherd Book's past in Firefly?
scifi.stackexchange.com
<firefly><character-development>
scifi.stackexchange.com/questions/166
scifi.stackexchange.com/users/98/PearsonArtPhoto
Shepherd Book wasn't born with the name Shepherd Book. He was abused as a boy, and lived on the street for a while before joining up with the independence movement, and volunteering to be a spy on the Alliance. He joined the independence movement and volunteered to be a spy. Moreover, he was abused as a boy and was homeless for some time. 
He joined the independence movement and volunteered to be a spy. He was abused as a boy and was homeless for some time. 