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

ABMDRPCC.m

Go to the documentation of this file.
ABMDRPCC ; IHS/ASDST/DMJ - View PCC Visit ;  
 ;;2.6;IHS 3P BILLING SYSTEM;**11,21**;NOV 12, 2009;Build 379
 ;IHS/SD/SDR -2.6*21 HEAT210601 - Added Q to stop LOOP if timeout or '^'; was causing <SUBSCR>LOOP+20^ABMDRPCC error
 ;
START ;START HERE
 K APCDVDSP
 W !
 S AUPNLK("ALL")=""  ;universal lookup  ;abm*2.6*11 NOHEAT6
 S DIC="^AUPNPAT(",DIC(0)="AEMQ" D ^DIC Q:Y<0  S APCDPAT=+Y
 S ABM("PNM")=$P(^DPT(APCDPAT,0),U),ABM("SSN")=$P(^(0),"^",9)
 S ABM("SSN")=$E(ABM("SSN"),1,3)_"-"_$E(ABM("SSN"),4,5)_"-"_$E(ABM("SSN"),6,9)
 S $P(ABM("EQ"),"=",80)="",ABM("I")=0 D HDR
LOOP ;LOOP HERE
 S ABM("VDT")=0 F  S ABM("VDT")=$O(^AUPNVSIT("AA",APCDPAT,ABM("VDT"))) Q:'ABM("VDT")!($G(ABM("QUIT")))  D
 .S ABM("VDFN")=0 F  S ABM("VDFN")=$O(^AUPNVSIT("AA",APCDPAT,ABM("VDT"),ABM("VDFN"))) Q:'ABM("VDFN")!($G(ABM("QUIT")))  D
 ..Q:$P(^AUPNVSIT(ABM("VDFN"),0),"^",11)
 ..S ABM("I")=ABM("I")+1,ABMN(ABM("I"))=ABM("VDFN")
 ..K ABM(9000010)
 ..S DIC="^AUPNVSIT(",DIQ="ABM(",DIQ(0)="E",DR=".01;.04;.06;.07",DA=ABM("VDFN") D EN^DIQ1 K DIQ
 ..W !,$J("("_ABM("I")_")",6)
 ..W ?9,ABM(9000010,DA,.01,"E")
 ..W ?30,$E(ABM(9000010,DA,.06,"E"),1,17)
 ..W ?50,ABM(9000010,DA,.07,"E")
 ..W !,?10,"Claim Status: ",ABM(9000010,DA,.04,"E")
 ..I $Y+5>IOSL,'(ABM("I")#2) D
 ...W ! S DIR(0)="NO^"_ABM("PST")_":"_ABM("I") D ^DIR K DIR
 ...I X S APCDVDSP=ABMN(X),ABM("QUIT")=1 Q
 ...I Y["^" S ABM("QUIT")=1 Q
 ...D HDR
 I '$D(ABMN) W !,"No PCC Visits Found for This Patient.",! S DIR(0)="E" D ^DIR K DIR K ABM Q
 I $G(ABM("QUIT")),'$G(APCDVDSP) K ABM Q
 I '$G(APCDVDSP) S DIR(0)="N^"_ABM("PST")_":"_ABM("I") D ^DIR K DIR I Y["^" K ABM Q
 Q:X=""!$D(DIROUT)!$D(DIRUT)!$D(DTOUT)!$D(DUOUT)  ;abm*2.6*21 IHS/SD/SDR HEAT210601
 S APCDVDSP=ABMN(X)
 K ABM,ABMN
DEV ;ASK FOR DEVICE
 S %ZIS("A")="Enter Device: ",%ZIS="NQ" D ^%ZIS Q:POP
 I IO'=IO(0) D QUE,HOME^%ZIS Q
 I $D(IO("S")) S IOP=ION D ^%ZIS
TM ;TASKMAN COME HERE
 D ^APCDVDSP
 I $E(IOST)="P" W $$EN^ABMVDF("IOF")
 K APCDPAT,APCDVDSP Q
HDR ;HEADER
 K ABMN
 S ABM("PST")=ABM("I")+1
 W $$EN^ABMVDF("IOF"),!,"PATIENT: ",ABM("PNM"),?40,"SSN: ",ABM("SSN")
 W !,?9,"VISIT DATE/TIME",?30,"VISIT LOCATION",?50,"SERVICE CATEGORY",!,ABM("EQ"),!
 Q
QUE ;QUE TO TASKMAN
 S ZTRTN="TM^ABMDVPCC",ZTDESC="PCC INQUIRY"
 S ZTSAVE("APCDVDSP")="",ZTSAVE("APCDPAT")=""
 K ZTSK D ^%ZTLOAD W:$G(ZTSK) !,"Task # ",ZTSK," queued.",!
 Q