VistA-WorldVistAEHR/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMPMON0.m

25 lines
1.9 KiB
Mathematica
Raw Permalink Normal View History

2009-11-29 13:37:14 -05:00
QAMPMON0 ;HISC/DAD-MONITOR DESCRIPTION REPORT ;7/2/92 09:22
;;1.0;Clinical Monitoring System;;09/13/1993
ASKSORT ;
R !!,"Sort report by Service or Monitor: Service// ",X:DTIME S:'$T X="^" G:$E(X)="^" EXIT X ^%ZOSF("UPPERCASE") S X=Y S QAMSORT=$S(X]"":$E(X),1:"S")
I $F("^SERVICE^MONITOR","^"_X)'>0 W:$E(X)'="?" " ??",*7 W !!?5,"Enter 'S' to sort monitors by service.",!?5,"Enter 'M' to sort monitors by monitor code." G ASKSORT
W $P($P("^SERVICE^MONITOR","^"_X,2),"^")
I QAMSORT="S" S QAQDIC="^DIC(49,",QAQDIC(0)="AEMNQZ",QAQDIC("A")="Select SERVICE: ",QAQUTIL="QAM SERVICE" D EN1^QAQSELCT S QAMQUIT=QAQQUIT
I QAMSORT="M" S QAQDIC="^QA(743,",QAQDIC(0)="AEMNQZ",QAQDIC("A")="Select MONITOR: ",QAQUTIL="QAM MONITOR" D EN1^QAQSELCT S QAMQUIT=QAQQUIT
G:QAMQUIT EXIT
K %ZIS,IOP S %ZIS="MQ" W ! D ^%ZIS G:POP EXIT I $D(IO("Q")) K IO("Q") S ZTDESC="Monitor Description Report",ZTRTN="ENTSK^QAMPMON0",ZTSAVE("QAMSORT")="",ZTSAVE("^UTILITY($J,")="" D ^%ZTLOAD G EXIT
ENTSK ;
U IO S QAMNAME="",(QAMFOUND,QAMQUIT)=0,X="T",%DT="" D ^%DT X ^DD("DD") S QAMTODAY=Y
S QAMXREF=$S(QAMSORT="M":"B",1:"ASRV"),QAMSORT="QAM "_$S(QAMSORT="M":"MONITOR",1:"SERVICE")
F QAMNAME(0)=0:0 S QAMNAME=$O(^UTILITY($J,QAMSORT,QAMNAME)) Q:QAMNAME=""!QAMQUIT F QAMIEN=0:0 S QAMIEN=$O(^UTILITY($J,QAMSORT,QAMNAME,QAMIEN)) Q:QAMIEN'>0!QAMQUIT D PRTLOOP
I 'QAMFOUND S QAMPAGE=1 D HEAD^QAMPMON1 W !!,"NO DATA FOUND FOR THIS REPORT"
EXIT ;
W ! D ^%ZISC
K %DT,%ZIS,POP,DIW,DIWF,DIWI,DIWL,DIWR,DIWT,DIWTC,DIWX,DN,QAMPAGE,POP,QA,QAMD0,QAMD1,QAMD2,QAMFLD,QAMFOUND,QAMHEAD,QAMIEN,QAMNAME,QAMPAUSE,QAMONE,QAMQUIT,QAMRAT,QAMSORT,QAMTODAY,QAMXREF,QAMZERO,X,Y,ZTDESC,ZTRTN,ZTSAVE,QAQQUIT
K ^UTILITY($J,"QAM MONITOR"),^UTILITY($J,"QAM SERVICE"),^UTILITY($J,"W")
S:$D(ZTQUEUED) ZTREQ="@"
Q
PRTLOOP ;
S QAMFLD=$S(QAMSORT["MONITOR":QAMNAME,1:QAMIEN) F QAMD0=0:0 S QAMD0=$O(^QA(743,QAMXREF,QAMFLD,QAMD0)) Q:QAMD0'>0!QAMQUIT D ^QAMPMON1
Q