source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENEQMED3.m@ 1211

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

initial load of WorldVistAEHR

File size: 2.7 KB
Line 
1ENEQMED3 ;(WASH ISC)/SAB-EQUIPMENT MULTIPLE EDIT, REPORT; 9.24.97
2 ;;7.0;ENGINEERING;**35,39,45**;Aug 17, 1993
3EN ;
4 ; Input Variables
5 ; ^TMP($J,"ENFLD",field number) modified fields array
6 ; ^TMP($J,"ENSEL",equip ien) selected equipment array
7 ; ^TMP($J,"ENCOM", word processing array for comments
8 ; ^TMP($J,"ENSPEX", word processing array for spex
9 ; ^TMP($J,"ENLCK",equip ien) equipment that couldn't be locked/updated
10 S %ZIS="Q" D ^%ZIS Q:POP
11 I $D(IO("Q")) D Q
12 . S ZTRTN="QEN^ENEQMED3",ZTDESC="Multiple Edit of Equipment Report"
13 . S ZTSAVE("^TMP($J,""ENFLD"",")="",ZTSAVE("^TMP($J,""ENSEL"",")=""
14 . S ZTSAVE("^TMP($J,""ENCOM"",")="",ZTSAVE("^TMP($J,""ENSPEX"",")=""
15 . S ZTSAVE("^TMP($J,""ENLCK"",")=""
16 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
17QEN ; queued entry
18 U IO
19 S (END,ENPG)=0 S Y=$P(DT,".") D DD^%DT S ENDT=Y
20 S ENHDR2="Edited Field(s) New Value"
21 S ENDASH="",$P(ENDASH,"-",IOM+1)="" D HD
22 S ENFLD=0
23 F S ENFLD=$O(^TMP($J,"ENFLD",ENFLD)) Q:'ENFLD D:$Y+3>IOSL HD Q:END D
24 . I ENFLD=30 W !,"PM DATA" Q
25 . I ENFLD=40 W !,"COMMENTS" D Q
26 . . S DIWL=36,DIWR=75,DIWF="W|"
27 . . S ENI=0
28 . . F S ENI=$O(^TMP($J,"ENCOM",ENI)) Q:'ENI S X=^(ENI,0) D ^DIWP
29 . . D ^DIWW
30 . . K DIWL,DIWR,DIWF,X
31 . I ENFLD=70 W !,"SPEX" D Q
32 . . S DIWL=36,DIWR=75,DIWF="W|"
33 . . S ENI=0
34 . . F S ENI=$O(^TMP($J,"ENSPEX",ENI)) Q:'ENI S X=^(ENI,0) D ^DIWP
35 . . D ^DIWW
36 . . K DIWL,DIWR,DIWF,X
37 . S ENVALE=$P($G(^TMP($J,"ENFLD",ENFLD)),U,2)
38 . W !,$$GET1^DID(6914,ENFLD,"","LABEL"),?35
39 . W $S(ENVALE]"":$E(ENVALE,1,40),1:"(individually specified for each item)")
40 G:END EXIT
41 I $D(^TMP($J,"ENLCK")) D
42 . S ENHDR2="List of Selected Equipment that was NOT Modified."
43 . I $Y+8>IOSL D HD
44 . E W !!,ENHDR2
45 . W !," Some of the selected equipment could not be updated because it"
46 . W !," was being edited by another process. This equipment will need"
47 . W !," to be edited to make the desired changes."
48 . S ENDA=0,ENI=0
49 . F S ENDA=$O(^TMP($J,"ENLCK",ENDA)) Q:'ENDA D Q:END
50 . . I '(ENI#6) D:$Y+3>IOSL HD Q:END W !
51 . . W ?(ENI#6*12),ENDA
52 . . S ENI=ENI+1
53 S ENHDR2="List of Modified Equipment"
54 I $Y+5>IOSL D HD
55 E W !!,ENHDR2
56 S ENDA=0,ENI=0
57 F S ENDA=$O(^TMP($J,"ENSEL",ENDA)) Q:'ENDA D Q:END
58 . Q:$D(^TMP($J,"ENLCK",ENDA)) ; could not be locked/updated
59 . I '(ENI#6) D:$Y+3>IOSL HD Q:END W !
60 . W ?(ENI#6*12),ENDA
61 . S ENI=ENI+1
62EXIT I $D(ZTQUEUED) S ZTREQ="Q" K ^TMP($J)
63 K DA,DIC,DIQ,DR,DIROUT,DIRUT,DTOUT,DUOUT,X,Y
64 K END,ENDA,ENDASH,ENDIQ,ENDT,ENFLD,ENHDR2,ENI,ENPG,ENVALE
65 D ^%ZISC
66 Q
67HD ; header
68 I $E(IOST,1,2)="C-",ENPG S DIR(0)="E" D ^DIR K DIR I 'Y S END=1 Q
69 I $E(IOST,1,2)="C-"!ENPG W @IOF
70 S ENPG=ENPG+1
71 S $X=0
72 W "Multiple Edit of Equipment Report",?50,ENDT,?70,"page ",ENPG
73 W !,ENDASH,!
74 W !,ENHDR2,!
75 Q
76 ;ENEQMED3
Note: See TracBrowser for help on using the repository browser.