source: WorldVistAEHR/trunk/r/PHARMACY_DATA_MANAGEMENT-PSS/PSSWRNB.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: 5.9 KB
RevLine 
[613]1PSSWRNB ;BIR/EJW-NEW WARNING SOURCE CUSTOM WARNING LIST BUILDER ; 9/8/05 3:46pm
2 ;;1.0;PHARMACY DATA MANAGEMENT;**87,98**;9/30/97
3 ;
4 ;IA: 3735 ^PSNDF(50.68
5 ;IA: 4445 ^PS(50.625
6 ;IA: 4446 ^PS(50.626
7 ;IA: 4448 ^PS(50.627
8 D NOTE^PSSWRNE,NOTE2^PSSWRNE
9 W ! K DIR S DIR(0)="Y",DIR("B")="N",DIR("A")=" Would you like to print a list of the entries in these files" D ^DIR K DIR I Y["^"!($D(DTOUT)) W !!?3,"Nothing queued to print." G SEL
10 I 'Y G SEL
11 S SPANISH=0
12 W ! K DIR S DIR(0)="Y",DIR("B")="N",DIR("A")=" Would you like to include the Spanish translations" D ^DIR K DIR I Y["^"!($D(DTOUT)) W !!?3,"Nothing queued to print." G SEL
13 I Y S SPANISH=1
14 D RPT
15SEL ;
16 W @IOF
17 D NOTE^PSSWRNE
18 W !!,?2,"Select one of the following to display drugs that match that criteria to"
19 W !,?2,"examine or edit their drug warnings:"
20 K DIR
21 S DIR("B")=""
22 S DIR("A")="Enter selection: "
23 S DIR("A",1)="1. Drug has WARNING LABEL filled in but there are no FDB warnings for the drug"
24 S DIR("A",2)="2. Drug has WARNING LABEL numbers higher than 20"
25 S DIR("A",3)="3. Select by range of drug names"
26 S DIR("A",4)="4. Drug has more than 5 warning labels"
27 S DIR("A",5)="5. Drugs containing specific WARNING LABEL number"
28 S DIR("A",6)="6. Drug has WARNING LABEL that does not map to new data source"
29 S DIR("A",7)="7. Drugs containing specific new data source warning number"
30 S DIR("A",8)="8. Drugs containing gender-specific warnings"
31 S DIR("A",9)="9. Drugs with warning mapping, but drug doesn't contain ""mapped to"" number"
32 S DIR(0)="SA^1:DRUGS WITH NO FDB WARNINGS;2:LOCAL WARNING (>20);3:RANGE OF DRUG NAMES;4:GREATER THAN 5 WARNINGS;5:SPECIFIC WARNING LABEL NUMBER;6:NO MAPPING;7:SPECIFIC NEW WARNING;8:GENDER-SPECIFIC WARNING;9:NO MAPPED TO"
33 D ^DIR K DIR S SEL=Y
34 I 'SEL G KILL
35 N DR,ACTIVE,SKIP,QUIT,PSO9
36 S SKIP=1,QUIT=0
37 K ^TMP("PSSWRNB",$J)
38ASK K DIR W ! S DIR(0)="Y",DIR("B")="Y",DIR("A")="Exclude drugs with NEW WARNING LABEL LIST filled in" D ^DIR K DIR
39 I 'Y S SKIP=0
40 W !!,$C(7),"NOTE: Only the first 5 warnings will print on the yellow auxillary labels."
41 K DIR S DIR(0)="Y",DIR("B")="Y",DIR("A")="Do you want to see the warning text for all warnings" D ^DIR K DIR
42 S ENDWARN=5
43 I Y S ENDWARN=99 D
44 .W !," Warnings (>5) that won't print and won't be sent to CMOP"
45 .W !," will be marked with a ""*"" on the following screens."
46 W ! K DIR S DIR(0)="E" D ^DIR K DIR I 'Y S PSSOUT=1 Q
47 ;
48 I SEL=1 D SEL1^PSSWRNC
49 ;
50 I SEL=2 D SEL2^PSSWRNC
51 ;
52 I SEL=3 D SEL3^PSSWRNC
53 ;
54 I SEL=4 D SEL4^PSSWRNC
55 ;
56 I SEL=5!(SEL=9) D SEL59^PSSWRNC
57 ;
58 I SEL=6 D SEL6^PSSWRNC
59 ;
60 I SEL=7 D SEL7^PSSWRNC
61 ;
62 I SEL=8 D SEL8^PSSWRNC
63 ;
64 I 'QUIT I '$D(^TMP("PSSWRNB",$J)) W !,"Nothing meets selection criteria" H 2 S QUIT=1
65 I 'QUIT D EDIT^PSSWRNE
66 G SEL
67RPT ;
68RPTQ W !!,"You may queue the report to print, if you wish.",!
69 ;
70DVC K %ZIS,POP,IOP S %ZIS="QM" D ^%ZIS I $G(POP) W !,"Nothing queued to print.",! G DONE
71 S ZTSAVE("*")=""
72 I $D(IO("Q")) S ZTRTN="PRT54^PSSWRNB",ZTDESC="WARNING LABEL TEXT REPORTS" D ^%ZTLOAD K %ZIS W !,"Report queued to print.",! G DONE
73PRT54 ;
74 U IO
75 S PSSOUT=0,PSSDV=$S($E(IOST,1,2)="C-":"C",1:"P")
76 S PSSPGCT=0,PSSPGLN=IOSL-7,PSSPGCT=1
77 S TITLE="RX CONSULT file - WARNING LABEL TEXT"
78 D TITLE
79 ;
80 S SEQ=0 F S SEQ=$O(^PS(54,SEQ)) Q:'SEQ D PRTRPT
81 G END
82PRTRPT ;
83 I $G(^PS(54,SEQ,0))'="" D RXCON D FULL I $G(PSSOUT) Q
84 D FULL I $G(PSSOUT) Q
85 W ! F MJT=1:1:70 W "-"
86 Q
87RXCON D FULL Q:$G(PSSOUT) W !,"RX CONSULT NUMBER: ",SEQ
88 N PSSTXT
89 D FULL I $G(PSSOUT) Q
90 W !
91 S PSSTXT=0 F S PSSTXT=$O(^PS(54,SEQ,1,PSSTXT)) Q:'PSSTXT D FULL Q:$G(PSSOUT) W !,?3,^PS(54,SEQ,1,PSSTXT,0)
92 I $G(SPANISH),$D(^PS(54,SEQ,3)) W !!,"Spanish translation:" D
93 .S PSSTXT=^PS(54,SEQ,3) Q:PSSTXT="" D FULL Q:$G(PSSOUT) W !,?3 D
94 ..N LEN,I,STR
95 ..S LEN=0
96 ..F I=1:1:$L(PSSTXT," ") S STR=$P(PSSTXT," ",I),LEN=LEN+$L(STR) W:LEN>62 !,?3 S:LEN>62 LEN=0 W STR," "
97 Q
98 ;
99FULL ;
100 I ($Y+5)>IOSL&('$G(PSSOUT)) D TITLE
101 Q
102 ;
103TITLE ;
104 I $E($G(PSSDV))="C",$G(PSSPGCT)'=1 W ! K DIR S DIR(0)="E" D ^DIR K DIR I 'Y S PSSOUT=1 Q
105 ;
106 W @IOF
107 W !,?16,TITLE,!
108 S Y=DT X ^DD("DD") W !,"Date printed: ",Y,?70,"Page: ",PSSPGCT,!
109 F MJT=1:1:79 W "="
110 W !
111 S PSSPGCT=PSSPGCT+1
112 Q
113END ;
114 I '$G(PSSOUT),$E($G(PSSDV))="C" W !!,"End of Rx Consult file Report." K DIR S DIR(0)="E",DIR("A")="Press Return to continue" D ^DIR K DIR
115 I $E($G(PSSDV))="C" W !
116 E W @IOF
117 G PRTNEW
118END2 ;
119 I '$G(PSSOUT),$E($G(PSSDV))="C" W !!,"End of Report." K DIR S DIR(0)="E",DIR("A")="Press Return to continue" D ^DIR K DIR
120 I $E($G(PSSDV))="C" W !
121 E W @IOF
122DONE ;
123 K SEQ,MJT,PSSPGCT,PSSPGLN,Y,DIR,INDT,PSSXX,X,OITM,IOP,POP,IO("Q"),DIRUT,DUOUT,DTOUT
124 K PSSDV,PSSOUT D ^%ZISC S:$D(ZTQUEUED) ZTREQ="@"
125 Q
126 ;
127PRTNEW ;
128 U IO
129 S PSSOUT=0,PSSDV=$S($E(IOST)="C":"C",1:"P")
130 S PSSPGCT=0,PSSPGLN=IOSL-7,PSSPGCT=1
131 S TITLE="WARNING LABEL-ENGLISH file - WARNING LABEL TEXT"
132 D TITLE
133 ; REPORT FROM NEW WARNING LABEL SOURCE
134 S SEQ=0 F S SEQ=$O(^PS(50.625,SEQ)) Q:'SEQ D RPTNEW
135 G END2
136RPTNEW ;
137 I $G(^PS(50.625,SEQ,0))'="" D FDBWARN D FULL I $G(PSSOUT) Q
138 D FULL I $G(PSSOUT) Q
139 W ! F MJT=1:1:70 W "-"
140 Q
141FDBWARN D FULL Q:$G(PSSOUT) W !,"WARNING LABEL-ENGLISH NUMBER: ",+SEQ
142 N PSSTXT
143 D FULL I $G(PSSOUT) Q
144 W !
145 S PSSTXT=0 F S PSSTXT=$O(^PS(50.625,SEQ,1,PSSTXT)) Q:'PSSTXT D FULL Q:$G(PSSOUT) W !,?3,^PS(50.625,SEQ,1,PSSTXT,0)
146 I $G(SPANISH) W !!,"Spanish translation:" D
147 .S PSSTXT=0 F S PSSTXT=$O(^PS(50.626,SEQ,1,PSSTXT)) Q:'PSSTXT D FULL Q:$G(PSSOUT) W !,?3,^PS(50.626,SEQ,1,PSSTXT,0)
148 Q
149 ;
150KILL ;
151 K ^TMP("PSSWRNB",$J),NDF,PSSWRN,SEL,SPANISH,WARN54,RXNUM,WARN,WARN20,STR,PSOWARN,JJJ,TEXT,WWW,DRUGN,DRUG,DEA,TITLE
152 Q
153DRUG ;
154 S NDF=0
155 N PSOPROD,GCNSEQNO,I,NEWWARN
156 S PSSWRN=""
157 S PSOPROD=$P($G(^PSDRUG(DR,"ND")),"^",3) I PSOPROD="" Q
158 S NDF=1
159 S GCNSEQNO=$$GET1^DIQ(50.68,PSOPROD,11,"I")
160 I GCNSEQNO="" Q
161 D GCN^PSSWRNA
162 Q
163WARN ; ENTRY POINT DRUG ENTER/EDIT OPTION
164 S DRUGENT=1
165 S DRUG=$P($G(^PSDRUG(DA,0)),"^") I DRUG="" Q
166 S ^TMP("PSSWRNB",$J,DRUG)=""
167 D EDIT^PSSWRNE
168 Q
169ACTIVE ;
170 S ACTIVE=1
171 I $P($G(^PSDRUG(DR,"I")),"^"),$P($G(^("I")),"^")<DT S ACTIVE=0 Q
172 Q
Note: See TracBrowser for help on using the repository browser.