- Timestamp:
- Dec 4, 2009, 12:11:15 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSOAFSET.m
r613 r623 1 PSOAFSET ;VFA/HMS autofinish site parameter set up ;1/30/07 19:412 ;;7.0;OUTPATIENT PHARMACY;**208**;DEC 1997;Build 41 3 ; Copyright (C) 2007 WorldVistA4 ;5 ; This program is free software; you can redistribute it and/or modify6 ; it under the terms of the GNU General Public License as published by7 ; the Free Software Foundation; either version 2 of the License, or8 ; (at your option) any later version.9 ;10 ; This program is distributed in the hope that it will be useful,11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the13 ; GNU General Public License for more details.14 ;15 ; You should have received a copy of the GNU General Public License16 ; along with this program; if not, write to the Free Software17 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA18 ;'Modified' MAS Patient Look-up Check Cross-References June 198719 VERS ;20 ;Is taken from PSOLSET ;vfah21 ;Reference to ^PS(59.7 supported by DBIA 69422 ;Reference to ^PSX(550 supported by DBIA 223023 ;Reference to ^%ZIS supported by DBIA 343524 ;25 ;Called by PSOORFIN if using AutoFinish,Rx26 S PSOBAR1="",PSOBARS=0 ;make sure we have one27 S PSOCNT=0 F I=0:0 S I=$O(^PS(59,I)) Q:'I S PSOCNT=PSOCNT+1,Y=I28 S PSOPAR=$G(^PS(59,PSOSITE,1)),PSOPAR7=$G(^PS(59,PSOSITE,"IB")),PSOSYS=$G(^PS(59.7,1,40.1)) D CUTDATE^PSOFUNC ;HMS From DIV329 S PSOPINST=$P($G(^PS(59,PSOSITE,"INI")),"^")30 S (SITE,DA)=$P(^XMB(1,1,"XUS"),"^",17),DIC="4",DIQ(0)="IE",DR=".01;99",DIQ="PSXUTIL" D EN^DIQ1 S S3=$G(PSXUTIL(4,SITE,99,"I")),S2=$G(PSXUTIL(4,SITE,.01,"E")) K DA,DIC,DIQ(0),DR31 S PSXSYS=+$O(^PSX(550,"C",""))_"^"_$G(S3)_"^"_$G(S2),PSOINST=S332 K S3,S2,S1,PSXUTIL33 I $G(PSXSYS) D34 .K:($P($G(^PSX(550,+PSXSYS,0)),"^",2)'="A") PSXSYS35 .S Y=$$VERSION^XPDUTL("PSO") I Y>6.0 S PSXVER=136 E K PSXSYS37 S PSODIV=$S(($P(PSOSYS,"^",2))&('$P(PSOSYS,"^",3)):0,1:1)38 ;39 ;I $D(DUZ),$D(^VA(200,+DUZ,0)) S PSOCLC=DUZ40 I $D(DUZ) S DIC="^VA(200,",DIC(0)="NQEZ",X=DUZ41 D ^DIC K DIC42 I +Y S PSOCLC=DUZ43 ;44 PLBL Q ;HMS No printer selection PSOAFSET ends here45 LBL S %ZIS="MNQ",%ZIS("A")="Select LABEL PRINTER: " S:$G(PSOCLBL)&($D(PSOLAP))!($G(SUSPT)) %ZIS("B")=$S($G(SUSPT):PSLION,1:PSOLAP)46 D ^%ZIS K %ZIS,IO("Q"),IOP G:POP EXIT S @$S($G(SUSPT):"PSLION",1:"PSOLAP")=ION,PSOPIOST=$G(IOST(0))47 N PSOIOS S PSOIOS=IOS D DEVBAR^PSOBMST48 S PSOBARS=PSOBAR1]""&(PSOBAR0]"")&$P(PSOPAR,"^",19),PSOIOS=IOS D ^%ZISC49 LASK I $G(PSOPIOST),$D(^%ZIS(2,PSOPIOST,55,"B","LL")) G EXIT50 K DIR S DIR("A")="OK to assume label alignment is correct",DIR("B")="YES",DIR(0)="Y",DIR("?")="Enter Y if labels are aligned, N if they need to be aligned." D ^DIR G:Y!($D(DIRUT)) EXIT51 P2 S IOP=$G(PSOLAP) D ^%ZIS K IOP I POP W $C(7),!?5,"Printer is busy.",! G LASK52 U IO(0) W !,"Align labels so that a perforation is at the top of the",!,"print head and the left side is at column zero."53 W ! K DIR,DIRUT,DUOUT,DTOUT S DIR(0)="E" D ^DIR K DIR,DTOUT,DUOUT Q:$D(DIRUT) D ^PSOLBLT D ^%ZISC54 K DIRUT,DIR S DIR("A")="Is this correct",DIR("B")="YES",DIR(0)="Y",DIR("?")="Enter Y if labels are aligned correctly, N if they need to be aligned." D ^DIR G:Y!($D(DIRUT)) EXIT55 G P256 LEAVE S XQUIT="" G FINAL57 Q W !?10,$C(7),"Default printer for labels must be entered." G LBL58 ;59 EXIT D ^%ZISC Q:$G(PSOCLBL)60 D:'$G(PSOBFLAG) GROUP K I,IOP,X,Y,%ZIS,DIC,J,DIR,X,Y,DTOUT,DIROUT,DIRUT,DUOUT Q61 ;62 FINAL ;exit action from main menu - kill and quit63 K SITE,PSOCP,PSNP,PSL,PRCA,PSLION,PSOPINST64 K GROUPCNT,DISGROUP,PSOCAP,PSOINST,PSOION,PSONULBL,PSOSITE7,PFIO,PSOIOS,X,Y,PSOSYS,PSODIV,PSOPAR,PSOPAR7,PSOLAP,PSOPROP,PSOCLC,PSOCNT65 K PSODTCUT,PSOSITE,PSOPRPAS,PSOBAR1,PSOBAR0,PSOBARS,SIG,DIR,DIRUT,DTOUT,DIROUT,DUOUT,I,%ZIS,DIC,J,PSOREL66 Q67 GROUP ;display group68 S GROUPCNT=0,AGROUP="" I $D(^PS(59.3,0)) F S AGROUP=$O(^PS(59.3,"B",AGROUP)) Q:AGROUP="" D69 .S GROUPCNT=GROUPCNT+1 I GROUPCNT=1 S AGROUP1=AGROUP70 S:GROUPCNT=1 GRPNME=AGROUP1,II="" G:GROUPCNT>1 GROUP171 Q:'$D(GRPNME) F S II=$O(^PS(59.3,"B",GRPNME,II)) Q:II="" S DISGROUP=II72 K AGROUP,AGROUP1,GRPNME,II73 Q74 GROUP1 W ! S DIC("A")="Bingo Board Display: ",DIC=59.3,DIC(0)="AEMQZ",DIR(0)="Y",DIR("?")="Enter 'Y' to select Bingo Board Display or 'N' to EXIT"75 S:$P($G(^PS(59,PSOSITE,1)),"^",20) DIC("B")=$P($G(^PS(59,PSOSITE,1)),"^",20)76 D ^DIC K DIC Q:$D(DTOUT)!($D(DUOUT))77 I +Y<0 W $C(7) S DIR("A",1)="A 'BINGO BOARD DISPLAY' should be selected!",DIR("A")="Do you want to try again",DIR("B")="YES",DIR("?")="A display group must be defined in order to run Bingo Board." D ^DIR Q:"Y"'[$E(X) G GROUP78 S DISGROUP=+Y79 K DIR,DIC,AGROUP,AGROUP1,GRPNME,II80 Q1 PSOAFSET ;VFA/HMS autofinish site parameter set up ;1/30/07 19:41 2 ;;7.0;OUTPATIENT PHARMACY;**208**;DEC 1997;Build 39 3 ; Copyright (C) 2007 WorldVistA 4 ; 5 ; This program is free software; you can redistribute it and/or modify 6 ; it under the terms of the GNU General Public License as published by 7 ; the Free Software Foundation; either version 2 of the License, or 8 ; (at your option) any later version. 9 ; 10 ; This program is distributed in the hope that it will be useful, 11 ; but WITHOUT ANY WARRANTY; without even the implied warranty of 12 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 ; GNU General Public License for more details. 14 ; 15 ; You should have received a copy of the GNU General Public License 16 ; along with this program; if not, write to the Free Software 17 ; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 ;'Modified' MAS Patient Look-up Check Cross-References June 1987 19 VERS ; 20 ;Is taken from PSOLSET ;vfah 21 ;Reference to ^PS(59.7 supported by DBIA 694 22 ;Reference to ^PSX(550 supported by DBIA 2230 23 ;Reference to ^%ZIS supported by DBIA 3435 24 ; 25 ;Called by PSOORFIN if using AutoFinish,Rx 26 S PSOBAR1="",PSOBARS=0 ;make sure we have one 27 S PSOCNT=0 F I=0:0 S I=$O(^PS(59,I)) Q:'I S PSOCNT=PSOCNT+1,Y=I 28 S PSOPAR=$G(^PS(59,PSOSITE,1)),PSOPAR7=$G(^PS(59,PSOSITE,"IB")),PSOSYS=$G(^PS(59.7,1,40.1)) D CUTDATE^PSOFUNC ;HMS From DIV3 29 S PSOPINST=$P($G(^PS(59,PSOSITE,"INI")),"^") 30 S (SITE,DA)=$P(^XMB(1,1,"XUS"),"^",17),DIC="4",DIQ(0)="IE",DR=".01;99",DIQ="PSXUTIL" D EN^DIQ1 S S3=$G(PSXUTIL(4,SITE,99,"I")),S2=$G(PSXUTIL(4,SITE,.01,"E")) K DA,DIC,DIQ(0),DR 31 S PSXSYS=+$O(^PSX(550,"C",""))_"^"_$G(S3)_"^"_$G(S2),PSOINST=S3 32 K S3,S2,S1,PSXUTIL 33 I $G(PSXSYS) D 34 .K:($P($G(^PSX(550,+PSXSYS,0)),"^",2)'="A") PSXSYS 35 .S Y=$$VERSION^XPDUTL("PSO") I Y>6.0 S PSXVER=1 36 E K PSXSYS 37 S PSODIV=$S(($P(PSOSYS,"^",2))&('$P(PSOSYS,"^",3)):0,1:1) 38 ; 39 ;I $D(DUZ),$D(^VA(200,+DUZ,0)) S PSOCLC=DUZ 40 I $D(DUZ) S DIC="^VA(200,",DIC(0)="NQEZ",X=DUZ 41 D ^DIC K DIC 42 I +Y S PSOCLC=DUZ 43 ; 44 PLBL Q ;HMS No printer selection PSOAFSET ends here 45 LBL S %ZIS="MNQ",%ZIS("A")="Select LABEL PRINTER: " S:$G(PSOCLBL)&($D(PSOLAP))!($G(SUSPT)) %ZIS("B")=$S($G(SUSPT):PSLION,1:PSOLAP) 46 D ^%ZIS K %ZIS,IO("Q"),IOP G:POP EXIT S @$S($G(SUSPT):"PSLION",1:"PSOLAP")=ION,PSOPIOST=$G(IOST(0)) 47 N PSOIOS S PSOIOS=IOS D DEVBAR^PSOBMST 48 S PSOBARS=PSOBAR1]""&(PSOBAR0]"")&$P(PSOPAR,"^",19),PSOIOS=IOS D ^%ZISC 49 LASK I $G(PSOPIOST),$D(^%ZIS(2,PSOPIOST,55,"B","LL")) G EXIT 50 K DIR S DIR("A")="OK to assume label alignment is correct",DIR("B")="YES",DIR(0)="Y",DIR("?")="Enter Y if labels are aligned, N if they need to be aligned." D ^DIR G:Y!($D(DIRUT)) EXIT 51 P2 S IOP=$G(PSOLAP) D ^%ZIS K IOP I POP W $C(7),!?5,"Printer is busy.",! G LASK 52 U IO(0) W !,"Align labels so that a perforation is at the top of the",!,"print head and the left side is at column zero." 53 W ! K DIR,DIRUT,DUOUT,DTOUT S DIR(0)="E" D ^DIR K DIR,DTOUT,DUOUT Q:$D(DIRUT) D ^PSOLBLT D ^%ZISC 54 K DIRUT,DIR S DIR("A")="Is this correct",DIR("B")="YES",DIR(0)="Y",DIR("?")="Enter Y if labels are aligned correctly, N if they need to be aligned." D ^DIR G:Y!($D(DIRUT)) EXIT 55 G P2 56 LEAVE S XQUIT="" G FINAL 57 Q W !?10,$C(7),"Default printer for labels must be entered." G LBL 58 ; 59 EXIT D ^%ZISC Q:$G(PSOCLBL) 60 D:'$G(PSOBFLAG) GROUP K I,IOP,X,Y,%ZIS,DIC,J,DIR,X,Y,DTOUT,DIROUT,DIRUT,DUOUT Q 61 ; 62 FINAL ;exit action from main menu - kill and quit 63 K SITE,PSOCP,PSNP,PSL,PRCA,PSLION,PSOPINST 64 K GROUPCNT,DISGROUP,PSOCAP,PSOINST,PSOION,PSONULBL,PSOSITE7,PFIO,PSOIOS,X,Y,PSOSYS,PSODIV,PSOPAR,PSOPAR7,PSOLAP,PSOPROP,PSOCLC,PSOCNT 65 K PSODTCUT,PSOSITE,PSOPRPAS,PSOBAR1,PSOBAR0,PSOBARS,SIG,DIR,DIRUT,DTOUT,DIROUT,DUOUT,I,%ZIS,DIC,J,PSOREL 66 Q 67 GROUP ;display group 68 S GROUPCNT=0,AGROUP="" I $D(^PS(59.3,0)) F S AGROUP=$O(^PS(59.3,"B",AGROUP)) Q:AGROUP="" D 69 .S GROUPCNT=GROUPCNT+1 I GROUPCNT=1 S AGROUP1=AGROUP 70 S:GROUPCNT=1 GRPNME=AGROUP1,II="" G:GROUPCNT>1 GROUP1 71 Q:'$D(GRPNME) F S II=$O(^PS(59.3,"B",GRPNME,II)) Q:II="" S DISGROUP=II 72 K AGROUP,AGROUP1,GRPNME,II 73 Q 74 GROUP1 W ! S DIC("A")="Bingo Board Display: ",DIC=59.3,DIC(0)="AEMQZ",DIR(0)="Y",DIR("?")="Enter 'Y' to select Bingo Board Display or 'N' to EXIT" 75 S:$P($G(^PS(59,PSOSITE,1)),"^",20) DIC("B")=$P($G(^PS(59,PSOSITE,1)),"^",20) 76 D ^DIC K DIC Q:$D(DTOUT)!($D(DUOUT)) 77 I +Y<0 W $C(7) S DIR("A",1)="A 'BINGO BOARD DISPLAY' should be selected!",DIR("A")="Do you want to try again",DIR("B")="YES",DIR("?")="A display group must be defined in order to run Bingo Board." D ^DIR Q:"Y"'[$E(X) G GROUP 78 S DISGROUP=+Y 79 K DIR,DIC,AGROUP,AGROUP1,GRPNME,II 80 Q
Note:
See TracChangeset
for help on using the changeset viewer.
