source: FOIAVistA/trunk/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCOSSO.m@ 1607

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

initial load of FOIAVistA 6/30/08 version

File size: 3.0 KB
Line 
1PRCOSSO ;WISC/DJM-SSO Server Interface to IFCAP ;10/3/94 10:45 AM
2V ;;5.1;IFCAP;;Oct 20, 2000
3 ;Per VHA Directive 10-93-142, this routine should not be modified.
4 Q
5SSO ;SUGGESTED ORDER TRANSACTION FROM AUSTIN USED TO CREATE A REPETITIVE ITEM LIST
6 N %,A,AA,AQ,A1,B,C,COUNT,CP,CS,CSF,DA,DIC,DIE,DIK,DR,DT,E,F,FS,FY,INACT,LC,L1,MO,NSN,NSNB,NSNC,NSNF,PRCDA,QTR,QTY,QTYL,REC,SC,SITE,TC,TIME,TYP,UC,VEN,VEN1,VENDOR,WF,Y,Y1,YR
7 S A=1,A1="" F S A=$O(^PRC(411,"B",A)) Q:A'>0 S A1=A1_"-"_A
8 S:$L(A1)>0 A1=A1_"-" S B=$O(^PRCF(423.6,PRCDA,1,0)),L1=^(B,0),SITE=$P(L1,U,3) I A1'[SITE D MSG1^PRCOSS5(L1) Q
9 S B=$O(^PRCF(423.6,PRCDA,1,B)),C=^(B,0) I $P(C,U)'="LC" D MSG2^PRCOSS5(L1) Q
10 S COUNT=$P(C,U,2),LC=B I COUNT="" D MSG3^PRCOSS5(L1) Q
11 S (QTY,TYP,C,NSNF,CSF)="" F S B=$O(^PRCF(423.6,PRCDA,1,B)) Q:B="" S C=^(B,0) S TYP=$P(C,U) Q:TYP'="SL" S QTY=QTY+1,NSN=$P(C,U,2),CS=$P(C,U,5) S:NSN="" NSNF=1 S:CS="" CSF=1 Q:C="$"
12 I TYP'="SL",C'="$" D MSG4^PRCOSS5(L1) Q
13 I QTY'=COUNT D MSG5^PRCOSS5(L1) Q
14 I NSNF=1 D MSG6^PRCOSS5(L1) Q
15 I CSF=1 D MSG8^PRCOSS5(L1) Q
16 S B=LC F S B=$O(^PRCF(423.6,PRCDA,1,B)) Q:B'>0 S C=^(B,0),TYP=$P(C,U) Q:TYP'="SL" S NSNF="" D Q:NSNF=1
17 .S NSN=$P(C,U,2),NSN=$E(NSN,1,4)_"-"_$E(NSN,5,6)_"-"_$E(NSN,7,9)_"-"_$E(NSN,10,99),NSNB=0
18SOA .S NSNB=$O(^PRC(441,"BB",NSN,NSNB)),NSNC="" I NSNB'>0 S NSNF=1 Q
19 .S NSNC=^PRC(441,NSNB,0) I $P(NSNC,U,5)'=NSN S NSNF=1 Q
20 .S INACT=$G(^PRC(441,NSNB,3)) I +INACT=1 G SOA
21 .S CS=$P(C,U,5),VEN=$G(^PRC(441,NSNB,2,0)) I VEN="" S NSNF=1 Q
22 .S NSNF=1,VEN=0 F S VEN=$O(^PRC(441,NSNB,2,VEN)) Q:VEN'>0 S SC="" D I CS=$P(SC,U) S NSNF="" Q
23 ..S VEN1=^PRC(441,NSNB,2,VEN,0) Q:+VEN1'>0 S FS=$G(^PRC(440,+VEN1,2)) Q:FS="" S FS=$P(FS,U,2) Q:FS'>0 S SC=$G(^PRCD(420.8,FS,0)) Q
24 I NSNF=1 S DIE="^PRCF(423.6,",DA=PRCDA,DR="3///65" D ^DIE Q
25S1 ;IF THERE WAS NO MISSING NSNs THE SSO^PRCOSSO BACKGROUND TASK WILL FALL THROUGH INTO THIS SECTION OF CODE.
26 ;NOW TO CHECK FILE 445, THE WAREHOUSE ENTRY, TO SEE IF ALL ITEMS ARE LISTED IN THE INVENTORY.
27 S A="" F S A=$O(^PRCP(445,"AC","W",A)) Q:A="" S B=+^PRCP(445,A,0),C=^PRCF(423.6,PRCDA,1,10000,0),CS=$P(C,U,3) I B=CS D Q
28 .S Y=0 F S Y=$O(^PRCF(423.6,PRCDA,1,Y)) Q:Y'>0 S Y1=^(Y,0) I $P(Y1,U)="SL" S (NSNF,WF)="" D Q:NSNF=1 Q:WF=1
29 ..S NSN=$P(Y1,U,2),NSN=$E(NSN,1,4)_"-"_$E(NSN,5,6)_"-"_$E(NSN,7,9)_"-"_$E(NSN,10,99),NSNB=$O(^PRC(441,"BB",NSN,0)) S:NSNB'>0 NSNF=1 Q:NSNF=1 S:+$G(^PRCP(445,A,1,NSNB,0))'=NSNB WF=1 Q
30 I A="" D MSG7^PRCOSS5(C) Q
31 I NSNF=1 S DIE="^PRCF(423.6,",DA=PRCDA,DR="3///65" D ^DIE Q
32 I WF=1 S DIE="^PRCF(423.6,",DA=PRCDA,DR="4///65" D ^DIE Q
33 G S2^PRCOSS6
34SSO1 ;ENTER HERE IF THERE WERE MISSING NSNs. THIS ENTRY POINT IS THE ONE
35 ;CALLED FROM THE BACKGROUND JOB SET UP AT THE END OF ENTERING THE MISSING
36 ;NSNs. THE ONLY THING THIS ENTRY POINT DOES IS TO NEW THE VARIABLES USED
37 ;WITHIN THE S1 SECTION OF THIS ROUTINE. THE SAME VARIABLE NAMES ARE USED
38 ;IN THE S1 SECTION AS WERE USED IN SSO SO THAT THE NEW COMMAND FOR THAT
39 ;SECTION CAN HANDLE THEM IF THE SSO SECTION FALLS THROUGH INTO THE S1
40 ;SECTION.
41 N A,B,C,CS,DA,DIE,DR,NSN,NSNB,NSNF,WF,Y,Y1 G S1
Note: See TracBrowser for help on using the repository browser.