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

AMHRBV.m

Go to the documentation of this file.
  1. AMHRBV ; IHS/CMI/LAB - print billable visits ;
  1. ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
  1. START ;
  1. I '$G(DUZ(2)) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",! Q
  1. W:$D(IOF) @IOF
  1. W !!,"This Option prints who are a list of Potentially Billable Visits for all ",!,"patients registered at the Facility that you select who have been seen",!,"by Mental Health and Social Services.",!
  1. W "The user will select which third party coverage type that they are interested",!,"in seeing billable visits for."
  1. W !,"This report displays visits during a period when this patient had third",!,"party coverage, but does not consider the diagnostic category which may be",!,"excluded by some types of coverage.",!
  1. D DBHUSR^AMHUTIL
  1. F ;
  1. S DIC("A")="Run the report for Patients registered at which Facility: ",DIC="^AUTTLOC(",DIC(0)="AEMQ" D ^DIC K DIC,DA G:Y<0 EOJ
  1. S AMHSU=+Y
  1. SD ;
  1. W !
  1. S Y=DT X ^DD("DD") S AMHDTP=Y
  1. S %DT("A")="Starting Visit Date for Billable Visits: ",%DT="AEPX" W ! D ^%DT
  1. I Y=-1 G F
  1. S AMHSD=Y X ^DD("DD") S AMHSDY=Y
  1. ED S %DT("A")="Ending Visit Date for Billable Visits: " W ! D ^%DT K %DT
  1. I Y=-1 G SD
  1. S AMHED=Y X ^DD("DD") S AMHEDY=Y
  1. I AMHED<AMHSD W !!,"Ending Date cannot be before Starting Date! Please reenter.",! G SD
  1. ;
  1. CT ;
  1. S DIR(0)="SO^1:Commissioned Officers/Dependents;2:Medicare Part A;3:Medicare Part B;4:Medicaid;5:Private Insurance;6:Non-Indians",DIR("A")="Select Third Party Coverage" D ^DIR K DIR
  1. G:$D(DIRUT) SD
  1. S AMHPROC=Y,AMHNAR=Y(0)
  1. ZIS ;
  1. S DIR(0)="S^P:PRINT Output;B:BROWSE Output on Screen",DIR("A")="Do you wish to ",DIR("B")="P" K DA D ^DIR K DIR
  1. I $D(DIRUT) G EOJ
  1. I $G(Y)="B" D BROWSE,EOJ Q
  1. S XBRP="^AMHRBV1",XBRC="^AMHRBV2",XBRX="EOJ^AMHRBV",XBNS="AMH"
  1. D ^XBDBQUE
  1. D EOJ
  1. Q
  1. BROWSE ;
  1. S XBRP="VIEWR^XBLM(""^AMHRBV1"")"
  1. S XBNS="AMH",XBRC="^AMHRBV2",XBRX="EOJ^AMHRBV",XBIOP=0 D ^XBDBQUE
  1. Q
  1. EOJ ;ENTRY POINT
  1. K POP,ZTSK,ZTQUEUED,DFN,%DT,%,X,Y,DIRUT,DTOUT,J,K,%XX,%YY,DDBN,DDBX,HS,IX,C,IO("Q"),DIR,DIRUT,DIC,DA,DR,DIQ,H,M,S,TS,ABHN
  1. K AMHSD,AMHSDY,AMHED,AMHEDY,AMHPROC,AMHNAR,AMH,AMHSU,AMHLENG,AMHDTP,AMHCAT,AMHMDFN,AMHGOT,AMHBT,AMHNAMEP,AMHJOB,AMHMIN
  1. K AMHS,AMHCOAR,AMHCOPN,AMHVDFN,AMHVN0,AMHCOP,AMHPN,AMHVAL,AMHTRI,AMHTRIC
  1. K AMHCHMP,AMH80E,AMH80D,AMHPG,AMHEOJ,AMHX,AMHVDFN,AMHVREC,AMHDATE,AMH1,AMH2,AMHAP,AMHDISC,AMHY,AMHSKIP,AMHMN,AMHMDOB,AMHMEDN,DOB,AMHHRN,AMHVAL
  1. K AMHNDFN,AMHREC,AMHNREC,AMHACT,AMHINI,AMHRDFN
  1. Q