AGED9 ; IHS/ASDS/EFG - EDIT - PAGE 9 (DIRECTIONS TO PATIENT'S HOME) ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
VAR D DRAW
W !,"Do you wish to ",$S($Y>8:"edit",1:"enter")," the patient's LOCATION OF HOME? (Y/N) NO// "
D READ^AGED1
Q:$D(DFOUT)!$D(DTOUT)
G END:$D(DLOUT)!(Y["N"),UP:$D(DUOUT),EDIT:Y["Y" G:$D(AG("ED"))&'$D(AGXTERN) @("^AGED"_AG("ED")) D YN^AG H 2 G VAR
DRAW ;EP
S AG("PG")=9 D ^AGED Q:'$O(^AUPNPAT(DFN,12,0))
W !! F I=0:0 S I=$O(^AUPNPAT(DFN,12,I)) Q:'I W ^(I,0),!
Q
EDIT S DIE="^AUPNPAT(",DR=1201,DA=DFN D ^DIE,UPDATE1^AGED(DUZ(2),DFN,9,"")
G VAR
END K AG,DUOUT,DFOUT,DQOUT,DTOUT,DLOUT,DA,DIC,DIE,DR,DRENT,AG("DRENT1"),AGL,AG("LKERR"),AG("LKPRINT"),Y
Q:$D(AGXTERN)
G ^AGED10
UP K AG
Q:$D(AGXTERN)
G ^AGED8
ADD ;EP - Add a Patient.
I AGOPT(6)="Y" W ! S DIE="^AUPNPAT(",DA=DFN,DR=1201 D ^DIE
G ADD^AGED11
AGED9 ; IHS/ASDS/EFG - EDIT - PAGE 9 (DIRECTIONS TO PATIENT'S HOME) ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
VAR DO DRAW
+1 WRITE !,"Do you wish to ",$SELECT($Y>8:"edit",1:"enter")," the patient's LOCATION OF HOME? (Y/N) NO// "
+2 DO READ^AGED1
+3 IF $DATA(DFOUT)!$DATA(DTOUT)
QUIT
+4 IF $DATA(DLOUT)!(Y["N")
GOTO END
IF $DATA(DUOUT)
GOTO UP
IF Y["Y"
GOTO EDIT
IF $DATA(AG("ED"))&'$DATA(AGXTERN)
GOTO @("^AGED"_AG("ED"))
DO YN^AG
HANG 2
GOTO VAR
DRAW ;EP
+1 SET AG("PG")=9
DO ^AGED
IF '$ORDER(^AUPNPAT(DFN,12,0))
QUIT
+2 WRITE !!
FOR I=0:0
SET I=$ORDER(^AUPNPAT(DFN,12,I))
IF 'I
QUIT
WRITE ^(I,0),!
+3 QUIT
EDIT SET DIE="^AUPNPAT("
SET DR=1201
SET DA=DFN
DO ^DIE
DO UPDATE1^AGED(DUZ(2),DFN,9,"")
+1 GOTO VAR
END KILL AG,DUOUT,DFOUT,DQOUT,DTOUT,DLOUT,DA,DIC,DIE,DR,DRENT,AG("DRENT1"),AGL,AG("LKERR"),AG("LKPRINT"),Y
+1 IF $DATA(AGXTERN)
QUIT
+2 GOTO ^AGED10
UP KILL AG
+1 IF $DATA(AGXTERN)
QUIT
+2 GOTO ^AGED8
ADD ;EP - Add a Patient.
+1 IF AGOPT(6)="Y"
WRITE !
SET DIE="^AUPNPAT("
SET DA=DFN
SET DR=1201
DO ^DIE
+2 GOTO ADD^AGED11