source: WorldVistAEHR/trunk/r/OUTPATIENT_PHARMACY-PSO-APSP-HUIP/PSODUE.m@ 1211

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

initial load of WorldVistAEHR

File size: 1.8 KB
Line 
1PSODUE ;BHAM ISC/JRR - DUE BUILD A QUESTIONNAIRE ; 11/17/92 10:20
2 ;;7.0;OUTPATIENT PHARMACY;**268**;DEC 1997;Build 9
3 Q
4BUILD ;Build/Edit a DUE Survey Questionnaire
5B2 S DIC="^PS(50.073,",DIC(0)="AEQLM",DLAYGO=50.073 D ^DIC K DIC G:Y<1 EXITB
6 S (DA,PSODUEL)=+Y,DIE=50.073,DR="[PSOD DUE BUILD QUESTIONNAIRE]" L +^PS(50.073,PSODUEL):$S(+$G(^DD("DILOCKTM"))>0:+^DD("DILOCKTM"),1:3) I '$T W !,"Entry is being edited by another user. Try Later!",! G B2
7 D ^DIE L -^PS(50.073,PSODUEL) K PSODUEL,PSRC
8 G B2
9EXITB K DIC,DIE,DA,DR,PSLOCK,PSQTYP,PSQUEST,X,Y
10 QUIT
11 ;
12PRINT ;Batch print a Due Questionnaire
13 S DIC="^PS(50.073,",DIC(0)="QEAM" D ^DIC K DIC
14 G:Y=-1 EXITP
15 S PSOQAIR=+Y
16 S DIR(0)="NO^1:999",DIR("A")="NUMBER OF COPIES",DIR("?")="Enter the number of copies of this DUE Questionnaire to print" D ^DIR K DIR
17 G:Y<1 EXITP
18 S PSQCNT=Y
19 K %ZIS,ZTDTH,ZTSAVE,IOP,ZTSK S PSOION=ION,%ZIS="QM" D ^%ZIS K %ZIS I POP S IOP=PSOION D ^%ZIS K IOP,PSOION G EXITP
20 K PSOION I $D(IO("Q")) S ZTDESC="Print Due Questionnaires",ZTRTN="START^PSODUE" S ZTSAVE("PSQCNT")="",ZTSAVE("PSOQAIR")="",ZTSAVE("ZTREQ")="@" D ^%ZTLOAD W:$D(ZTSK) "queued..." K ZTSK,IO("Q") G EXITP
21 ;
22START ;Start here when print is queued
23 U IO
24 F PSI=1:1:PSQCNT S PSOQ=PSOQAIR D OUT
25EXITP D ^%ZISC
26 K DUOUT,DTOUT,PSDASH,PSQ,PSQA,PSQCNT,PSIGN,PSOQAIR,PSOQN,PSOQM,PSTXT,PSWRAP,PSQNUM
27 K POP,TAB,DIRUT,DIROUT,PSLOCK,PSQUEST,PSQTYP,PSOQL,PSMARG,PSI,X,Y
28 QUIT
29 ;
30OUT S PSOQM=$P(^PS(50.073,PSOQ,0),"^")
31 W @IOF,?(IOM\2-($L(PSOQM)\2)-4),"*** ",PSOQM," ***",!
32 W !,"DRUG: __________________________"
33 S X="RX #: ______________" D X
34 S X="PROVIDER: ______________________" D X
35 S X="PATIENT: _______________________" D X
36 S X="SECTION: _______________________" D X
37 S X="SEQ. # __________________" D X
38 D QOUT^PSODACT
39 K PSDASH,PSOQM,PSOQ
40 Q
41X W:(IOM-$X)<($L(X)+4) !! S TAB=$S($X:$X+3,1:0) W ?(TAB),X
Note: See TracBrowser for help on using the repository browser.