source: FOIAVistA/tag/r/SURGERY-SR/SROPRIO.m@ 1154

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

initial load of FOIAVistA 6/30/08 version

File size: 3.6 KB
Line 
1SROPRIO ;B'HAM ISC/MAM - LIST OF OPERATIONS (BY PRIORITY) ; [ 09/22/98 11:36 AM ]
2 ;;3.0; Surgery ;**77,50**;24 Jun 93
3BEG S (SRSP,SRQ)=0,SRORD=1 W @IOF,!,"List of Operations by Surgical Priority:",!!
4DATE D DATE^SROUTL(.SRSD,.SRED,.SRQ) G:SRQ END
5PRIO W @IOF,! K DIR S DIR("A")="Print List of Operations for all priorities ",DIR("B")="Y",DIR(0)="Y"
6 S DIR("?",1)="Enter RETURN to print the report for all priorities,or 'N' to print the",DIR("?")="report for a specific specialty."
7 D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRQ=1 Q
8 I Y S SRPRIO="ALL" G SORT
9 D PRIORITY S X="",Z=1 F S X=$O(SRCODE(X)) Q:X="" S SRL(Z)=X,Z=Z+1
10 W ! K DIR S DIR("A",1)="Print report for which Priority ?",DIR("A",2)="",X="",Z=0 F S X=$O(SRCODE(X)) Q:X="" S Z=Z+1,DIR("A",Z+2)=Z_". "_SRCODE(X)
11 S DIR("A",Z+3)="",DIR("A")="Select Number: ",DIR("B")=1,DIR("?")="Enter a number between 1 and "_Z_".",DIR(0)="NA^1:"_Z_":0" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRQ=1 G END
12 S SRPRIO=SRL(Y)
13SORT W !!,"Do you want the report sorted by surgical specialty ? Y// " R SRYN:DTIME I '$T!(SRYN["^") S SRQ=1 G END
14 S:SRYN="" SRYN="Y" S SRYN=$E(SRYN)
15 I "YyNn"'[SRYN W !!,"Enter RETURN to sort the report by surgical specialty, or 'N' to not sort",!,"by surgical specialty." G SORT
16 I "Nn"[SRYN S SRORD=0 G DEVICE
17SER W !!,"Print for all surgical specialties ? Y// " R SRYN:DTIME I '$T!(SRYN["^") S SRQ=1 G END
18 S:SRYN="" SRYN="Y" S SRYN=$E(SRYN)
19 I "YyNn"'[SRYN W !!,"Enter RETURN to print the report for all surgical specialties, or 'N' to print",!,"the report for a specific specialty." G SER
20 I "Nn"[SRYN D SP I SRQ G END
21DEVICE K IOP,%ZIS,POP,IO("Q") S %ZIS("A")="Print the Report on which Device: ",%ZIS="QM" W !!,"This report is designed to use a 132 column format.",! D ^%ZIS G:POP END
22 I $D(IO("Q")) K IO("Q") S ZTDESC="LIST OF OPERATIONS",ZTRTN="^SROPRI",(ZTSAVE("SRORD"),ZTSAVE("SRSP*"),ZTSAVE("SRED"),ZTSAVE("SRPRIO"),ZTSAVE("SRSD"),ZTSAVE("SRSITE*"))="",%ZIS="QM" D ^%ZTLOAD G END
23 D ^SROPRI
24 Q
25PRIORITY ; get list of priorities
26 N SRLIST,SRC,SRP,I,J,X,Y D HELP^DIE(130,"",.035,"S","SRLIST")
27 F I=2:1:SRLIST("DIHELP") S X=SRLIST("DIHELP",I),Y=$F(X," "),SRC=$E(X,1,Y-2) F J=Y:1 I $E(X,J)'=" " S SRP=$E(X,J,99),SRCODE(SRC)=SRP Q
28 S SRCODE("ZZ")="PRIORITY NOT ENTERED"
29 Q
30SP W ! S SRSP=1 K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Print the report for which Specialty ? " D ^DIC I Y<0 S SRQ=1 Q
31 S SRSP(+Y)=+Y
32MORE ; more specialties?
33 K DIC S DIC("S")="I '$P(^(0),""^"",3)",DIC=137.45,DIC(0)="QEAMZ",DIC("A")="Select An Additional Specialty: " D ^DIC I Y>0 S SRSP(+Y)=+Y G MORE
34 Q
35END I 'SRQ,($E(IOST,1)'="P") W !!,"Press RETURN to continue " R X:DTIME
36 W ! D ^SRSKILL K SRTN D ^%ZISC W @IOF
37 Q
38RET W !!," Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRQ=1 Q
39 I X["?" W !!,"Press RETURN to continue with the List of Surgical Cases sorted by Surgical",!,"Priority, or '^' if you do not want to review any additional information." G RET
40 Q
41HDR ; print heading
42 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRQ=1 Q
43 I SRHDR,$E(IOST)'="P" D RET Q:SRQ
44 W:$Y @IOF W !,?(132-$L(SRINST)\2),SRINST,?125,"PAGE:",!,?58,"SURGICAL SERVICE",?127,PAGE
45 W !,?47,"LIST OF OPERATIONS BY SURGICAL PRIORITY",?100,SRPRINT
46 W !,?(132-$L(SRFRTO)\2),SRFRTO,?100,"REVIEWED BY:"
47 I SRPRIO'="ALL" S SRP=SRPRIO
48 I SRP'="" S SRTP="SURGICAL PRIORITY: "_SRCODE(SRP) W !,?(132-$L(SRTP)\2),SRTP,?100,"DATE REVIEWED:"
49 I SRP="" W !,?100,"DATE REVIEWED:"
50 W !!,"DATE",?13,"PATIENT",?38,"OPERATION(S)",?90,"SURGEON",?114,"ANESTHESIA TECH",!,"CASE #",?15,"ID#",?90,"1ST ASST",!,?90,"2ND ASST" W ! F I=1:1:132 W "-"
51 I $D(SRSPEC) W !,?(132-$L(">> "_SRSPEC_" <<")\2),">> "_SRSPEC_" <<",!
52 S SRHDR=1,PAGE=PAGE+1
53 Q
Note: See TracBrowser for help on using the repository browser.