;Set up registration parameters
; Input -- None
; Output -- DGDIV Primary Medical Center Division IEN
; DGIO Registration printer array
; DGASKDEV Registration ask device flag
; DGRPTOUT Quit flag
; 1 =Timeout or User up-arrow
ELGCHK(DFN)
;Eligibility check for editing
; Input -- DFN Patient IEN
; Output -- 0=No and 1=Yes
GETPRT(DGDIV,DGIO,DGASKDEV,DGRPTOUT)
;Get registration printer defaults
; Input -- DGDIV Primary Medical Center Division IEN
; Output -- DGIO Registration printer array
; DGASKDEV Registration ask device flag
; DGRPTOUT Quit flag
; -1 =User entered up-arrow
; -2 =Timeout
SETPARQ
ASK
;Ask device in registration
GETPAT(DGHOWPT,DGADDF,DFN,DGNEWPF)
;Look-up patient
; Input -- DGHOWPT How was patient entered
; 1 =10-10T registration
; DGADDF Add new entry flag (optional)
; 1 =Allow new patient
; Output -- DFN Patient IEN
; # =Patient IEN
; -1 =No patient selected
; DGNEWPF New patient added flag
; 1 =New patient added
; Null=Existing patient