source: FOIAVistA/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMPINQ1.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1QAMPINQ1 ;HISC/DAD-INQUIRE: FALL OUT FILE ;2/10/92 07:33
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 D XIT S QAQDIC="^QA(743.1,",QAQDIC(0)="AEMNQ",QAQDIC("A")="Select PATIENT: ",QAQUTIL=743.1 D ^QAQSELCT G:QAQQUIT EXIT
4 K %ZIS,IOP S %ZIS="MQ",%ZIS("B")="HOME" W ! D ^%ZIS G:POP EXIT I $D(IO("Q")) K IO("Q") S ZTRTN="ENTSK^QAMPINQ1",ZTSAVE("^UTILITY($J,")="",ZTDESC="Fall out file inquire" D ^%ZTLOAD G EXIT
5ENTSK ;
6 S QAMQUIT=0,QAMPTXT="" K QAMUNDL S $P(QAMUNDL,"=",81)="" U IO
7 F S QAMPTXT=$O(^UTILITY($J,743.1,QAMPTXT)) Q:QAMPTXT=""!QAMQUIT F QAMD0=0:0 S QAMD0=$O(^UTILITY($J,743.1,QAMPTXT,QAMD0)) Q:QAMD0'>0!QAMQUIT D LOOP0
8EXIT ;
9 W ! D ^%ZISC
10XIT K %ZIS,DFN,DGA1,DGT,DIR,POP,QA,QAM,QAMCREAT,QAMD0,QAMD1,QAMELEM,QAMEVENT,QAMMON,QAMNAME,QAMPAGE,QAMPTXT,QAMQUIT,QAMUNDL,QAQDIC,QAQQUIT,QAQUTIL,X,Y,ZTRTN,ZTSAVE,^UTILITY($J,"QAMPINQ1")
11 S:$D(ZTQUEUED) ZTREQ="@"
12 Q
13LOOP0 ;
14 S QAM=$S($D(^QA(743.1,QAMD0,0))#2:^(0),1:"") Q:QAM="" S Y=$P(QAM,"^",3) X ^DD("DD") S QAMEVENT=Y,Y=$P(QAM,"^",4) X ^DD("DD") S QAMCREAT=Y
15 S QAMNAME=+QAM,QAMNAME=$S($D(^DPT(QAMNAME,0))#2:$P(^(0),"^"),1:QAMNAME),QAMMON=$P(QAM,"^",2),QA=$S($D(^QA(743,+QAMMON,0))#2:^(0),1:QAMMON),QAMMON=$P(QA,"^")_$S($P(QA,"^",4):" (a)",1:" (m)")
16 K ^UTILITY($J,"QAMPINQ1") F QAMD1=0:0 S QAMD1=$O(^QA(743.1,QAMD0,1,QAMD1)) Q:QAMD1'>0 D LOOP1
17 S QAMPAGE=1 D HEAD W !,"NAME: ",QAMNAME,?37,"MONITOR: ",QAMMON,!,"EVENT DATE: ",QAMEVENT,?37,"CREATION DATE: ",QAMCREAT,!
18 S QAMELEM="" F S QAMELEM=$O(^UTILITY($J,"QAMPINQ1",QAMELEM)) Q:QAMELEM=""!QAMQUIT F QAMD1=0:0 S QAMD1=$O(^UTILITY($J,"QAMPINQ1",QAMELEM,QAMD1)) Q:QAMD1'>0!QAMQUIT D LOOP2
19 I 'QAMQUIT W !!,QAMUNDL D WAIT
20 Q
21LOOP1 ;
22 S QA=+^QA(743.1,QAMD0,1,QAMD1,0),QAMELEM=$S($D(^QA(743.4,QA,0))#2:$P(^(0),"^"),1:QA),^UTILITY($J,"QAMPINQ1",QAMELEM,QAMD1)=$S($D(^QA(743.1,QAMD0,1,QAMD1,"E"))#2:$P(^("E"),"^"),1:"")
23 Q
24LOOP2 ;
25 S QA=^UTILITY($J,"QAMPINQ1",QAMELEM,QAMD1) W !,QAMELEM,?37,$E(QA,1,43) D PAUSE:($O(^UTILITY($J,"QAMPINQ1",QAMELEM))]"")!($O(^(QAMELEM,QAMD1)))
26 Q
27PAUSE Q:$Y'>(IOSL-4) D WAIT,HEAD:'QAMQUIT
28 Q
29HEAD W:(QAMPAGE>1)!($E(IOST)="C") @IOF W !,QAMUNDL,! S QAMPAGE=QAMPAGE+1
30 Q
31WAIT I $E(IOST)="C" K DIR S DIR(0)="E" D ^DIR S QAMQUIT=$S(Y'>0:1,1:0)
32 Q
Note: See TracBrowser for help on using the repository browser.