Yes, r/o is rule out. They do thyroid function tests to r/o thyroid disorder, for example. Or a patient shows signs of different diagnoses and the doctor applies the most likey diagnosis but is open to the possiblity of a different or additional diagnosis.
NOS is not otherwise specified so the diagnosis provided is the most likely diagnosis, based on all the data the doctor had at that time.