ABMDREMP ; IHS/ASDST/DMJ - Employer File Report ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;03/25/96 11:32 AM
;
K ABM,ABMY S ABM("SYN")=0
W !!,"This program generates a listing of the Employees for each Employer, sorted",!,"in alphabetic order."
W ! K DIR S DIR(0)="Y",DIR("A")="Do you wish the Run the Program",DIR("B")="Y" D ^DIR K DIR G XIT:'Y
S ABM("HD",0)="" D HD^ABMDRHD
D ZIS^ABMDRUTL G XIT:'$D(IO)!$G(POP)!$D(DTOUT)!$D(DUOUT)
S ABM("HD",0)="EMPLOYEE LISTING for All EMPLOYERS"
S ABM("SUBR")="ABM-EMP"
G:$D(IO("Q")) QUE
;
PRQUE ;EP - Entry Point for Taskman
S IOP=ABM("IOP") D ^%ZIS Q:$G(POP) U IO S ABM("PG")=0 D HDB
S ABM="" F S ABM=$O(^AUPNPAT("AF",ABM)) Q:ABM="" S ABM("D")=0 D
.F S ABM("D")=$O(^AUPNPAT("AF",ABM,ABM("D"))) Q:'ABM("D") D
..Q:'$D(^AUTNEMPL(ABM,0))!'$D(^AUPNPAT(ABM("D"),0))
..S ^TMP("ABM-EMP",$J,$P(^AUTNEMPL(ABM,0),U),$P(^DPT(ABM("D"),0),U),$S('$D(DUZ(2)):0,1:+$P($G(^AUPNPAT(ABM("D"),41,DUZ(2),0)),U,2)))=""
;
S ABM("E")=""
S ABM("Z")="TMP(""ABM-EMP"","_$J,ABM="^"_ABM("Z")_")" I '$D(@ABM) G XIT
F S ABM=$Q(@ABM) Q:ABM'[ABM("Z") D G XIT:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.S ABM("T")=$P(ABM,"ABM-E",2),ABM("EMP")=$P($P(ABM("T"),",",3,99),"""",2)
.S ABM("PAT")=$P($P(ABM("T"),",",4,99),"""",2)
.S ABM("HRN")=$P($P($P($P(ABM("T"),",",5,99),"""",2),")"),",",2)
.I $Y>(IOSL-5) D HD Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT)
.I ABM("E")'=ABM("EMP") W !!,$P(ABM("EMP"),U) S ABM("E")=ABM("EMP")
.E W !
.W ?32,ABM("PAT"),?64,ABM("HRN")
G XIT
HD D PAZ^ABMDRUTL Q:$D(DTOUT)!$D(DUOUT)!$D(DIROUT) S ABM("E")=""
HDB W $$EN^ABMVDF("IOF") S ABM("PG")=ABM("PG")+1 D WHD^ABMDRHD
W !,"Employer",?32,"Employee",?65,"HRN"
W !,"-------------------------------------------------------------------------------"
Q
;
XIT D POUT^ABMDRUTL,^%ZISC
Q
;
QUE S ZTRTN="PRQUE^ABMDREMP",ZTDESC="EMPLOYEE LISTING"
D QUE^ABMDRUTL
G XIT
ABMDREMP ; IHS/ASDST/DMJ - Employer File Report ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;03/25/96 11:32 AM
+3 ;
+4 KILL ABM,ABMY
SET ABM("SYN")=0
+5 WRITE !!,"This program generates a listing of the Employees for each Employer, sorted",!,"in alphabetic order."
+6 WRITE !
KILL DIR
SET DIR(0)="Y"
SET DIR("A")="Do you wish the Run the Program"
SET DIR("B")="Y"
DO ^DIR
KILL DIR
IF 'Y
GOTO XIT
+7 SET ABM("HD",0)=""
DO HD^ABMDRHD
+8 DO ZIS^ABMDRUTL
IF '$DATA(IO)!$GET(POP)!$DATA(DTOUT)!$DATA(DUOUT)
GOTO XIT
+9 SET ABM("HD",0)="EMPLOYEE LISTING for All EMPLOYERS"
+10 SET ABM("SUBR")="ABM-EMP"
+11 IF $DATA(IO("Q"))
GOTO QUE
+12 ;
PRQUE ;EP - Entry Point for Taskman
+1 SET IOP=ABM("IOP")
DO ^%ZIS
IF $GET(POP)
QUIT
USE IO
SET ABM("PG")=0
DO HDB
+2 SET ABM=""
FOR
SET ABM=$ORDER(^AUPNPAT("AF",ABM))
IF ABM=""
QUIT
SET ABM("D")=0
Begin DoDot:1
+3 FOR
SET ABM("D")=$ORDER(^AUPNPAT("AF",ABM,ABM("D")))
IF 'ABM("D")
QUIT
Begin DoDot:2
+4 IF '$DATA(^AUTNEMPL(ABM,0))!'$DATA(^AUPNPAT(ABM("D"),0))
QUIT
+5 SET ^TMP("ABM-EMP",$JOB,$PIECE(^AUTNEMPL(ABM,0),U),$PIECE(^DPT(ABM("D"),0),U),$SELECT('$DATA(DUZ(2)):0,1:+$PIECE($GET(^AUPNPAT(ABM("D"),41,DUZ(2),0)),U,2)))=""
End DoDot:2
End DoDot:1
+6 ;
+7 SET ABM("E")=""
+8 SET ABM("Z")="TMP(""ABM-EMP"","_$JOB
SET ABM="^"_ABM("Z")_")"
IF '$DATA(@ABM)
GOTO XIT
+9 FOR
SET ABM=$QUERY(@ABM)
IF ABM'[ABM("Z")
QUIT
Begin DoDot:1
+10 SET ABM("T")=$PIECE(ABM,"ABM-E",2)
SET ABM("EMP")=$PIECE($PIECE(ABM("T"),",",3,99),"""",2)
+11 SET ABM("PAT")=$PIECE($PIECE(ABM("T"),",",4,99),"""",2)
+12 SET ABM("HRN")=$PIECE($PIECE($PIECE($PIECE(ABM("T"),",",5,99),"""",2),")"),",",2)
+13 IF $Y>(IOSL-5)
DO HD
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
+14 IF ABM("E")'=ABM("EMP")
WRITE !!,$PIECE(ABM("EMP"),U)
SET ABM("E")=ABM("EMP")
+15 IF '$TEST
WRITE !
+16 WRITE ?32,ABM("PAT"),?64,ABM("HRN")
End DoDot:1
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
GOTO XIT
+17 GOTO XIT
HD DO PAZ^ABMDRUTL
IF $DATA(DTOUT)!$DATA(DUOUT)!$DATA(DIROUT)
QUIT
SET ABM("E")=""
HDB WRITE $$EN^ABMVDF("IOF")
SET ABM("PG")=ABM("PG")+1
DO WHD^ABMDRHD
+1 WRITE !,"Employer",?32,"Employee",?65,"HRN"
+2 WRITE !,"-------------------------------------------------------------------------------"
+3 QUIT
+4 ;
XIT DO POUT^ABMDRUTL
DO ^%ZISC
+1 QUIT
+2 ;
QUE SET ZTRTN="PRQUE^ABMDREMP"
SET ZTDESC="EMPLOYEE LISTING"
+1 DO QUE^ABMDRUTL
+2 GOTO XIT