source: FOIAVistA/trunk/r/PATIENT_DATA_EXCHANGE-VAQ/VAQDIS01.m@ 1713

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

initial load of FOIAVistA 6/30/08 version

File size: 1.8 KB
Line 
1VAQDIS01 ;ALB/JFP - DISPLAY MINIMAL DATA, DRIVER ;01MAR93
2 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
3EP ; -- Main entry point for the list processor
4 ;
5PT S VAQTYPE="PT" G EP1 ; -- Minimal data extracted from ^DPT(2,
6TR S VAQTYPE="TR" G EP1 ; -- Minimal data extracted from ^VAT(394.62,
7 ;
8EP1 D EN^VALM("VAQ DISPLAY MINIMUM") ; -- Protocol = VAQ DIS1 (MENU)
9 QUIT
10 ;
11INIT ; -- Builds array of minimal data for the patient entered (DFN)
12 ;W !,"DFN = ",DFN
13 K ^TMP("VAQD1",$J),^TMP("VAQDIS",$J)
14 N ROOT,SEGPTR,X,MSG,VAQIGNC,XTRCT,OFFSET
15 S (VAQADFL,ERRPOP,VALMCNT)=0
16 ;
17 S ROOT="^TMP(""VAQDIS"",$J)"
18 S SEGPTR=$O(^VAT(394.71,"C","PDX*MIN",""))
19 S VAQIGNC=1 ; -- turns of encryption
20 I VAQTYPE="PT" D
21 .D CHGCAP^VALM("LOCAL"," Local Patient Data")
22 .S X=$$SEGXTRCT^VAQDBI(0,DFN,ROOT,SEGPTR)
23 I VAQTYPE="TR" D
24 .D CHGCAP^VALM("LOCAL"," Remote Patient Data")
25 .S X=$$SEGEXT^VAQUPD1(DFN,SEGPTR,ROOT)
26 I +X=-1 D QUIT
27 .S MSG="Extract not successful...Error: "_$P(X,U,2)
28 .S X=$$SETSTR^VALM1(" ","",1,79) D TMP
29 .S X=$$SETSTR^VALM1(MSG,"",1,80) D TMP
30 .S ERRPOP=1
31 ; -- extraction sucessful, call display load
32 S XTRCT=ROOT
33 S ROOT="^TMP(""VAQD1"",$J)"
34 S (OFFSET,DSP)=0
35 S X=$$DISPMIN^VAQDIS21(XTRCT,SEGPTR,ROOT,OFFSET,DSP)
36 I +X=-1 D QUIT
37 .S MSG="Display load not successful...Error: "_$P(X,U,2)
38 .S X=$$SETSTR^VALM1(" ","",1,79) D TMP
39 .S X=$$SETSTR^VALM1(MSG,"",1,80) D TMP
40 .S ERRPOP=1
41 S VALMBCK="Q"
42 QUIT
43 ;
44TMP ; -- Set the array used by list processor
45 S VALMCNT=VALMCNT+1
46 S ^TMP("VAQD1",$J,VALMCNT,0)=$E(X,1,79)
47 QUIT
48 ;
49HD ; -- Make header line for list processor
50 D HD1^VAQEXT02 QUIT
51 ;
52EXIT ; -- Note: The list processor cleans up its own variables.
53 ; All other variables cleaned up here.
54 ;
55 K ^TMP("VAQD1",$J),^TMP("VAQDIS",$J)
56 K VAQTYPE,VAQIGNC
57 K ROOT,SEGPTR,X,MSG,XTRCT,OFFSET,DSP,ERRPOP
58 Q
59 ;
60END ; -- End of code
61 QUIT
Note: See TracBrowser for help on using the repository browser.