VAQDIS40 ;ALB/JFP - PDX, BUILDS DISPLAY ARRAY FOR PHA DATA ;01MAR93
;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
DISPMP(XTRCT,SEGPTR,ROOT,OFFSET,DSP) ;SAMPLE DISPLAY METHOD
;INPUT : XTRCT - Input array (full global reference)
; SEGPTR - Segment to extract (ptr to file #394.71)
; ROOT - Output array (full global reference)
; OFFSET - Starting line for display
; DSP - Flag to set display option (1-on,0-off)
;OUTPUT: n - Number of lines added to display
; -1^ErrorText - Error
;
; -- Check input
Q:('$D(XTRCT)) "-1^Input array not passed on input"
Q:('$D(SEGPTR)) "-1^Segment not passed on input"
Q:('$D(ROOT)) "-1^Output array not passed on input"
Q:('$D(OFFSET)) "-1^Starting line for display not passed on input"
;
S:('$D(DSP)) DSP=1
; -- Declare variables
N X,VAQSEGND,VALMCNT
;
S VAQSEGND=$G(^VAT(394.71,SEGPTR,0))
S VAQSEGNM=$P(VAQSEGND,U,2)
Q:(VAQSEGNM="") "-1^Invalid segment"
S VALMCNT=$S(DSP=1:OFFSET-1,1:0)
I DSP=1 S ROOT=$$ROOT^VAQDIS20(ROOT)
;
; -- Build display segment
S FORMTYPE=$S(VAQSEGNM="PDX*MPS":0,1:1)
S X=$$PRINT^VAQDIS41(FORMTYPE)
; -- Clean up variables
K X,VAQSEGND,VAQSEGNM,TMP,ROOT,FORMTYPE
; -- End
QUIT VALMCNT-OFFSET
;
END ; -- End of code
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQDIS40 1290 printed Nov 22, 2024@17:35:39 Page 2
VAQDIS40 ;ALB/JFP - PDX, BUILDS DISPLAY ARRAY FOR PHA DATA ;01MAR93
+1 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
DISPMP(XTRCT,SEGPTR,ROOT,OFFSET,DSP) ;SAMPLE DISPLAY METHOD
+1 ;INPUT : XTRCT - Input array (full global reference)
+2 ; SEGPTR - Segment to extract (ptr to file #394.71)
+3 ; ROOT - Output array (full global reference)
+4 ; OFFSET - Starting line for display
+5 ; DSP - Flag to set display option (1-on,0-off)
+6 ;OUTPUT: n - Number of lines added to display
+7 ; -1^ErrorText - Error
+8 ;
+9 ; -- Check input
+10 if ('$DATA(XTRCT))
QUIT "-1^Input array not passed on input"
+11 if ('$DATA(SEGPTR))
QUIT "-1^Segment not passed on input"
+12 if ('$DATA(ROOT))
QUIT "-1^Output array not passed on input"
+13 if ('$DATA(OFFSET))
QUIT "-1^Starting line for display not passed on input"
+14 ;
+15 if ('$DATA(DSP))
SET DSP=1
+16 ; -- Declare variables
+17 NEW X,VAQSEGND,VALMCNT
+18 ;
+19 SET VAQSEGND=$GET(^VAT(394.71,SEGPTR,0))
+20 SET VAQSEGNM=$PIECE(VAQSEGND,U,2)
+21 if (VAQSEGNM="")
QUIT "-1^Invalid segment"
+22 SET VALMCNT=$SELECT(DSP=1:OFFSET-1,1:0)
+23 IF DSP=1
SET ROOT=$$ROOT^VAQDIS20(ROOT)
+24 ;
+25 ; -- Build display segment
+26 SET FORMTYPE=$SELECT(VAQSEGNM="PDX*MPS":0,1:1)
+27 SET X=$$PRINT^VAQDIS41(FORMTYPE)
+28 ; -- Clean up variables
+29 KILL X,VAQSEGND,VAQSEGNM,TMP,ROOT,FORMTYPE
+30 ; -- End
+31 QUIT VALMCNT-OFFSET
+32 ;
END ; -- End of code
+1 QUIT