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

RT200.m

Go to the documentation of this file.
  1. RT200 ;PKE/TROY; clean up 2 old DIC(3,16 references for va200
  1. ;;2.0;Record Tracking;**29**;10/22/91
  1. ;
  1. ; fix 194.5,46 REQUESTING USER for executable code to dic(3
  1. ; fix 194.5,7 AGE for person multiple in 194.51
  1. ;
  1. CHKPTS ;Create check points for post-init
  1. ;Input : All variables set by KIDS
  1. ;Output : None
  1. ;
  1. ;Declare variables
  1. N TMP
  1. ;Create check points
  1. ;
  1. ;Change REQUESTING USER entry #46 in file 194.5
  1. S TMP=$$NEWCP^XPDUTL("RT46","EN46^RT200")
  1. ;
  1. ;Change AGE entry #7 in file 194.5
  1. S TMP=$$NEWCP^XPDUTL("RT7","EN7^RT200")
  1. Q
  1. ;
  1. ;
  1. EN46 ;checkpoint entry
  1. N OFIELD,NFIELD,DR,DA,DIC,DIE,X,Y
  1. ;
  1. S DIC="^DIC(194.5,",DIC(0)="X",X="REQUESTING USER"
  1. D ^DIC
  1. I Y'>0 DO QUIT
  1. .D BMES^XPDUTL(">>> REQUESTING USER entry NOT found in File #194.5")
  1. .D BMES^XPDUTL(">>> Please check entry names and/or cross-references")
  1. .;
  1. ;
  1. S DA=+Y
  1. ;
  1. S OFIELD="S RTV(RTJ)=$S($D(^DIC(3,+$P(RTQ,""^"",3),0)):$P(^(0),""^""),1:"_"""UNKNOWN"""_")"
  1. S NFIELD="S RTV(RTJ)=$S($D(^VA(200,+$P(RTQ,""^"",3),0)):$P(^(0),""^""),1:"_"""UNKNOWN"""_")"
  1. ;
  1. ;if entry has dic(3 change it to va(200
  1. I $G(^DIC(194.5,DA,"E"))=OFIELD DO
  1. . S DIE="^DIC(194.5,"
  1. . S DR="100///^S X=NFIELD"
  1. . D ^DIE
  1. . I $G(^DIC(194.5,DA,"E"))=NFIELD DO
  1. . . D BMES^XPDUTL(">>> MUMPS CODE TO SET VARIABLE field in REQUESTING USER entry in file #194.5")
  1. . . D BMES^XPDUTL(">>> was updated to use ^VA(200.")
  1. ;
  1. I $G(^DIC(194.5,DA,"E"))'=NFIELD DO
  1. . D BMES^XPDUTL(">>> MUMPS CODE TO SET VARIABLE field for REQUESTING USER' entry in file 194.5")
  1. . D BMES^XPDUTL(">>> not found OR doesn't match patch distribution. Please check this entry.")
  1. ;
  1. QUIT
  1. ;
  1. ;
  1. EN7 ;checkpoint entry
  1. N RTDA,DINUM,DLAGO,DR,DA,DIC,DIE,X,Y
  1. ;
  1. S DIC="^DIC(194.5,",DIC(0)="X",X="AGE"
  1. D ^DIC
  1. I Y'>0 DO QUIT
  1. .D BMES^XPDUTL(">>> AGE entry NOT found in File #194.5")
  1. .D BMES^XPDUTL(">>> Please check entry names and/or cross-references")
  1. ;
  1. S (RTDA,DA)=+Y
  1. ;
  1. ; if new person entry missing, addit
  1. I '$D(^DIC(194.5,DA,50,200,0)) DO
  1. . K DD,DO
  1. . S DIC="^DIC(194.5,"_DA_",50,"
  1. . S DIC("P")=$P($G(^DD(194.5,50,0)),U,2)
  1. . S DIC(0)="L"
  1. . S DA(1)=DA
  1. . S DINUM=200
  1. . S DA="200"
  1. . S X="200"
  1. . S DLAGO=194.51
  1. . S DIC("DR")="2///5"
  1. . D FILE^DICN
  1. .;
  1. . I Y'>0 DO QUIT
  1. . . D BMES^XPDUTL(">>> Failed to add NEW PERSON entry in PARENT FILE multiple for the")
  1. . . D BMES^XPDUTL(">>> AGE entry in file #194.5")
  1. .;
  1. . I $P(Y,"^",3) DO
  1. . . D BMES^XPDUTL(">>> Added NEW PERSON entry to PARENT FILE multiple in AGE entry in file #194.5")
  1. ;
  1. S DA=RTDA
  1. ;if PERSON entry get rid of it
  1. I $D(^DIC(194.5,DA,50,16,0)) DO
  1. . S DA(1)=DA,DIK="^DIC(194.5,"_DA_",50,"
  1. . S DA=16
  1. . D ^DIK
  1. . K DIK
  1. .;
  1. . I '$D(^DIC(194.5,DA,50,16,0)) DO
  1. . . D BMES^XPDUTL(">>> Removed PERSON entry from PARENT FILE multiple of AGE entry in file #194.5")
  1. Q