AGED10 ; IHS/ASDS/EFG - EDIT PAGE NOK ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
S AG("N")=7
VAR D DRAW
W !,AGLINE("EQ") W !?23,"CHANGE which item? (1-",AG("N"),") NONE// " D READ^AGED1 G ^AGED8:$D(DUOUT)&'$D(AGXTERN),END:$D(DLOUT)!(Y["N"),VAR:$D(AG("ERR")) G:$D(AG("ED"))&'$D(AGXTERN) @("^AGED"_AG("ED"))
Q:$D(DTOUT)!$D(DFOUT) I $D(DQOUT)!(+Y<1)!(+Y>AG("N")) D QUES^AGED1 G VAR
CC S AG("C")="NKNAME^AG8B,NKPH^AG8B,NKREL^AG8B,NKSTR^AG8B,NKCITY^AG8B,NKST^AG8B,NKZIP^AG8B"
C ;EP - Edit multiple fields on a Reg edit page.
S AGY=Y F AGI=1:1 S AG("SEL")=+$P(AGY,",",AGI) Q:AG("SEL")<1!(AG("SEL")>AG("N")) D @($P(AG("C"),",",AG("SEL")))
D UPDATE1^AGED(DUZ(2),DFN,10,"") K AGI,AGY
EC ;
G VAR
END K AG,DUOUT,DFOUT,DTOUT,DQOUT,DLOUT,DA,AGSCRN,Y
Q:$D(AGXTERN)
G ^AGED11
DRAW ;EP
S AG("PG")=10,DA=DFN,AGSCRN=$P($T(@1),";;",2,8) D ^AGED K ^UTILITY("DIQ1",$J)
F AG=1:1:7 W:AG=4 !?37,"Address" S X=$P(AGSCRN,";;",AG),DIC=$P(X,U,3),DR=$P(X,U,4) W !,AG,".",?$P(X,U,2),$P($G(^DD(DIC,DR,0)),U)," : " D EN^DIQ1 I $D(^(DR)) W ^(DR)
Q
1 ;;^11^2^.211;;^13^2^.219;;^6^9000001^2802;;^4^2^.213;;^6^2^.216;;^5^2^.217;;^7^2^.218
AGED10 ; IHS/ASDS/EFG - EDIT PAGE NOK ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 SET AG("N")=7
VAR DO DRAW
+1 WRITE !,AGLINE("EQ")
WRITE !?23,"CHANGE which item? (1-",AG("N"),") NONE// "
DO READ^AGED1
IF $DATA(DUOUT)&'$DATA(AGXTERN)
GOTO ^AGED8
IF $DATA(DLOUT)!(Y["N")
GOTO END
IF $DATA(AG("ERR"))
GOTO VAR
IF $DATA(AG("ED"))&'$DATA(AGXTERN)
GOTO @("^AGED"_AG("ED"))
+2 IF $DATA(DTOUT)!$DATA(DFOUT)
QUIT
IF $DATA(DQOUT)!(+Y<1)!(+Y>AG("N"))
DO QUES^AGED1
GOTO VAR
CC SET AG("C")="NKNAME^AG8B,NKPH^AG8B,NKREL^AG8B,NKSTR^AG8B,NKCITY^AG8B,NKST^AG8B,NKZIP^AG8B"
C ;EP - Edit multiple fields on a Reg edit page.
+1 SET AGY=Y
FOR AGI=1:1
SET AG("SEL")=+$PIECE(AGY,",",AGI)
IF AG("SEL")<1!(AG("SEL")>AG("N"))
QUIT
DO @($PIECE(AG("C"),",",AG("SEL")))
+2 DO UPDATE1^AGED(DUZ(2),DFN,10,"")
KILL AGI,AGY
EC ;
+1 GOTO VAR
END KILL AG,DUOUT,DFOUT,DTOUT,DQOUT,DLOUT,DA,AGSCRN,Y
+1 IF $DATA(AGXTERN)
QUIT
+2 GOTO ^AGED11
DRAW ;EP
+1 SET AG("PG")=10
SET DA=DFN
SET AGSCRN=$PIECE($TEXT(@1),";;",2,8)
DO ^AGED
KILL ^UTILITY("DIQ1",$JOB)
+2 FOR AG=1:1:7
IF AG=4
WRITE !?37,"Address"
SET X=$PIECE(AGSCRN,";;",AG)
SET DIC=$PIECE(X,U,3)
SET DR=$PIECE(X,U,4)
WRITE !,AG,".",?$PIECE(X,U,2),$PIECE($GET(^DD(DIC,DR,0)),U)," : "
DO EN^DIQ1
IF $DATA(^(DR))
WRITE ^(DR)
+3 QUIT
1 ;;^11^2^.211;;^13^2^.219;;^6^9000001^2802;;^4^2^.213;;^6^2^.216;;^5^2^.217;;^7^2^.218