source: FOIAVistA/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOCLO1.m@ 635

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

initial load of FOIAVistA 6/30/08 version

File size: 4.7 KB
Line 
1PSOCLO1 ;BHAM ISC/SAB - clozaril rx lockout routine ; 20 Apr 1999 10:50 AM
2 ;;7.0;OUTPATIENT PHARMACY;**1,23,37,222**;DEC 1997;Build 12
3 ;External reference YSCLTST2 supported by DBIA 4556
4 ;External reference ^PS(55 supported by DBIA 2228
5 ;MH package will authorize dispensing of the Clozapine drugs
6 K ANQDATA,ANQX,ANQNO,PSONEW("SAND"),^TMP($J,"PSO")
7 N X,Y,%,%DT,J,ANQ,ANQD,ANQJ,ANQRE,DTOUT,DUOUT,DIR,DIRUT,PSOYS
8 I '$D(^PS(55,DFN,"SAND")) W !!,"*** This patient has not been registered in the clozapine program ***" G END
9 I $P(^PS(55,DFN,"SAND"),"^")="" W !!,"*** This patient has no clozapine registration number ***" G END
10 I $P(^PS(55,DFN,"SAND"),"^",2)="D" D G END
11 .W !!,"*** This patient has been discontinued from the clozapine treatment program ***"
12 .W !,"*** and must have a new registration number assigned ***"
13 S PSOYS=$$CL^YSCLTST2(DFN)
14 G:+PSOYS<0 END
15 S CLOZPAT=$P(PSOYS,"^",7),CLOZPAT=$S(CLOZPAT="M":2,CLOZPAT="B":1,1:0)
16 G:$P(PSOYS,"^")=0 OV1
17 D DSP G:+PSOYS=1 GDOSE
18 S X=$S(CLOZPAT=2:84,CLOZPAT=1:42,1:21)
19 D CL1^YSCLTST2(DFN,X)
20 I $D(^TMP($J,"PSO")) G CHECK
21OV1 I $$OVERRIDE^YSCLTST2(DFN) S ANQRE=7 W !!,"Permission to dispense clozapine has been authorized by NCCC",! G OVRD
22 D MSG4,MSG3,MH G QU
23 Q
24CHECK ;
25 S ANQRE=$S($P(PSOYS,"^",2)<3500:3,1:5)
26 S ANQD(1)=9999999-$P(PSOYS,"^",6),X1=$P(PSOYS,"^",6),X2="-6" D C^%DTC S ANQD=(9999999-$P(X,"."))
27 S ANQ(1)=$P(PSOYS,"^",2)_"^"_$P(PSOYS,"^",4) D
28 .F ANQJ=2:1:4 S ANQD=$O(^TMP($J,"PSO",ANQD)) Q:'ANQD S ANQ(ANQJ)=^(ANQD),ANQD(ANQJ)=ANQD
29 S ANQD=$O(ANQ(""),-1)
30 I ANQD<2 W !,"*** No previous results to display ***",! G OVRD
31 W !,"*** Last "_$S(ANQD=4:"Four ",ANQD=3:"Three ",1:"TWO ")_$P(PSOYS,"^",3)_" and ANC results were:"
32 W !,?39,"WBC ANC",!
33 F ANQJ=ANQD:-1:1 S ANQD=9999999-ANQD(ANQJ)_"0000" W ?5,$E(ANQD,4,5)_"/"_$E(ANQD,6,7)_"/"_($E(ANQD,1,3)+1700) W:ANQD["." "@",$E(ANQD,9,10),":",$E(ANQD,11,12) W ?29,"Results: "_$P(ANQ(ANQJ),"^")_" - "_$P(ANQ(ANQJ),"^",2),!
34OVRD ;
35 I '$D(^XUSEC("PSOLOCKCLOZ",DUZ)) D G EXIT
36 .S ANQX=1 W !,"You Are Not Authorized to Override! See Clozapine Manager with PSOLOCKCLOZ key."
37 I ANQRE W !,"Override reason being: "_$P($T(@(ANQRE_"^PSOCLO1")),";;",2),!
38 S DIR("A")="Do you want to override and issue this prescription",DIR(0)="Y",DIR("B")="N" D ^DIR K DIR I 'Y!($D(DIRUT)) S ANQX=1 G EXIT
39 S DIC=200,DIC(0)="AEQM",DIC("A")="Approving member of the Clozapine team: ",DIC("S")="I $D(^XUSEC(""PSOLOCKCLOZ"",+Y)),+Y'=DUZ" D ^DIC K DIC S ANQD=+Y I Y<0 S ANQX=1 G EXIT
40 S DIR(0)="52.52,5",DIR("A")="Remarks"
41 D ^DIR K DIR G EXIT:$D(DIRUT)
42 S ANQX=0,ANQDATA=DUZ_"^"_ANQD_"^"_ANQRE_"^"_X
43 ;
44GDOSE ; set variable to ask daily dose
45 N PSOCD
46DOSE ;
47 S DIR(0)="N^12.5:3000:1",DIR("A")="CLOZAPINE dosage (mg/day) ? " D ^DIR K DIR G EXIT:$D(DIRUT)
48 S PSOCD=X
49 I PSOCD#25=0,PSOCD'<12.5,PSOCD<900 G EXIT
50 I PSOCD#12.5 S DIR(0)="Y",DIR("B")="NO",DIR("A")=PSOCD_" is an unusual dose. Are you sure " D ^DIR K DIR G EXIT:$D(DIRUT) I 'Y G DOSE
51 I PSOCD>900 S DIR(0)="Y",DIR("A")="Recommended maximum daily dose is 900. Are you sure " D ^DIR K DIR G EXIT:$D(DIRUT) I 'Y G DOSE
52EXIT ;
53 K ^TMP($J,"PSO")
54 S:$D(DIRUT) ANQX=1
55 I $G(ANQX) W !!,"No Prescription entered!" K ANQDATA
56 E S PSONEW("SAND")=PSOCD_"^"_$P(PSOYS,"^",2)_"^"_($P($P(PSOYS,"^",6),"."))_"^"_$P(PSOYS,"^",4)
57 D DIR
58 Q
59MSG3 ;
60 W !!,"A CBC/Differential including WBC and ANC Must Be Ordered and Monitored on a",!
61 W "Twice weekly basis until the WBC STABILIZES above 3500/mm3 and ANC above",!
62 W "2000/mm3 with no signs of infection.",!
63 Q
64MSG4 ;
65 W !!,"Permission to dispense clozapine has been denied. If the results of the latest"
66 W !,"Lab Test drawn in the past 7 days show WBC>3000/mm3 and ANC>1500/mm3 and"
67 W !,"you wish to dispense outside the FDA and VA protocol WBC/ANC limits, document"
68 W !,"your request to Director of the VA National Clozapine Coordinating Center"
69 W !,"(Phone: 214-857-0068 Fax: 214-857-0339) for a one-time override permission."
70 Q
71MSG5 ;
72 W !!,"Permission to dispense clozapine has been denied. Please contact the"
73 W !,"Director of the VA National Clozapine Coordinating Center"
74 W !,"(Phone: 214-857-0068 Fax: 214-857-0339)."
75 Q
76MH ;
77 W !,"Also make sure that the LAB tests, WBC and ANC are set up correctly in the"
78 W !,"Mental Health package using the CLOZAPINE MULTI TEST LINK option."
79 Q
80DSP ;
81 W !,"*** Most recent "_$P(PSOYS,"^",3)_" and "_$P(PSOYS,"^",5)_" (ANC) results ***"
82 W !," performed on "
83 S Y=$P(PSOYS,"^",6) X ^DD("DD") W $P(Y,"@")_" are: "
84 W !!,?5,$P(PSOYS,"^",3)_": "_$P(PSOYS,"^",2)
85 W !,?5,"ANC: "_$P(PSOYS,"^",4),!
86 Q
87DIR ;
88 W !! K DIR S DIR(0)="E",DIR("A")="Press Return to Continue" D ^DIR K DIR,DTOUT,DUOUT,DIRUT
89 Q
90END ;
91 D MSG5
92QU S ANQX=1 D DIR
93 Q
941 ;;NO WBC IN LAST 7 DAYS
952 ;;NO VERIFIED WBC
963 ;;LAST WBC RESULT < 3500
974 ;;3 SEQ. WBC DECREASE
985 ;;LAST ANC RESULT < 2000
996 ;;3 SEQ. ANC DECREASE
1007 ;;NCCC AUTHORIZED
Note: See TracBrowser for help on using the repository browser.