VistA-WorldVistAEHR/r/SURGERY-SR/SROCMP2.m

22 lines
1.2 KiB
Mathematica

SROCMP2 ;BIR/MAM - PERIOPERATIVE OCCURRENCES REPORT ;02/02/06
;;3.0; Surgery ;**38,50,153**;24 Jun 93;Build 11
HDR ; print heading
I $D(ZTQUEUED) D ^SROSTOP I SRHALT S SRSOUT=1 Q
I SRHDR D HDR2 Q:SRSOUT S SRHDR=0
W:$Y @IOF W !,?(132-$L(SRINST)\2),SRINST,?120,"PAGE ",PAGE,!,?58,"SURGICAL SERVICE",?100,"REVIEWED BY: ",!,?53,"PERIOPERATIVE OCCURRENCES",?100,"DATE REVIEWED: "
W !,?(132-$L(SRFRTO)\2),SRFRTO,?100,SRPRINT
W !!!,?1,"PATIENT",?29,$S(SRSEL=2:"SURGICAL SPECIALTY",1:"ATTENDING SURGEON"),?80,"OCCURRENCE(S) - (DATE)",?125,"OUTCOME"
W !,?3,"ID#",?29,$S(SRSEL=3:"SURGICAL SPECIALTY",1:"PRINCIPAL OPERATION"),?80,"TREATMENT",!,"OPERATION DATE",?29,$S(SRSEL=3:"PRINCIPAL OPERATION",1:""),!
F I=1:1:132 W "="
S PAGE=PAGE+1 I '$D(^TMP("SR",$J)) Q
N SRY S SRY=$S(SRSEL=2:"ATTENDING",SRSEL=3:"CATEGORY",1:"SPECIALTY")_": "_SRSS W !,?(132-$L(SRY)\2),SRY,! F LINE=1:1:132 W "-"
Q
HDR2 ; more heading
F I=$Y:1:IOSL-9 W !
FOOT ; print footer
W ! F LINE=1:1:IOM W "-"
W !,"OUTCOMES: U - UNRESOLVED, I - IMPROVED, W - WORSE, D - DEATH"
W !,?11,"'*' Represents Postoperative Occurrences",! F LINE=1:1:IOM W "-"
S SRHDR=0 I $E(IOST)'="P" W !!,"Press RETURN to continue, or '^' to quit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 Q
Q