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

ENSP.m

Go to the documentation of this file.
ENSP ;(WASH ISC)/WDS@Charleston-Space File Driver ; 5/31/12 2:28pm
 ;;7.0;ENGINEERING;**91**;Aug 17, 1993;Build 9
 ;
V D:'$D(DT) DT^DICRW S U="^",S=";",O=$T(OPT) I $D(^DOPT($P(O,S,5),"VERSION")),($P($T(V),S,3)=^DOPT($P(O,S,5),"VERSION")) G IN
 K ^DOPT($P(O,S,5))
 F I=1:1 Q:$T(OPT+I)=""  S ^DOPT($P(O,S,5),I,0)=$P($T(OPT+I),S,3),^DOPT($P(O,S,5),"B",$P($P($T(OPT+I),S,3),"^",1),I)=""
 S K=I-1,^DOPT($P(O,S,5),0)=$P(O,S,4)_U_1_U_K_U_K K I,K,X S ^DOPT($P(O,S,5),"VERSION")=$P($T(V),S,3)
IN I $P(O,S,6)'="" D @($P(O,S,6))
PR S O=$T(OPT),S=";" S IOP="HOME" D ^%ZIS W:IOST'["PK-" @IOF K IOP
 D HDR F J=1:1 Q:'$D(^DOPT($P(O,S,5),J,0))  W !,?15,J,". ",$P(^DOPT($P(O,S,5),J,0),U,1)
RE W ! S DIC("A")="Select "_$P($T(OPT),S,4)_": EXIT// ",DIC="^DOPT("_""""_$P($T(OPT),S,5)_""""_",",DIC(0)="AEQMN" D ^DIC G:X=""!(X=U) EXIT G:Y<0 RE K DIC,J,O D @($P($T(OPT+Y),S,4)) G PR
HDR W @IOF,!!,?18,"ENGINEERING SPACE/FACILITY MANAGEMENT",!
 Q
SP ;Room enter/edit
 W !! S (DIC,DIE)="^ENG(""SP"",",DR=$S($D(^DIE("B","ENZSPENTER")):"[ENZSPENTER]",1:"[ENSPENTER]")
 S DIC(0)="AEQLM",DLAYGO=6928 D FMUT
 K DLAYGO
 G EXIT
 ;
EMKY ;RECORD KEY DISTRIBUTION
 W !! S (DIC,DIE)="^ENG(""KEY"",",DIC(0)="AEQLM",DLAYGO=6926
 D FMUT
 K DLAYGO
 G EXIT
 ;
KLOCK ;LOCK/KEY NUMBER DISTRIBUTION
 W !! S DR=".01:2",(DIC,DIE)="^ENG(""LK"",",DIC(0)="AEQLM",DLAYGO=6927
 D FMUT
 K DLAYGO
 G EXIT
 ;
PREMP ;PRINT LIST OF EMPLOYEES WITH KEYS
 S L="0",DIC="^ENG(""KEY"",",FLDS="[ENSPPREMP]",BY=".01" G PRINT
PRSRV ;PRINT LIST OF EMPLOYEES BY SERVICE
 S DHD="Service Key Holders by Employee Name"
 S L="0",DIC="^ENG(""KEY"",",FLDS="[ENSPPREMP]",BY="#.4,.01" G PRINT
PRKEY ;PRINT LIST OF KEYS WITH EMPLOYEES
 S L="0",DIC="^ENG(""LK"",",FLDS="[ENSPPRKEY]",BY=".01" G PRINT
PRRM ;Print ROOMS
 D SET S BY=".5,.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 G PRINT
PRSER ;Rooms by SERVICE
 D SET S DHD="ENGINEERING SPACE INVENTORY BY OWNING SERVICE",BY=".5,+1.5,@.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 D SUM G PRINT
PRFUNC ;Rooms by FUNCTION
 D SET S DHD="ENGINEERING SPACE INVENTORY BY ROOM FUNCTION",BY=".5,+2.6,@.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 D SUM G PRINT
PRBLDG ;Space Survey by BUILDING
 D SET S DHD="ENGINEERING SPACE INVENTORY BY BUILDING",BY="+.5,@.01" S:ENMULT BY=".6,"_BY D FLDS^ENSP1 D SUM G PRINT
PR144 ;PRINT RCS 14-4 REPORTABLE SPACE
 D SET S DHD="RCS 14-4 REPORTABLE SPACE SORTED BY SERVICE",FLDS="[ENSPR144]"
 I ENMULT S BY="16,.6,.5,+1.5;S1",FR="YES,?,?,?",TO="YESZ,?,?,?"
 E  S BY="16,.5,+1.5;S1",FR="YES,?,?",TO="YESZ,?,?"
 G PRINT
 ;
PR137 ;BLDG MNGT (137) AMIS REPORT
 D SET S DHD="BUILDING MANAGEMENT AMIS REPORT, RCS 10-203",BY="+15;S1",FLDS="[ENSPR144]" G PRINT
 ;
PRFRS ;PRINT REPORT OF FINISH REPLACEMENT SCHEDULE
FRS1 ;Ceiling
 S X=1 G FRS
FRS2 ;Wall
 S X=2 G FRS
FRS3 ;Floor
 S X=3 G FRS
FRS4 ;All finishes
 S X=4 G FRS
FRS S L="0",DIC="^ENG(""SP"",",DHD="ROOM FINISH REPLACEMENT SCHEDULE",FLDS=$S(X=1:"[ENSPFRDCEILING]",X=2:"[ENSPFRDWALL]",X=3:"[ENSPFRDFLOOR]",X=4:"[ENSPFRD]"),BY=$S(X=1:"9.5",X=2:"7.5",X=3:"8.5",X=4:".01") G PRINT
 ;
SET S L="0",DIC="^ENG(""SP"",",ENMULT=0 K FR,TO
 S N=$O(^DIC(6910,0)) I N>0,$P(^DIC(6910,N,0),U,10) S ENMULT=1
 Q
 ;
SUM W !!,"Want just a net square foot and room count summary" S %=2 D YN^DICN G:%=0 SUM I %=1 S FLDS="+4.5"
 Q
 ;
FUNC ;FUNCTION FILE EDIT
 W !! S (DIC,DIE)="^ENG(6928.1,",DIC(0)="AEQLM",DLAYGO=6928
 D FMUT
 K DLAYGO
 G EXIT
 ;
UTL ;UTILITIES FILE EDIT
 W !! S (DIC,DIE)="^ENG(6928.2,",DIC(0)="AEQLM",DLAYGO=6928
 D FMUT
 K DLAYGO
 G EXIT
 ;
PRINT I $D(%) Q:%<0
 S DIOEND="I IOST[""C-"" R !!,""Press <RETURN> to continue"",X:DTIME" D EN1^DIP
 G EXIT
FMUT ;FILEMAN UTILITY
 S ENDIC(0)=DIC(0),ENDIC=DIC
FMUT1 S DIC(0)=ENDIC(0),DIC=$G(ENDIC) D ^DIC Q:Y'>0  S (DA,ENLOCK)=+Y D LOCK G:ENL=0 FMUT S:$D(DR)=0 DR=".01:99" D ^DIE L -@(ENDIC_ENLOCK_")") W !! G FMUT1
LOCK ;Lock record being edited
 S X=DIC_DA_")" L +@X:$G(DILOCKTM,3) S ENL=$T Q:ENL'=0  I ENL=0 W !!,$C(7),"THIS ENTRY IS BEING EDITED BY ANOTHER USER.  TRY LATER." Q
 ;
EXIT K A,BY,C,DIC,DIE,DA,DP,DR,D0,ENL,FLDS,FR,I,IOP,J,K,L,O,S,TO,X,Y,%DT,ENLOCK,ENMULT,ENDIC
 Q
 ;ENSP
OPT ;;ENGINEERING SPACE/FACILITY MANAGEMENT;SPACE MANAGEMENT OPTION;ENSP;
 ;;ENTER NEW ROOM SPACE DATA;SP
 ;;DISPLAY/EDIT ROOM DATA;ENT^ENSP2
 ;;KEY DISTRIBUTION BY EMPLOYEE ENTER/EDIT;EMKY
 ;;LOCK NUMBER FILE ENTER/EDIT;KLOCK
 ;;PRINT KEY DISTRIBUTION BY EMPLOYEE;PREMP
 ;;PRINT KEY DISTRIBUTION BY SERVICE;PRSRV
 ;;EMPLOYEE LIST BY KEY REPORT;PRKEY
 ;;SPACE SURVEY REPORT MENU;^ENSP2
 ;;REPLACEMENT SCHEDULE FOR ALL FINISHES;FRS4
 ;;CEILING REPLACEMENT SCHEDULE;FRS1
 ;;WALL REPLACEMENT SCHEDULE;FRS2
 ;;FLOOR REPLACEMENT SCHEDULE;FRS3
 ;;EDIT FUNCTION FILE;FUNC
 ;;EDIT UTILITIES FILE;UTL