Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: APCDCAFP

APCDCAFP.m

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