1 | PRCNTIRQ ;SSI/ALA-Enter a Turn-In Request ;[ 02/06/97 11:57 AM ]
|
---|
2 | ;;1.0;Equipment/Turn-In Request;**2**;Sep 13, 1996
|
---|
3 | EN D NOW^%DTC S PRCNDTM=% K %I,%H
|
---|
4 | D FYQ^PRCNUTL S PRCF("X")="S" D ^PRCFSITE G EXIT:'$D(PRC("SITE"))
|
---|
5 | S DIC(0)="AEQZ",DIC="^ENG(6914.1," D ^DIC G EXIT:Y<1
|
---|
6 | S PRCN("CMR")=$P(Y(0),U),PRCNCMR=+Y,PRCNSRV=$P(Y(0),U,5)
|
---|
7 | I PRCNSRV="" D G EXIT:Y<1
|
---|
8 | . S DIC="^DIC(49," D ^DIC S PRCNSRV=+Y
|
---|
9 | K DIC,Y
|
---|
10 | ENR ; Get the next sequential number
|
---|
11 | I $G(PRC("SITE"))="" S PRC("SITE")=$P($P(^PRCN(413,DA,0),U),"-")
|
---|
12 | I $G(PRCN("CMR"))="" S PRCN("CMR")=$P($P(^PRCN(413,DA,0),U),"-",2)
|
---|
13 | I $G(PRC("FY"))="" S PRC("FY")=$P($P(^PRCN(413,DA,0),U),"-",3)
|
---|
14 | S TST=PRC("SITE")_"-"_PRCN("CMR")_"-"_PRC("FY") D SEQ^PRCNUTL
|
---|
15 | S PRCNRTN=TST_"-"_$E("00000",$L(PRCNDA)+1,5)_PRCNDA
|
---|
16 | ; File into temporary transaction file
|
---|
17 | N DA,DIC,DIE,Y
|
---|
18 | S DIC="^PRCN(413.1,",DIC(0)="L",DLAYGO=413.1,X=PRCNRTN D FILE^DICN
|
---|
19 | S PRCNTDA=DA I $G(PRCNTY)'="" D
|
---|
20 | . S ^PRCN(413.1,PRCNTDA,0)=PRCNRTN_U_$P(^PRCN(413,PRCNRDA,0),U,2,8)
|
---|
21 | . S $P(^PRCN(413.1,PRCNTDA,0),U,9)=PRCNRDA,$P(^PRCN(413,PRCNRDA,0),U,11)=PRCNTDA
|
---|
22 | . S $P(^PRCN(413.1,PRCNTDA,0),U,16)=$P(^PRCN(413,PRCNRDA,0),U,16)
|
---|
23 | G EXIT:$D(PRCNTY)
|
---|
24 | TIN ; Select a Turn-In request, display info & get justification
|
---|
25 | W !!,"This request has been assigned transaction #: ",PRCNRTN,!
|
---|
26 | S PRCNFA=0,DIE=413.1,DA=PRCNTDA,DR="[PRCNTIRQ]"
|
---|
27 | S EDIT=$S($P(^PRCN(413.1,PRCNTDA,0),U,7)="":0,1:1) D ^DIE
|
---|
28 | EXIT K PRC,PRCF,PRCN,PRCNDA,DIC,DIE
|
---|
29 | K %DT,EDIT,TST,X,RI,%,DA,DLAYGO,PRCNFA,PRCNFAP
|
---|
30 | I $G(PRCNTY)="" K PRCNRTN
|
---|
31 | Q
|
---|
32 | DISP ; Display line item info
|
---|
33 | NEW DIC,DA,DR,DI
|
---|
34 | S DA=RI,DIC=6914,DR=".01;3;2;4;5;12;18;19;24",DIQ(0)="E",DIQ="PRCNDAT"
|
---|
35 | D EN^DIQ1
|
---|
36 | W !,"CSN: ",$G(PRCNDAT(6914,RI,18,"E"))
|
---|
37 | W !,"Description: ",$G(PRCNDAT(6914,RI,3,"E"))
|
---|
38 | W !,"Model #: ",$G(PRCNDAT(6914,RI,4,"E"))
|
---|
39 | W ?40,"Serial #: ",$G(PRCNDAT(6914,RI,5,"E"))
|
---|
40 | W !,"Manufacturer: ",$G(PRCNDAT(6914,RI,1,"E"))
|
---|
41 | W ?40,"Last Location: ",$G(PRCNDAT(6914,RI,24,"E"))
|
---|
42 | W !,"Aquisition Value: ","$ "_$G(PRCNDAT(6914,RI,12,"E"))
|
---|
43 | W ?40,"CMR: ",$G(PRCNDAT(6914,RI,19,"E"))
|
---|
44 | K PRCNDAT
|
---|
45 | Q
|
---|
46 | INP ; Input transform check for validity of selection
|
---|
47 | I DR["PRCNTIPPM",'$D(^PRCN(413.1,D0,1,"B",X)) W !,$C(7)," Cannot add item to turn in at this point" K X Q
|
---|
48 | I $G(PRCNFA)="" S PRCNFA=0
|
---|
49 | I $G(PRCNCMR)="" S PRCNCMR=$P(^PRCN(413.1,DA,0),U,16)
|
---|
50 | I $D(^PRCN(413.1,"AB",X)) W !,$C(7)," Request already on file for this item" K X Q
|
---|
51 | ;S ACQ=$P($G(^ENG(6914,X,3)),U,4) I ACQ'="P"&(ACQ'="M")&(ACQ'="O")&(ACQ'="") K X W !,$C(7),"Item not owned by facility" Q
|
---|
52 | I $P($G(^ENG(6914,X,2)),U,9)'=PRCNCMR W !,$C(7)," Item not in this CMR" K X Q
|
---|
53 | S PRCNFAP=$$CHKFA^ENFAUTL(X)
|
---|
54 | I 'PRCNFA,PRCNFAP S PRCNFA=1 Q
|
---|
55 | I PRCNFA,'PRCNFAP W !,$C(7),"Previous item capitalized, this item isn't" K X Q
|
---|
56 | Q
|
---|