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

MAGJINI.m

Go to the documentation of this file.
  1. MAGJINI ;;WIRMFO/JHC VistaRad Maintenance functions [ 07/07/1999 2:42 PM ]
  1. ;;3.0;IMAGING;;Mar 01, 2002
  1. ;990707--created routine
  1. ; Subroutines for VistaRad KIDS inits
  1. ;
  1. ENV ; "Environment Check" for KIDS Install
  1. Q
  1. KOLDDD ; K ^DD(2006.631,3),^(4),^DD(2006.631,"B","SEARCH"),^DD(2006.631,"B","SEARCH2")
  1. ; K ^DD(2006.631,"GL",3),^(4),^DD(2006.631,"SB",2006.6313,3),^DD(2006.631,"SB",2006.6314,4)
  1. Q
  1. MAG30T5A ; EP for KIDS PRE-Install init magj 3.0t5
  1. D PREFKIL
  1. Q
  1. MAG30T5B ; EP for KIDS POST-Install init magj 3.0t5
  1. D B2006631,D2006631
  1. Q
  1. MAG30T7A ; EP for KIDS PRE-Install init magj 3.0t7
  1. D BGCSTOP
  1. Q
  1. MAG30T7B ; EP for KIDS POST-Install init magj 3.0t7
  1. D BGCSTRT
  1. Q
  1. ;
  1. MAG30T8A ; EP for KIDS Pre-Install init magj 3.0t8
  1. ;D BGCSTOP
  1. Q
  1. MAG30T8B ; EP for KIDS POST-Install init magj 3.0t8
  1. D B2006631,BGCSTRT
  1. Q
  1. ;
  1. MG30T11A ; EP for KIDS Pre-Install init magj 3.0t11
  1. D BGCSTOP
  1. Q
  1. MG30T11B ; EP for KIDS POST-Install init magj 3.0t11
  1. D BUILD72,B2006631,BGCSTRT
  1. Q
  1. ;
  1. MG30T18A ; EP for KIDS Pre-Install init magj 3.0t18
  1. D INIT63
  1. Q
  1. MG30T18B ; EP for KIDS POST-Install init magj 3.0t18
  1. D B2006631
  1. Q
  1. ;
  1. BUILD72 ; copy Exam Status Category data to RAD file #72
  1. N IEN,CAT,RAIEN S IEN=0
  1. I $D(^MAG(2006.69,"FILE72")) Q ; already did this
  1. F S IEN=$O(^MAG(2006.61,IEN)) Q:'IEN S X=$G(^(IEN,0)) D
  1. . I X S RAIEN=+X,CAT=$P(X,U,2) I CAT]"",("DETW"[CAT) D
  1. . . I '$D(^RA(72,RAIEN)) Q ; should never occur, but . . .
  1. . . S DIE=72,DA=RAIEN,DR="9////"_CAT D ^DIE
  1. . . K DIE,DA,DR,DIC
  1. S ^MAG(2006.69,"FILE72")=$H
  1. Q
  1. ;
  1. BGCSTOP ; Stop Background Compile program
  1. S MAGCSTRT=0,GO=1 K RETRY
  1. K ^MAG(2006.69,"KIDS")
  1. S X=$G(^MAG(2006.69,1,0))
  1. I X]"",$P(X,U,8) D
  1. . S ^MAG(2006.69,"KIDS")=X ; save current settings for restore later
  1. . S MAGCSTRT=1
  1. . S $P(X,U,8)=0
  1. . S ^MAG(2006.69,1,0)=X ; disable compile
  1. . W !!,*7,"Wait for Background Compile program to stop;"
  1. . W !," this might take up to a few minutes."
  1. . S NTRY=100
  1. . F I=1:1:NTRY L +^XTMP("MAGJ2","BKGND2","RUN"):3 I Q
  1. . W !!,"Background Compile "
  1. . I W "Stopped; proceed with install." L -^XTMP("MAGJ2","BKGND2","RUN")
  1. . E W "NOT Stopped -- Try again? Y// " D
  1. . . R X:120 S X=$TR($E(X),"ynYN","YNYN") S RETRY="Y"[X,GO=0
  1. . . S ^MAG(2006.69,1,0)=^MAG(2006.69,"KIDS") K ^MAG(2006.69,"KIDS")
  1. I 'GO G BGCSTOP:RETRY W !!,"Exiting out of Install" S XPDQUIT=1
  1. Q
  1. BGCSTRT ; re-enable Background Compile
  1. I '$D(^MAG(2006.69,"KIDS")) Q ; had not been enabled
  1. S ^MAG(2006.69,1,0)=^MAG(2006.69,"KIDS") K ^MAG(2006.69,"KIDS")
  1. W !!,"Background Compile Enabled again"
  1. Q
  1. ;
  1. PREFKIL ; initialize the Prior Exams Logic File (Prefetch logic)
  1. I $D(^MAG(2006.65,0)) S X=^(0) D
  1. . S $P(X,U,3,4)="0^0"
  1. . K ^MAG(2006.65) S ^MAG(2006.65,0)=X
  1. Q
  1. ;
  1. D2006631 ; Clean Up old vs List Definition file
  1. K DIU S DIU=2006.6313 S DIU(0)="DS" D EN^DIU2
  1. K DIU S DIU=2006.6314 S DIU(0)="DS" D EN^DIU2
  1. K DIU
  1. Q
  1. ;
  1. INIT63 ; Initialize 2006.63 for re-create updated version
  1. ; This must always be followed by running B2006631
  1. K ^MAG(2006.63)
  1. Q
  1. ;
  1. B2006631 ; Create "DEF" nodes, Button labels for updated List Def'ns
  1. N SS,LSTDAT,LSTNUM,BUTTON,LSTTYP
  1. S SS=0
  1. F S SS=$O(^MAG(2006.631,SS)) Q:'SS S LSTDAT=$G(^(SS,0)) I LSTDAT]"" D
  1. . S LSTNUM=$P(LSTDAT,U,2),BUTTON=$P(LSTDAT,U,7),LSTTYP=$P(LSTDAT,U,3)
  1. . I LSTNUM>9900!$P(LSTDAT,U,6) D BLDDEF^MAGJMN1(SS) ; build DEF nodes for System Lists & any Enabled lists
  1. . I BUTTON="",(LSTTYP]"") D ; Create Button Labels
  1. . . S BUTTON=$S(LSTTYP="U":"Unread #",LSTTYP="R":"Recent #",LSTTYP="A":"All Active #",LSTTYP="P":"Pending #",1:"List #")_LSTNUM
  1. . . S $P(^MAG(2006.631,SS,0),U,7)=BUTTON
  1. Q
  1. END ;