source: WorldVistAEHR/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMC9.m@ 789

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1QAMC9 ;HISC/DAD-CONDITION: FALL OUT ;9/3/93 13:14
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3EN1 ; *** CONDITION CODE
4 S MONITOR=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:+^("P1"),1:0)
5 S LOOKBACK=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:+^("P2"),1:0)
6 S QAMDATE=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P3"))#2:+^("P3"),1:0)
7 S X1=QAMTODAY,X2=-(LOOKBACK+1) D C^%DTC S START=X_".9999999",END=QAMTODAY+.9999999
8 F FALLDT=START:0 S FALLDT=$O(^QA(743.1,"AA",MONITOR,FALLDT)) Q:(FALLDT'>0)!(FALLDT>END) F QAMDFN=0:0 S QAMDFN=$O(^QA(743.1,"AA",MONITOR,FALLDT,QAMDFN)) Q:QAMDFN'>0 D LOOP1
9 K MONITOR,LOOKBACK,X1,X2,X,START,END,FALLDT,FALLD0
10 Q
11LOOP1 F FALLD0=0:0 S FALLD0=$O(^QA(743.1,"AA",MONITOR,FALLDT,QAMDFN,FALLD0)) Q:FALLD0'>0 S ^UTILITY($J,"QAM CONDITION",QAMD1,QAMDFN)="",^(QAMDFN,$S(QAMDATE:FALLDT,1:QAMTODAY))=FALLD0
12 Q
13EN2 ; *** PARAMETER CODE
14 K DIR,DIRUT S DIR(0)="POA^743:AEMNQZ",DIR("A")="FALL OUT MONITOR: ",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P1"))#2:$P(^("P1"),"^",2),1:"") K:DIR("B")="" DIR("B")
15 S DIR("?",1)="Enter the monitor you want this condition to scan."
16 S QAMPARAM="P1" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
17 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P1")=+Y_"^"_Y(0,0)
182 K DIR,DIRUT S DIR(0)="NO^1:365:0",DIR("A")="LOOK BACK DAYS",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P2"))#2:^("P2"),1:"") K:DIR("B")="" DIR("B")
19 S DIR("?",1)="Enter the number of days the condition should 'look back'",DIR("?")="while trying to find a fall out for this monitor."
20 S QAMPARAM="P2" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
21 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P2")=+Y
223 K DIR,DIRUT S DIR("A")="ENTER THE TYPE OF DATE",DIR(0)="SOB^0:AUTO ENROLL DATE;1:FALL OUT DATE",DIR("B")=$S($D(^QA(743,QAMD0,"COND",QAMD1,"P3"))#2:$P(^("P3"),"^",2),1:"") K:DIR("B")="" DIR("B")
23 S DIR("?",1)=" 0 AUTO ENROLL DATE",DIR("?",2)=" 1 FALL OUT DATE",DIR("?",3)="Enter the date you wish to be",DIR("?",4)="associated with this condition.",DIR("?")="Enter a 'RETURN' for the AUTO ENROLL DATE."
24 S QAMPARAM="P3" D EN3^QAMUTL1 I $D(DIRUT) S Y=-1 G Y
25 S:Y]"" ^QA(743,QAMD0,"COND",QAMD1,"P3")=+Y_"^"_Y(0)
26EXIT K Y
27 K QAMPARAM
28Y Q
Note: See TracBrowser for help on using the repository browser.