Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: VAQDIS25

VAQDIS25.m

Go to the documentation of this file.
VAQDIS25 ;ALB/JFP,JRP - PDX, BUILDS DISPLAY ARRAY FOR MAS DATA ;01MAR93
 ;;1.5;PATIENT DATA EXCHANGE;**13**;NOV 17, 1993
SCR3 ; -- Builds MAS DATA SCREEN 3, NEXT OF KIN
ROW0 ; -- Header
 D BLANK^VAQDIS20
 S VAQLN=$$REPEAT^VAQUTL1(" ",79)
 S VAQCTR=" -- NEXT OF KIN  -- "
 S X=$$CENTER^VAQDIS20(VAQLN,VAQCTR)
 D TMP,BLANK^VAQDIS20
 K VAQLN,VAQCTR
ROW1 ;
 S VAQTMP=$G(@XTRCT@("VALUE",2,.211,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Nok: "_VAQINF,"",10,46)
 S VAQTMP=$G(@XTRCT@("VALUE",2,.2191,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Nok-2: "_VAQINF,X,47,32)
 D TMP K VAQTMP,VAQINF
ROW2 ;
 S VAQTMP=$G(@XTRCT@("VALUE",2,.212,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Relation: "_VAQINF,"",5,43)
 S VAQTMP=$G(@XTRCT@("VALUE",2,.2192,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Relation: "_VAQINF,X,44,37)
 D TMP K VAQTMP,VAQINF
 ;
NOK ; -- NOK Address
 K ADDR
 S VAQTMP=1
 F VAQX=.213,.214,.215 D  Q:(VAQINF="")
 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
 .I ((VAQX=.213)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
 .Q:(VAQINF="")
 .S ADDR(VAQTMP)=VAQINF
 .S VAQTMP=VAQTMP+1
 S CTY=$G(@XTRCT@("VALUE",2,.216,0))
 S ZIP=$G(@XTRCT@("VALUE",2,.2207,0))
 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.217,0)))
 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
 S ADDR(VAQTMP)=VAQINF
NOK2 ;NOK-2 Address
 K ADDRT
 S VAQTMP=1
 F VAQX=.2193,.2194,.2195 D  Q:(VAQINF="")
 .S VAQINF=$G(@XTRCT@("VALUE",2,VAQX,0))
 .I ((VAQX=.2193)&(VAQINF="")) S VAQINF="STREET ADDRESS UNKNOWN"
 .Q:(VAQINF="")
 .S ADDRT(VAQTMP)=VAQINF
 .S VAQTMP=VAQTMP+1
 S CTY=$G(@XTRCT@("VALUE",2,.2196,0))
 S ZIP=$G(@XTRCT@("VALUE",2,.2203,0))
 S STATE=$$STATE^VAQDIS20($G(@XTRCT@("VALUE",2,.2197,0)))
 S VAQINF=$S((CTY="")&(STATE="")&(ZIP=""):"CITY/STATE/ZIP UNKNOWN",1:CTY_$S(STATE="":" ",1:", ")_STATE_" "_ZIP)
 S ADDRT(VAQTMP)=VAQINF
 D ADRLOAD
 K ADDR,ADDRT,VAQTMP,VAQINF,VAQX,CTY,STATE,ZIP
 ;
ROW5 ; -- Phone
 S VAQTMP=$G(@XTRCT@("VALUE",2,.219,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Phone: "_VAQINF,"",8,46)
 S VAQTMP=$G(@XTRCT@("VALUE",2,.2199,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Phone: "_VAQINF,X,47,32)
 D TMP K VAQTMP,VAQINF
 ;
ROW6 ; -- Work Phone
 S VAQTMP=$G(@XTRCT@("VALUE",2,.21011,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,"",3,41)
 S VAQTMP=$G(@XTRCT@("VALUE",2,.211011,0))
 S VAQINF=$S(VAQTMP="":"UNANSWERED",1:VAQTMP)
 S X=$$SETSTR^VALM1("Work Phone: "_VAQINF,X,42,37)
 D TMP K VAQTMP,VAQINF
 ;
 D BLANK^VAQDIS20
EXIT ; -- Sets the number of lines in display
 QUIT
 ;
ADRLOAD ; -- Loads addresses into display array
 F VAQX=1:1:4 D
 .S VAQINF=""
 .S:($D(ADDR(VAQX))) VAQINF=$$SETSTR^VALM1(ADDR(VAQX),VAQINF,15,53)
 .S:($D(ADDRT(VAQX))) VAQINF=$$SETSTR^VALM1(ADDRT(VAQX),VAQINF,54,25)
 .Q:(VAQINF="")
 .S VALMCNT=VALMCNT+1
 .S @ROOT@(VALMCNT,0)=$E(VAQINF,1,79)
 Q
 ;
TMP ; -- Sets up display array
 S VALMCNT=VALMCNT+1
 S @ROOT@(VALMCNT,0)=$E(X,1,79)
 QUIT
 ;
END ; -- End of code
 QUIT