AUPNPAT ;IHS/OHPRD/EDE - POST SELECTION SETS FOR PATIENT LOOKUP ; 24-MAY-1993
;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
;;93.2;IHS PATIENT DICTIONARIES.;;JUL 01, 1993
;
; This routine sets standard patient variables
;
START ;
S:$D(X) AUPNPATX=X
S AUPNPAT=+Y
S AUPNSEX=$P(^DPT(AUPNPAT,0),U,2),AUPNDOB=$P(^(0),U,3),AUPNDOD="" S:$D(^(.35)) AUPNDOD=$P(^(.35),U,1)
S X2=AUPNDOB,X1=$S('AUPNDOD:DT,AUPNDOD:AUPNDOD,1:DT) D ^%DTC S AUPNDAYS=X K X,X1,X2
S:$D(AUPNPATX) X=AUPNPATX
K %T,%Y,AUPNPATX
Q
;
KILL ; KILL VARIABLES SET BY THIS ROUTINE
K AUPNPAT,AUPNSEX,AUPNDOB,AUPNDOD,AUPNDAYS
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HAUPNPAT 616 printed Dec 13, 2024@02:25:27 Page 2
AUPNPAT ;IHS/OHPRD/EDE - POST SELECTION SETS FOR PATIENT LOOKUP ; 24-MAY-1993
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;;Aug 12, 1996
+2 ;;93.2;IHS PATIENT DICTIONARIES.;;JUL 01, 1993
+3 ;
+4 ; This routine sets standard patient variables
+5 ;
START ;
+1 if $DATA(X)
SET AUPNPATX=X
+2 SET AUPNPAT=+Y
+3 SET AUPNSEX=$PIECE(^DPT(AUPNPAT,0),U,2)
SET AUPNDOB=$PIECE(^(0),U,3)
SET AUPNDOD=""
if $DATA(^(.35))
SET AUPNDOD=$PIECE(^(.35),U,1)
+4 SET X2=AUPNDOB
SET X1=$SELECT('AUPNDOD:DT,AUPNDOD:AUPNDOD,1:DT)
DO ^%DTC
SET AUPNDAYS=X
KILL X,X1,X2
+5 if $DATA(AUPNPATX)
SET X=AUPNPATX
+6 KILL %T,%Y,AUPNPATX
+7 QUIT
+8 ;
KILL ; KILL VARIABLES SET BY THIS ROUTINE
+1 KILL AUPNPAT,AUPNSEX,AUPNDOB,AUPNDOD,AUPNDAYS
+2 QUIT