| 1 | ANRVSITE ;BHAM/MAM - ENTER/EDIT PARAMETERS ; 4 Feb 98 / 9:00 AM
 | 
|---|
| 2 |  ;;4.0; Visual Impairment Service Team ;;12 Jun 98
 | 
|---|
| 3 | CHECK ; check to see if the entry exists
 | 
|---|
| 4 |  S ANRVOUT=0 I $O(^ANRV(2041,0)) D EDIT01 I ANRVOUT G END
 | 
|---|
| 5 |  I '$O(^ANRV(2041,0)) D CREATE I ANRVOUT G END
 | 
|---|
| 6 | EDIT ; edit all information in the VIST PARAMETER file
 | 
|---|
| 7 |  K DR S DIE=2041,DA=ANRVIFN,DR="[ANRV PARAM EDIT]" D ^DIE K DR,DIE,DA
 | 
|---|
| 8 | END ; clean up variables, quit
 | 
|---|
| 9 |  K ANRVSITE,ANRVOUT,DIC
 | 
|---|
| 10 |  Q
 | 
|---|
| 11 | EDIT01 ; edit the .01 node of the VIST PARAMETERS file
 | 
|---|
| 12 |  S ANRVIFN=$O(^ANRV(2041,0)),X=$P(^ANRV(2041,ANRVIFN,0),"^"),ANRVSITE=$P(^DIC(4,X,0),"^")
 | 
|---|
| 13 |  W !!,"The site name, "_ANRVSITE_", is already defined in the VIST PARAMETERS",!,"file.",!
 | 
|---|
| 14 |  N DIR,DIRUT,DUOUT,DTOUT,X,Y
 | 
|---|
| 15 |  S DIR(0)="Y",DIR("A")="Do you want to edit the SITE NAME in the VIST PARAMETER file",DIR("B")="No"
 | 
|---|
| 16 |  S DIR("?")="Enter ""Yes"" to edit the site name in the VIST PARAMETERS file, ""No"" to exit."
 | 
|---|
| 17 |  D ^DIR
 | 
|---|
| 18 |  I $D(DUOUT)!$D(DIRUT) S ANRVOUT=1
 | 
|---|
| 19 |  I Y'=1 W ! Q
 | 
|---|
| 20 |  W !! K DR S DIE=2041,DA=ANRVIFN,DR=.01 D ^DIE K DR,DIE,DA
 | 
|---|
| 21 |  Q
 | 
|---|
| 22 | CREATE ; create new entry
 | 
|---|
| 23 |  W !!,"There are no entries in the VIST PARAMETER file.  Only one entry can be created",!,"in this file.",!!
 | 
|---|
| 24 |  N DIR,DIRUT,DUOUT,DTOUT,X,Y
 | 
|---|
| 25 |  S DIR(0)="Y",DIR("A")="Do you want to add the SITE NAME to the VIST PARAMETER file now",DIR("B")="Yes"
 | 
|---|
| 26 |  S DIR("?")="Enter ""Yes"" to enter the site name in the VIST PARAMETERS file, ""No"" to exit."
 | 
|---|
| 27 |  D ^DIR
 | 
|---|
| 28 |  I $D(DUOUT)!$D(DIRUT) S ANRVOUT=1
 | 
|---|
| 29 |  I Y'=1 S ANRVOUT=1 Q
 | 
|---|
| 30 | NEW ; add new entry to VIST PARAMETER file
 | 
|---|
| 31 |  W !! K DIC S DIC=4,DIC(0)="QEAMZ" D ^DIC I Y<0 S ANRVOUT=1 Q
 | 
|---|
| 32 |  K DA,DIC,DO,DD,DINUM,ANRVIFN S X=+Y,DIC="^ANRV(2041,",DIC(0)="L",DLAYGO=2041 D FILE^DICN K DIC,DLAYGO S ANRVIFN=+Y
 | 
|---|
| 33 |  Q
 | 
|---|