[613] | 1 | VAQDIS01 ;ALB/JFP - DISPLAY MINIMAL DATA, DRIVER ;01MAR93
|
---|
| 2 | ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
|
---|
| 3 | EP ; -- Main entry point for the list processor
|
---|
| 4 | ;
|
---|
| 5 | PT S VAQTYPE="PT" G EP1 ; -- Minimal data extracted from ^DPT(2,
|
---|
| 6 | TR S VAQTYPE="TR" G EP1 ; -- Minimal data extracted from ^VAT(394.62,
|
---|
| 7 | ;
|
---|
| 8 | EP1 D EN^VALM("VAQ DISPLAY MINIMUM") ; -- Protocol = VAQ DIS1 (MENU)
|
---|
| 9 | QUIT
|
---|
| 10 | ;
|
---|
| 11 | INIT ; -- 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 | ;
|
---|
| 44 | TMP ; -- 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 | ;
|
---|
| 49 | HD ; -- Make header line for list processor
|
---|
| 50 | D HD1^VAQEXT02 QUIT
|
---|
| 51 | ;
|
---|
| 52 | EXIT ; -- 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 | ;
|
---|
| 60 | END ; -- End of code
|
---|
| 61 | QUIT
|
---|