APCDACP2 ; IHS/CMI/LAB - PROC ACC REPORT ;
;;2.0;IHS PCC SUITE;;MAY 14, 2009
PROC ;EP;Process and Print ACCEPT commands
Q:$P(^AUPNVSIT(APCDVDFN,0),U,2)=""
Q:$P(^AUPNVSIT(APCDVDFN,0),U,11)
Q:'$P(^AUPNVSIT(APCDVDFN,0),U,9)
NEW X
S X=$P(^AUPNVSIT(APCDVDFN,0),U,5)
Q:$$DEMO^APCLUTL(X,APCLDEMO)
D @APCDT
Q
1 ;
S APCDACCT=1,APCDG="^AUPNVPOV(",APCDFILE=9000010.07,APCDTITL="POV"
D GETPVS
Q
2 ;
S APCDACCT=2,APCDG="^AUPNVPRC(",APCDFILE=9000010.08,APCDTITL="PROCEDURE"
D GETPVS
Q
3 ;
S APCDACCT=3,APCDG="^AUPNVINP(",APCDFILE=9000010.02,APCDTITL="HOSPITALIZATION"
D GETPVS
Q
4 ;
D 1,2,3
Q
;
GETPVS ;
S APCDVIGR=APCDG_"""AD"",APCDVDFN,APCDEDFN)"
S APCDEDFN=0 F S APCDEDFN=$O(@APCDVIGR) Q:APCDEDFN'=+APCDEDFN D GETPVS1
K APCDEDFN
Q
GETPVS1 ;
I APCDACCT=1,$P(^AUPNVPOV(APCDEDFN,0),U,14)]"" S ^XTMP("APCDACP",$J,"POV",APCDVDFN,APCDEDFN)=""
I APCDACCT=2,$P(^AUPNVPRC(APCDEDFN,0),U,9)]"" S ^XTMP("APCDACP",$J,"PROCEDURE",APCDVDFN,APCDEDFN)=""
I APCDACCT=3,$P(^AUPNVINP(APCDEDFN,0),U,14)]"" S ^XTMP("APCDACP",$J,"HOSPITALIZATION",APCDVDFN,APCDEDFN)=""
Q
APCDACP2 ; IHS/CMI/LAB - PROC ACC REPORT ;
+1 ;;2.0;IHS PCC SUITE;;MAY 14, 2009
PROC ;EP;Process and Print ACCEPT commands
+1 IF $PIECE(^AUPNVSIT(APCDVDFN,0),U,2)=""
QUIT
+2 IF $PIECE(^AUPNVSIT(APCDVDFN,0),U,11)
QUIT
+3 IF '$PIECE(^AUPNVSIT(APCDVDFN,0),U,9)
QUIT
+4 NEW X
+5 SET X=$PIECE(^AUPNVSIT(APCDVDFN,0),U,5)
+6 IF $$DEMO^APCLUTL(X,APCLDEMO)
QUIT
+7 DO @APCDT
+8 QUIT
1 ;
+1 SET APCDACCT=1
SET APCDG="^AUPNVPOV("
SET APCDFILE=9000010.07
SET APCDTITL="POV"
+2 DO GETPVS
+3 QUIT
2 ;
+1 SET APCDACCT=2
SET APCDG="^AUPNVPRC("
SET APCDFILE=9000010.08
SET APCDTITL="PROCEDURE"
+2 DO GETPVS
+3 QUIT
3 ;
+1 SET APCDACCT=3
SET APCDG="^AUPNVINP("
SET APCDFILE=9000010.02
SET APCDTITL="HOSPITALIZATION"
+2 DO GETPVS
+3 QUIT
4 ;
+1 DO 1
DO 2
DO 3
+2 QUIT
+3 ;
GETPVS ;
+1 SET APCDVIGR=APCDG_"""AD"",APCDVDFN,APCDEDFN)"
+2 SET APCDEDFN=0
FOR
SET APCDEDFN=$ORDER(@APCDVIGR)
IF APCDEDFN'=+APCDEDFN
QUIT
DO GETPVS1
+3 KILL APCDEDFN
+4 QUIT
GETPVS1 ;
+1 IF APCDACCT=1
IF $PIECE(^AUPNVPOV(APCDEDFN,0),U,14)]""
SET ^XTMP("APCDACP",$JOB,"POV",APCDVDFN,APCDEDFN)=""
+2 IF APCDACCT=2
IF $PIECE(^AUPNVPRC(APCDEDFN,0),U,9)]""
SET ^XTMP("APCDACP",$JOB,"PROCEDURE",APCDVDFN,APCDEDFN)=""
+3 IF APCDACCT=3
IF $PIECE(^AUPNVINP(APCDEDFN,0),U,14)]""
SET ^XTMP("APCDACP",$JOB,"HOSPITALIZATION",APCDVDFN,APCDEDFN)=""
+4 QUIT