Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: PRCHCS9

PRCHCS9.m

Go to the documentation of this file.
  1. PRCHCS9 ;WISC/RWS,RHD-BUILD ISMS CODE SHEET DATA ;12/1/93 09:53
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ADDRS ;GET BILL TO & SHIP TO ADDRESS
  1. S PRCH("ST")=$P(^PRC(442,PRCHPO,1),U,3),PRCH("BI")=$P(^(12),U,6)
  1. S PRCH("CU")=$G(^PRC(411,PRC("SITE"),3))
  1. I PRCH("ST") S PRCH("ST")=$G(^PRC(411,PRC("SITE"),1,PRCH("ST"),0))
  1. I PRCH("BI") S PRCH("BI")=$G(^PRC(411,PRC("SITE"),4,PRCH("ST"),0))
  1. Q
  1. PRIORITY S X=$S($P($G(^PRC(442,PRCHPO,1)),U,19)=1:3,$P($G(^(17)),U,9)=8:2,1:1),X=$S(PRCHN("SFC")=1:"TO",1:"SO")_X Q
  1. SETUP ;SETUP VARIABLES - CALLED FROM INPUT TEMPLATE
  1. Q:'$D(PRCHPO)&0 D ADDRS S PRCHI="",PRCHI("PODATE")=$P(^PRC(442,PRCHPO,1),U,15),PRCH0=^(0) Q
  1. ITEM ;SET UP LINE ITEM VARIABLES
  1. Q:PRCFASYS'="ISM"&0 S PRCHI=$O(^PRC(442,PRCHPO,2,PRCHI)),X=$S(PRCHI:PRCHI,1:"") Q:'PRCHI S PRCHI0=^(PRCHI,0) W "." Q
  1. Q
  1. BLDAR ; BUILD THE PRCHTP ARRAY
  1. K PRCHTP D ADDRS S PRCHTP(1)="442,"_PRCHPO_",^PRC(442,",PRCHTP(2)="442.01,PRCHLI,^PRC(442,"_PRCHPO_",2,"
  1. S PRCHTP(1,1)="S X=""ISM"";500"
  1. S PRCHTP(1,2)="S X=PRC(""SITE"");1"
  1. S PRCHTP(1,3)="107;63"
  1. S PRCHTP(1,4)="D PRIORITY^PRCHCS9;3"
  1. S PRCHTP(1,5)="S X=""T"";501"
  1. S PRCHTP(1,6)="S X=""N"";502"
  1. S PRCHTP(1,6)="S X=PRCHPONO;503"
  1. S PRCHTP(1,8)="S X=1;504"
  1. S PRCHTP(1,9)="S X=""|HE"";540"
  1. S PRCHTP(1,10)=".1;541"
  1. S PRCHTP(1,11)="S X=""01"";542"
  1. S PRCHTP(1,12)="7;543"
  1. S PRCHTP(1,13)="S X=PRCHLCNT;520"
  1. S PRCHTP(1,14)="S X=""|AC"";570"
  1. S PRCHTP(1,15)="1.4;78"
  1. S PRCHTP(1,16)="S X=PRC(""FY"");80"
  1. S PRCHTP(1,17)="2;81"
  1. S PRCHTP(1,18)="1;82"
  1. S PRCHTP(1,19)="S X=""|CU"";512"
  1. S PRCHTP(1,20)="S X=$P(^PRC(411,PRC(""SITE""),0),U,10);512.2"
  1. S PRCHTP(1,21)="S X=0;512.1"
  1. S PRCHTP(1,22)="S X=$P(PRCH(""CU""),U,1);512.3"
  1. S PRCHTP(1,23)="S X=$P(PRCH(""CU""),U,2);512.4"
  1. S PRCHTP(1,24)="S X=$P(PRCH(""CU""),U,3);512.7"
  1. S PRCHTP(1,25)="S X=$P(PRCH(""CU""),U,4) S:X]"""" X=$P($G(^DIC(5,X,0)),U,2);512.8"
  1. S PRCHTP(1,26)="S X=$P(PRCH(""CU""),U,5);512.9"
  1. S PRCHTP(1,27)="S X=""|BI"";513"
  1. S PRCHTP(1,28)="S X=$P(PRCH(""BI""),U,1);513.1"
  1. S PRCHTP(1,29)="S X=0;513.2"
  1. S PRCHTP(1,30)="S X=$P(PRCH(""BI""),U,2);513.3"
  1. S PRCHTP(1,32)="S X=$P(PRCH(""BI""),U,3);513.4"
  1. S PRCHTP(1,32)="S X=$P(PRCH(""BI""),U,4);513.5"
  1. S PRCHTP(1,33)="S X=$P(PRCH(""BI""),U,5);513.7"
  1. S PRCHTP(1,34)="S X=$P(PRCH(""BI""),U,6) S:X]"""" X=$P($G(^DIC(5,X,0)),U,2);513.8"
  1. S PRCHTP(1,35)="S X=$P(PRCH(""BI""),U,7);513.9"
  1. S PRCHTP(1,36)="S X=""|ST"";514"
  1. S PRCHTP(1,37)="S X=$P(PRCH(""ST""),U,1);514.2"
  1. S PRCHTP(1,38)="S X=0;514.1"
  1. S PRCHTP(1,39)="S X=$P(PRCH(""ST""),U,2);514.3"
  1. S PRCHTP(1,40)="S X=$P(PRCH(""ST""),U,3);514.4"
  1. S PRCHTP(1,41)="S X=$P(PRCH(""ST""),U,4);514.5"
  1. S PRCHTP(1,42)="S X=$P(PRCH(""ST""),U,5);514.7"
  1. S PRCHTP(1,43)="S X=$P(PRCH(""ST""),U,6) S:X]"""" X=$P($G(^DIC(5,X,0)),U,2);514.8"
  1. S PRCHTP(1,44)="S X=$P(PRCH(""ST""),U,7);514.9"
  1. S PRCHTP(1,45)="D LINE^PRCHCS9 S X=""|$"";507"
  1. QUIT
  1. LINE ; TRANSFER LINE ITEM DATA OVER
  1. N I,J S PRCHI=0 F S PRCHI=$O(^PRC(442,PRCHPO,2,PRCHI)) Q:'PRCHI S X=^(PRCHI,0) W "."_PRCHI D
  1. .S PRCHI(0,20)="|IT"
  1. .S PRCHI(0,1)=$P(X,U,1)
  1. .S PRCHI(0,2)=$P(X,U,13)
  1. .S PRCHI(0,4)=$P(X,U,4)
  1. .S PRCHI(1,2)=$P(X,U,3)
  1. .S PRCHI(0,3)=$P(X,U,16)
  1. .S PRCHI(1,5)=$P(X,U,4)
  1. .S PRCHI(1,10)="0"
  1. .I $D(^PRC(442,PRCHPO,2,PRCHI,4)) N X4 S X4=^(4) D
  1. ..S PRCHI(1,6)=$P(X4,U,15)
  1. ..S PRCHI(1,7)=$P(X4,U,16)
  1. .S $P(^PRCF(423,PRCFA("CSDA"),52,0),U,3,4)=$P(^PRC(442,PRCHPO,2,0),U,3,4)
  1. .S I="" F S I=$O(PRCHI(I)) Q:I="" S J="" F S J=$O(PRCHI(I,J)) Q:J="" D
  1. ..S $P(^PRCF(423,PRCFA("CSDA"),52,PRCHI,I),U,J)=PRCHI(I,J)
  1. S PRCHLI="QUIT" QUIT