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

VAFCMGB2.m

Go to the documentation of this file.
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