source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMPMON1.m@ 1306

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

initial load of WorldVistAEHR

File size: 2.8 KB
Line 
1QAMPMON1 ;HISC/DAD-MONITOR DESCRIPTION REPORT ;9/14/92 11:29
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3 S (QAMPAGE,QAMHEAD,QAMPAUSE)=1,QAMZERO=$S($D(^QA(743,QAMD0,0))#2:^(0),1:""),QAMONE=$S($D(^(1))#2:^(1),1:"") Q:QAMZERO="" S QAMFOUND=1 D HEAD
4 W !!,"CODE: ",$P(QAMZERO,"^")," ",$S($P(QAMZERO,"^",4):"(a)",1:"(m)"),?43,"TITLE: ",$P(QAMZERO,"^",2) S X=$P(QAMZERO,"^",3),X=$S($D(^DIC(49,+X,0))#2:$P(^(0),"^"),1:X) W !,"SERVICE: ",X
5 W !,"STATUS: ",$S($P(QAMZERO,"^",5):"Finished",1:"Under Construction"),?28,"SWITCH: ",$S($P(QAMONE,"^",5):"On",1:"Off") S Y=$P(QAMONE,"^",6) X ^DD("DD") W ?43,"START: ",Y S Y=$P(QAMONE,"^",7) X ^DD("DD") W ?62,"END: ",Y
6 S X=$P(QAMONE,"^"),X=$S($D(^QA(743.92,+X,0))#2:$P(^(0),"^"),1:X)
7 W !,"TIME FRAME: ",X,?43,"THRESHOLD: ",$P(QAMONE,"^",3),?60,$S($P(QAMONE,"^",3)["%":"MIN SAMPLE: ",1:"ALERT LEVEL: "),$P(QAMONE,"^",2)
8 W !?43,"HI/LO %: ",$S($P(QAMONE,"^",3)'["%":"n/a",$P(QAMONE,"^",4)="H":"High",$P(QAMONE,"^",4)="L":"Low",1:""),?60,"DUPLICATES: ",$S($P(QAMONE,"^",14):"Yes",1:"No")
9 W !!," STANDARD OF CARE",!,"------------------" K ^UTILITY($J,"W") S DIWL=2,DIWR=78,DIWF="W"
10 F QAMD1=0:0 S QAMD1=$O(^QA(743,QAMD0,"STDC",QAMD1)) Q:QAMD1'>0!QAMQUIT S X=^QA(743,QAMD0,"STDC",QAMD1,0) D ^DIWP,PAGE
11 G:QAMQUIT EXIT D ^DIWW,PAGE G:QAMQUIT EXIT
12 W !!," CLINICAL INDICATOR",!,"--------------------" K ^UTILITY($J,"W") S DIWL=2,DIWR=78,DIWF="W" D PAGE
13 F QAMD1=0:0 S QAMD1=$O(^QA(743,QAMD0,"CLIN",QAMD1)) Q:QAMD1'>0!QAMQUIT S X=^QA(743,QAMD0,"CLIN",QAMD1,0) D ^DIWP,PAGE
14 G:QAMQUIT EXIT D ^DIWW,PAGE G:QAMQUIT EXIT
15 W !!," RATIONALE",?35,"EXPLANATION",!,"-----------",?34,"-------------" S QAMHEAD=$O(^QA(743,QAMD0,"RAT",0)) D PAGE
16 F QAMD1=0:0 S QAMD1=$O(^QA(743,QAMD0,"RAT",QAMD1)) Q:QAMD1'>0!QAMQUIT D RAT1
17EXIT D:$E(IOST)="C" PAUSE
18 Q
19RAT1 ;
20 S X=$S($D(^QA(743,QAMD0,"RAT",QAMD1,0))#2:$P(^(0),"^"),1:""),QAMRAT=$S($D(^QA(743.91,+X,0))#2:$P(^(0),"^"),1:X)
21 K ^UTILITY($J,"W") S DIWL=35,DIWR=78,DIWF="" F QAMD2=0:0 S QAMD2=$O(^QA(743,QAMD0,"RAT",QAMD1,"EXP",QAMD2)) Q:QAMD2'>0 S X=^QA(743,QAMD0,"RAT",QAMD1,"EXP",QAMD2,0) D ^DIWP
22 W !?1,QAMRAT S QAMD2=$O(^UTILITY($J,"W",DIWL,0)) W:QAMD2 ?DIWL,^UTILITY($J,"W",DIWL,QAMD2,0) S QAMHEAD=$O(^UTILITY($J,"W",DIWL,QAMD2)) D PAGE
23 I QAMD2 F QAMD2=QAMD2:0 S QAMD2=$O(^UTILITY($J,"W",DIWL,QAMD2)) Q:QAMD2'>0!QAMQUIT W !?DIWL,^UTILITY($J,"W",DIWL,QAMD2,0) S QAMHEAD=$O(^UTILITY($J,"W",DIWL,QAMD2)) D PAGE
24 Q
25HEAD ;REPORT HEADER
26 W:(QAMPAGE>1)!($E(IOST)="C") @IOF
27 W !!?27,"MONITOR DESCRIPTION REPORT",?68,QAMTODAY,!?68,"PAGE: ",QAMPAGE S QAMPAGE=QAMPAGE+1 W !,"================================================================================"
28 Q
29PAUSE ;PAUSE AT END OF PAGE
30 I QAMPAUSE K DIR S DIR(0)="E" D ^DIR K DIR S QAMQUIT=$S(Y:0,1:1),QAMPAUSE=0
31 Q
32PAGE ;CHECK FOR END OF PAGE
33 S QAMPAUSE=1 Q:$Y'>(IOSL-6) D:$E(IOST)="C" PAUSE Q:QAMQUIT D:QAMHEAD HEAD
34 Q
Note: See TracBrowser for help on using the repository browser.