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

ABPAPD7C.m

Go to the documentation of this file.
ABPAPD7C ;DISPLAY CLAIMS AFTER TRANS ALLOCATION; [ 07/18/91  6:09 PM ]
 ;;1.4;AO PVT-INS TRACKING;*0*;IHS-OKC/KJR;JULY 25, 1991
A0 S U="^",DC=1,D0=ABPATDFN K DXS W @IOF,! D ^ABPAPDA K DXS
 K DIC,DIE,DA,DR,ABPACAMT,ABPACCNT
 S ABPADOS=ABPAFRDT-1,(ABPACAMT,ABPACCNT,ABPACTPD)=0
 S (ABPATA2,ABPATA3,ABPATA4,ABPATA5,ABPATA5)=0
LOOP F  D  Q:'ABPADOS
 .S ABPADOS=$O(^ABPVAO("PC",ABPATDFN,ABPADOS))
 .Q:+ABPADOS=0!(ABPADOS>ABPATODT)  S DA=0 F  D  Q:'DA
 ..S DA=$O(^ABPVAO("PC",ABPATDFN,ABPADOS,DA)) Q:'DA
 ..Q:$D(^ABPVAO(ABPATDFN,1,DA,0))'=1!($D(ABPACSCR(+DA))=1)
 ..S ABPAPTR=+DA,ABPADATA=^ABPVAO(ABPATDFN,1,ABPAPTR,0)
 ..S ABPACCNT=ABPACCNT+1 W !,ABPACCNT,?2,$J($P(ABPADATA,"^",2),7)
 ..S ABPA("DTIN")=+ABPADATA D DTCVT^ABPAMAIN W ?10,$J(ABPA("DTOUT"),8)
 ..W ?19,$J($P(ABPADATA,"^",7),8,2)
 ..S ABPACAMT=ABPACAMT+$P(ABPADATA,"^",7) F I=28,37 S J=$E(I) D
 ...W ?I,$J($P(ABPA("PP",ABPADOS,DA),"^",J),8,2)
 ...S @("ABPATA"_J)=@("ABPATA"_J)+$P(ABPA("PP",ABPADOS,DA),"^",J)
 ...S:+$P(ABPA("PP",ABPADOS,DA),"^",J)<0 ABPA("OPERR")=""
 ..W ?46,$J($P(ABPA("PP",ABPADOS,DA),"^",4),7,2)
 ..S ABPATA4=ABPATA4+$P(ABPA("PP",ABPADOS,DA),"^",4)
 ..S:+$P(ABPA("PP",ABPADOS,DA),"^",4)<0 ABPA("OPERR")=""
 ..W ?54,$J($P(ABPA("PP",ABPADOS,DA),"^",5),8,2)
 ..S ABPATA5=ABPATA5+$P(ABPA("PP",ABPADOS,DA),"^",5)
 ..S:+$P(ABPA("PP",ABPADOS,DA),"^",5)<0 ABPA("OPERR")=""
 ..W ?63,$J($P(ABPA("PP",ABPADOS,DA),"^",7),8,2)
 ..S ABPATA7=ABPATA7+$P(ABPA("PP",ABPADOS,DA),"^",7)
 ..S ABPACTPD=ABPACTPD+$P(ABPA("PP",ABPADOS,DA),"^",6)
 ..W ?72,$J(+ABPA("PP",ABPADOS,DA),8,2)
 ..I +ABPA("PP",ABPADOS,DA)<0&(+$P(ABPA("PP",ABPADOS,DA),"^",5)'>0) D
 ...S ABPA("OPERR")=""
 ..I +ABPA("PP",ABPADOS,DA)>+$P(ABPADATA,"^",7) S ABPA("OPERR")=""
 I +ABPACCNT>1 W ! D
 .F ABPAI=19,28,37 W ?ABPAI,"--------"
 .W ?46,"-------" F ABPAI=54,63,72 W ?ABPAI,"--------"
 .W !?19,$J(ABPACAMT,8,2),?28,$J(ABPATA2,8,2),?37,$J(ABPATA3,8,2)
 .W ?46,$J(ABPATA4,7,2),?54,$J(ABPATA5,8,2)
 .W ?63,$J(ABPATA7,8,2),?72,$J(ABPACTOB,8,2)
 W !,ABPAXX
CURARAY ;ENTRY POINT
 ;PROCEDURE TO BUILD A COMPOSITE ARRAY OF CURRENT TRANS. AS ALLOCATED
 S ABPADOS=0 F ABPAI=0:0 D  Q:+ABPADOS=0
 .S ABPADOS=$O(ABPA("HP",ABPADOS)) Q:+ABPADOS=0
 .S DA=0 F ABPAJ=0:0 D  Q:+DA=0
 ..S DA=$O(ABPA("HP",ABPADOS,DA)) Q:+DA=0
 ..F ABPAK=2:1:5 D
 ...S @("ABPAH"_ABPAK)=$P(ABPA("HP",ABPADOS,DA),"^",ABPAK)
 ...S @("ABPAP"_ABPAK)=$P(ABPA("PP",ABPADOS,DA),"^",ABPAK)
 ...S ABPACURA=@("ABPAP"_ABPAK)-@("ABPAH"_ABPAK)
 ...S $P(ABPA("CP",ABPADOS,DA),"^",ABPAK)=ABPACURA
 Q