source: FOIAVistA/trunk/r/EQUIPMENT_TURN_IN_REQUEST-PRCN/PRCNPROJ.m@ 1446

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

initial load of FOIAVistA 6/30/08 version

File size: 1.0 KB
Line 
1PRCNPROJ ;SSI/ALA-Special Project Help Program ;[ 03/18/96 11:31 AM ]
2 ;;1.0;Equipment/Turn-In Request;;Sep 13, 1996
3LKUP ; Special help for Projects
4 W !,"Must begin with station number. Enter '??' for more help text."
5 W !!,"Projects currently in the Project File:"
6 S DUOUT=0,PRCNCT=0,PL=""
7 F S PL=$O(^ENG("PROJ","B",PL)) Q:PL="" D I $G(DUOUT)=1 S DUOUT=0 Q
8 . S L=$O(^ENG("PROJ","B",PL,""))
9 . S PRCNPJT=$P(^ENG("PROJ",L,0),U,3)
10 . S LL=PL_" "_PRCNPJT
11 . D T I $G(DUOUT)=1 Q
12 K L,PRCNA,PRCNCT
13 Q
14INP ; Input transform check
15 I X'?3N1"-"3N&(X'?3N1"-"2NA1"-"3N) K X Q
16 S PRJNM=$O(^ENG("PROJ","B",X,"")) I PRJNM="" K PRJNM Q
17 S PRJMR=$P($G(^ENG("PROJ",PRJNM,33)),U,2)
18 I PRJMR'="",PRJMR?.N S PRJMR=$P(^VA(200,PRJMR,0),U)
19 Q
20PROJ ; Make a request number into a project number
21 S (R,R2)=$P(^PRCN(413,D0,0),U) G EX:R["P" S $P(R2,"-",4)="P"_$P(R2,"-",4)
22 K ^PRCN(413,"B",R) S ^PRCN(413,"B",R2,D0)="",$P(^PRCN(413,D0,0),U)=R2
23EX K R,R2
24 Q
25T S PRCNCT=PRCNCT+1
26 I PRCNCT<10 W !,LL Q
27 R !,"'^' TO STOP: ",PRCNA:DTIME S:'$T PRCNA=U
28 I $G(PRCNA)[U S DUOUT=1 Q
29 S PRCNCT=0 Q
Note: See TracBrowser for help on using the repository browser.