source: FOIAVistA/trunk/r/SURGERY-SR/SROQIDP0.m@ 847

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1SROQIDP0 ;BIR/ADM - LIST OF INVASIVE DIAGNOSTIC PROCEDURES ;09/22/98 11:46 AM
2 ;;3.0; Surgery ;**62,77,50,142**;24 Jun 93
3 ;
4 ;** NOTICE: This routine is part of an implementation of a nationally
5 ;** controlled procedure. Local modifications to this routine
6 ;** are prohibited.
7 ;
8 U IO S (SRIDPT,SRSOUT)=0,(SRHDR,SRPAGE)=1,SRSD=SDATE-.0001,SRED=EDATE+.9999,Y=SDATE X ^DD("DD") S STARTDT=Y,Y=EDATE X ^DD("DD") S ENDATE=Y K ^TMP("SR",$J) F I="N","I","O" S SRIOT(I)=0
9 S SRRPT="LIST OF INVASIVE DIAGNOSTIC PROCEDURES",SRFRTO="From: "_STARTDT_" To: "_ENDATE
10 S SRINST=$S(SRINSTP["ALL DIV":$P($$SITE^SROVAR,"^",2)_" - ALL DIVISIONS",1:$$GET1^DIQ(4,SRINSTP,.01))
11 D NOW^%DTC S Y=$E(%,1,12) X ^DD("DD") S SRPRINT="Report Printed: "_Y
12 D HDR D AC^SROQIDP
13 I SRIDPT=0 W $$NODATA^SROUTL0() Q
14 S SRSD=0 F S SRSD=$O(^TMP("SR",$J,SRSD)) Q:'SRSD!SRSOUT S SRTN=0 F S SRTN=$O(^TMP("SR",$J,SRSD,SRTN)) Q:'SRTN!SRSOUT S SRZ=^TMP("SR",$J,SRSD,SRTN) D PRINT
15 D:$Y+10>IOSL PAGE Q:SRSOUT W !! D
16 .I SRIO="A" W ?4,"TOTAL CASES BY IN/OUT-PATIENT STATUS",!,?14,"INPATIENT: ",SRIOT("I"),!,?13,"OUTPATIENT: ",SRIOT("O"),!,?12,"NOT ENTERED: ",SRIOT("N"),!!,?12,"TOTAL CASES: ",SRIDPT
17 .I SRIO'="A" W "TOTAL "_$S(SRIO="I":"INPATIENT",1:"OUTPATIENT")_" CASES: "_SRIOT(SRIO)
18 Q
19PRINT ; print case information
20 D:$Y+9>IOSL PAGE Q:SRSOUT S SRL=78,SRSUPCPT=1 D PROC^SROUTL
21 S DFN=$P(SRZ,"^"),SRSS=$P(^SRO(137.45,$P(SRZ,"^",2),0),"^"),Y=$P(SRZ,"^",3),SRIOSTAT=$S(Y="I":"INPATIENT",Y="O":"OUTPATIENT",1:"NOT ENTERED"),SRDOC=$P($G(^SRF(SRTN,.1)),"^",4) I SRDOC S SRDOC=$P(^VA(200,SRDOC,0),"^")
22 D DEM^VADPT S SRSNM=VADM(1),SRSSN=VA("PID"),Y=SRSD X ^DD("DD") S SRSDATE=Y,X1=$E(SRSD,1,7),X2=$P(VADM(3),"^"),SRAGE=$E(X1,1,3)-$E(X2,1,3)-($E(X1,4,7)<$E(X2,4,7))
23 D TECH^SROPRIN S SRANES=$S(SRTECH'="":SRTECH,1:"NOT ENTERED")
24 W !,SRSDATE,?22,SRSNM,?54,$S(SRSPEC:$E(SRDOC,1,27),1:$E(SRSS,1,27)),?89,SRANES,?117,SRIOSTAT
25 W !,SRTN,?22,SRSSN_" ("_SRAGE_")",?54,SRPROC(1),! S I=1 F S I=$O(SRPROC(I)) Q:'I W ?54,SRPROC(I),!
26 D:$Y+9>IOSL PAGE Q:SRSOUT S SRL=78 D PROC^SROUTLN W !,?54,SRPROC(1),! S I=1 F S I=$O(SRPROC(I)) Q:'I W ?54,SRPROC(I),!
27 Q
28PRESS W !! K DIR S DIR(0)="E" D ^DIR K DIR I $D(DTOUT)!$D(DUOUT) S SRSOUT=1
29 Q
30PAGE I $E(IOST)="P"!SRHDR G HDR
31 D PRESS I SRSOUT Q
32HDR ; print heading
33 I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
34 W:$Y @IOF W:$E(IOST)="P" !,?(IOM-$L(SRINST)\2),SRINST W !,?(IOM-$L(SRRPT)\2),SRRPT,?(IOM-10),$J("PAGE "_SRPAGE,9),!,?(IOM-$L(SRFRTO)\2),SRFRTO W:$E(IOST)="P" !,?(IOM-$L(SRPRINT)\2),SRPRINT
35 I SRSPEC S X="SURGICAL SPECIALTY: "_SRSPECN W !,?(IOM-$L(X)\2),X
36 W !!,"DATE OF OPERATION",?22,"PATIENT NAME",?54,$S(SRSPEC:"SURGEON",1:"SURGICAL SPECIALTY"),?89,"ANESTHESIA TECHNIQUE",?117,"IN/OUT-PATIENT"
37 W !,"CASE #",?22,"PATIENT ID (AGE)",?54,"PROCEDURE(S) PERFORMED"
38 S SRHDR=0,SRPAGE=SRPAGE+1 W ! F I=1:1:IOM W "="
39 Q
Note: See TracBrowser for help on using the repository browser.