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

ABMMUEL1.m

Go to the documentation of this file.
ABMMUEL1 ;IHS/SD/SDR - Meaningful Use Report - count patients/eligibility ;
 ;;2.6;IHS 3P BILLING SYSTEM;**12,15,21**;NOV 12, 2009;Build 379
 ;IHS/SD/SDR - 2.6*15 - HEAT188495 - Fixed policy holder so it will print all the time; defaulted to policy number from policy holder file the
 ;  same way Reg does
 ;IHS/SD/SDR - 2.6*15 - HEAT188548 - Formatted visit/admit date/time for VISIT section
 ;IHS/SD/SDR - 2.6*21 - HEAT204790 - Added code to stop error <SUBSCR>WRTELIG+55^ABMMUEL1.  Occurs when Private Insurance Eligible entry doesn't
 ;   have a coinsiding Policy Holder entry.
 ;
WRTPTS ;^TMP($J,"ABM-MURPT","PTS",ABMP("PDFN"))
 W !!!,"PATIENTS PATIENTS PATIENTS PATIENTS PATIENTS"
 W !?3,"PDFN",?15,"NAME",?50,"HRN",?60,"DATE INACTIVE"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","PTS",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNPAT(ABMP("PDFN"),41,DUZ(2),0)),U,2),?60,$$SDT^ABMDUTL($P($G(^AUPNPAT(ABMP("PDFN"),41,DUZ(2),0)),U,3))
 ;
 ;^TMP($J,"ABM-MURPT","UNQ",ABMPT)
 W !!!,"UNIQUE PATIENTS UNIQUE PATIENTS UNIQUE PATIENTS UNIQUE PATIENTS UNIQUE PATIENTS"
 W !?3,"PDFN",?15,"NAME",?50,"HRN"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","UNQ",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNPAT(ABMP("PDFN"),41,DUZ(2),0)),U,2)
 Q
 ;
WRTELIG ;
 ;^TMP($J,"ABM-MURPT","MCD",ABMP("PDFN"),ABMP("MDFN"))
 W !!!,"MEDICAID MEDICAID MEDICAID MEDICAID MEDICAID MEDICAID MEDICAID "
 W !?3,"PDFN",?15,"NAME",?50,"MCD#",?81,"PLAN"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","MCD",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .S ABMP("MDFN")=0
 .F  S ABMP("MDFN")=$O(^TMP($J,"ABM-MURPT","MCD",ABMP("PDFN"),ABMP("MDFN"))) Q:'ABMP("MDFN")  D
 ..;W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNMCD(ABMP("MDFN"),0)),U,3),?62,$P($G(^AUPNMCD(ABMP("MDFN"),0)),U,10)  ;abm*2.6*15 HEAT188548
 ..;abm*2.6*15 HEAT188548 below line - Expanded mcd# and wrote ins name w/#
 ..W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNMCD(ABMP("MDFN"),0)),U,3)
 ..W:$P($G(^AUPNMCD(ABMP("MDFN"),0)),U,10) ?81,$P($G(^AUTNINS($P($G(^AUPNMCD(ABMP("MDFN"),0)),U,10),0)),U)_" ("_$P($G(^AUPNMCD(ABMP("MDFN"),0)),U,10)_")"  ;abm*2.6*15 HEAT188548
 ;
 ;^TMP($J,"ABM-MURPT","MCR",ABMP("PDFN"),ABMP("MDFN"))
 W !!!,"MEDICARE MEDICARE MEDICARE MEDICARE MEDICARE MEDICARE MEDICARE MEDICARE "
 W !?3,"PDFN",?15,"NAME",?50,"MCR#"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","MCR",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .S ABMP("MDFN")=0
 .F  S ABMP("MDFN")=$O(^TMP($J,"ABM-MURPT","MCR",ABMP("PDFN"),ABMP("MDFN"))) Q:'ABMP("MDFN")  D
 ..W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNMCR(ABMP("PDFN"),0)),U,3)
 ;
 ;^TMP($J,"ABM-MURPT","RR",ABMP("PDFN"),ABMP("MDFN"))
 W !!!,"RAILROAD RAILROAD RAILROAD RAILROAD RAILROAD RAILROAD RAILROAD RAILROAD "
 W !?3,"PDFN",?15,"NAME",?50,"RR#"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","RR",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .S ABMP("MDFN")=0
 .F  S ABMP("MDFN")=$O(^TMP($J,"ABM-MURPT","RR",ABMP("PDFN"),ABMP("MDFN"))) Q:'ABMP("MDFN")  D
 ..;W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNRRE(ABMP("PDFN"),0)),U,3)  ;abm*2.6*12 HEAT120278
 ..W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUTTRRP($P($G(^AUPNRRE(ABMP("PDFN"),0)),U,3),0)),U)_$P($G(^AUPNRRE(ABMP("PDFN"),0)),U,4)  ;abm*2.6*12 HEAT120278
 ;
 ;start new abm*2.6*11 VMBP#9 RQMT_103
 ;^TMP($J,"ABM-MURPT","VMBP",ABMP("PDFN"),ABMP("MDFN"))
 W !!!,"VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP VMBP "
 W !?3,"PDFN",?15,"NAME",?50,"VA#"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","VAMB",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .S ABMP("MDFN")=0
 .F  S ABMP("MDFN")=$O(^TMP($J,"ABM-MURPT","VAMB",ABMP("PDFN"),ABMP("MDFN"))) Q:'ABMP("MDFN")  D
 ..W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNVAMB(ABMP("PDFN"),0)),U,6)
 ;end new VMBP#9 RQMT_103
 ;
 ;^TMP($J,"ABM-MURPT","PI",ABMP("PDFN"),ABMP("MDFN"))
 W !!!,"PRIVATE PRIVATE PRIVATE PRIVATE PRIVATE PRIVATE PRIVATE PRIVATE PRIVATE "
 ;W !?3,"PDFN",?15,"NAME",?50,"INS",?62,"MEM#"  ;abm*2.6*15 HEAT188548
 W !?3,"PDFN",?15,"NAME",?50,"MEM#",?71,"INS"  ;abm*2.6*15 HEAT188548
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","PI",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .S ABMP("MDFN")=0
 .F  S ABMP("MDFN")=$O(^TMP($J,"ABM-MURPT","PI",ABMP("PDFN"),ABMP("MDFN"))) Q:'ABMP("MDFN")  D
 ..;W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U),?50,$P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),0)),U),?62,$P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),2)),U)  ;abm*2.6*15 188495
 ..W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U)
 ..W ?50  ;abm*2.6*15 HEAT188495
 ..I $P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),2)),U)'="" W $P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),2)),U) ;abm*2.6*15 HEAT188495
 ..;I $P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),2)),U)="" W $P($G(^AUPN3PPH($P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),0)),U,8),0)),U,4)  ;abm*2.6*15 HEAT188495  ;abm*2.6*21 IHS/SD/SDR HEAT204790
 ..I $P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),2)),U)=""&($P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),0)),U,8)'="") W $P($G(^AUPN3PPH($P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),0)),U,8),0)),U,4)  ;abm*2.6*21 IHS/SD/SDR HEAT204790
 ..W ?71,$P($G(^AUTNINS($P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),0)),U),0)),U)_" ("_$P($G(^AUPNPRVT(ABMP("PDFN"),11,ABMP("MDFN"),0)),U)_")"  ;abm*2.6*15 HEAT188495 and HEAT188548
 ;
 ;^TMP($J,"ABM-MURPT","NO",ABMP("PDFN"))
 W !!!,"NOT INSURED NOT INSURED NOT INSURED NOT INSURED NOT INSURED NOT INSURED "
 W !?3,"PDFN",?15,"NAME"
 S ABMP("PDFN")=0
 F  S ABMP("PDFN")=$O(^TMP($J,"ABM-MURPT","NO",ABMP("PDFN"))) Q:'ABMP("PDFN")  D
 .W !?3,ABMP("PDFN"),?15,$P($G(^DPT(ABMP("PDFN"),0)),U)
 Q
 ;
WRTVSTS ;^TMP($J,"ABM-MURPT","ENC",ABMP("VDFN"))
 W !!!,"VISITS VISITS VISITS VISITS VISITS VISITS VISITS VISITS VISITS "
 ;W !?3,"VDFN",?13,"VISIT",?30,"PDFN",?40,"PATIENT"  ;abm*2.6*15 HEAT188548
 W !?3,"VDFN",?13,"VISIT",?34,"PDFN",?44,"PATIENT",?75,"VISIT LOCATION"  ;abm*2.6*15 HEAT188548
 S ABMP("VDFN")=0
 F  S ABMP("VDFN")=$O(^TMP($J,"ABM-MURPT","ENC",ABMP("VDFN"))) Q:'ABMP("VDFN")  D
 .;W !?3,ABMP("VDFN"),?13,$P($G(^AUPNVSIT(ABMP("VDFN"),0)),U),?30,$P($G(^AUPNVSIT(ABMP("VDFN"),0)),U,5),?40,$P($G(^DPT($P($G(^AUPNVSIT(ABMP("VDFN"),0)),U,5),0)),U)  ;abm*2.6*15 HEAT188548
 .W !?3,ABMP("VDFN"),?13,$$BDT^ABMDUTL($P($G(^AUPNVSIT(ABMP("VDFN"),0)),U))  ;abm*2.6*15 HEAT188548
 .W ?34,$P($G(^AUPNVSIT(ABMP("VDFN"),0)),U,5),?44,$P($G(^DPT($P($G(^AUPNVSIT(ABMP("VDFN"),0)),U,5),0)),U)  ;abm*2.6*15 HEAT188548 formatted visit/admit date/time
 .W ?75,$$GET1^DIQ(4,$P($G(^AUPNVSIT(ABMP("VDFN"),0)),U,6),".01","E")  ;abm*2.6*15 HEAT188548 visit location
 Q