source: FOIAVistA/tag/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHED.m@ 897

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1PRCHED ;WISC/RHD,AKS-EDIT ROUTINES FOR SUPPLY SYSTEM--LOG CODE SHEETS ;10/30/92 1:55 PM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5EN1 ;CREATE ISSUE REQUEST LOG CODE SHEETS
6 D ST
7EN01 Q:'$D(PRC("SITE")) S DIC="^PRC(443,",DIC(0)="AEQMZ",DIC("A")="Select TRANSACTION NUMBER: "
8 S DIC("S")="I $P(^(0),U,3)]"""",$D(^PRCS(410,+Y,0)),+^(0)=PRC(""SITE""),$P(^(0),U,2)=""O"",$P(^(0),U,4)=5,$D(^(""IT"",""AB""))" D ^DIC K DIC G:Y'>0 Q S PRCHR=+Y
9 ;
10EN11 ;ENTRY POINT IF CALLED
11 I $D(^PRCS(410,PRCHR,100)),$P(^(100),U,5)]"" D ERR G EN01
12 ;LOOP THRU ITEMS TO FIND NSN'S
13 F PRCHIT=0:0 S PRCHIT=$O(^PRCS(410,PRCHR,"IT",PRCHIT)) Q:'PRCHIT I ^(PRCHIT,0) S PRCHPRN=$P(^(0),U,5) I 'PRCHPRN W !!,$C(7),"There is no Repetitive (PR Card) Number for Line Item # "_$P(^(0),U,1)_".",!!?16,"** CANNOT CONTINUE! **" K PRCHR Q
14 G:'$D(PRCHR) Q
15 S PRCHTYP="I",PRCHKEY=$P(^PRCS(410,PRCHR,0),U,1) W !!!
16 S PRCFA("DICS")="I Y=661!(Y=662)!(Y=663)!(Y=666)!(Y=671)!(Y=669)"
17 K PRCFA("TTF") S PRCFA("TT")=663 D GT G:'% EN01
18 S PRCHCP=+$P(PRCHKEY,"-",4),PRCHCP=$S($L(PRCHCP)=2:"0"_PRCHCP,1:PRCHCP)
19 I '$D(^PRC(420,PRC("SITE"),1,+PRCHCP,0)) S PRCHCP="ER" G Q
20 S PRCHCPN=+PRCHCP
21 I $L(PRCHCP)'=3 S PRCHCP=$S($P(^PRC(420,PRC("SITE"),1,+PRCHCP,0),U,12)=1:"GPF",$P(^(0),U,12)=3:"",1:"ER") G Q:PRCHCP="ER"
22 I PRCHCP="" D CP
23 ;S PRCHDPT=$S($D(^PRC(420,PRC("SITE"),1,PRCHCPN,0)):$P($P(^(0),U,18)," ",1),1:"")
24 S PRCHDPT=$P($P($G(^PRC(420,PRC("SITE"),1,PRCHCPN,0)),U,18)," ",1)
25 I PRCHDPT="" W !!,$C(7),"THIS CONTROL POINT HAS NO LOG DEPT #, YOU CANNOT PROCEED!" G Q
26 D EDIT G:'$D(^PRCS(410,DA,100)) EN01 S X=^(100) I $P(X,U,1)=""!($P(X,U,3)="")!($P(X,U,8)="") W $C(7),!!,"YOU MUST FILL IN ALL THIS DATA TO GENERATE THE LOG CODE SHEETS!!" G EN01
27 D EN^PRCHCS6,^PRCHCS3
28 G EN01
29 ;
30Q I $D(PRCHCP) W:PRCHCP="ER" !,"THIS IS NOT A VALID CONTROL POINT, YOU CANNOT PROCEED!",$C(7)
31 K PRCHCS,PRCHCP,PRCHCPN,PRCHTP,PRCHAMT,PRCHRPT,PRCHRD,PRCHCMI,PRCHFA,PRCHLOG,PRCHDIET,PRCHDPT,PRCHDRD,PRCHDT,PRCHDTP,PRCHKEY,PRCHN,PRCHNM,PRCHREQ,PRCHTYP
32 Q
33 ;
34CP W !!,"This Special Control Point is CASCA/CANTEEN.",!
35 ;
36C1 R "Select ""OGA"" or ""CTN"": ",PRCHCP:DTIME
37 I PRCHCP["^" S PRCHCP="ER" G Q
38 S PRCHCP=$S(PRCHCP["O":"OGA",PRCHCP["C":"CTN",1:"")
39 I PRCHCP="" W !!,"Enter ""O"" for Other Goverment Agencies, or ""C"" for Canteen.",!! G C1
40 Q
41 ;
42EDIT S PRCHMO=$E(DT,4,5),DIE="^PRCS(410,",DA=PRCHR
43 S DR="66//"_PRCHDPT_";57;59//"_$S(PRCHMO="10":"0",PRCHMO="11":"J",PRCHMO="12":"K",1:+PRCHMO)_";I $E(PRCHDPT,1,2)'=""11"" S Y="""";58//"_$S($P(DT,6,7)>15:2,1:2) D ^DIE
44 S:$D(^PRCS(410,DA,100)) PRCHDPT=$P(^(100),U,8)
45 Q
46 ;
47ST S PRCF("X")="S" D ^PRCFSITE
48 Q
49 ;
50GT S PRCHLOG=1 D TT^PRCFAC Q:'% S PRCFA("TTF")=PRCFA("TT")
51 K PRCHTP S PRCHTP(1)="410,"_PRCHR_",^PRCS(410,",PRCHTP(2)="410.02,PRCHLI,^PRCS(410,"_PRCHR_",""IT"","
52 Q
53 ;
54ERR W !?3,"LOG code sheets already created and signed. Use Edit A Code Sheet option.",$C(7)
55 Q
Note: See TracBrowser for help on using the repository browser.