BDGXREF1 ; IHS/ANMC/LJF - IHS MUMPS XREFS ;
;;5.3;PIMS;;APR 26, 2002
;
SVACSET ;EP; set AC xref on Scheduled Visit file
; uses 3 fields - visit type, date expected & ward
; used by bed availability to list future scheduled admissions
;
NEW BDGX1,BDGX2,BDGX3
S BDGX1=$P($G(^BDGSV(DA,0)),U,2) ;date expected
S BDGX2=$P($G(^BDGSV(DA,0)),U,3) ;visit type
S BDGX3=$P($G(^BDGSV(DA,0)),U,9) ;ward
Q:BDGX1="" Q:BDGX2="" Q:BDGX3=""
S ^BDGSV("AC",BDGX2,BDGX3,BDGX1,DA)=""
Q
;
SVACKIL ;EP; kill AC xref on Scheduled Visit file
NEW BDGX1,BDGX2,BDGX3
S BDGX1=$P($G(^BDGSV(DA,0)),U,2) ;date expected
S BDGX2=$P($G(^BDGSV(DA,0)),U,3) ;visit type
S BDGX3=$P($G(^BDGSV(DA,0)),U,9) ;ward
Q:BDGX1="" Q:BDGX2="" Q:BDGX3=""
K ^BDGSV("AC",BDGX2,BDGX3,BDGX1,DA)
Q
;
SVADSET ;EP; set AD xref on Scheduled Visit file
; uses 2 fields - patient and date expected
; used by patient inquiry
;
NEW BDGX1,BDGX2
S BDGX1=$P($G(^BDGSV(DA,0)),U,1) ;patient
S BDGX2=$P($G(^BDGSV(DA,0)),U,2) ;date expected
Q:BDGX1="" Q:BDGX2=""
S ^BDGSV("AD",BDGX1,BDGX2,DA)=""
Q
;
SVADKIL ;EP; kill AC xref on Scheduled Visit file
NEW BDGX1,BDGX2
S BDGX2=$P($G(^BDGSV(DA,0)),U,1) ;patient
S BDGX1=$P($G(^BDGSV(DA,0)),U,2) ;date expected
Q:BDGX1="" Q:BDGX2=""
K ^BDGSV("AD",BDGX1,BDGX2,DA)
Q
BDGXREF1 ; IHS/ANMC/LJF - IHS MUMPS XREFS ;
+1 ;;5.3;PIMS;;APR 26, 2002
+2 ;
SVACSET ;EP; set AC xref on Scheduled Visit file
+1 ; uses 3 fields - visit type, date expected & ward
+2 ; used by bed availability to list future scheduled admissions
+3 ;
+4 NEW BDGX1,BDGX2,BDGX3
+5 ;date expected
SET BDGX1=$PIECE($GET(^BDGSV(DA,0)),U,2)
+6 ;visit type
SET BDGX2=$PIECE($GET(^BDGSV(DA,0)),U,3)
+7 ;ward
SET BDGX3=$PIECE($GET(^BDGSV(DA,0)),U,9)
+8 IF BDGX1=""
QUIT
IF BDGX2=""
QUIT
IF BDGX3=""
QUIT
+9 SET ^BDGSV("AC",BDGX2,BDGX3,BDGX1,DA)=""
+10 QUIT
+11 ;
SVACKIL ;EP; kill AC xref on Scheduled Visit file
+1 NEW BDGX1,BDGX2,BDGX3
+2 ;date expected
SET BDGX1=$PIECE($GET(^BDGSV(DA,0)),U,2)
+3 ;visit type
SET BDGX2=$PIECE($GET(^BDGSV(DA,0)),U,3)
+4 ;ward
SET BDGX3=$PIECE($GET(^BDGSV(DA,0)),U,9)
+5 IF BDGX1=""
QUIT
IF BDGX2=""
QUIT
IF BDGX3=""
QUIT
+6 KILL ^BDGSV("AC",BDGX2,BDGX3,BDGX1,DA)
+7 QUIT
+8 ;
SVADSET ;EP; set AD xref on Scheduled Visit file
+1 ; uses 2 fields - patient and date expected
+2 ; used by patient inquiry
+3 ;
+4 NEW BDGX1,BDGX2
+5 ;patient
SET BDGX1=$PIECE($GET(^BDGSV(DA,0)),U,1)
+6 ;date expected
SET BDGX2=$PIECE($GET(^BDGSV(DA,0)),U,2)
+7 IF BDGX1=""
QUIT
IF BDGX2=""
QUIT
+8 SET ^BDGSV("AD",BDGX1,BDGX2,DA)=""
+9 QUIT
+10 ;
SVADKIL ;EP; kill AC xref on Scheduled Visit file
+1 NEW BDGX1,BDGX2
+2 ;patient
SET BDGX2=$PIECE($GET(^BDGSV(DA,0)),U,1)
+3 ;date expected
SET BDGX1=$PIECE($GET(^BDGSV(DA,0)),U,2)
+4 IF BDGX1=""
QUIT
IF BDGX2=""
QUIT
+5 KILL ^BDGSV("AD",BDGX1,BDGX2,DA)
+6 QUIT