ABMDREL ; IHS/ASDST/DMJ - List holders of medicare a, b, medicaid or priv ins ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;
;
START I '$G(DUZ(2)) W $C(7),$C(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",! Q
I '$D(ABMDRPT) W !,$C(7),$C(7),"REPORT TYPE MISSING!! NOTIFY PROGRAMMER",! Q
D GETINFO G:$D(ABMD("Q")) QUIT
W !!,"This option will print a list of Patients who are registered at",!,"the facility that you select who are currently enrolled in ",ABMD("INF"),".",!
W !,"You will be asked to enter an 'As of' date to be used in determining",!,"those patients who are 'actively' enrolled.",!
W !,"The report will be sorted alphabetically by Patient Name.",!
F ;
S DIC("A")="Which Facility: ",DIC="^AUTTLOC(",DIC(0)="AEMQ" D ^DIC K DIC,DA G:Y<0 QUIT
S ABMD("SU")=+Y
AOD ;
S %DT("A")="Patients are to be considered ACTIVE as of what date: ",%DT="AEPX" W ! D ^%DT
I Y=-1 G F
S ABMD("ACE")=Y D DD^%DT S ABMD("ACEY")=Y
S ABMD("$J")=DUZ_"-"_$P($H,",",1)_"-"_$P($H,",",2)
S ABMQ("RC")="^ABMDREL2",ABMQ("RP")="^ABMDREL1",ABMQ("RX")="EOJ^ABMDREL0",ABMQ("NS")="ABMD"
D ^ABMDRDBQ
QUIT K ABMD,ABMDRPT
Q
;
GETINFO ;
I $T(@(ABMDRPT))="" W !!,$C(7),$C(7),"REPORT INFORMATION MISSING!! NOTIFY PROGRAMMER!",!! S ABMD("Q")="" Q
S ABMD("INFO")=$T(@(ABMDRPT)),ABMD("VAL")=$P(ABMD("INFO"),";;",2),ABMD("PROC")=$P(ABMD("INFO"),";;",4),ABMD("INF")=$P(ABMD("INFO"),";;",3),ABMD("TITL")=$P(ABMD("INFO"),";;",5)
Q
;
MCD ;;X;;Medicaid;;MCD;;ACTIVE MEDICAID ENROLLEES
MCRA ;;A;;Medicare Part A;;MCRA;;ACTIVE MEDICARE PART A ENROLLEES
MCRB ;;B;;Medicare Part B;;MCRA;;ACTIVE MEDICARE PART B ENROLLEES
PI ;;X;;Private Insurance;;PI;;ACTIVE PRIVATE INSURANCE ENROLLEES
ABMDREL ; IHS/ASDST/DMJ - List holders of medicare a, b, medicaid or priv ins ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;
+3 ;
START IF '$GET(DUZ(2))
WRITE $CHAR(7),$CHAR(7),!!,"SITE NOT SET IN DUZ(2) - NOTIFY SITE MANAGER!!",!
QUIT
+1 IF '$DATA(ABMDRPT)
WRITE !,$CHAR(7),$CHAR(7),"REPORT TYPE MISSING!! NOTIFY PROGRAMMER",!
QUIT
+2 DO GETINFO
IF $DATA(ABMD("Q"))
GOTO QUIT
+3 WRITE !!,"This option will print a list of Patients who are registered at",!,"the facility that you select who are currently enrolled in ",ABMD("INF"),".",!
+4 WRITE !,"You will be asked to enter an 'As of' date to be used in determining",!,"those patients who are 'actively' enrolled.",!
+5 WRITE !,"The report will be sorted alphabetically by Patient Name.",!
F ;
+1 SET DIC("A")="Which Facility: "
SET DIC="^AUTTLOC("
SET DIC(0)="AEMQ"
DO ^DIC
KILL DIC,DA
IF Y<0
GOTO QUIT
+2 SET ABMD("SU")=+Y
AOD ;
+1 SET %DT("A")="Patients are to be considered ACTIVE as of what date: "
SET %DT="AEPX"
WRITE !
DO ^%DT
+2 IF Y=-1
GOTO F
+3 SET ABMD("ACE")=Y
DO DD^%DT
SET ABMD("ACEY")=Y
+4 SET ABMD("$J")=DUZ_"-"_$PIECE($HOROLOG,",",1)_"-"_$PIECE($HOROLOG,",",2)
+5 SET ABMQ("RC")="^ABMDREL2"
SET ABMQ("RP")="^ABMDREL1"
SET ABMQ("RX")="EOJ^ABMDREL0"
SET ABMQ("NS")="ABMD"
+6 DO ^ABMDRDBQ
QUIT KILL ABMD,ABMDRPT
+1 QUIT
+2 ;
GETINFO ;
+1 IF $TEXT(@(ABMDRPT))=""
WRITE !!,$CHAR(7),$CHAR(7),"REPORT INFORMATION MISSING!! NOTIFY PROGRAMMER!",!!
SET ABMD("Q")=""
QUIT
+2 SET ABMD("INFO")=$TEXT(@(ABMDRPT))
SET ABMD("VAL")=$PIECE(ABMD("INFO"),";;",2)
SET ABMD("PROC")=$PIECE(ABMD("INFO"),";;",4)
SET ABMD("INF")=$PIECE(ABMD("INFO"),";;",3)
SET ABMD("TITL")=$PIECE(ABMD("INFO"),";;",5)
+3 QUIT
+4 ;
MCD ;;X;;Medicaid;;MCD;;ACTIVE MEDICAID ENROLLEES
MCRA ;;A;;Medicare Part A;;MCRA;;ACTIVE MEDICARE PART A ENROLLEES
MCRB ;;B;;Medicare Part B;;MCRA;;ACTIVE MEDICARE PART B ENROLLEES
PI ;;X;;Private Insurance;;PI;;ACTIVE PRIVATE INSURANCE ENROLLEES