; returns PID segment
; Input - DFN as internal entry number of the PATIENT file
; VAFSTR as string of fields requested separated by commas
; VAFNUM as sequential number for SET ID (default=1)
; PTID is flag denoting which Patient ID (seq 3) to use
; 0 - Use DFN formatted as data type CK (default)
; 1 - Use ICN
; 2 - Use DFN formatted as data type CX
; 3 - Use SSN (with dashes)