AGFACE6 ; IHS/ASDS/EFG - FACE SHEET (RAILROAD RETIREMENT) ;
;;7.1;PATIENT REGISTRATION;**2,13**;AUG 25, 2005;Build 1
;IHS/OIT/NKD AG*7.1*13 MBI IMPLEMENTATION
G END:'$D(^AUPNRRE(DFN,0)) W !,$G(AG("-")),!,"RAILROAD RETIREMENT:",!,"TYPE",?19,"NUMBER",?46,"ELIG. DATE",?60,"ELIG. END DATE"
F AG=1:1 S AG("DRENT")=AG,DIC=9000005.11,DA=DFN,DR=.02 D ^AGDICLK Q:$D(AG("LKERR")) D L3A
S DIC=9000005,DR=2101,DA=DFN D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" W !?3,"NAME: ",AG("LKPRINT")
S DR=2102 D ^AGDICLK I $D(AG("LKPRINT")),AG("LKPRINT")]"" W !?3,"DATE OF BIRTH: ",AG("LKPRINT")
END Q
L3A S DA=DFN,DIC=9000005.11,AG("DRENT")=AG,DR=.03 D ^AGDICLK Q:$D(AG("LKERR"))
W !," ",AG("LKPRINT")
;S DIC=9000005,DR=.03,DA=DFN D ^AGDICLK Q:$D(AG("LKERR")) ;IHS/SD/TPF AG*7.1*2 IM23259
I AG("LKPRINT")="D" D ;IHS/SD/TPF AG*7.1*2 IM23259
.W ?19,$$GET1^DIQ(9000005.11,AG_","_DA_",",.06)
I AG("LKPRINT")'="D" D ;IHS/SD/TPF AG*7.1*2 IM23259
.;S DIC=9000005,DR=.03,DA=DFN D ^AGDICLK Q:$D(AG("LKERR"))
.W ?19,$$GETRRE^AGUTL(DFN) ; IHS/OIT/NKD AG*7.1*13
.;W ?19,AG("LKPRINT"),$P(^AUPNRRE(DFN,0),U,4)
S AG("DRENT")=AG,DR=.01,DIC=9000005.11 D ^AGDICLK Q:$D(AG("LKERR")) W ?46,AG("LKPRINT")
S AG("DRENT")=AG,DR=.02,DIC=9000005.11 D ^AGDICLK Q:$D(AG("LKERR")) W ?60,AG("LKPRINT")
Q
AGFACE6 ; IHS/ASDS/EFG - FACE SHEET (RAILROAD RETIREMENT) ;
+1 ;;7.1;PATIENT REGISTRATION;**2,13**;AUG 25, 2005;Build 1
+2 ;IHS/OIT/NKD AG*7.1*13 MBI IMPLEMENTATION
+3 IF '$DATA(^AUPNRRE(DFN,0))
GOTO END
WRITE !,$GET(AG("-")),!,"RAILROAD RETIREMENT:",!,"TYPE",?19,"NUMBER",?46,"ELIG. DATE",?60,"ELIG. END DATE"
+4 FOR AG=1:1
SET AG("DRENT")=AG
SET DIC=9000005.11
SET DA=DFN
SET DR=.02
DO ^AGDICLK
IF $DATA(AG("LKERR"))
QUIT
DO L3A
+5 SET DIC=9000005
SET DR=2101
SET DA=DFN
DO ^AGDICLK
IF $DATA(AG("LKPRINT"))
IF AG("LKPRINT")]""
WRITE !?3,"NAME: ",AG("LKPRINT")
+6 SET DR=2102
DO ^AGDICLK
IF $DATA(AG("LKPRINT"))
IF AG("LKPRINT")]""
WRITE !?3,"DATE OF BIRTH: ",AG("LKPRINT")
END QUIT
L3A SET DA=DFN
SET DIC=9000005.11
SET AG("DRENT")=AG
SET DR=.03
DO ^AGDICLK
IF $DATA(AG("LKERR"))
QUIT
+1 WRITE !," ",AG("LKPRINT")
+2 ;S DIC=9000005,DR=.03,DA=DFN D ^AGDICLK Q:$D(AG("LKERR")) ;IHS/SD/TPF AG*7.1*2 IM23259
+3 ;IHS/SD/TPF AG*7.1*2 IM23259
IF AG("LKPRINT")="D"
Begin DoDot:1
+4 WRITE ?19,$$GET1^DIQ(9000005.11,AG_","_DA_",",.06)
End DoDot:1
+5 ;IHS/SD/TPF AG*7.1*2 IM23259
IF AG("LKPRINT")'="D"
Begin DoDot:1
+6 ;S DIC=9000005,DR=.03,DA=DFN D ^AGDICLK Q:$D(AG("LKERR"))
+7 ; IHS/OIT/NKD AG*7.1*13
WRITE ?19,$$GETRRE^AGUTL(DFN)
+8 ;W ?19,AG("LKPRINT"),$P(^AUPNRRE(DFN,0),U,4)
End DoDot:1
+9 SET AG("DRENT")=AG
SET DR=.01
SET DIC=9000005.11
DO ^AGDICLK
IF $DATA(AG("LKERR"))
QUIT
WRITE ?46,AG("LKPRINT")
+10 SET AG("DRENT")=AG
SET DR=.02
SET DIC=9000005.11
DO ^AGDICLK
IF $DATA(AG("LKERR"))
QUIT
WRITE ?60,AG("LKPRINT")
+11 QUIT