AGSS ; IHS/ASDS/EFG - PROCESS NPIRS/SSA SUBMITTALS ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
S ;start
S DIC="^AUTTLOC(",DIC(0)="AEMQ",DIC("A")="Process Site: ",DIC("B")=$P(^DIC(4,DUZ(2),0),"^",1) D ^DIC K DIC Q:Y<0 S AGSSITE=+Y
I $D(^AGSSTEMP(AGSSITE)) D Q:'Y
.S DIR(0)="Y"
.S DIR("A")="Scratch global ^AGSSTEMP exists for this site. Kill"
.S DIR("B")="N"
.D ^DIR K DIR
.Q:'Y
.K ^AGSSTEMP(AGSSITE)
S AGSSUFAC=$P(^AUTTLOC(AGSSITE,0),"^",10)
S AGSSHFL="ss"_AGSSUFAC_".ssn"
W !!,"Processing Host File: ",AGSSHFL,!
S DIR(0)="F"
S DIR("A")="Enter Directory Containing Above Host File"
S DIR("B")="/usr/spool/uucppublic"
D ^DIR S AGSSPATH=Y
I "\/"'[$E(AGSSPATH) D
.S:^%ZOSF("OS")["UNIX" AGSSPATH="/"_AGSSPATH Q
.S AGSSPATH="\"_AGSSPATH
I "\/"'[$E(AGSSPATH,$L(AGSSPATH)) D
.S:^%ZOSF("OS")["UNIX" AGSSPATH=AGSSPATH_"/" Q
.S AGSSPATH=AGSSPATH_"\"
I $D(AGSS("NORUN")) W !!,"NO RUN HAS BEEN SET",!!
S DIR(0)="Y",DIR("A")="Queue",DIR("B")="NO" D ^DIR K DIR
S AGSSQ=Y
I AGSSQ D Q
.D QUE
.D HOME^%ZIS
.K AGSSHFL,AGSSITE,AGSSQ
D PROC^AGSS0
D ^%ZISC
D PRINT^AGSS0
K AGSSHFL,AGSSITE,AGSSQ
Q
QUE ;que to taskman
S ZTRTN="PROC^AGSS0"
S ZTDESC="SSN Matching"
S ZTIO=""
S ZTSAVE("AGSSUFAC")=""
S ZTSAVE("AGSSHFL")=""
S ZTSAVE("AGSSITE")=""
S ZTSAVE("AGSSPATH")=""
D ^%ZTLOAD
W:$G(ZTSK) !,"Task #",ZTSK," queued.",!
W !,"You may monitor progress with the 'Monitor Facility Processing' option.",!
S DIR(0)="E" D ^DIR K DIR
Q
AGSS ; IHS/ASDS/EFG - PROCESS NPIRS/SSA SUBMITTALS ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
S ;start
+1 SET DIC="^AUTTLOC("
SET DIC(0)="AEMQ"
SET DIC("A")="Process Site: "
SET DIC("B")=$PIECE(^DIC(4,DUZ(2),0),"^",1)
DO ^DIC
KILL DIC
IF Y<0
QUIT
SET AGSSITE=+Y
+2 IF $DATA(^AGSSTEMP(AGSSITE))
Begin DoDot:1
+3 SET DIR(0)="Y"
+4 SET DIR("A")="Scratch global ^AGSSTEMP exists for this site. Kill"
+5 SET DIR("B")="N"
+6 DO ^DIR
KILL DIR
+7 IF 'Y
QUIT
+8 KILL ^AGSSTEMP(AGSSITE)
End DoDot:1
IF 'Y
QUIT
+9 SET AGSSUFAC=$PIECE(^AUTTLOC(AGSSITE,0),"^",10)
+10 SET AGSSHFL="ss"_AGSSUFAC_".ssn"
+11 WRITE !!,"Processing Host File: ",AGSSHFL,!
+12 SET DIR(0)="F"
+13 SET DIR("A")="Enter Directory Containing Above Host File"
+14 SET DIR("B")="/usr/spool/uucppublic"
+15 DO ^DIR
SET AGSSPATH=Y
+16 IF "\/"'[$EXTRACT(AGSSPATH)
Begin DoDot:1
+17 IF ^%ZOSF("OS")["UNIX"
SET AGSSPATH="/"_AGSSPATH
QUIT
+18 SET AGSSPATH="\"_AGSSPATH
End DoDot:1
+19 IF "\/"'[$EXTRACT(AGSSPATH,$LENGTH(AGSSPATH))
Begin DoDot:1
+20 IF ^%ZOSF("OS")["UNIX"
SET AGSSPATH=AGSSPATH_"/"
QUIT
+21 SET AGSSPATH=AGSSPATH_"\"
End DoDot:1
+22 IF $DATA(AGSS("NORUN"))
WRITE !!,"NO RUN HAS BEEN SET",!!
+23 SET DIR(0)="Y"
SET DIR("A")="Queue"
SET DIR("B")="NO"
DO ^DIR
KILL DIR
+24 SET AGSSQ=Y
+25 IF AGSSQ
Begin DoDot:1
+26 DO QUE
+27 DO HOME^%ZIS
+28 KILL AGSSHFL,AGSSITE,AGSSQ
End DoDot:1
QUIT
+29 DO PROC^AGSS0
+30 DO ^%ZISC
+31 DO PRINT^AGSS0
+32 KILL AGSSHFL,AGSSITE,AGSSQ
+33 QUIT
QUE ;que to taskman
+1 SET ZTRTN="PROC^AGSS0"
+2 SET ZTDESC="SSN Matching"
+3 SET ZTIO=""
+4 SET ZTSAVE("AGSSUFAC")=""
+5 SET ZTSAVE("AGSSHFL")=""
+6 SET ZTSAVE("AGSSITE")=""
+7 SET ZTSAVE("AGSSPATH")=""
+8 DO ^%ZTLOAD
+9 IF $GET(ZTSK)
WRITE !,"Task #",ZTSK," queued.",!
+10 WRITE !,"You may monitor progress with the 'Monitor Facility Processing' option.",!
+11 SET DIR(0)="E"
DO ^DIR
KILL DIR
+12 QUIT