VAFCMGB2 ;ALB/JRP-DEMOGRAPHIC MERGE SCREENS ;28-OCT-96
;;5.3;Registration;**149,384,479**;Aug 13, 1993
;
;NOTE: This routine contains line tags used to build the display
; screen for a List Manager interface. Refer to routine
; VAFCMGB for a description of input/output variables.
;
GROUP3 ;Line tag to build logical group number three
;
;Group three contains the following fields:
; .02, .05, .08, .211, .219, .2403, .31115
;
;Column width is limited to 28 characters
;
;Declare variables
N IENS,TARGET,MESSAGE,LINE,DATA,LOCAL,REMOTE,DIFF
S TARGET="^TMP(""VAFC-MERGE-TO"","_$J_",""DATA"")"
S MESSAGE="^TMP(""VAFC-MERGE-TO"","_$J_",""MESSAGE"")"
;Initialize global locations
K @TARGET,@MESSAGE
;Set group index
S @VALMAR@("GRP",3)=VALMCNT
;Get local data for patient
D GETDATA^VAFCMGU0(VAFCDFN,3,TARGET,MESSAGE)
;Build display
S IENS=VAFCDFN_","
;Sex
S LOCAL=$$LOCAL^VAFCMGB0(2,.02,IENS,TARGET)
S REMOTE=$$REMOTE^VAFCMGB0(2,.02)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.02,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_" 7" ;**479 12 to 7
S:DIFF&($P($G(@VAFCARR@(2,.02)),U,2)) LINE="->"_" 7" ;**479 12 to 7
S DATA="Sex: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,15)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,7)="" ;**479 12 to 7
I (DIFF) D
.S @VALMAR@("E2F",7,1)="2^.02" ;**479 12 to 7
.S @VALMAR@("E2G",7)=3 ;**479 12 to 7
I ('DIFF) D
.K @VALMAR@("E2F",7) ;**479 12 to 7
.K @VALMAR@("E2G",7) ;**479 12 to 7
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Marital status
S LOCAL=$$LOCAL^VAFCMGB0(2,.05,IENS,TARGET)
S LOCAL=$E(LOCAL,1,28)
S REMOTE=$$REMOTE^VAFCMGB0(2,.05)
S REMOTE=$E(REMOTE,1,28)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.05,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_" 8" ;**479 13 to 8
S:DIFF&($P($G(@VAFCARR@(2,.05)),U,2)) LINE="->"_" 8" ;**479 13 to 8
S DATA="Marital: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,11)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,8)="" ;**479 13 to 8
I (DIFF) D
.S @VALMAR@("E2F",8,1)="2^.05" ;**479 13 to 8
.S @VALMAR@("E2G",8)=3 ;**479 13 to 8
I ('DIFF) D
.K @VALMAR@("E2F",8) ;**479 13 to 8
.K @VALMAR@("E2G",8) ;**479 13 to 8
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Religion
S LOCAL=$$LOCAL^VAFCMGB0(2,.08,IENS,TARGET)
S LOCAL=$E(LOCAL,1,28)
S REMOTE=$$REMOTE^VAFCMGB0(2,.08)
S REMOTE=$E(REMOTE,1,28)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.08,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_" 9" ;**479 14 to 9
S:DIFF&($P($G(@VAFCARR@(2,.08)),U,2)) LINE="->"_" 9" ;**479 14 to 9
S DATA="Religion: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,10)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,9)="" ;**479 14 to 9
I (DIFF) D
.S @VALMAR@("E2F",9,1)="2^.08" ;**479 14 to 9
.S @VALMAR@("E2G",9)=3 ;**479 14 to 9
I ('DIFF) D
.K @VALMAR@("E2F",9) ;**479 14 to 9
.K @VALMAR@("E2G",9) ;**479 14 to 9
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Mother's maiden name
S LOCAL=$$LOCAL^VAFCMGB0(2,.2403,IENS,TARGET)
S LOCAL=$E(LOCAL,1,28)
S REMOTE=$$REMOTE^VAFCMGB0(2,.2403)
S REMOTE=$E(REMOTE,1,28)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.2403,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_"10" ;**479 15 to 10
S:DIFF&($P($G(@VAFCARR@(2,.2403)),U,2)) LINE="->"_"10" ;**479 15 to 10
S DATA="Mom's Maiden: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,6)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,10)="" ;**479 15 to 10
I (DIFF) D
.S @VALMAR@("E2F",10,1)="2^.2403" ;**479 15 to 10
.S @VALMAR@("E2G",10)=3 ;**479 15 to 10
I ('DIFF) D
.K @VALMAR@("E2F",10) ;**479 15 to 10
.K @VALMAR@("E2G",10) ;**479 15 to 10
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Employment status
S LOCAL=$$LOCAL^VAFCMGB0(2,.31115,IENS,TARGET)
S LOCAL=$E(LOCAL,1,28)
S REMOTE=$$REMOTE^VAFCMGB0(2,.31115)
S REMOTE=$E(REMOTE,1,28)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.31115,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_"11" ;**479 16 to 11
S:DIFF&($P($G(@VAFCARR@(2,.31115)),U,2)) LINE="->"_"11" ;**479 16 to 11
S DATA="Employ Stat: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,7)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,11)="" ;**479 16 to 11
I (DIFF) D
.S @VALMAR@("E2F",11,1)="2^.31115" ;**479 16 to 11
.S @VALMAR@("E2G",11)=3 ;**479 16 to 11
I ('DIFF) D
.K @VALMAR@("E2F",11) ;**479 16 to 11
.K @VALMAR@("E2G",11) ;**479 16 to 11
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Next of kin's name
S LOCAL=$$LOCAL^VAFCMGB0(2,.211,IENS,TARGET)
S LOCAL=$E(LOCAL,1,28)
S REMOTE=$$REMOTE^VAFCMGB0(2,.211)
S REMOTE=$E(REMOTE,1,28)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.211,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_"12" ;**479 17 to 12
S:DIFF&($P($G(@VAFCARR@(2,.211)),U,2)) LINE="->"_"12" ;**384 ;**479 17 to 12
S DATA="NOK Name: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,10)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,12)="" ;**479 17 to 12
I (DIFF) D
.S @VALMAR@("E2F",12,1)="2^.211" ;**479 17 to 12
.S @VALMAR@("E2G",12)=3 ;**479 17 to 12
I ('DIFF) D
.K @VALMAR@("E2F",12) ;**479 17 to 12
.K @VALMAR@("E2G",12) ;**479 17 to 12
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Next of kin's phone number
S LOCAL=$$LOCAL^VAFCMGB0(2,.219,IENS,TARGET)
S LOCAL=$E(LOCAL,1,28)
S REMOTE=$$REMOTE^VAFCMGB0(2,.219)
S REMOTE=$E(REMOTE,1,28)
S DIFF=$$DIFFCHK^VAFCMGB0(2,.219,IENS,TARGET)
S LINE=$S(DIFF:"**",1:" ")_"13" ;**479 18 to 13
S:DIFF&($P($G(@VAFCARR@(2,.219)),U,2)) LINE="->"_"13" ;**384 ;**479 18 to 13
S DATA="NOK Phone #: "_LOCAL
S LINE=$$INSERT^VAFCMGU0(DATA,LINE,7)
S @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
S @VALMAR@("IDX",VALMCNT,13)="" ;**479 18 to 13
I (DIFF) D
.S @VALMAR@("E2F",13,1)="2^.219" ;**479 18 to 13
.S @VALMAR@("E2G",13)=3 ;**479 18 to 13
I ('DIFF) D
.K @VALMAR@("E2F",13) ;**479 18 to 13
.K @VALMAR@("E2G",13) ;**479 18 to 13
W:(+$G(VAFCDOTS)) "."
S VALMCNT=VALMCNT+1
;Done
K @TARGET,@MESSAGE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HVAFCMGB2 6112 printed Oct 16, 2024@19:02:23 Page 2
VAFCMGB2 ;ALB/JRP-DEMOGRAPHIC MERGE SCREENS ;28-OCT-96
+1 ;;5.3;Registration;**149,384,479**;Aug 13, 1993
+2 ;
+3 ;NOTE: This routine contains line tags used to build the display
+4 ; screen for a List Manager interface. Refer to routine
+5 ; VAFCMGB for a description of input/output variables.
+6 ;
GROUP3 ;Line tag to build logical group number three
+1 ;
+2 ;Group three contains the following fields:
+3 ; .02, .05, .08, .211, .219, .2403, .31115
+4 ;
+5 ;Column width is limited to 28 characters
+6 ;
+7 ;Declare variables
+8 NEW IENS,TARGET,MESSAGE,LINE,DATA,LOCAL,REMOTE,DIFF
+9 SET TARGET="^TMP(""VAFC-MERGE-TO"","_$JOB_",""DATA"")"
+10 SET MESSAGE="^TMP(""VAFC-MERGE-TO"","_$JOB_",""MESSAGE"")"
+11 ;Initialize global locations
+12 KILL @TARGET,@MESSAGE
+13 ;Set group index
+14 SET @VALMAR@("GRP",3)=VALMCNT
+15 ;Get local data for patient
+16 DO GETDATA^VAFCMGU0(VAFCDFN,3,TARGET,MESSAGE)
+17 ;Build display
+18 SET IENS=VAFCDFN_","
+19 ;Sex
+20 SET LOCAL=$$LOCAL^VAFCMGB0(2,.02,IENS,TARGET)
+21 SET REMOTE=$$REMOTE^VAFCMGB0(2,.02)
+22 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.02,IENS,TARGET)
+23 ;**479 12 to 7
SET LINE=$SELECT(DIFF:"**",1:" ")_" 7"
+24 ;**479 12 to 7
if DIFF&($PIECE($GET(@VAFCARR@(2,.02)),U,2))
SET LINE="->"_" 7"
+25 SET DATA="Sex: "_LOCAL
+26 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,15)
+27 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+28 ;**479 12 to 7
SET @VALMAR@("IDX",VALMCNT,7)=""
+29 IF (DIFF)
Begin DoDot:1
+30 ;**479 12 to 7
SET @VALMAR@("E2F",7,1)="2^.02"
+31 ;**479 12 to 7
SET @VALMAR@("E2G",7)=3
End DoDot:1
+32 IF ('DIFF)
Begin DoDot:1
+33 ;**479 12 to 7
KILL @VALMAR@("E2F",7)
+34 ;**479 12 to 7
KILL @VALMAR@("E2G",7)
End DoDot:1
+35 if (+$GET(VAFCDOTS))
WRITE "."
+36 SET VALMCNT=VALMCNT+1
+37 ;Marital status
+38 SET LOCAL=$$LOCAL^VAFCMGB0(2,.05,IENS,TARGET)
+39 SET LOCAL=$EXTRACT(LOCAL,1,28)
+40 SET REMOTE=$$REMOTE^VAFCMGB0(2,.05)
+41 SET REMOTE=$EXTRACT(REMOTE,1,28)
+42 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.05,IENS,TARGET)
+43 ;**479 13 to 8
SET LINE=$SELECT(DIFF:"**",1:" ")_" 8"
+44 ;**479 13 to 8
if DIFF&($PIECE($GET(@VAFCARR@(2,.05)),U,2))
SET LINE="->"_" 8"
+45 SET DATA="Marital: "_LOCAL
+46 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,11)
+47 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+48 ;**479 13 to 8
SET @VALMAR@("IDX",VALMCNT,8)=""
+49 IF (DIFF)
Begin DoDot:1
+50 ;**479 13 to 8
SET @VALMAR@("E2F",8,1)="2^.05"
+51 ;**479 13 to 8
SET @VALMAR@("E2G",8)=3
End DoDot:1
+52 IF ('DIFF)
Begin DoDot:1
+53 ;**479 13 to 8
KILL @VALMAR@("E2F",8)
+54 ;**479 13 to 8
KILL @VALMAR@("E2G",8)
End DoDot:1
+55 if (+$GET(VAFCDOTS))
WRITE "."
+56 SET VALMCNT=VALMCNT+1
+57 ;Religion
+58 SET LOCAL=$$LOCAL^VAFCMGB0(2,.08,IENS,TARGET)
+59 SET LOCAL=$EXTRACT(LOCAL,1,28)
+60 SET REMOTE=$$REMOTE^VAFCMGB0(2,.08)
+61 SET REMOTE=$EXTRACT(REMOTE,1,28)
+62 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.08,IENS,TARGET)
+63 ;**479 14 to 9
SET LINE=$SELECT(DIFF:"**",1:" ")_" 9"
+64 ;**479 14 to 9
if DIFF&($PIECE($GET(@VAFCARR@(2,.08)),U,2))
SET LINE="->"_" 9"
+65 SET DATA="Religion: "_LOCAL
+66 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,10)
+67 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+68 ;**479 14 to 9
SET @VALMAR@("IDX",VALMCNT,9)=""
+69 IF (DIFF)
Begin DoDot:1
+70 ;**479 14 to 9
SET @VALMAR@("E2F",9,1)="2^.08"
+71 ;**479 14 to 9
SET @VALMAR@("E2G",9)=3
End DoDot:1
+72 IF ('DIFF)
Begin DoDot:1
+73 ;**479 14 to 9
KILL @VALMAR@("E2F",9)
+74 ;**479 14 to 9
KILL @VALMAR@("E2G",9)
End DoDot:1
+75 if (+$GET(VAFCDOTS))
WRITE "."
+76 SET VALMCNT=VALMCNT+1
+77 ;Mother's maiden name
+78 SET LOCAL=$$LOCAL^VAFCMGB0(2,.2403,IENS,TARGET)
+79 SET LOCAL=$EXTRACT(LOCAL,1,28)
+80 SET REMOTE=$$REMOTE^VAFCMGB0(2,.2403)
+81 SET REMOTE=$EXTRACT(REMOTE,1,28)
+82 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.2403,IENS,TARGET)
+83 ;**479 15 to 10
SET LINE=$SELECT(DIFF:"**",1:" ")_"10"
+84 ;**479 15 to 10
if DIFF&($PIECE($GET(@VAFCARR@(2,.2403)),U,2))
SET LINE="->"_"10"
+85 SET DATA="Mom's Maiden: "_LOCAL
+86 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,6)
+87 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+88 ;**479 15 to 10
SET @VALMAR@("IDX",VALMCNT,10)=""
+89 IF (DIFF)
Begin DoDot:1
+90 ;**479 15 to 10
SET @VALMAR@("E2F",10,1)="2^.2403"
+91 ;**479 15 to 10
SET @VALMAR@("E2G",10)=3
End DoDot:1
+92 IF ('DIFF)
Begin DoDot:1
+93 ;**479 15 to 10
KILL @VALMAR@("E2F",10)
+94 ;**479 15 to 10
KILL @VALMAR@("E2G",10)
End DoDot:1
+95 if (+$GET(VAFCDOTS))
WRITE "."
+96 SET VALMCNT=VALMCNT+1
+97 ;Employment status
+98 SET LOCAL=$$LOCAL^VAFCMGB0(2,.31115,IENS,TARGET)
+99 SET LOCAL=$EXTRACT(LOCAL,1,28)
+100 SET REMOTE=$$REMOTE^VAFCMGB0(2,.31115)
+101 SET REMOTE=$EXTRACT(REMOTE,1,28)
+102 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.31115,IENS,TARGET)
+103 ;**479 16 to 11
SET LINE=$SELECT(DIFF:"**",1:" ")_"11"
+104 ;**479 16 to 11
if DIFF&($PIECE($GET(@VAFCARR@(2,.31115)),U,2))
SET LINE="->"_"11"
+105 SET DATA="Employ Stat: "_LOCAL
+106 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,7)
+107 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+108 ;**479 16 to 11
SET @VALMAR@("IDX",VALMCNT,11)=""
+109 IF (DIFF)
Begin DoDot:1
+110 ;**479 16 to 11
SET @VALMAR@("E2F",11,1)="2^.31115"
+111 ;**479 16 to 11
SET @VALMAR@("E2G",11)=3
End DoDot:1
+112 IF ('DIFF)
Begin DoDot:1
+113 ;**479 16 to 11
KILL @VALMAR@("E2F",11)
+114 ;**479 16 to 11
KILL @VALMAR@("E2G",11)
End DoDot:1
+115 if (+$GET(VAFCDOTS))
WRITE "."
+116 SET VALMCNT=VALMCNT+1
+117 ;Next of kin's name
+118 SET LOCAL=$$LOCAL^VAFCMGB0(2,.211,IENS,TARGET)
+119 SET LOCAL=$EXTRACT(LOCAL,1,28)
+120 SET REMOTE=$$REMOTE^VAFCMGB0(2,.211)
+121 SET REMOTE=$EXTRACT(REMOTE,1,28)
+122 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.211,IENS,TARGET)
+123 ;**479 17 to 12
SET LINE=$SELECT(DIFF:"**",1:" ")_"12"
+124 ;**384 ;**479 17 to 12
if DIFF&($PIECE($GET(@VAFCARR@(2,.211)),U,2))
SET LINE="->"_"12"
+125 SET DATA="NOK Name: "_LOCAL
+126 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,10)
+127 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+128 ;**479 17 to 12
SET @VALMAR@("IDX",VALMCNT,12)=""
+129 IF (DIFF)
Begin DoDot:1
+130 ;**479 17 to 12
SET @VALMAR@("E2F",12,1)="2^.211"
+131 ;**479 17 to 12
SET @VALMAR@("E2G",12)=3
End DoDot:1
+132 IF ('DIFF)
Begin DoDot:1
+133 ;**479 17 to 12
KILL @VALMAR@("E2F",12)
+134 ;**479 17 to 12
KILL @VALMAR@("E2G",12)
End DoDot:1
+135 if (+$GET(VAFCDOTS))
WRITE "."
+136 SET VALMCNT=VALMCNT+1
+137 ;Next of kin's phone number
+138 SET LOCAL=$$LOCAL^VAFCMGB0(2,.219,IENS,TARGET)
+139 SET LOCAL=$EXTRACT(LOCAL,1,28)
+140 SET REMOTE=$$REMOTE^VAFCMGB0(2,.219)
+141 SET REMOTE=$EXTRACT(REMOTE,1,28)
+142 SET DIFF=$$DIFFCHK^VAFCMGB0(2,.219,IENS,TARGET)
+143 ;**479 18 to 13
SET LINE=$SELECT(DIFF:"**",1:" ")_"13"
+144 ;**384 ;**479 18 to 13
if DIFF&($PIECE($GET(@VAFCARR@(2,.219)),U,2))
SET LINE="->"_"13"
+145 SET DATA="NOK Phone #: "_LOCAL
+146 SET LINE=$$INSERT^VAFCMGU0(DATA,LINE,7)
+147 SET @VALMAR@(VALMCNT,0)=$$INSERT^VAFCMGU0(REMOTE,LINE,50)
+148 ;**479 18 to 13
SET @VALMAR@("IDX",VALMCNT,13)=""
+149 IF (DIFF)
Begin DoDot:1
+150 ;**479 18 to 13
SET @VALMAR@("E2F",13,1)="2^.219"
+151 ;**479 18 to 13
SET @VALMAR@("E2G",13)=3
End DoDot:1
+152 IF ('DIFF)
Begin DoDot:1
+153 ;**479 18 to 13
KILL @VALMAR@("E2F",13)
+154 ;**479 18 to 13
KILL @VALMAR@("E2G",13)
End DoDot:1
+155 if (+$GET(VAFCDOTS))
WRITE "."
+156 SET VALMCNT=VALMCNT+1
+157 ;Done
+158 KILL @TARGET,@MESSAGE
+159 QUIT