ABMDBAD1 ; IHS/ASDST/DMJ - ADD BILL SUBMITTED ELSWHERE, NON-INTERACTIVE ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
ADD(ABM1) ;EP
K DINUM,DIC
S DIC(0)="LX"
S DIC="^ABMDBILL(DUZ(2),"
S X=$$NXNM^ABMDUTL
I 'X S DA="" Q DA
S X=X_"A"
D ^DIC
I +Y<0 S DA="" Q DA
S DA=+Y
S DIE=DIC
S ABMFLD=0
F S ABMFLD=$O(ABM1(ABMFLD)) Q:'ABMFLD D
.Q:ABM1(ABMFLD)=""
.S DR=ABMFLD_"////"_ABM1(ABMFLD)
.D ^DIE
K ABMFLD,ABM1
Q DA
ABMDBAD1 ; IHS/ASDST/DMJ - ADD BILL SUBMITTED ELSWHERE, NON-INTERACTIVE ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
ADD(ABM1) ;EP
+1 KILL DINUM,DIC
+2 SET DIC(0)="LX"
+3 SET DIC="^ABMDBILL(DUZ(2),"
+4 SET X=$$NXNM^ABMDUTL
+5 IF 'X
SET DA=""
QUIT DA
+6 SET X=X_"A"
+7 DO ^DIC
+8 IF +Y<0
SET DA=""
QUIT DA
+9 SET DA=+Y
+10 SET DIE=DIC
+11 SET ABMFLD=0
+12 FOR
SET ABMFLD=$ORDER(ABM1(ABMFLD))
IF 'ABMFLD
QUIT
Begin DoDot:1
+13 IF ABM1(ABMFLD)=""
QUIT
+14 SET DR=ABMFLD_"////"_ABM1(ABMFLD)
+15 DO ^DIE
End DoDot:1
+16 KILL ABMFLD,ABM1
+17 QUIT DA