source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOCPTRH.m@ 619

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1PSOCPTRH ;BHAM ISC/SAB,RTR - PUT IN CHAMPUS HOLD ; 4/29/93 10:55
2 ;;7.0;OUTPATIENT PHARMACY;;DEC 1997
3ACT ;adds activity info for rx removed or placed on hold
4 D NOW^%DTC S NOW=%
5 S IR=0 F FDA=0:0 S FDA=$O(^PSRX(DA,"A",FDA)) Q:'FDA S IR=FDA
6 S IR=IR+1,^PSRX(DA,"A",0)="^52.3DA^"_IR_"^"_IR
7 S ^PSRX(DA,"A",IR,0)=NOW_"^"_ACT_"^"_DUZ_"^"_$S(RXF'<0&(RXF<6):RXF,1:(RXF+1))_"^"_"RX "_"Rx placed in a HOLD status for CHAMPUS billing."
8 K PSUS,RXF,I,FDA,DIC,DIE,DR,Y,X,%,%I,%H,RSDT
9 Q
10 ;
11H ;hold function
12 I $P($G(^PSRX(DA,"STA")),"^")=3 Q
13 S RSDT="@",ACT="H",(PSUS,RXF,RFN,I)=0 F S I=$O(^PSRX(DA,1,I)) Q:'I D
14 .S RXF=I,RFN=RFN+1 S:RFN=1 RSDT=$P(^PSRX(DA,2),"^",2) S:RFN>1 RSDT=$P(^(I-1,0),"^")
15 I RXF S (PSDA,DA(1))=DA,DA=RXF S $P(^PSRX(DA(1),1,RXF,0),"^",3)="CHAMPUS billing",$P(^(0),"^",5)=$G(DUZ) S DA=PSDA K DA(1)
16 S PSHORX=DA S DIE="^PSRX(",DR=$S('RXF:"22///@;",1:"")_"99///"_FLD(99)_";99.1///"_FLD(99.1)_";99.2///"_DT_";100///3;101///"_RSDT D ^DIE
17 S DA=PSHORX D EN^PSOHLSN1(DA,"OH","","Rx placed in hold status (CHAMPUS billing)","A") S DA=PSHORX K PSHORX
18 W !!,"RX# "_$P(^PSRX(DA,0),"^")_" Has been placed in a Hold status. (CHAMPUS BILLING)",!
19 I $G(PSTRIVER) K DIR S DIR(0)="E",DIR("A")="Press RETURN to continue" D ^DIR K DIR
20 I +$G(PSDA) S DA=$O(^PS(52.5,"B",PSDA,0)) I DA S DIK="^PS(52.5,",PSUS=1 D ^DIK K DA,DIK
21 S:+$G(PSDA) DA=PSDA D ACT
22 Q
Note: See TracBrowser for help on using the repository browser.