source: FOIAVistA/trunk/r/CLINICAL_MONITORING_SYSTEM-QAM/QAMAHO4.m@ 1061

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

initial load of FOIAVistA 6/30/08 version

File size: 2.8 KB
Line 
1QAMAHO4 ;HISC/GJC-CHECKS SORT DATA FOR FALLOUT FILE ^QA(743.1 ;7/2/92 09:03
2 ;;1.0;Clinical Monitoring System;;09/13/1993
3 ;
4DATE ;BEGINNING/ENDING SORT VALUES FOR DATE DATA ELEMENTS
5 S QAMELEM=QAMDIEN D EN1^QAMUTL2 W !!,"Enter the beginning and ending values for ",DIR("A"),".",!
6 K DIR("A"),DIR("B") S DIR("A")="Start with: First// ",DIR(0)=$P(DIR(0),U)_"A^"_$P(DIR(0),U,2)
7 D ^DIR I $D(DTOUT)!($D(DUOUT))!(+Y=-1) S QAMOUT=1 Q
8 I X="" S DATA1=0,DATA2=9999999 G DATE1
9 E S DATA1=Y
10 S DIR("A")="End with: Last// ",DATA1=Y,DIR(0)=$P(DIR(0),U)_"^"_DATA1_"::"_$P(DIR(0),":",3)
11 D ^DIR I $D(DTOUT)!($D(DUOUT))!(+Y=-1) S QAMOUT=1 Q
12 I X="" S DATA2=9999999
13 E S DATA2=Y
14 I (DATA2<DATA1),(DATA1'=DATA2) W !!,*7,"The 'Start with' date must fall before the 'End with' date." G DATE
15DATE1 S LP0="" F LP=0:0 S LP0=$O(^QA(743.1,"AD",QAMDIEN,LP0)) Q:LP0="" S X=LP0 D ^%DT I (Y>DATA1)!(Y=DATA1),((DATA2>Y)!(DATA2=Y)) D DATE2
16 Q
17DATE2 F QAMD0=0:0 S QAMD0=$O(^QA(743.1,"AD",QAMDIEN,LP0,QAMD0)) Q:QAMD0'>0 S ^UTILITY($J,"QAM DLMNT",Y,QAMD0)=LP0
18 Q
19NUM ;BEGINNING/ENDING SORT VALUES FOR NUMERIC DATA ELEMENTS
20 S QAMELEM=QAMDIEN D EN1^QAMUTL2 W !!,"Enter the beginning and ending values for ",DIR("A"),".",!
21 K DIR("A"),DIR("B") S DIR("A")="Start with: First// ",DIR(0)=$P(DIR(0),U)_"A^"_$P(DIR(0),U,2)
22 D ^DIR I $D(DTOUT)!($D(DUOUT))!(+Y=-1) S QAMOUT=1 Q
23 I X="" S DATA1=0,DATA2=9999999 G NUM1
24 E S DATA1=Y
25 S DIR("A")="End with: Last// ",DATA1=Y,DIR(0)=$P(DIR(0),U)_"^"_DATA1_"::"_$P(DIR(0),":",3)
26 D ^DIR I $D(DTOUT)!($D(DUOUT))!(+Y=-1) S QAMOUT=1 Q
27 I X="" S DATA2=9999999
28 E S DATA2=Y
29 I (DATA2<DATA1),(DATA1'=DATA2) W !!,*7,"The 'Start with' number must fall before the 'End with' number." G DATE
30NUM1 S LP0="" F LP=0:0 S LP0=$O(^QA(743.1,"AD",QAMDIEN,LP0)) Q:LP0="" I (LP0>DATA1)!(LP0=DATA1),((DATA2>LP0)!(DATA2=LP0)) D NUM2
31 Q
32NUM2 F QAMD0=0:0 S QAMD0=$O(^QA(743.1,"AD",QAMDIEN,LP0,QAMD0)) Q:QAMD0'>0 S ^UTILITY($J,"QAM DLMNT",LP0,QAMD0)=LP0
33 Q
34POINT ;BEGINNING/ENDING SORT VALUES FOR POINTER DATA ELEMENTS
35 S QAMELEM=QAMDIEN D EN1^QAMUTL2 W !!,"Enter the beginning and ending values for ",DIR("A"),".",!
36 K DIR("A"),DIR("B") S DIR("A")="Start with: First// ",DIR(0)=$P(DIR(0),U)_"A^"_$P(DIR(0),U,2)
37 D ^DIR I $D(DTOUT)!($D(DUOUT))!(($E(X)="^")&(+Y=-1)) S QAMOUT=1 Q
38 I X="" S DATA1=" ",DATA2="~" G POINT1
39 I X]"" S DATA1=Y(0,0)
40 S DIR("A")="End with: Last// "
41 D ^DIR I $D(DTOUT)!($D(DUOUT))!(($E(X)="^")&(+Y=-1)) S QAMOUT=1 Q
42 I X="" S DATA2="~"
43 E S DATA2=Y(0,0)
44 I (DATA2']DATA1),(DATA1'=DATA2) W !!,*7,"The 'Start with' value must fall before the 'End with' value in the alphabet." G POINT
45POINT1 S LP0="" F LP=0:0 S LP0=$O(^QA(743.1,"AD",QAMDIEN,LP0)) Q:LP0="" I (LP0]DATA1)!(LP0=DATA1),((DATA2]LP0)!(DATA2=LP0)) D PNT
46 Q
47PNT F QAMD0=0:0 S QAMD0=$O(^QA(743.1,"AD",QAMDIEN,LP0,QAMD0)) Q:QAMD0'>0 S ^UTILITY($J,"QAM DLMNT",LP0,QAMD0)=LP0
48 Q
Note: See TracBrowser for help on using the repository browser.