VAQPST24 ;ALB/JRP - POST INIT (FILE CONVERSION);11-JUN-93
;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
;
CNVRT ;COMPLETE FILE CONVERSION FOR LOCAL AND REMOTE REQUESTS
;CONTINUATION FOR REQUEST^VAQPST21 & PROCESS^VAQPST22
; DECLARATIONS DONE IN CALLING ROUTINE
S (PTR15,TRAN15)=0
S TMP=$$NEWTRAN^VAQFILE
I ($P(TMP,"^",1)="-1") S ERRCNT=ERRCNT+1 Q
S PTR15=$P(TMP,"^",1)
S TRAN15=$P(TMP,"^",2)
;TRANSFER INFO
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.02,STATUS)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.05,RELEASE)
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.07,"1.0")
I (PATPTR'="") S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.03,("`"_PATPTR))
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,10,NAME)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,11,SSN)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,12,DOB)
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,13,PID)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,20,DATE)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,21,USER)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,30,SITE)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,31,DOMAIN)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,40,"NO")
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,60,REMOTE)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,61,RETURN)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.06,REMTRAN)
I (TMP) D ERROR Q
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,70,"NO")
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MIN",.01,"PDX*MIN")
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MAS",.01,"PDX*MAS")
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MPL",.01,"PDX*MPL")
S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,90,"NO")
Q
;
ERROR ;DELETE NEW TRANSACTION
S ERRCNT=ERRCNT+1
S TMP=$$DELTRAN^VAQFILE(PTR15)
Q
;
;
DELETE(DEBUG) ;DELETE ENTRIES IN VERSION 1.0 FILES
;INPUT : DEBUG - Turns on debug mode (info written to screen)
; 1 - Debug on
; 0 - Debug off (default)
;OUTPUT : NONE
;
;CHECK INPUT
S DEBUG=+$G(DEBUG)
;DECLARE VARIABLES
N TMP,FILE
W:(DEBUG) !!!!
W:(DEBUG) !,"**************************"
W:(DEBUG) !,"* *"
W:(DEBUG) !,"* Deletion of Entries *"
W:(DEBUG) !,"* In Version 1.0 Files *"
W:(DEBUG) !,"* *"
W:(DEBUG) !,"**************************"
W:(DEBUG) !!,"Beginning deletions",!," Time: ",$$NOW^VAQUTL99,!
;LOOP THROUGH ALL FILES & DELETE ENTRIES
F FILE=394,394.1,394.2,394.3,394.4 D
.W:(DEBUG) !!,"Deleting entries in file number ",FILE," ... "
.;GET ZERO NODE FOR FILE
.S TMP=$G(^VAT(FILE,0))
.;UPDATE ZERO NODE
.S $P(TMP,"^",3)=0
.S $P(TMP,"^",4)=0
.;DELETE ENTRIES
.K ^VAT(FILE)
.;RESET ZERO NODE
.S ^VAT(FILE,0)=TMP
.W:(DEBUG) "Done"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQPST24 2854 printed Nov 22, 2024@17:36:35 Page 2
VAQPST24 ;ALB/JRP - POST INIT (FILE CONVERSION);11-JUN-93
+1 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
+2 ;
CNVRT ;COMPLETE FILE CONVERSION FOR LOCAL AND REMOTE REQUESTS
+1 ;CONTINUATION FOR REQUEST^VAQPST21 & PROCESS^VAQPST22
+2 ; DECLARATIONS DONE IN CALLING ROUTINE
+3 SET (PTR15,TRAN15)=0
+4 SET TMP=$$NEWTRAN^VAQFILE
+5 IF ($PIECE(TMP,"^",1)="-1")
SET ERRCNT=ERRCNT+1
QUIT
+6 SET PTR15=$PIECE(TMP,"^",1)
+7 SET TRAN15=$PIECE(TMP,"^",2)
+8 ;TRANSFER INFO
+9 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.02,STATUS)
+10 IF (TMP)
DO ERROR
QUIT
+11 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.05,RELEASE)
+12 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.07,"1.0")
+13 IF (PATPTR'="")
SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.03,("`"_PATPTR))
+14 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,10,NAME)
+15 IF (TMP)
DO ERROR
QUIT
+16 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,11,SSN)
+17 IF (TMP)
DO ERROR
QUIT
+18 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,12,DOB)
+19 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,13,PID)
+20 IF (TMP)
DO ERROR
QUIT
+21 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,20,DATE)
+22 IF (TMP)
DO ERROR
QUIT
+23 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,21,USER)
+24 IF (TMP)
DO ERROR
QUIT
+25 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,30,SITE)
+26 IF (TMP)
DO ERROR
QUIT
+27 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,31,DOMAIN)
+28 IF (TMP)
DO ERROR
QUIT
+29 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,40,"NO")
+30 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,60,REMOTE)
+31 IF (TMP)
DO ERROR
QUIT
+32 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,61,RETURN)
+33 IF (TMP)
DO ERROR
QUIT
+34 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.06,REMTRAN)
+35 IF (TMP)
DO ERROR
QUIT
+36 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,70,"NO")
+37 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MIN",.01,"PDX*MIN")
+38 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MAS",.01,"PDX*MAS")
+39 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MPL",.01,"PDX*MPL")
+40 SET TMP=$$FILEINFO^VAQFILE(394.61,PTR15,90,"NO")
+41 QUIT
+42 ;
ERROR ;DELETE NEW TRANSACTION
+1 SET ERRCNT=ERRCNT+1
+2 SET TMP=$$DELTRAN^VAQFILE(PTR15)
+3 QUIT
+4 ;
+5 ;
DELETE(DEBUG) ;DELETE ENTRIES IN VERSION 1.0 FILES
+1 ;INPUT : DEBUG - Turns on debug mode (info written to screen)
+2 ; 1 - Debug on
+3 ; 0 - Debug off (default)
+4 ;OUTPUT : NONE
+5 ;
+6 ;CHECK INPUT
+7 SET DEBUG=+$GET(DEBUG)
+8 ;DECLARE VARIABLES
+9 NEW TMP,FILE
+10 if (DEBUG)
WRITE !!!!
+11 if (DEBUG)
WRITE !,"**************************"
+12 if (DEBUG)
WRITE !,"* *"
+13 if (DEBUG)
WRITE !,"* Deletion of Entries *"
+14 if (DEBUG)
WRITE !,"* In Version 1.0 Files *"
+15 if (DEBUG)
WRITE !,"* *"
+16 if (DEBUG)
WRITE !,"**************************"
+17 if (DEBUG)
WRITE !!,"Beginning deletions",!," Time: ",$$NOW^VAQUTL99,!
+18 ;LOOP THROUGH ALL FILES & DELETE ENTRIES
+19 FOR FILE=394,394.1,394.2,394.3,394.4
Begin DoDot:1
+20 if (DEBUG)
WRITE !!,"Deleting entries in file number ",FILE," ... "
+21 ;GET ZERO NODE FOR FILE
+22 SET TMP=$GET(^VAT(FILE,0))
+23 ;UPDATE ZERO NODE
+24 SET $PIECE(TMP,"^",3)=0
+25 SET $PIECE(TMP,"^",4)=0
+26 ;DELETE ENTRIES
+27 KILL ^VAT(FILE)
+28 ;RESET ZERO NODE
+29 SET ^VAT(FILE,0)=TMP
+30 if (DEBUG)
WRITE "Done"
End DoDot:1
+31 QUIT