[613] | 1 | ENPROJ ;(WIRMFO)/DLM/DH/SAB-Project Tracking Enter/Edit ;4/25/97
|
---|
| 2 | ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
|
---|
| 3 | ;
|
---|
| 4 | EDALLT ;Enter/Edit All Project Data - Template
|
---|
| 5 | S ENDR="[ENPRI001]" G TEMPL
|
---|
| 6 | ;
|
---|
| 7 | EDALLS ;Enter/Edit All Project Data - Screen
|
---|
| 8 | S ENDR="[ENPR ALL]" G SCREEN
|
---|
| 9 | ;
|
---|
| 10 | EDPREL ;Enter/Edit Preliminary Project Data - Screen
|
---|
| 11 | S ENDR="[ENPR PRELIM]" G SCREEN
|
---|
| 12 | ;
|
---|
| 13 | EDMS ;Enter/Edit Milestone Data - Screen
|
---|
| 14 | S ENDR="[ENPR MS]" G SCREEN
|
---|
| 15 | ;
|
---|
| 16 | EDAE ;Enter/Edit A/E Data - Screen
|
---|
| 17 | S ENDR="[ENPR AE]" G SCREEN
|
---|
| 18 | ;
|
---|
| 19 | EDCO ;Enter/Edit Contractor Data - Screen
|
---|
| 20 | S ENDR="[ENPR CO]" G SCREEN
|
---|
| 21 | ;
|
---|
| 22 | EDCHG ;Enter/Edit Changes & Remarks - Screen
|
---|
| 23 | S ENDR="[ENPR CHG]" G SCREEN
|
---|
| 24 | ;
|
---|
| 25 | EDLOCAL ;Enter/Edit Local Project Data - Template
|
---|
| 26 | S ENDR=$S($D(^DIE("B","ENZPRLOCAL")):"[ENZ",1:"[EN")_"PRLOCAL]" G TEMPL
|
---|
| 27 | ;
|
---|
| 28 | TEMPL ; called for input template edits
|
---|
| 29 | ; input
|
---|
| 30 | ; ENDR - name of template
|
---|
| 31 | D ASKPROJ G:'ENDA TEMPLX
|
---|
| 32 | S DIE="^ENG(""PROJ"",",DA=ENDA,DR=ENDR
|
---|
| 33 | D ^DIE K DIE,DR
|
---|
| 34 | I '$D(DTOUT),$D(^ENG("PROJ",ENDA,0)) D VALPROJ
|
---|
| 35 | L -^ENG("PROJ",ENDA)
|
---|
| 36 | I '$D(DTOUT),'$D(DUOUT) G TEMPL
|
---|
| 37 | TEMPLX ; exit
|
---|
| 38 | K DA,DIC,DIE,DIROUT,DIRUT,DR,DUOUT,DTOUT,X,Y
|
---|
| 39 | K ENAMI,ENAY,ENBC,ENBCI,ENBO,ENBOI,ENCAF,ENCMI,ENCY,ENDA,ENDR
|
---|
| 40 | K ENFT,ENPC,ENPCI,ENPN,ENPR,ENRY
|
---|
| 41 | Q
|
---|
| 42 | ;
|
---|
| 43 | SCREEN ; called for screen edits
|
---|
| 44 | ; input
|
---|
| 45 | ; ENDR - name of form
|
---|
| 46 | D ASKPROJ G:'ENDA SCREENX
|
---|
| 47 | S DDSFILE=6925,DA=ENDA,DR=ENDR,DDSPARM="S"
|
---|
| 48 | D ^DDS
|
---|
| 49 | I $G(DDSSAVE),'$D(DTOUT),$D(^ENG("PROJ",ENDA,0)) D VALPROJ
|
---|
| 50 | L -^ENG("PROJ",ENDA)
|
---|
| 51 | I '$D(DTOUT),'$D(DUOUT) G SCREEN
|
---|
| 52 | SCREENX ; exit
|
---|
| 53 | K DA,DIC,DIE,DIROUT,DIRUT,DR,DUOUT,DTOUT,X,Y
|
---|
| 54 | K DDSFILE,DDSPAGE,DDSPARM,DDSSAVE
|
---|
| 55 | K ENDA,ENDR,ENPN
|
---|
| 56 | Q
|
---|
| 57 | ;
|
---|
| 58 | ASKPROJ ; Ask project to edit
|
---|
| 59 | ; output
|
---|
| 60 | ; ENDA - ien of locked project (or null)
|
---|
| 61 | S ENDA=""
|
---|
| 62 | S DIC="^ENG(""PROJ"",",DIC(0)="AELMQ",DIC("A")="Select PROJECT NUMBER: "
|
---|
| 63 | S DLAYGO=6925 D ^DIC K DIC,DLAYGO I Y'>0!$D(DTOUT)!$D(DUOUT) Q
|
---|
| 64 | L +^ENG("PROJ",+Y):5 I '$T D Q
|
---|
| 65 | . W $C(7),!!,"Project is locked by another user. Please try later",!
|
---|
| 66 | S ENDA=+Y,ENPN=$P(Y,U,2)
|
---|
| 67 | I $P(Y,U,3)=1 D
|
---|
| 68 | . ; populate fields for new project
|
---|
| 69 | . N DA,DR,DIE,ENMCI
|
---|
| 70 | . S ENMCI=$$FIND1^DIC(4,"","O",$P(ENPN,"-"),"D")
|
---|
| 71 | . S DR=""
|
---|
| 72 | . S:ENMCI DR=DR_";3///^S X=ENMCI"
|
---|
| 73 | . S:"4567"[$E(ENPN) DR=DR_";158///VHA"
|
---|
| 74 | . S:"89"[$E(ENPN) DR=DR_";158///NCS"
|
---|
| 75 | . I $E(DR)=";" S DR=$E(DR,2,999)
|
---|
| 76 | . I DR]"" S DIE="^ENG(""PROJ"",",DA=ENDA D ^DIE
|
---|
| 77 | Q
|
---|
| 78 | ;
|
---|
| 79 | VALPROJ ; Validate edited project
|
---|
| 80 | ; input
|
---|
| 81 | ; ENDA - ien of project
|
---|
| 82 | ; ENPN - project number
|
---|
| 83 | S ^TMP($J,"L")=1,^TMP($J,"L",ENPN)=ENDA
|
---|
| 84 | D EN^ENPLV("R")
|
---|
| 85 | K ^TMP($J,"L")
|
---|
| 86 | Q
|
---|
| 87 | ;
|
---|
| 88 | ;ENPROJ
|
---|