source: FOIAVistA/trunk/r/SURGERY-SR/SROALOG.m@ 1688

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

initial load of FOIAVistA 6/30/08 version

File size: 4.6 KB
Line 
1SROALOG ;BIR/MAM - ASSESSMENT LOG ;01/24/08
2 ;;3.0; Surgery ;**38,55,62,77,50,153,160,166**;24 Jun 93;Build 6
3 K SRMNA S (SRSOUT,SRFLG,SRSP,SRAST)=0,SRSRT=1
4START G:SRSOUT END W @IOF K DIR S DIR("A",1)="List of Surgery Risk Assessments",DIR("A",2)="",DIR("A",3)=" 1. List of Incomplete Assessments"
5 S DIR("A",4)=" 2. List of Completed Assessments",DIR("A",5)=" 3. List of Transmitted Assessments"
6 S DIR("A",6)=" 4. List of Non-Assessed Major Surgical Cases",DIR("A",7)=" 5. List of All Major Surgical Cases"
7 S DIR("A",8)=" 6. List of All Surgical Cases",DIR("A",9)=" 7. List of Completed/Transmitted Assessments Missing Information"
8 S DIR("A",10)=" 8. List of 1-Liner Cases Missing Information",DIR("A",11)=" 9. List of Eligible Cases"
9 S DIR("A",12)=" 10. List of Cases With No CPT Codes",DIR("A",13)=" 11. Summary List of Assessed Cases"
10 S DIR("A",14)="",DIR("A")="Select the Number of the Report Desired"
11 S DIR(0)="NO^1:11" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT)!'Y S SRSOUT=1 G END
12 S SREPORT=X
13DATE I SREPORT=3 D DSORT G:SRSOUT END
14 D DATE^SROUTL(.SRSD,.SRED,.SRSOUT) G:SRSOUT END
15 I SREPORT=9 D TYPE9 I SRSOUT G END
16 I SREPORT=3 D TYPE3 I SRSOUT G END
17 D SEL G:SRSOUT END
18 N SRINSTP S SRINST=$$INST^SROUTL0() G:SRINST="^" END S SRINSTP=$P(SRINST,"^"),SRINST=$S(SRINST["ALL DIVISIONS":SRINST,1:$P(SRINST,"^",2))
19 I SREPORT<7 W @IOF,!,"This report is designed to print to your terminal screen or a printer. When",!,"using a printer, a 132 column format is used.",!
20 K IOP,%ZIS,POP,IO("Q") S %ZIS("A")="Print the List of Assessments to which Device: ",%ZIS="QM" D ^%ZIS I POP S SRSOUT=1 G END
21 I $D(IO("Q")) K IO("Q") D S ZTREQ="@" D ^%ZTLOAD G END
22 .S ZTRTN="EN^SROALOG",ZTDESC="List of Surgery Risk Assessments"
23 .S (ZTSAVE("SRSD"),ZTSAVE("SRED"),ZTSAVE("SREPORT"),ZTSAVE("SRASP"),ZTSAVE("SRFLG"),ZTSAVE("SRSP"),ZTSAVE("SRINSTP"),ZTSAVE("SRAST"),ZTSAVE("SRSRT"))=""
24EN ; entry when queued
25 N SRFRTO S Y=SRSD X ^DD("DD") S SRFRTO="FROM: "_Y_" TO: ",Y=SRED X ^DD("DD") S SRFRTO=SRFRTO_Y
26 U IO S SRSD=SRSD-.0001,SRED=SRED_".9999",Y=DT X ^DD("DD") S SRPRINT="DATE PRINTED: "_Y
27 S SRINST=$S(SRINSTP["ALL DIV":$P($$SITE^SROVAR,"^",2)_" - ALL DIVISIONS",1:$$GET1^DIQ(4,SRINSTP,.01))
28 I SREPORT=1 D:SRSP ^SROANTS D:'SRSP ^SROANT G END
29 I SREPORT=2 D:SRSP ^SROALCS D:'SRSP ^SROALC G END
30 I SREPORT=3 D:SRSP ^SROALTS D:'SRSP ^SROALT G END
31 I SREPORT=4 S SRMNA=1 D:SRSP ^SROALLS D:'SRSP ^SROALL G END
32 I SREPORT=5 D:SRSP ^SROALLS D:'SRSP ^SROALL G END
33 I SREPORT=7 D ^SROALM G END
34 I SREPORT=8 D ^SROALMN G END
35 I SREPORT=9 D ^SROALEC G END
36 I SREPORT=10 D ^SROALNC G END
37 I SREPORT=11 D ^SROALSL G END
38 D:SRSP ^SROALSS D:'SRSP ^SROALST
39END I 'SRSOUT,$E(IOST)'="P" W !!,"Press ENTER to continue " R X:DTIME
40 W:$E(IOST)="P" @IOF K ^TMP("SRA",$J) I $D(ZTQUEUED) Q:$G(ZTSTOP) S ZTREQ="@" Q
41 D ^%ZISC K SRTN,SRAST,SRSRT W @IOF D ^SRSKILL
42 Q
43TYPE3 ; select type of eligible cases
44 W ! K DIR S DIR("A",1)="Print which Transmitted Cases ?",DIR("A",2)="",DIR("A",3)=" 1. Assessed Cases Only"
45 S DIR("A",4)=" 2. Excluded Cases Only",DIR("A",5)=" 3. Both Assessed and Excluded",DIR("A",6)=""
46 S DIR("A")="Select Number",DIR("B")=1,DIR(0)="N^1:3" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
47 S SRAST=Y
48 Q
49TYPE9 ; select type of transmitted case
50 W ! K DIR S DIR("A",1)="Print which Eligible Cases ?",DIR("A",2)="",DIR("A",3)=" 1. Assessed Cases Only"
51 S DIR("A",4)=" 2. Excluded Cases Only",DIR("A",5)=" 3. Non-Assessed Cases only",DIR("A",6)=" 4. All Cases",DIR("A",7)=""
52 S DIR("A")="Select Number",DIR("B")=1,DIR(0)="N^1:4" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
53 S SRAST=Y
54 Q
55DSORT ; sort by op date or transmit date
56 W ! K DIR S DIR("A",1)="Print by Date of Operation or by Date of Transmission ?",DIR("A",2)="",DIR("A",3)=" 1. Date of Operation"
57 S DIR("A",4)=" 2. Date of Transmission",DIR("A",5)="",DIR("A")="Select Number",DIR("B")=1,DIR(0)="N^1:2"
58 D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
59 S SRSRT=Y
60 Q
61SEL ; select specialty
62 W ! K DIR S DIR(0)="YA",DIR("A")="Print by Surgical Specialty ? ",DIR("B")="YES"
63 S DIR("?",1)="Enter YES to print the report by surgical specialty, or NO to print",DIR("?")="the report listing all surgical cases."
64 D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
65 Q:'Y
66SEL1 S SRSP=1 W ! K DIR S DIR(0)="YA",DIR("A")="Print report for ALL specialties ? ",DIR("B")="YES"
67 S DIR("?",1)="Enter YES to print the report for all surgical specialties, or NO to",DIR("?")="print the report for a specific surgical specialty."
68 D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1 Q
69 I 'Y W ! S DIC("S")="I '$P(^(0),""^"",3)",DIC("A")="Print the Report for which Surgical Specialty: ",DIC=137.45,DIC(0)="QEAMZ" D ^DIC K DIC I Y>0 S SRASP=+Y,SRFLG=1 Q
70 I Y'>0 S SRSOUT=1 Q
71 Q
Note: See TracBrowser for help on using the repository browser.