APCDCAFP ; IHS/CMI/LAB - ;
;;2.0;IHS PCC SUITE;**2,7,11,15**;MAY 14, 2009;Build 11
;
START ;
D XIT
I '$D(IOF) D HOME^%ZIS
W @(IOF),!!
D INFORM
I $P(^APCCCTRL(DUZ(2),0),U,12)="" W !!,"The EHR/PCC Coding Audit Start Date has not been set",!,"in the PCC Master Control file." D D XIT Q
.W !!,"Please see your Clinical Coordinator or PCC Manager."
.S DIR(0)="E",DIR("A")="Press Enter" KILL DA D ^DIR KILL DIR
.Q
GETPAT ;
W !
S APCDPATF=""
S DIC="^AUPNPAT(",DIC(0)="AEMQ" D ^DIC K DIC
G:Y<0 XIT
I $D(APCDPARM),$P(APCDPARM,U,3)="Y" W !?25,"Ok" S %=1 D YN^DICN Q:%'=1
S (DFN,APCDPATF)=+Y
SORT ;how to sort list of visits
W !! S APCDSORT=""
K DIR S DIR(0)="S^D:Date of Visit;S:Service Category;L:Location of Encounter;C:Clinic;O:Hospital Location;P:Primary Provider;A:Chart Audit Status"
S DIR("A")="How would you like the list of visits sorted",DIR("B")="D" KILL DA D ^DIR KILL DIR
I $D(DIRUT) G XIT
S APCDSORT=Y
PROC1 ; call listmanager
S APCDCAFP=DFN,APCDBD=$P(^APCCCTRL(DUZ(2),0),U,12),APCDED=DT,APCDPEHR=1
D EN^APCDCAF
D XIT
Q
XIT ;
K DIR
D EN^XBVK("APCD") ;clean up APCD variables
D ^XBFMK ;clean up fileman variables
D KILL^AUPNPAT ;clean up AUPN
D EN^XBVK("AMQQ") ;clean up after qman
Q
;
PROC ;EP - called from xbdbque
Q
D(D) ;
I $G(D)="" Q ""
Q $E(D,4,5)_"/"_$E(D,6,7)_"/"_$E(D,2,3)
CTR(X,Y) ;EP - Center X in a field Y wide.
Q $J("",$S($D(Y):Y,1:IOM)-$L(X)\2)_X
;----------
EOP ;EP - End of page.
Q:$E(IOST)'="C"
Q:$D(ZTQUEUED)!'(IOT="TRM")!$D(IO("S"))
NEW DIR
K DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
S DIR("A")="End of report. Press Enter",DIR(0)="E" D ^DIR
Q
;----------
USR() ;EP - Return name of current user from ^VA(200.
Q $S($G(DUZ):$S($D(^VA(200,DUZ,0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
;----------
LOC() ;EP - Return location name from file 4 based on DUZ(2).
Q $S($G(DUZ(2)):$S($D(^DIC(4,DUZ(2),0)):$P(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0")
;----------
INFORM ;inform user what this report is all about
W !,$$CTR($$LOC)
W !!,$$CTR("PCC/EHR CODING AUDIT FOR ONE PATIENT")
W !!,"This option is used to review visits created by EHR users for one patient."
W !,"The visits displayed in the list are those with an INCOMPLETE or blank"
W !,"chart audit status. This list can be sorted by date, primary provider"
W !,"clinic code, hospital location (scheduling clinic), and facility."
W !,"Once the visit has been reviewed, the review status can be set as reviewed/"
W !,"complete or incomplete. All visits set as reviewed/complete will be passed"
W !,"to the IHS/RPMS billing package."
W !,"Contract Health visits are excluded."
W !,"Visits that do not have a primary provider are ",$S($P(^APCDSITE(DUZ(2),0),U,28):"included in ",1:"excluded from "),"the list."
W !,"Visits with the following service categories are NOT included in the list:"
W !?10,"- Event (Historical)"
S X="" F S X=$O(^APCDSITE(DUZ(2),13,"B",X)) Q:X="" W !?10,"- ",$$EXTSET^XBFUNC(9000010,.07,X)
W !!,"PLEASE NOTE: A visit will NOT pass to Billing until it is marked"
W !,"as reviewed/completed."
W !
Q
;
APCDCAFP ; IHS/CMI/LAB - ;
+1 ;;2.0;IHS PCC SUITE;**2,7,11,15**;MAY 14, 2009;Build 11
+2 ;
START ;
+1 DO XIT
+2 IF '$DATA(IOF)
DO HOME^%ZIS
+3 WRITE @(IOF),!!
+4 DO INFORM
+5 IF $PIECE(^APCCCTRL(DUZ(2),0),U,12)=""
WRITE !!,"The EHR/PCC Coding Audit Start Date has not been set",!,"in the PCC Master Control file."
Begin DoDot:1
+6 WRITE !!,"Please see your Clinical Coordinator or PCC Manager."
+7 SET DIR(0)="E"
SET DIR("A")="Press Enter"
KILL DA
DO ^DIR
KILL DIR
+8 QUIT
End DoDot:1
DO XIT
QUIT
GETPAT ;
+1 WRITE !
+2 SET APCDPATF=""
+3 SET DIC="^AUPNPAT("
SET DIC(0)="AEMQ"
DO ^DIC
KILL DIC
+4 IF Y<0
GOTO XIT
+5 IF $DATA(APCDPARM)
IF $PIECE(APCDPARM,U,3)="Y"
WRITE !?25,"Ok"
SET %=1
DO YN^DICN
IF %'=1
QUIT
+6 SET (DFN,APCDPATF)=+Y
SORT ;how to sort list of visits
+1 WRITE !!
SET APCDSORT=""
+2 KILL DIR
SET DIR(0)="S^D:Date of Visit;S:Service Category;L:Location of Encounter;C:Clinic;O:Hospital Location;P:Primary Provider;A:Chart Audit Status"
+3 SET DIR("A")="How would you like the list of visits sorted"
SET DIR("B")="D"
KILL DA
DO ^DIR
KILL DIR
+4 IF $DATA(DIRUT)
GOTO XIT
+5 SET APCDSORT=Y
PROC1 ; call listmanager
+1 SET APCDCAFP=DFN
SET APCDBD=$PIECE(^APCCCTRL(DUZ(2),0),U,12)
SET APCDED=DT
SET APCDPEHR=1
+2 DO EN^APCDCAF
+3 DO XIT
+4 QUIT
XIT ;
+1 KILL DIR
+2 ;clean up APCD variables
DO EN^XBVK("APCD")
+3 ;clean up fileman variables
DO ^XBFMK
+4 ;clean up AUPN
DO KILL^AUPNPAT
+5 ;clean up after qman
DO EN^XBVK("AMQQ")
+6 QUIT
+7 ;
PROC ;EP - called from xbdbque
+1 QUIT
D(D) ;
+1 IF $GET(D)=""
QUIT ""
+2 QUIT $EXTRACT(D,4,5)_"/"_$EXTRACT(D,6,7)_"/"_$EXTRACT(D,2,3)
CTR(X,Y) ;EP - Center X in a field Y wide.
+1 QUIT $JUSTIFY("",$SELECT($DATA(Y):Y,1:IOM)-$LENGTH(X)\2)_X
+2 ;----------
EOP ;EP - End of page.
+1 IF $EXTRACT(IOST)'="C"
QUIT
+2 IF $DATA(ZTQUEUED)!'(IOT="TRM")!$DATA(IO("S"))
QUIT
+3 NEW DIR
+4 KILL DIRUT,DFOUT,DLOUT,DTOUT,DUOUT
+5 SET DIR("A")="End of report. Press Enter"
SET DIR(0)="E"
DO ^DIR
+6 QUIT
+7 ;----------
USR() ;EP - Return name of current user from ^VA(200.
+1 QUIT $SELECT($GET(DUZ):$SELECT($DATA(^VA(200,DUZ,0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ UNDEFINED OR 0")
+2 ;----------
LOC() ;EP - Return location name from file 4 based on DUZ(2).
+1 QUIT $SELECT($GET(DUZ(2)):$SELECT($DATA(^DIC(4,DUZ(2),0)):$PIECE(^(0),U),1:"UNKNOWN"),1:"DUZ(2) UNDEFINED OR 0")
+2 ;----------
INFORM ;inform user what this report is all about
+1 WRITE !,$$CTR($$LOC)
+2 WRITE !!,$$CTR("PCC/EHR CODING AUDIT FOR ONE PATIENT")
+3 WRITE !!,"This option is used to review visits created by EHR users for one patient."
+4 WRITE !,"The visits displayed in the list are those with an INCOMPLETE or blank"
+5 WRITE !,"chart audit status. This list can be sorted by date, primary provider"
+6 WRITE !,"clinic code, hospital location (scheduling clinic), and facility."
+7 WRITE !,"Once the visit has been reviewed, the review status can be set as reviewed/"
+8 WRITE !,"complete or incomplete. All visits set as reviewed/complete will be passed"
+9 WRITE !,"to the IHS/RPMS billing package."
+10 WRITE !,"Contract Health visits are excluded."
+11 WRITE !,"Visits that do not have a primary provider are ",$SELECT($PIECE(^APCDSITE(DUZ(2),0),U,28):"included in ",1:"excluded from "),"the list."
+12 WRITE !,"Visits with the following service categories are NOT included in the list:"
+13 WRITE !?10,"- Event (Historical)"
+14 SET X=""
FOR
SET X=$ORDER(^APCDSITE(DUZ(2),13,"B",X))
IF X=""
QUIT
WRITE !?10,"- ",$$EXTSET^XBFUNC(9000010,.07,X)
+15 WRITE !!,"PLEASE NOTE: A visit will NOT pass to Billing until it is marked"
+16 WRITE !,"as reviewed/completed."
+17 WRITE !
+18 QUIT
+19 ;