VistA-WorldVistAEHR/r/IFCAP-PRC-PRX--PRCA--PRCN/PRCHHI1.m

31 lines
1.1 KiB
Mathematica

PRCHHI1 ;WISC/TGH-IFCAP SEGMENT HE ;12-18-92/08:38
V ;;5.1;IFCAP;;Oct 20, 2000
;Per VHA Directive 10-93-142, this routine should not be modified.
HE(A,A1,A2,VAR1,CNTR,NUM) ;PO HEADER INFORMATION SEGMENT
N A12,DA,I,NM,P,PHN,PNM,PPM,STRNG,TOR,X,Y
S A12=$G(^PRC(442,VAR1,12))
S X=$P(A1,U,15)
D JD^PRCFDLN S PRCHPOD=$E(X,1,3)+1700_$E(Y,1,3)
S X=$P(A,U,10)
D JD^PRCFDLN S PRCHDD=$E(X,1,3)+1700_$E(Y,1,3),P=$P(A1,U,10)
S X=$P(A12,U,2)
S X=$$DECODE^PRCHES5(VAR1),PPM=X
S NM=$P(^VA(200,P,0),U),PNM=$P(NM,",",2)_" "_$P(NM,",")
S PPM=$E("ES/"_PPM,1,30)
S PHN=$P($G(^VA(200,P,.13)),U,2)
S PHN=$P(PHN,U)
S TOR=$P(A,U,19),TOR=$S(TOR=2:"P",1:"U")
S PRCHTP(1,CNTR+1)="S X=""|HE"";540"
S PRCHTP(1,CNTR+2)="S X=PRCHPOD;541"
S PRCHTP(1,CNTR+3)="S X=""01"";542"
S PRCHTP(1,CNTR+4)="S X=PRCHDD;543"
S PRCHLCNT=$P(A,U,14)
S PRCHTP(1,CNTR+5)="S X=PRCHLCNT;520"
S PRCHCOM=$P($G(^PRC(442,VAR1,4,0)),U,4)
S:PRCHCOM="" PRCHCOM=0
S PRCHTP(1,CNTR+6)="S X=PRCHCOM;546.1"
S STRNG="HE"_"^^"_PRCHPOD_"^"_"01"_"^"_PRCHDD_"^^^^^^^"_PRCHLCNT_"^"_PRCHCOM_"^|"
S NUM=NUM+1,^TMP($J,"STRING",NUM)=STRNG
S CNTR=CNTR+6
Q