Sure. This is called the chart. Besides, if a contamination occurs, then every hospital has a procedure in place to check the patient's status and get the contaminated person some treatment.
If it doesn't supercede any precaution standards and shouldn't change the way you handle the patient, then why would it be necessary?
Talking about potentially sensitive matters (like drug use/cancer etc.) around the patient (i.e. on rounds) is a different story, but IMO, but this business about posting "codes" in the chart or on doors is nonsense. We have people roll through th ER/Wards/OR all the time whose Hepatitis/HIV status is unknown. It doesn't change how they get handled, because EVERYONE ought to be treated as if they have some potentially transmissible agent. If you are treating someone differently or behaving differently yourself because you happen to know they have HIV then, IMO, you are doing something wrong. For the cases where the patient has something requiring extra protection for staff, then this is usually posted directly outside the room along with a box of gowns/masks and gloves... i.e C. Diff, Tuberculosis, MRSA, etc.