DVBAUTL3 ;ALB/JLU-A general utility routine ;1/28/93
;;2.7;AMIE;;Apr 10, 1995
;
DEL(DA) ;this subroutine will delete an entry from file 396
N Z
S DIK="^DVB(396,"
D ^DIK
I IOST?1"C-".E W *7,!,?10,"7131 entry deleted.",?39,"<Return to continue>"
R Z:DTIME
K DIK
Q
;
FILE ;this subroutine files the results into 396 for DVBARQP
N A
S A=^DVB(396,DVBAENTR,0)
S $P(A,U,5)=$P(DVBARPT(1),U,2)
S $P(A,U,9)=$P(DVBARPT(1),U,3)
S $P(A,U,6)=$P(DVBARPT(2),U,2)
S $P(A,U,11)=$P(DVBARPT(2),U,3)
S $P(A,U,7)=$P(DVBARPT(3),U,2)
S $P(A,U,13)=$P(DVBARPT(3),U,3)
S $P(A,U,8)=$P(DVBARPT(4),U,2)
S $P(A,U,15)=$P(DVBARPT(4),U,3)
S $P(A,U,16)=$P(DVBARPT(5),U,2)
S $P(A,U,17)=$P(DVBARPT(5),U,3)
S $P(A,U,18)=$P(DVBARPT(6),U,2)
S $P(A,U,19)=$P(DVBARPT(6),U,3)
S $P(A,U,20)=$P(DVBARPT(7),U,2)
S $P(A,U,21)=$P(DVBARPT(7),U,3)
S $P(A,U,22)=$P(DVBARPT(8),U,2)
S $P(A,U,23)=$P(DVBARPT(8),U,3)
S $P(A,U,24)=$P(DVBARPT(9),U,2)
S $P(A,U,27)=$P(DVBARPT(10),U,2)
S $P(A,U,28)=$P(DVBARPT(10),U,3)
S ^DVB(396,DVBAENTR,0)=A
S $P(^DVB(396,DVBAENTR,1),U,7)=$P(DVBARPT(9),U,3)
D DIVUPDT^DVBAUTL2
Q
;
INITRPT ;This subroutine will setup the report array.
S DVBAO=^DVB(396,DVBAENTR,0)
S DVBARPT(1)="Notice of discharge"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,5),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,9),1:"")
S DVBARPT(2)="Hospital Summary"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,6),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,11),1:"")
S DVBARPT(3)="Certificate (21-day)"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,7),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,13),1:"")
S DVBARPT(4)="Other/Exam (Review Remarks)"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,8),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,15),1:"")
S DVBARPT(5)="Special Report"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,16),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,17),1:"")
S DVBARPT(6)="Competency Report"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,18),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,19),1:"")
S DVBARPT(7)="VA Form 21-2680"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,20),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,21),1:"")
S DVBARPT(8)="Asset Information"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,22),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,23),1:"")
S DVBAP=^DVB(396,DVBAENTR,1)
S DVBARPT(9)="Admission Report"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,24),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAP,U,7),1:"")
S DVBARPT(10)="Beginning Date Care"_"^"_$S($D(DVBAEDT):$P(DVBAO,U,27),1:"NO")_"^"_$S($D(DVBAEDT):$P(DVBAO,U,28),1:"")
Q
;
IFNPAR() ;
;This function call returns the internal entry number of the entry in
;the parameter file 396.1. There are no inputs. The outputs are either
;the IFN or zero.
;
N X
S X=$O(^DVB(396.1,0))
I 'X Q 0
Q X
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAUTL3 2662 printed Oct 16, 2024@17:43:10 Page 2
DVBAUTL3 ;ALB/JLU-A general utility routine ;1/28/93
+1 ;;2.7;AMIE;;Apr 10, 1995
+2 ;
DEL(DA) ;this subroutine will delete an entry from file 396
+1 NEW Z
+2 SET DIK="^DVB(396,"
+3 DO ^DIK
+4 IF IOST?1"C-".E
WRITE *7,!,?10,"7131 entry deleted.",?39,"<Return to continue>"
+5 READ Z:DTIME
+6 KILL DIK
+7 QUIT
+8 ;
FILE ;this subroutine files the results into 396 for DVBARQP
+1 NEW A
+2 SET A=^DVB(396,DVBAENTR,0)
+3 SET $PIECE(A,U,5)=$PIECE(DVBARPT(1),U,2)
+4 SET $PIECE(A,U,9)=$PIECE(DVBARPT(1),U,3)
+5 SET $PIECE(A,U,6)=$PIECE(DVBARPT(2),U,2)
+6 SET $PIECE(A,U,11)=$PIECE(DVBARPT(2),U,3)
+7 SET $PIECE(A,U,7)=$PIECE(DVBARPT(3),U,2)
+8 SET $PIECE(A,U,13)=$PIECE(DVBARPT(3),U,3)
+9 SET $PIECE(A,U,8)=$PIECE(DVBARPT(4),U,2)
+10 SET $PIECE(A,U,15)=$PIECE(DVBARPT(4),U,3)
+11 SET $PIECE(A,U,16)=$PIECE(DVBARPT(5),U,2)
+12 SET $PIECE(A,U,17)=$PIECE(DVBARPT(5),U,3)
+13 SET $PIECE(A,U,18)=$PIECE(DVBARPT(6),U,2)
+14 SET $PIECE(A,U,19)=$PIECE(DVBARPT(6),U,3)
+15 SET $PIECE(A,U,20)=$PIECE(DVBARPT(7),U,2)
+16 SET $PIECE(A,U,21)=$PIECE(DVBARPT(7),U,3)
+17 SET $PIECE(A,U,22)=$PIECE(DVBARPT(8),U,2)
+18 SET $PIECE(A,U,23)=$PIECE(DVBARPT(8),U,3)
+19 SET $PIECE(A,U,24)=$PIECE(DVBARPT(9),U,2)
+20 SET $PIECE(A,U,27)=$PIECE(DVBARPT(10),U,2)
+21 SET $PIECE(A,U,28)=$PIECE(DVBARPT(10),U,3)
+22 SET ^DVB(396,DVBAENTR,0)=A
+23 SET $PIECE(^DVB(396,DVBAENTR,1),U,7)=$PIECE(DVBARPT(9),U,3)
+24 DO DIVUPDT^DVBAUTL2
+25 QUIT
+26 ;
INITRPT ;This subroutine will setup the report array.
+1 SET DVBAO=^DVB(396,DVBAENTR,0)
+2 SET DVBARPT(1)="Notice of discharge"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,5),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,9),1:"")
+3 SET DVBARPT(2)="Hospital Summary"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,6),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,11),1:"")
+4 SET DVBARPT(3)="Certificate (21-day)"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,7),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,13),1:"")
+5 SET DVBARPT(4)="Other/Exam (Review Remarks)"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,8),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,15),1:"")
+6 SET DVBARPT(5)="Special Report"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,16),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,17),1:"")
+7 SET DVBARPT(6)="Competency Report"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,18),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,19),1:"")
+8 SET DVBARPT(7)="VA Form 21-2680"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,20),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,21),1:"")
+9 SET DVBARPT(8)="Asset Information"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,22),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,23),1:"")
+10 SET DVBAP=^DVB(396,DVBAENTR,1)
+11 SET DVBARPT(9)="Admission Report"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,24),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAP,U,7),1:"")
+12 SET DVBARPT(10)="Beginning Date Care"_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,27),1:"NO")_"^"_$SELECT($DATA(DVBAEDT):$PIECE(DVBAO,U,28),1:"")
+13 QUIT
+14 ;
IFNPAR() ;
+1 ;This function call returns the internal entry number of the entry in
+2 ;the parameter file 396.1. There are no inputs. The outputs are either
+3 ;the IFN or zero.
+4 ;
+5 NEW X
+6 SET X=$ORDER(^DVB(396.1,0))
+7 IF 'X
QUIT 0
+8 QUIT X