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

APCLPVC.m

Go to the documentation of this file.
  1. APCLPVC ; IHS/CMI/LAB - POV GROUPED BY APC CODES - 6/21/89 12:58 PM ;
  1. ;;2.0;IHS PCC SUITE;;MAY 14, 2009
  1. ;SEARCH VISIT FILE FOR DATE RANGE AND GENERATE APC RECODED AMBULATORY PCC VISIT COUNTS
  1. ;
  1. START ;
  1. D GO
  1. SD S %DT("A")="Starting Visit Date: ",%DT="AEPX" W ! D ^%DT
  1. G:Y=-1 QUIT S APCLSD=Y X ^DD("DD") S APCLSDY=Y
  1. ED S %DT("A")="Ending Visit Date: " W ! D ^%DT
  1. I Y=-1 D GO G SD
  1. S APCLFD=Y X ^DD("DD") S APCLFDY=Y
  1. I APCLFD<APCLSD W !!,"Ending Date cannot be before Starting Date! Please reenter.",! G SD
  1. COM ;
  1. K APCLCOM
  1. S DIR(0)="Y",DIR("A")="Should the counts only include visits for patients from a specific community",DIR("B")="N"
  1. S DIR("?")="You may restrict the POV counts to patients whose current community matches the one you select if you answer 'Y' to this question." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. I $D(DIRUT) G ED
  1. I Y'=1 G LIM
  1. S DIC(0)="AEMQZ",DIC="^AUTTCOM(" W ! D ^DIC K DIC G:Y=-1 COM S APCLCOM=Y(0,0)
  1. LIM ;
  1. S DIR(0)="N^0:999:0",DIR("A")="How many (MAXIMUM) ICD9 POV's to include in each APC Category",DIR("B")="20"
  1. S DIR("?")="If you enter '0' the POV counts will be by APC category only. If you enter a number, the APC counts will be broken down by ICD code as well, within the limit you specifiy." D ^DIR K DIR S:$D(DUOUT) DIRUT=1
  1. G:$D(DIRUT) COM
  1. S APCLLIM=Y
  1. ZIS ;
  1. DEMO ;
  1. D DEMOCHK^APCLUTL(.APCLDEMO)
  1. I APCLDEMO=-1 G COM
  1. S XBRP="^APCLPVC2",XBRC="^APCLPVC1",XBRX="QUIT^APCLPVC",XBNS="APCL"
  1. D ^XBDBQUE
  1. D QUIT
  1. QUIT ;
  1. K DIC,%DT,ZTSK,ZTQUEUED,I,J,K,Y
  1. K APCLIDFN,APCLSITE,APCLQUIT,APCL80D,APCLDTP,APCLFDY,APCLPG,APCLSDY,APCLINM,APCLINO,APCLPDFN,APCLBT,APCLJOB,APCLERR
  1. K APCLCNTL,APCLAPNM,APCLCNTI,APCLLIMC,APCLCOM,APCLICLN,APCLPCOM,APCLCNT,APCLCNTR,APCLICNO,APCLLIM,APCL,APCLVDFN,APCLVN0,APCLFD,APCLS,APCLSD,APCLX,APCLY,APCLAPC
  1. Q
  1. GO W:$D(IOF) @IOF
  1. W ?25,"*** Purpose of Visit Counts ***",!!
  1. W !!,"The Purpose of Visit Counts will include only Ambulatory Visits within the",!,"date range you select."
  1. Q