HL7 v2 PD1-12 (Protection Indicator): Format, Values, and Testing Notes
PD1-12 is one character wide and one of the highest-stakes fields in the whole segment — it's the flag that tells downstream systems a record needs restricted handling, and a generator that never sets it to Y means that code path ships untested.
PD1-12 is the Protection Indicator field, a single Y/N value marking whether the patient's record requires restricted access or special confidentiality handling. It's commonly used for VIP patients, staff members receiving care at their own facility, or anyone who has requested additional privacy protections.
What this field contains
Example
PD1-12 (Y) flags this synthetic record as protected, paired with an effective date in PD1-13.
Where this trips people up
Because a Y in PD1-12 is supposed to trigger real access restrictions, testing it properly means generating protected records and then verifying they're actually blocked from the queries and directory listings that check the flag — not just confirming the field parses. Teams that only test the N (unprotected) case get a test suite that passes cleanly while the restricted-access logic itself has never once been triggered.