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

APCLAUD.m

Go to the documentation of this file.
  1. APCLAUD ; IHS/CMI/LAB - audit report ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ;
  1. ;location of encounter 02/13/95
  1. START ;
  1. S APCLJOB=$J,APCLBT=$H
  1. K ^XTMP("APCLAUD",APCLJOB,APCLBT),APCLTABL S APCLIRNG=0,APCLPRNG=1
  1. D XTMP^APCLOSUT("APCLAUD","PCC AUDIT REPORT")
  1. D XTMP^APCLOSUT("APCLAUD2","PCC AUDIT REPORT")
  1. GO W:$D(IOF) @IOF
  1. S APCLMSG="VISIT DATE RANGE Selection" D APCLMSGO
  1. GETDATES ;
  1. BD ;get beginning date
  1. W ! S DIR(0)="DA^:DT:EP",DIR("A")="Enter beginning Visit Date for Search: " D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G QUIT
  1. S APCLBD=Y
  1. ED ;get ending date
  1. W ! S DIR(0)="DA^"_APCLBD_":DT:EP",DIR("A")="Enter ending Visit Date for Search: " S Y=APCLBD D DD^%DT S (APCLBDY)=Y,Y="" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G BD
  1. S APCLED=Y D DD^%DT S APCLEDY=Y
  1. S X1=APCLBD,X2=-1 D C^%DTC S APCLSD=X
  1. ;
  1. MORE ;
  1. D ^APCLAUD3
  1. I $D(DIRUT) G GO
  1. ICD S DIC(0)="AMEQZ",DIC="^ICD9("
  1. ICDB S APCLMSG="ICD CODE RANGE Selection" W:$D(IOF) @IOF D APCLMSGO
  1. D ICDB1 G ICDB11
  1. ICDB1 ;EP
  1. W !,"Visit Date Range: ",APCLBDY," through ",APCLEDY,"."
  1. I '$D(APCLLAGE) W !!,"No Age Range restrictions." G ICDB10
  1. W !!,"Age Range Selected: ",APCLLAGE," - ",APCLHAGE," Years."
  1. ICDB10 I $D(^XTMP("APCLAUD",APCLJOB,APCLBT,"ICDDFN","ALL")) W !!,"All ICD Coded Diagnoses will be included." G ICDB101
  1. I APCLIRNG>0 W ! F APCLI=1:1:APCLIRNG W !,"ICD Code Range ",APCLI,": ",^XTMP("APCLAUD",APCLJOB,APCLBT,APCLI,"ICDB")," through ",^XTMP("APCLAUD",APCLJOB,APCLBT,APCLI,"ICDE"),"."
  1. ICDB101 ;
  1. W !!,"Sex Selected: ",$S($D(APCLSEX):APCLSEXP,1:"ALL")
  1. W !!,"Service Category Selected: ",$S($D(APCLSC):APCLSCP,1:"ALL")
  1. W !!,"Visit Type Selected: ",$S($D(APCLTYPE):APCLTYPP,1:"ALL")
  1. W !!,"Visit Location of Encounter: ",$S($D(APCLLOC):APCLLOCP,1:"ALL")
  1. W !!,"Visit Clinic Type Selected: ",$S($D(APCLCLN):APCLCLNP,1:"ALL")
  1. Q
  1. ICDB11 ;
  1. S DIR(0)="Y",DIR("A")="Do you want all ICD Coded diagnoses in the report",DIR("B")="Y" D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G BD
  1. I Y=1 S ^XTMP("APCLAUD",APCLJOB,APCLBT,"ICDDFN","ALL")="" G ^APCLAUD0
  1. ICDB2 D ^APCLAUD5
  1. ICDE1 W:$D(IOF) @IOF
  1. G ^APCLAUD0
  1. APCLMSGO W ?30,"*** Audit Search ***",!!
  1. W !?80-$L(APCLMSG)\2,APCLMSG,!! Q
  1. QUIT ;
  1. K APCLBT,APCLJOB,DIR,APCLPOVD
  1. Q