source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOCP1.m@ 1635

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1PSOCP1 ;BHAM ISC/EJW-PHARMACY CO-PAY APPLICATION UTILITIES FOR IB (CONT'D) ;12/12/02
2 ;;7.0;OUTPATIENT PHARMACY;**137,239**;DEC 1997
3 ;
4 ;REF/IA
5 ;IBARX/125
6CHKIB ; SEE IF BILL # IS A CHARGE OR CANCELLATION #
7 N IBN,XX
8 I PSOREF=0 S XX=$G(^PSRX(RXP,"IB")) I $P(XX,"^",4)'="" S PSOIB=1 Q ;ALREADY BILLED
9 I PSOREF=0 S IBN=$P(XX,"^",2)
10 I PSOREF'=0 S XX=$G(^PSRX(RXP,1,PSOREF,"IB")) I $P(XX,"^",2)'="" S PSOIB=1 Q ;ALREADY BILLED
11 I PSOREF'=0 S IBN=$P(XX,"^",1)
12 I IBN'="" D STATUS
13 Q
14 ;
15STATUS ;
16 N XX
17 S XX=$$STATUS^IBARX(IBN)
18 I XX'=1,XX'=3 Q
19 S PSOIB=1 ; ALREADY BILLED
20 Q
21 ;
22XTYPE1 ;
23 N PSOCIBQ,PSOSCMX,Y,I,J,X,SAVY
24 S (X,PSOSCMX,SAVY)=""
25 S PSOCIBQ=$G(^PSRX(RXP,"IBQ"))
26 I $P(PSOCIBQ,"^",1)'=1 Q
27 S J=0 F S J=$O(^PS(59,J)) Q:'J I +$G(^(J,"IB")) S X=+^("IB") Q
28 I 'X Q
29 S X=X_"^"_PSOCPN D XTYPE^IBARX
30 I $G(Y)'=1 Q
31 S J="" F S J=$O(Y(J)) Q:'J S I="" F S SAVY=I,I=$O(Y(J,I)) Q:I="" S:I>0 PSOSCMX=I
32 I PSOSCMX="",SAVY=0 Q ; INCOME EXEMPT OR SERVICE-CONNECTED
33 I PSOSCMX=2 Q ; NEED TO ASK SC QUESTION
34 ; If get to here, service-connected question does not apply for this patient anymore. Update "IBQ" and CPRS
35 S $P(^PSRX(RXP,"IBQ"),"^",1)="",CHKXTYPE=1
36 D EN^PSOHLSN1(RXP,"XX","","Order edited")
37 Q
38 ;
39SETCOMM ;
40 I EXMT="SC" S PSOCOMM="Service Connected" Q
41 I EXMT="CV" S PSOCOMM="COMBAT VETERAN" Q
42 I EXMT="AO" S PSOCOMM="AGENT ORANGE RELATED" Q
43 I EXMT="IR" S PSOCOMM="IONIZING RAD RELATED" Q
44 I EXMT="EC" S PSOCOMM="ENV CONTAMINANTS RELATED" Q
45 I EXMT="MST" S PSOCOMM="MILITARY SEXUAL TRAUMA" Q
46 I EXMT="HNC" S PSOCOMM="Head and/or Neck Cancer" Q
47 Q
48 ;
49ICD ;
50 S PSOCIBQ=$P(ZXX,U,4)_"^"_$P(ZXX,U,6)_"^"_$P(ZXX,U,2)_"^"_$P(ZXX,U,3)_"^"_$P(ZXX,U,5)_"^"_$P(ZXX,U,7)_"^"_$P(ZXX,U,8)
51 Q
52 ;
Note: See TracBrowser for help on using the repository browser.