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

ABMM2PV1.m

Go to the documentation of this file.
ABMM2PV1 ;IHS/SD/SDR - MU Patient Volume EP Report ; 20 Feb 2014  6:04 AM
 ;;2.6;IHS 3P BILLING SYSTEM;**11,12,15**;NOV 12, 2009;Build 251
 ;IHS/SD/SDR - 2.6*15 - HEAT161159 - Removed DEMO,PATIENT from report.  Also added record indicator.
 ;IHS/SD/SDR - 2.6*15 - HEAT156874 - fix for programming error <SUBSCR>OTHERVST+23^ABMM2PV7.  Flag wasn't getting reset from previous visit where it was looking for
 ;  other visits on the same DOS.
 ;IHS/SD/SDR - 2.6*15 - HEAT171490 - Added code to put visit location NPI and TIN on patient list.  Also added record indicator to label visits on pt list
 ;  as to what grouping they were counted in.
 ;IHS/SD/SDR - 2.6*15 - HEAT174501 - Added primary provider NPI to group report.
 ;
COMPUTE ;EP - gather data
 ;spec. 90-day
 I ABMY("90")="B" D  Q
 .S X1=ABMY("SDT")
 .S X2=89
 .D C^%DTC
 .S (ABMY("EDT"),ABMP("EDT"))=X
 .D VISITS
 .D BILLS
 .D ENROLL
 .D CALC^ABMM2PV2
 .D PRINT^ABMM2PV3
 ;
 I ABMY("90")="E" D  Q
 .S X1=ABMY("SDT")
 .S X2=89
 .D C^%DTC
 .S (ABMY("EDT"),ABMP("EDT"))=X
 .D VISITS
 .D BILLS
 .D ENROLL
 .D CALC^ABMM2PV2
 .D PRINT^ABMM2PV3
 ;
 ;User specified
 I ABMY("90")="C" D VISITS,BILLS,ENROLL,CALC^ABMM2PV2,PRINT^ABMM2PV3 Q
 ;
 ;auto
 S (ABMY("SDT"),ABMP("SDT"))=(ABMY("QYR")-1700)_"0101"
 S ABMP("EDT")=(ABMY("QYR")-1700)_"1231"
 I +$G(ABMY("ADT"))'=0 D
 .S ABMP("EDT")=ABMY("ADT")
 .S X1=ABMY("ADT")
 .S X2=-365
 .D C^%DTC
 .S (ABMY("SDT"),ABMP("SDT"))=X
 D VISITS
 D BILLS
 D ENROLL
 D CALC^ABMM2PV2
 I ABMY("RTYP")="SEL",'$D(ABMPRVDR) Q
 I ABMY("RTYP")="GRP",(+$G(^XTMP("ABM-PVP2",$J,"PRV TOP"))>29.99)
 D PRINT^ABMM2PV3
 K ABMY("EDT")
 Q
VISITS ;
 K ABMRIND  ;make sure there is no record indicator for visits  ;abm*2.6*15
 S ABMSDT=ABMP("SDT")
 S ABMEDT=ABMP("EDT")+.999999
 S ABMINS=0,ABMOINS="NO BILL"
 S ABMITYP="X"
 F  S ABMSDT=$O(^AUPNVSIT("B",ABMSDT)) Q:'ABMSDT!(ABMSDT>ABMEDT)  D
 .S ABMVDFN=0
 .F  S ABMVDFN=$O(^AUPNVSIT("B",ABMSDT,ABMVDFN)) Q:'ABMVDFN  D
 ..Q:$$GET1^DIQ(9000010,ABMVDFN,".05","E")["DEMO,PATIENT"  ;abm*2.6*15 HEAT161159 remove demo patients from list
 ..S ABMSCAT=$$GET1^DIQ(9000010,ABMVDFN,.07,"I")  ;serv cat
 ..S ABMCLNC=$$GET1^DIQ(9000010,ABMVDFN,.08,"I")  ;clinic
 ..S ABMP("VDT")=$P($$GET1^DIQ(9000010,ABMVDFN,.01,"I"),".")  ;vst dt
 ..;Q:"^39^D1^D2^76^63^51^52^72^22^42^54^57^66^71^77^B5^C6^"[("^"_$$GET1^DIQ(40.7,$$GET1^DIQ(9000010,ABMVDFN,.08,"I"),1,"E")_"^")&(ABMY("RTYP")="SEL")  ;exclude clinics  ;abm*2.6*15 HEAT203662
 ..Q:"^39^D1^D2^76^63^51^52^72^22^42^54^57^66^71^77^B5^C6^"[("^"_$$GET1^DIQ(40.7,$$GET1^DIQ(9000010,ABMVDFN,.08,"I"),1,"I")_"^")&(ABMY("RTYP")="SEL")  ;exclude clinics  ;abm*2.6*15 HEAT203662
 ..S ABMPT=$$GET1^DIQ(9000010,ABMVDFN,.05,"I")  ;pt
 ..;if SEL rpt type, serv cat MUST be S,O,R, or (A w/clinic'=30)
 ..I "^H^I^C^T^N^E^D^X^R^"[("^"_ABMSCAT_"^") Q
 ..I (ABMSCAT="A")&(ABMCLNC=30) Q
 ..S ABMVLOC=$$GET1^DIQ(9000010,ABMVDFN,.06,"I")
 ..Q:ABMVLOC=""
 ..I ($$GET1^DIQ(9000010,ABMVDFN,.12)'="")&(ABMSDT>$$GET1^DIQ(9000010,ABMVDFN,.12,"I")&($$GET1^DIQ(9000010,ABMVDFN,1111,"I")'="R")) Q
 ..Q:'$D(ABMF(ABMVLOC))  ;not a selected loc
    ..S ABMNPI=$S($P($$NPI^XUSNPI("Organization_ID",ABMVLOC),U)>0:$P($$NPI^XUSNPI("Organization_ID",ABMVLOC),U),1:"")  ;abm*2.6*15 added
    ..S ABMTIN=$$GET1^DIQ(9999999.06,ABMVLOC,".21","E")  ;abm*2.6*15 added
 ..I ABMY("RTYP")="GRP" D GRPVST Q
 ..S ABMPIEN=0
 ..K ABMPRVC
 ..F  S ABMPIEN=$O(^AUPNVPRV("AD",ABMVDFN,ABMPIEN)) Q:'ABMPIEN  D
 ...S ABMPRV=$$GET1^DIQ(9000010.06,ABMPIEN,.01,"I")
 ...Q:'$D(ABMPRVDR(ABMPRV))
 ...;skip prv if on vst >1
 ...Q:$D(ABMPRVC(ABMPRV))
 ...S ABMPRVC(ABMPRV)=1
 ...D CALCDTS
 ...S ABMDTFLG=0
 ...S ABMP("BDT")=ABMP("BSDT")
 ...;Q:$D(^XTMP("ABM-PVP2",$J,"PT VSTS",ABMPT,ABMSDT))  ;abm*2.6*15
 ...Q:$D(^XTMP("ABM-PVP2",$J,"PT VSTS",ABMPT,ABMSDT,ABMVDFN))  ;make sure it hasn't counted this specific visit already  ;abm*2.6*15
 ...F  D  Q:ABMDTFLG=1
 ....I ABMP("VDT")<ABMP("BSDT") Q  ;vst is before 90-day
 ....S ^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"),ABMPRV)=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"),ABMPRV))+1
 ....S ^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"),ABMPRV,ABMVLOC)=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"),ABMPRV,ABMVLOC))+1
 ....S ^XTMP("ABM-PVP2",$J,"PT VSTS",ABMPT,ABMSDT,ABMVDFN)=""  ;list of vsts by pt,DOS
 ....S ^XTMP("ABM-PVP2",$J,"VISITS",ABMVDFN)=""  ;list of vsts to chk for pymt
 ....S ^XTMP("ABM-PVP2",$J,"VISIT CNT",ABMP("BDT"))=+$G(^XTMP("ABM-PVP2",$J,"VISIT CNT",ABMP("BDT")))+1  ;cnt vsts
 ....S ^XTMP("ABM-PVP2",$J,"ALL VISITS",ABMP("BDT"),ABMVDFN)=""  ;list of all vsts looked at
 ....I (^XTMP("ABM-PVP2",$J,"VISIT CNT",ABMP("BDT"))#1000&(IOST["C")) W "." U 0 W "."
 ....K ABMITYP
 ....D PTDATA
 ....S X1=ABMP("BDT")
 ....S X2=1
 ....D C^%DTC
 ....I X>ABMP("BEDT") S ABMDTFLG=1 Q
 ....S ABMP("BDT")=X
 ;
 Q
GRPVST ;EP
 S ABMPIEN=0
 K ABMPRVC
 K ABMPNPI,ABMPRVN  ;IHS/SD/SDR 9/5/14 HEAT174501
 F  S ABMPIEN=$O(^AUPNVPRV("AD",ABMVDFN,ABMPIEN)) Q:'ABMPIEN  D
 .S ABMPRV=$$GET1^DIQ(9000010.06,ABMPIEN,.01,"I")
 .;start new abm*2.6*15 HEAT174501
 .S ABMPRVST=$$GET1^DIQ(9000010.06,ABMPIEN,".04","I")
 .I ABMPRVST="P" D
 ..S ABMPNPI=$S($P($$NPI^XUSNPI("Individual_ID",+ABMPRV),U)>0:$P($$NPI^XUSNPI("Individual_ID",+ABMPRV),U),1:"")
 ..S ABMPRVN=$$GET1^DIQ(9000010.06,ABMPIEN,".01","E")
 ..S ^XTMP("ABM-PVP2",$J,"PRVS",ABMVDFN)=ABMPNPI_U_ABMPRVN
 .;end new HEAT174501
 .;skip prv if on vst >1
 .Q:$D(ABMPRVC(ABMPRV))
 .S ABMPRVC(ABMPRV)=1
 .S ABMPRVCL=+$$GET1^DIQ(200,ABMPRV,53.5,"I")
 .I ABMPRVCL=0 S ABMPRV("O",ABMPRV)=""
 .I ABMPRVCL'=0 D
 ..I '$D(^ABMMUPRM(1,2,"B",ABMPRVCL)) S ABMPRV("O",ABMPRV)=""
 ..I $$GET1^DIQ(7,ABMPRVCL,9999999.01,"E")=11 D
 ...I '$D(^ABMMUPRM(1,1,"B",ABMVLOC)) S ABMPRV("O",ABMPRV)=""
 ...I $D(^ABMMUPRM(1,1,"B",ABMVLOC)) D
 ....S ABMVIEN=$O(^ABMMUPRM(1,1,"B",ABMVLOC,0))
 ....I $P($G(^ABMMUPRM(1,1,ABMVIEN,0)),U,2)=1 S ABMPRV("E",ABMPRV)=""
 ....I $P($G(^ABMMUPRM(1,1,ABMVIEN,0)),U,2)'=1 S ABMPRV("O",ABMPRV)=""
 ..I $$GET1^DIQ(7,ABMPRVCL,9999999.01,"E")'=11,$D(^ABMMUPRM(1,2,"B",ABMPRVCL)) S ABMPRV("E",ABMPRV)=""
 D CALCDTS
 S ABMDTFLG=0
 S ABMP("BDT")=ABMP("BSDT")
 Q:$D(^XTMP("ABM-PVP2",$J,"PT VSTS",ABMPT,ABMSDT))
 F  D  Q:ABMDTFLG=1
 .S ^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"))=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT")))+1
 .S ^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"),ABMVLOC)=+$G(^XTMP("ABM-PVP2",$J,"PRV-DENOM",ABMP("BDT"),ABMVLOC))+1
 .S ^XTMP("ABM-PVP2",$J,"PT VSTS",ABMPT,ABMSDT,ABMVDFN)=""  ;list of vsts by pt,DOS
 .S ^XTMP("ABM-PVP2",$J,"VISITS",ABMVDFN)=""  ;list of vsts to chk for pymt
 .S ^XTMP("ABM-PVP2",$J,"VISIT CNT",ABMP("BDT"))=+$G(^XTMP("ABM-PVP2",$J,"VISIT CNT",ABMP("BDT")))+1  ;cnt of vsts
 .I (^XTMP("ABM-PVP2",$J,"VISIT CNT",ABMP("BDT"))#1000&(IOST["C")) W "." U 0 W "."
 .D GPTDATA
 .;
 .S X1=ABMP("BDT")
 .S X2=1
 .D C^%DTC
 .I X>ABMP("VDT") S ABMDTFLG=1 Q
 .S ABMP("BDT")=X
 .K ABMITYP
 Q
CALCDTS ;EP
 ;Calc 90 days
 S X1=$P(ABMSDT,".")
 S X2=$P(ABMY("SDT"),".")
 D ^%DTC
 S X1=$P(ABMSDT,".")
 S X2=$S(X<89:-X,1:-89)
 D C^%DTC
 S ABMP("BSDT")=X
 S ABMP("BEDT")=ABMP("VDT")
 Q
BILLS ;E
 S ABMCNT=0
 S ABMDUZ2=0
 S ABMFOUND=0
 F  S ABMDUZ2=$O(^ABMDBILL(ABMDUZ2)) Q:'ABMDUZ2  D
 .Q:'$D(^ABMDBILL(ABMDUZ2,0))
 .S ABMVDFN=0
 .F  S ABMVDFN=$O(^XTMP("ABM-PVP2",$J,"VISITS",ABMVDFN)) Q:'ABMVDFN  D
 ..S ABMBILLF=0
 ..S ABMFOUND=0  ;abm*2.6*15 HEAT156874
 ..S ABMRIND=""  ;abm*2.6*15 HEAT161159 record indicator
 ..Q:($G(^XTMP("ABM-PVP2",$J,"VISITS",ABMVDFN))=1)  ;already cnted this vst on rpt
 ..Q:'$D(^ABMDBILL(ABMDUZ2,"AV",ABMVDFN))  ;vst not under DUZ(2)
 ..K ABMBILLN,ABMSAV
 ..S ABMP("BDFN")=0
 ..F  S ABMP("BDFN")=$O(^ABMDBILL(ABMDUZ2,"AV",ABMVDFN,ABMP("BDFN"))) Q:'ABMP("BDFN")  D  Q:ABMBILLF
 ...Q:($G(^XTMP("ABM-PVP2",$J,"VISITS",ABMVDFN))=1)  ;already cnted this vst on rpt
 ...;S (ABMBILLN,ABMSAV)=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U)  ;abm*2.6*15 HEAT161159 record indicator
 ...S (ABMBILLN,ABMSAV,ABMBNUM)=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U)  ;abm*2.6*15 HEAT161159 record indicator
 ...I $P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U,4)="X" Q
 ...S ABMSDT=$P($$GET1^DIQ(9000010,ABMVDFN,".01","I"),".")
 ...S ABMVLOC=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U,3)
 ...S ABMP("VDT")=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),7)),U)
 ...S ABMINS=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U,8)
 ...;S ABMTSI=$P($G(^ABMNINS(ABMDUZ2,ABMINS,0)),U,11)  ;abm*2.6*15 HEAT183289
 ...S ABMPT=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U,5)
 ...S (ABMDOS,ABMDOSSV)=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),7)),U)
 ...;start new abm*2.6*15 HEAT171490
 ...S ABMVTYP=$P($G(^ABMDBILL(ABMDUZ2,ABMP("BDFN"),0)),U,7)
    ...S ABMLNPI=$S($P($G(^ABMNINS(ABMVLOC,ABMINS,1,ABMVTYP,1)),U,8)'="":$P(^ABMNINS(ABMVLOC,ABMINS,1,ABMVTYP,1),U,8),$P($G(^ABMDPARM(ABMVLOC,1,2)),U,12)'="":$P(^ABMDPARM(ABMVLOC,1,2),U,12),1:ABMVLOC)
    ...S ABMNPI=$S($P($$NPI^XUSNPI("Organization_ID",ABMLNPI),U)>0:$P($$NPI^XUSNPI("Organization_ID",ABMLNPI),U),1:"")
    ...S ABMTIN=$$GET1^DIQ(9999999.06,ABMLNPI,".21","E")
 ...;end new HEAT171490
 ...K ABMDX
 ...D PRIMPOV^ABMM2PV7  ;get prim POV for bill
 ...D ARBILLS
 ...S ABMBILLN=ABMBNUM  ;abm*2.6*15 HEAT161159 record indicator
 ...I +$G(ABMFOUND)=1 D OTHERVST  ;check for other vsts on DOS to mark pd
 ..;
 ..S ABMRIND="" ;abm*2.6*15 HEAT161159 record indicator
 ..;look thru bills found & remove zero pays when pymt was found - GROUP PROVIDERS
 ..I ABMY("RTYP")="GRP" D  Q
 ...S ABMP("BDT")=0
 ...F  S ABMP("BDT")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"))) Q:'ABMP("BDT")  D
 ....S ABMGRP=""
 ....F  S ABMGRP=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"),ABMGRP)) Q:ABMGRP=""  D
 .....S ABMP("VDFN")=0  ;abm*2.6*12
 .....F  S ABMP("VDFN")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"),ABMGRP,ABMP("VDFN"))) Q:'ABMP("VDFN")  D
 ......I $D(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMGRP,ABMP("VDFN"))) D
 .......K ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMGRP,ABMP("VDFN"))
 ......S ^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMGRP))+1
 ......S ^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMVLOC,ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMVLOC,ABMGRP))+1
 ......;I ABMGRP="MCD"!($D(ABMI("INS",ABMINS))) S ABMRIND="PD"  ;abm*2.6*15 HEAT161159 record indicator
 ...K ^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS")
 ...S ABMP("BDT")=0
 ...F  S ABMP("BDT")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"))) Q:'ABMP("BDT")  D
 ....S ABMGRP=""
 ....F  S ABMGRP=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMGRP)) Q:ABMGRP=""  D
 .....S ABMP("VDFN")=0  ;abm*2.6*12
 .....F  S ABMP("VDFN")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMGRP,ABMP("VDFN"))) Q:'ABMP("VDFN")  D
 ......S ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMVLOC,ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMVLOC,ABMGRP))+1
 ......S ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMGRP))+1
 ......;I ABMGRP="MCD"!($D(ABMI("INS",ABMINS))) S ABMRIND="ZPD"  ;abm*2.6*15 HEAT161159 record indicator
 ...K ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS")
 ..;
 ..;look thru bills found & remove zero pays when pymt was found - INDIV PRVS
 ..S ABMP("BDT")=0
 ..F  S ABMP("BDT")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"))) Q:'ABMP("BDT")  D
 ...S ABMPRV=0
 ...F  S ABMPRV=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"),ABMPRV)) Q:'ABMPRV  D
 ....S ABMGRP=""
 ....F  S ABMGRP=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"),ABMPRV,ABMGRP)) Q:ABMGRP=""  D
 .....S ABMP("VDFN")=0  ;abm*2.6*12
 .....F  S ABMP("VDFN")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS",ABMP("BDT"),ABMPRV,ABMGRP,ABMP("VDFN"))) Q:'ABMP("VDFN")  D
 ......I $D(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMPRV,ABMGRP,ABMP("VDFN"))) D
 .......K ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMPRV,ABMGRP,ABMP("VDFN"))
 ......S ^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMPRV,ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMPRV,ABMGRP))+1
 ......S ^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMPRV,ABMVLOC,ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM PD",ABMP("BDT"),ABMPRV,ABMVLOC,ABMGRP))+1
 ......S ^XTMP("ABM-PVP2",$J,"TEST","PD",ABMP("BDT"),ABMVDFN)=""
 ......;I ABMGRP="MCD"!($D(ABMI("INS",ABMINS))) S ABMRIND="PD"  ;abm*2.6*15 HEAT161159 record indicator
 ..K ^XTMP("ABM-PVP2",$J,"PRV-NUM PD BILLS")
 ..S ABMP("BDT")=0
 ..F  S ABMP("BDT")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"))) Q:'ABMP("BDT")  D
 ...S ABMPRV=0
 ...F  S ABMPRV=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMPRV)) Q:'ABMPRV  D
 ....S ABMGRP=""
 ....F  S ABMGRP=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMPRV,ABMGRP)) Q:ABMGRP=""  D
 .....S ABMP("VDFN")=0
 .....F  S ABMP("VDFN")=$O(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS",ABMP("BDT"),ABMPRV,ABMGRP,ABMP("VDFN"))) Q:'ABMP("VDFN")  D
 .....S ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMPRV,ABMVLOC,ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMPRV,ABMVLOC,ABMGRP))+1
 .....S ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMPRV,ABMGRP)=+$G(^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD",ABMP("BDT"),ABMPRV,ABMGRP))+1
 .....S ^XTMP("ABM-PVP2",$J,"TEST","ZEROPD",ABMP("BDT"),ABMVDFN)=""
 ....;.I ABMGRP="MCD"!($D(ABMI("INS",ABMINS))) S ABMRIND="ZPD"  ;abm*2.6*15 HEAT161159 record indicator
 ..K ^XTMP("ABM-PVP2",$J,"PRV-NUM ZEROPD BILLS")
 Q
ARBILLS ;
 D ARBILLS^ABMM2P12  ;abm*2.6*15 split routine due to size
 Q
TRANS ;
 D TRANS^ABMM2P12  ;abm*2.6*15 split routine due to size
 Q
ZEROPD ;EP
 D ZEROPD^ABMM2PV7
 Q
GRPBILL ;
 D GRPBILL^ABMM2PV7
 Q
GRPOTHVS ;
 D GRPOTHVS^ABMM2PV7
 Q
OTHERVST ;EP
 D OTHERVST^ABMM2PV7
 Q
GPTDATA ;EP
 D GPTDATA^ABMM2PV7
 Q
PTDATA ;EP
 D PTDATA^ABMM2PV7
 Q
ENROLL ;EP
 D ENROLL^ABMM2PV7
 Q