source: FOIAVistA/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMAUTO3.m@ 1552

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

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1QAMAUTO3 ;HISC/GJC-AUTO ENROLL FALL OUT REPORT ;9/13/93 08:42
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3 ;
4 S ZTIO=$P($G(^QA(740,1,"QAM")),U,2) G:ZTIO="" K9
5 S ZTDESC="Generate Fall-Out reports.",ZTDTH=$H,ZTRTN="EN1^QAMAUTO3",(ZTSAVE("^UTILITY($J,"),ZTSAVE("QAMD0"),ZTSAVE("QAMTODAY"))="" D ^%ZTLOAD
6 G K9
7EN1 U IO
8 K QAMST S QAMPG=0,Y=DT X ^DD("DD") S QAMDT=Y,$P(QAMST,"-",81)="",Y=QAMTODAY X ^DD("DD") S QAMDT0=Y
9 D HDER G:'$D(QAMD0) K1
10 I $D(^UTILITY($J,"QAM FALL OUT",QAMD0)),^(QAMD0)'>0 W !,"Zero fall outs for the ",$P($G(^QA(743,QAMD0,0)),U)," monitor." G K1
11 ;GRAB THE PATIENT(S) FOR THE SPECIFIC MONITOR.
12 S QAM1=0 K ^TMP($J,"QAMAUTO3")
13 F S QAM1=$O(^UTILITY($J,"QAM FALL OUT",QAMD0,QAM1)) Q:QAM1'>0 D
14 . S X=$P($G(^DPT(QAM1,0)),"^") Q:X=""
15 . S ^TMP($J,"QAMAUTO3",X,QAM1)=""
16 . Q
17 S QAMPAT="" F S QAMPAT=$O(^TMP($J,"QAMAUTO3",QAMPAT)) Q:QAMPAT="" F QAM1=0:0 S QAM1=$O(^TMP($J,"QAMAUTO3",QAMPAT,QAM1)) Q:QAM1'>0 D PAT
18 W !!,"Total number of Fall Outs is: ",^UTILITY($J,"QAM FALL OUT",QAMD0),!,"Fall Out sample size is: ",^UTILITY($J,"QAM SAMPLE",QAMD0),!,"Percent Fall Out: "
19 I ^UTILITY($J,"QAM SAMPLE",QAMD0)>0 W $J((^UTILITY($J,"QAM FALL OUT",QAMD0)/^UTILITY($J,"QAM SAMPLE",QAMD0)*100),3,3)_"%",!
20 E W "Division by zero!",!
21K1 W !
22K9 D ^%ZISC,HOME^%ZIS
23 K %ZIS,DFN,IOP,QAM1,QAMDT,QAMDT0,QAMFG,QAMPG,QAMSSN,QAMST,QAMZ,VA,Y,ZTDESC,ZTDTH,ZTRTN,ZTSAVE,ZTSK,^TMP($J,"QAMAUTO3")
24 S:$D(ZTQUEUED) ZTREQ="@"
25 Q
26PAT ;
27 S DFN=QAM1 D PID^VADPT6 S QAMSSN=VA("PID") W !,"PATIENT: ",$S($D(^DPT(QAM1,0))#2:$P(^(0),U),1:QAM1),?45,"SSN: ",QAMSSN D DATE
28 Q
29DATE ;
30 F QAMZ=0:0 S QAMZ=$O(^UTILITY($J,"QAM FALL OUT",QAMD0,QAM1,QAMZ)) Q:QAMZ'>0 S Y=QAMZ X ^DD("DD") W !," DATE: ",Y W:^UTILITY($J,"QAM FALL OUT",QAMD0,QAM1,QAMZ)="*" ?45,"*** Duplicate ***" D:$Y>(IOSL-5) HDER
31 Q
32HDER ;HEADER
33 S QAMPG=QAMPG+1 W:(QAMPG>1)!($E(IOST)="C") @IOF
34 W !!?30,"DAILY FALL OUT REPORT",?68,QAMDT,!?32,"FOR: ",QAMDT0,?68,"PAGE: ",QAMPG D EN6^QAQAUTL W !,QAMST
35 I $S($D(QAMD0)[0:1,$D(^QA(743,+QAMD0,0))[0:1,1:0) W !!,"*** Monitor data not found ***" Q
36 S QAM=$G(^QA(743,+QAMD0,0))
37 W !!,"CODE: ",$P(QAM,U)," ",$S($P(QAM,U,4):"(a)",1:"(m)"),?43,"TITLE: ",$P(QAM,U,2),! W "SERVICE: " I $P(QAM,U,3) W $P($G(^DIC(49,+$P(QAM,U,3),0)),U)
38 W !
39 Q
Note: See TracBrowser for help on using the repository browser.