source: FOIAVistA/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQPST24.m@ 1660

Last change on this file since 1660 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1VAQPST24 ;ALB/JRP - POST INIT (FILE CONVERSION);11-JUN-93
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3 ;
4CNVRT ;COMPLETE FILE CONVERSION FOR LOCAL AND REMOTE REQUESTS
5 ;CONTINUATION FOR REQUEST^VAQPST21 & PROCESS^VAQPST22
6 ; DECLARATIONS DONE IN CALLING ROUTINE
7 S (PTR15,TRAN15)=0
8 S TMP=$$NEWTRAN^VAQFILE
9 I ($P(TMP,"^",1)="-1") S ERRCNT=ERRCNT+1 Q
10 S PTR15=$P(TMP,"^",1)
11 S TRAN15=$P(TMP,"^",2)
12 ;TRANSFER INFO
13 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.02,STATUS)
14 I (TMP) D ERROR Q
15 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.05,RELEASE)
16 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.07,"1.0")
17 I (PATPTR'="") S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.03,("`"_PATPTR))
18 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,10,NAME)
19 I (TMP) D ERROR Q
20 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,11,SSN)
21 I (TMP) D ERROR Q
22 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,12,DOB)
23 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,13,PID)
24 I (TMP) D ERROR Q
25 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,20,DATE)
26 I (TMP) D ERROR Q
27 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,21,USER)
28 I (TMP) D ERROR Q
29 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,30,SITE)
30 I (TMP) D ERROR Q
31 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,31,DOMAIN)
32 I (TMP) D ERROR Q
33 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,40,"NO")
34 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,60,REMOTE)
35 I (TMP) D ERROR Q
36 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,61,RETURN)
37 I (TMP) D ERROR Q
38 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,.06,REMTRAN)
39 I (TMP) D ERROR Q
40 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,70,"NO")
41 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MIN",.01,"PDX*MIN")
42 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MAS",.01,"PDX*MAS")
43 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,80,"PDX*MPL",.01,"PDX*MPL")
44 S TMP=$$FILEINFO^VAQFILE(394.61,PTR15,90,"NO")
45 Q
46 ;
47ERROR ;DELETE NEW TRANSACTION
48 S ERRCNT=ERRCNT+1
49 S TMP=$$DELTRAN^VAQFILE(PTR15)
50 Q
51 ;
52 ;
53DELETE(DEBUG) ;DELETE ENTRIES IN VERSION 1.0 FILES
54 ;INPUT : DEBUG - Turns on debug mode (info written to screen)
55 ; 1 - Debug on
56 ; 0 - Debug off (default)
57 ;OUTPUT : NONE
58 ;
59 ;CHECK INPUT
60 S DEBUG=+$G(DEBUG)
61 ;DECLARE VARIABLES
62 N TMP,FILE
63 W:(DEBUG) !!!!
64 W:(DEBUG) !,"**************************"
65 W:(DEBUG) !,"* *"
66 W:(DEBUG) !,"* Deletion of Entries *"
67 W:(DEBUG) !,"* In Version 1.0 Files *"
68 W:(DEBUG) !,"* *"
69 W:(DEBUG) !,"**************************"
70 W:(DEBUG) !!,"Beginning deletions",!," Time: ",$$NOW^VAQUTL99,!
71 ;LOOP THROUGH ALL FILES & DELETE ENTRIES
72 F FILE=394,394.1,394.2,394.3,394.4 D
73 .W:(DEBUG) !!,"Deleting entries in file number ",FILE," ... "
74 .;GET ZERO NODE FOR FILE
75 .S TMP=$G(^VAT(FILE,0))
76 .;UPDATE ZERO NODE
77 .S $P(TMP,"^",3)=0
78 .S $P(TMP,"^",4)=0
79 .;DELETE ENTRIES
80 .K ^VAT(FILE)
81 .;RESET ZERO NODE
82 .S ^VAT(FILE,0)=TMP
83 .W:(DEBUG) "Done"
84 Q
Note: See TracBrowser for help on using the repository browser.