VAQDIS22 ;ALB/JFP - PDX, BUILDS DISPLAY ARRAY FOR MAS DATA ;01MAR93
;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
DISPMAS(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))
Q:($P(VAQSEGND,U,2)="") "-1^Invalid segment"
S VALMCNT=$S(DSP=1:OFFSET-1,1:0)
I DSP=1 S ROOT=$$ROOT^VAQDIS20(ROOT)
;
; -- Build display segment
D SCR1^VAQDIS23 ; -- MAS Screen 1
D SCR2^VAQDIS24 ; -- MAS Screen 2
D SCR3^VAQDIS25 ; -- MAS Screen 3
D SCR3^VAQDIS26 ; -- MAS Screen 3
D SCR4^VAQDIS27 ; -- MAS Screen 4
D SCR5^VAQDIS28 ; -- MAS Screen 5
D SCR6^VAQDIS29 ; -- MAS Screen 6
D SCR7^VAQDIS31 ; -- MAS Screen 7
D SCR10^VAQDIS32 ; -- MAS Screen 10
D SCR11^VAQDIS33 ; -- MAS Screen 11
D BLANK^VAQDIS20
D BLANK^VAQDIS20
;
K X
QUIT VALMCNT-OFFSET
;
END ; -- End of code
QUIT
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAQDIS22 1527 printed Oct 16, 2024@18:26:08 Page 2
VAQDIS22 ;ALB/JFP - PDX, BUILDS DISPLAY ARRAY FOR MAS DATA ;01MAR93
+1 ;;1.5;PATIENT DATA EXCHANGE;;NOV 17, 1993
DISPMAS(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 if ($PIECE(VAQSEGND,U,2)="")
QUIT "-1^Invalid segment"
+21 SET VALMCNT=$SELECT(DSP=1:OFFSET-1,1:0)
+22 IF DSP=1
SET ROOT=$$ROOT^VAQDIS20(ROOT)
+23 ;
+24 ; -- Build display segment
+25 ; -- MAS Screen 1
DO SCR1^VAQDIS23
+26 ; -- MAS Screen 2
DO SCR2^VAQDIS24
+27 ; -- MAS Screen 3
DO SCR3^VAQDIS25
+28 ; -- MAS Screen 3
DO SCR3^VAQDIS26
+29 ; -- MAS Screen 4
DO SCR4^VAQDIS27
+30 ; -- MAS Screen 5
DO SCR5^VAQDIS28
+31 ; -- MAS Screen 6
DO SCR6^VAQDIS29
+32 ; -- MAS Screen 7
DO SCR7^VAQDIS31
+33 ; -- MAS Screen 10
DO SCR10^VAQDIS32
+34 ; -- MAS Screen 11
DO SCR11^VAQDIS33
+35 DO BLANK^VAQDIS20
+36 DO BLANK^VAQDIS20
+37 ;
+38 KILL X
+39 QUIT VALMCNT-OFFSET
+40 ;
END ; -- End of code
+1 QUIT