source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPROJ.m@ 1150

Last change on this file since 1150 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.4 KB
RevLine 
[613]1ENPROJ ;(WIRMFO)/DLM/DH/SAB-Project Tracking Enter/Edit ;4/25/97
2 ;;7.0;ENGINEERING;**23,28**;Aug 17, 1993
3 ;
4EDALLT ;Enter/Edit All Project Data - Template
5 S ENDR="[ENPRI001]" G TEMPL
6 ;
7EDALLS ;Enter/Edit All Project Data - Screen
8 S ENDR="[ENPR ALL]" G SCREEN
9 ;
10EDPREL ;Enter/Edit Preliminary Project Data - Screen
11 S ENDR="[ENPR PRELIM]" G SCREEN
12 ;
13EDMS ;Enter/Edit Milestone Data - Screen
14 S ENDR="[ENPR MS]" G SCREEN
15 ;
16EDAE ;Enter/Edit A/E Data - Screen
17 S ENDR="[ENPR AE]" G SCREEN
18 ;
19EDCO ;Enter/Edit Contractor Data - Screen
20 S ENDR="[ENPR CO]" G SCREEN
21 ;
22EDCHG ;Enter/Edit Changes & Remarks - Screen
23 S ENDR="[ENPR CHG]" G SCREEN
24 ;
25EDLOCAL ;Enter/Edit Local Project Data - Template
26 S ENDR=$S($D(^DIE("B","ENZPRLOCAL")):"[ENZ",1:"[EN")_"PRLOCAL]" G TEMPL
27 ;
28TEMPL ; 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
37TEMPLX ; 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 ;
43SCREEN ; 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
52SCREENX ; 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 ;
58ASKPROJ ; 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 ;
79VALPROJ ; 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
Note: See TracBrowser for help on using the repository browser.