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

ESPREG.m

Go to the documentation of this file.
  1. ESPREG ;DALISC/CKA- EDIT REGISTRATION PROGRAM ;5/91
  1. ;;1.0;POLICE & SECURITY;;Mar 31, 1994
  1. EN ;
  1. S DIR(0)="910.2,.04" D ^DIR K DIR G:$D(DIRUT) EXIT S ESPRT=$S($D(Y(0)):Y(0),X'?1N:X,1:""),ESPRT(1)=+Y
  1. NAM W ! S DIR(0)="P^910:EMZ" D ^DIR K DIR G:$D(DIRUT) EXIT S ESPFN=+Y,ESPNAM=$P(Y,U,2) D REG G ESPREG
  1. ;
  1. REG S DIR(0)="FO:1:30",DIR("A")="Select VA TAG ID",DIR("?")="^S D=""B"",DZ=""??"",DIC=""^ESP(910.2,"",DIC(0)=""AEQZ"",DIC(""S"")=""I $P(^(0),U,4)=ESPRT(1)&($P(^(0),U,3)=ESPFN)"" D DQ^DICQ K DIC" D ^DIR K DIR G:'Y EXIT
  1. S DIC="^ESP(910.2,",DIC("S")="I $P(^(0),""^"",4)=ESPRT(1)",DIC(0)="E" D ^DIC K DIC G:Y'>0 MES S ESPY=Y I '$D(^ESP(910.2,+Y,0)) W !!,"Invalid selection made...try again please!",$C(7) G REG
  1. DISPLAY ;Show the record to be edited
  1. S DIC="^ESP(910.2,",DA=+ESPY D EN^DIQ
  1. EDIT ;
  1. L +^ESP(910.2,+ESPY):0 E W !!?5,"Record is in use. Try later.",!,$C(7) G REG
  1. S DIE="^ESP(910.2,",DA=+ESPY,DR=".01DECAL NO.;.02:.07",DR=DR_";"_$P($T(DR+ESPRT(1)),";;",2) D ^DIE L -^ESP(910.2,+ESPY) K DR,DIE G:'$D(ESPVAR) REG G EXIT
  1. ;
  1. DR ;
  1. ;;1.01:1.09;20
  1. ;;4.01:4.05;20
  1. ;;2.01:2.08;20
  1. ;;3.01:3.08;20
  1. ;;5.02;20
  1. ;;10;5;20
  1. EXIT W:$D(DTOUT) $C(7)
  1. K ESPNAM,ESPRT,ESPRTD,ESPY QUIT
  1. MES ;
  1. I ESPRT(1)=1 W !,$C(7),ESPNAM," does not have a vehicle registered with this decal." E W !,$C(7),ESPNAM," does not have this va tag id."
  1. G REG