- Timestamp:
- Aug 29, 2008, 3:00:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLVITAL.m
r113 r115 46 46 . . I DEBUG W "VMAP= ",VITVMAP,! 47 47 . . S VITPTMP=VITRSLT(VSORT(J)) ; DATE SORTED VITAL FROM RETURN ARRAY 48 . . W "VITAL ",VSORT(J),!49 . . W VITRSLT(VSORT(J))," ",$$FMDTOUTC^CCRUTIL($P(VITPTMP,U,4),"DT"),!50 . . W $P(VITPTMP,U,4),!48 . . I DEBUG W "VITAL ",VSORT(J),! 49 . . I DEBUG W VITRSLT(VSORT(J))," ",$$FMDTOUTC^CCRUTIL($P(VITPTMP,U,4),"DT"),! 50 . . I DEBUG W $P(VITPTMP,U,4),! 51 51 . . S @VITVMAP@("VITALSIGNSDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID 52 52 . . I $P(VITPTMP,U,2)="HT" D … … 185 185 ; AS EXTRINSIC 186 186 ; BOTH V1 AND V2 ARE PASSED BY REFERENCE 187 ;N VSRT ; TEMP FOR HASHING DATES188 ;N ZI,ZJ,ZTMP,ZCNT,ZP1,ZP2187 N VSRT ; TEMP FOR HASHING DATES 188 N ZI,ZJ,ZTMP,ZCNT,ZP1,ZP2 189 189 S ZCNT=0 ; COUNTING NUMBER OF VITALS 190 190 S ZTMP="" ; … … 197 197 . . S VSRT(ZP1,ZP2_"00000"_ZCNT)=ZCNT ; HASH ON DATE AND TIME 198 198 . . ; S VSRT($P(V2(ZTMP),U,4)_"000000"_ZCNT)=ZCNT ; PULL DATE 199 . W "ZTMP=",ZTMP," "199 . I DEBUG W "ZTMP=",ZTMP," " 200 200 S V1(0)=ZCNT ; ARRAYS ARE THE SAME SIZE 201 S ZJ="" 202 ZWR V2 203 ZWR VSRT 204 F ZI=1:1:ZCNT D Q:$O(VSRT(ZJ))="" ; VISIT THE ARRAY IN DATE ORDER 205 . ; S ZJ=$O(VSRT(ZJ)) ; NEXT DATE 206 . ; S V1(ZI)=VSRT(ZJ) ; ASSIGN INDEX OF NEXT DATE 207 . S V1(ZI)=ZI ; PLUG FOR NOW, DATES NOT SORTED 201 I DEBUG ZWR V2 202 I DEBUG ZWR VSRT 203 N ZD,ZT ; DATA AND TIME ITERATORS 204 N ZDONE ; DONE FLAG 205 S (ZD,ZT)="" 206 S ZDONE=0 207 N ZZCNT S ZZCNT=0 ; ANOTHER COUNTER 208 F ZI=0:0 D Q:ZDONE ; VISIT THE ARRAY IN DATE ORDER 209 . S ZD=$O(VSRT(ZD)) ; NEXT DATE 210 . I ZD="" S ZDONE=1 211 . I 'ZDONE D ; MORE DATES 212 . . S ZT="" ; WANT FIRST TIME FOR THIS DATE 213 . . F ZJ=0:0 D Q:$O(VSRT(ZD,ZT))="" ; LOOP THROUGH ALL TIMES 214 . . . S ZT=$O(VSRT(ZD,ZT)) ; NEXT TIME 215 . . . S ZZCNT=ZZCNT+1 ; INCREMENT COUNTER 216 . . . S V1(ZZCNT)=VSRT(ZD,ZT) ; PULL OUT THE INDEX 217 . ; S V1(ZI)=ZI ; PLUG FOR NOW, DATES NOT SORTED 218 I DEBUG ZWR V1 208 219 Q ZCNT 209 220 ;
Note:
See TracChangeset
for help on using the changeset viewer.