; RPC = MAG DICOM PATIENT LOOKUP
; patient lookup
; modified from FINDP^SCUTBK11 for SC PATIENT LOOKUP rpc
;
; INPUT = value to lookup
; Lookup uses multiple index lookup of File #2
;
; OUTPUT = data
; OUTPUT(0) = number of records
; for i=1:number of records returned:
; DFN^patient name^DOB^PID^SEX^DOD^Sensitive
; 1 2 3 4 5 6 7
;
; (DOD = Date of Death)
;
; RPC = MAG DICOM PATIENT HISTORY
; look up historical patient changes in the audit archive
; INPUT = value to lookup
; Lookup uses multiple index lookup of File #2
;
; OUTPUT = data
; OUTPUT(0) = number of records
; for i=1:number of records returned:
; DFN^Patient Name^DOB^PID^SEX^DOD^Sensitive^Changed Field^Change date & time
; 1 2 3 4 5 6 7 8 9
;
; (DOD = Date of Death; DOD and Sensitive are null)
; RPC = MAG DICOM FORMAT PATIENT NAME
; get properly formatted DICOM patient name
; HL7: family ^ given ^ middle ^ suffix ^ prefix ^ degree
; DICOM: family ^ given ^ middle ^ prefix ^ suffix (4 & 5 swapped, no degree)