Vitals now sorted in reverse date and time order

This commit is contained in:
george 2008-08-30 12:48:44 +00:00
parent 37d37d7be8
commit 9ff7d946bb
2 changed files with 3 additions and 4 deletions

View File

@ -31,7 +31,6 @@ FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrins
S D=$E(DATE,6,7) S D=$E(DATE,6,7)
S H=$E(DATE,9,10) S H=$E(DATE,9,10)
I $L(H)=1 S H="0"_H I $L(H)=1 S H="0"_H
I $L(H)=1 S H="0"_H
S MM=$E(DATE,11,12) S MM=$E(DATE,11,12)
I $L(MM)=1 S MM="0"_MM I $L(MM)=1 S MM="0"_MM
S S=$E(DATE,13,14) S S=$E(DATE,13,14)

View File

@ -206,12 +206,12 @@ VITSORT(V1,V2) ; DATE SORT VITALS ARRAY AND RETURN INDEX IN V1 AND COUNT
S ZDONE=0 S ZDONE=0
N ZZCNT S ZZCNT=0 ; ANOTHER COUNTER N ZZCNT S ZZCNT=0 ; ANOTHER COUNTER
F ZI=0:0 D Q:ZDONE ; VISIT THE ARRAY IN DATE ORDER F ZI=0:0 D Q:ZDONE ; VISIT THE ARRAY IN DATE ORDER
. S ZD=$O(VSRT(ZD)) ; NEXT DATE . S ZD=$O(VSRT(ZD),-1) ; NEXT DATE
. I ZD="" S ZDONE=1 . I ZD="" S ZDONE=1
. I 'ZDONE D ; MORE DATES . I 'ZDONE D ; MORE DATES
. . S ZT="" ; WANT FIRST TIME FOR THIS DATE . . S ZT="" ; WANT FIRST TIME FOR THIS DATE
. . F ZJ=0:0 D Q:$O(VSRT(ZD,ZT))="" ; LOOP THROUGH ALL TIMES . . F ZJ=0:0 D Q:$O(VSRT(ZD,ZT),-1)="" ; LOOP THROUGH ALL TIMES
. . . S ZT=$O(VSRT(ZD,ZT)) ; NEXT TIME . . . S ZT=$O(VSRT(ZD,ZT),-1) ; NEXT TIME
. . . S ZZCNT=ZZCNT+1 ; INCREMENT COUNTER . . . S ZZCNT=ZZCNT+1 ; INCREMENT COUNTER
. . . S V1(ZZCNT)=VSRT(ZD,ZT) ; PULL OUT THE INDEX . . . S V1(ZZCNT)=VSRT(ZD,ZT) ; PULL OUT THE INDEX
. ; S V1(ZI)=ZI ; PLUG FOR NOW, DATES NOT SORTED . ; S V1(ZI)=ZI ; PLUG FOR NOW, DATES NOT SORTED