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

ESPORO.m

Go to the documentation of this file.
ESPORO ;DALISC/CKA-OPEN A CLOSED OFFENSE REPORT;11/92
 ;;1.0;POLICE & SECURITY;;Mar 31, 1994
EN ;
 D DT^DICRW
OR S DIC(0)="AEMZ",DIC("A")="UOR#: ",DIC("S")="I $D(^(5)),$P(^(5),U,5),$P(^(0),U,8)=""C""",DIC="^ESP(912,"
 D ^DIC
 G:$D(DTOUT)!($D(DUOUT))!(X="") EXIT
 G:Y<0 OR S ESPDTR=$P(^ESP(912,+Y,0),U,2),(ESPOFN,ESPID)=+Y
OP ;OPEN CLOSED REPORT
 D NOW^%DTC
 S NOW=X,$P(^ESP(912,ESPID,0),U,8)="O",$P(^(5),U,5)="R"
 W !?5,$C(7),"This report is now open and may be edited."
 ;COPY REOPENED REPORT TO A NEW ID # IN OFFENSE REPORT FILE
 K DD,D0 S DIC="^ESP(912,",DIC(0)="L",DLAYGO=912 D OFF^ESPOID D FILE^DICN
 S ESPOFN=+Y
 L +^ESP(912,ESPOFN):1 I '$T W !,"Another user is editing this record!!"
 S %X="^ESP(912,"_ESPID_",",%Y="^ESP(912,"_ESPOFN_"," D %XY^%RCR
 S $P(^ESP(912,ESPOFN,0),U)=ESPOFN,$P(^(5),U,5)=1,$P(^(6),U)=ESPID,$P(^(6),U,2)=NOW,$P(^(6),U,3)=DUZ
 ;CROSS REFERENCES SET
 S DIK="^ESP(912,",DA=ESPOFN D IX1^DIK K DIK,DA
 L -^ESP(912,ESPOFN)
EDIT ;CALL TO ESPOFFE TO PRINT/EDIT REPORT
 S ESPVAR=2,ESPID=ESPOFN D PRT^ESPOFFE
EXIT K %ZIS,DA,DIE,DIR,DIRUT,DR,ESPID,ESPN,ESPOFN,ESPVAR,NOW,POP,Y,ZTDESC,ZTRTN,ZTSAVE Q