AGTMPPOL ; IHS/ASDS/EFG - REPORT OF PI POLICY HOLDERS ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
W ! K DIR S DIR(0)="Y",DIR("A")="Limit Report to a Specific INSURER",DIR("B")="Y" D ^DIR K DIR G XIT:$D(DTOUT)!$D(DUOUT) I Y'=1 S AG(1)="A",AG(2)="ZZ" G ZIS
SEL K DIC W ! S DIC="^AUTNINS(",DIC(0)="QEAM" D ^DIC K DIC
G XIT:X=""!$D(DTOUT)!$D(DUOUT),SEL:+Y<1
S (AG(1),AG(2))=$P(^AUTNINS(+Y,0),U)
ZIS W !!!,"NOTE: This report requires 132 character width."
W ! S %ZIS="NQ",%ZIS("B")="" D ^%ZIS G:'$D(IO)!(POP) XIT
S AG("ION")=ION G:$D(IO("Q")) QUE
PRQUE ;ENTER FROM TASK MANAGER
S L=0,DIC="^AUPNPRVT(",FLDS="[AG TM PI ELIGIBLE]",BY="[AG TM PI ELIGIBLE]",FR=AG(1)_",?,?",TO=AG(2)_",?,?"
S IOP=AG("ION")_";132",AGPGPG=1,DOUT=$I
D EN1^DIP
XIT D ^%ZISC K AG
Q
QUE K IO("Q") S ZTRTN="PRQUE^AGTMPPOL",ZTDESC="REPORT OF PI POLICY HOLDERS" F AG="AG(" S ZTSAVE(AG)=""
D ^%ZTLOAD W:$D(ZTSK) !,"REQUEST QUEUED!",! G XIT
AGTMPPOL ; IHS/ASDS/EFG - REPORT OF PI POLICY HOLDERS ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
+3 WRITE !
KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Limit Report to a Specific INSURER"
SET DIR("B")="Y"
DO ^DIR
KILL DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
GOTO XIT
IF Y'=1
SET AG(1)="A"
SET AG(2)="ZZ"
GOTO ZIS
SEL KILL DIC
WRITE !
SET DIC="^AUTNINS("
SET DIC(0)="QEAM"
DO ^DIC
KILL DIC
+1 IF X=""!$DATA(DTOUT)!$DATA(DUOUT)
GOTO XIT
IF +Y<1
GOTO SEL
+2 SET (AG(1),AG(2))=$PIECE(^AUTNINS(+Y,0),U)
ZIS WRITE !!!,"NOTE: This report requires 132 character width."
+1 WRITE !
SET %ZIS="NQ"
SET %ZIS("B")=""
DO ^%ZIS
IF '$DATA(IO)!(POP)
GOTO XIT
+2 SET AG("ION")=ION
IF $DATA(IO("Q"))
GOTO QUE
PRQUE ;ENTER FROM TASK MANAGER
+1 SET L=0
SET DIC="^AUPNPRVT("
SET FLDS="[AG TM PI ELIGIBLE]"
SET BY="[AG TM PI ELIGIBLE]"
SET FR=AG(1)_",?,?"
SET TO=AG(2)_",?,?"
+2 SET IOP=AG("ION")_";132"
SET AGPGPG=1
SET DOUT=$IO
+3 DO EN1^DIP
XIT DO ^%ZISC
KILL AG
+1 QUIT
QUE KILL IO("Q")
SET ZTRTN="PRQUE^AGTMPPOL"
SET ZTDESC="REPORT OF PI POLICY HOLDERS"
FOR AG="AG("
SET ZTSAVE(AG)=""
+1 DO ^%ZTLOAD
IF $DATA(ZTSK)
WRITE !,"REQUEST QUEUED!",!
GOTO XIT