- Timestamp:
- Aug 29, 2008, 1:48:03 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLACTOR.m
r111 r112 1 GPLACTOR S; CCDCCR/GPL - CCR/CCD PROCESSING FOR ACTORS ; 7/3/081 GPLACTOR ; CCDCCR/GPL - CCR/CCD PROCESSING FOR ACTORS ; 7/3/08 2 2 ;;0.3;CCDCCR;nopatch;noreleasedate 3 3 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU -
ccr/trunk/p/GPLRIMA.m
r104 r112 64 64 . I $D(^TMP("GPLCCR",$J,"MEDICATIONS",1)) D ; MEDS VARS EXISTS 65 65 . . M @RIMBASE@("VARS",RIMDFN,"MEDS")=^TMP("GPLCCR",$J,"MEDICATIONS") 66 . K ^TMP("GPLCCR",$J) ; KILL WORK AREA FOR CCR BUILDING 66 67 . ; 67 68 . ; EVALUATE THE VARIABLES AND CREATE AN ATTRIBUTE MAP -
ccr/trunk/p/GPLVITAL.m
r111 r112 1 GPLVITAL S; CCDCCR/CJE - CCR/CCD PROCESSING FOR VITALS ; 07/16/081 GPLVITAL ; CCDCCR/CJE - CCR/CCD PROCESSING FOR VITALS ; 07/16/08 2 2 ;;0.1;CCDCCR;;JUL 16,2008; 3 3 ;Copyright 2008 WorldVistA. Licensed under the terms of the GNU … … 24 24 ; 25 25 ; VITXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED 26 ; IVITXML WILL CONTAINONLY THE VITALS SECTION OF THE OVERALL TEMPLATE27 ; 28 N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF 26 ; IVITXML CONTAINS ONLY THE VITALS SECTION OF THE OVERALL TEMPLATE 27 ; 28 N VITRSLT,J,K,VITPTMP,X,VITVMAP,TBUF,VORDR 29 29 D VITALS^ORQQVI(.VITRSLT,DFN,"","") 30 30 I $P(VITRSLT(1),U,2)="No vitals found." D ; NULL RESULT FROM RPC … … 36 36 S VITTARYTMP=$NA(^TMP("GPLCCR",$J,"VITALARYTMP")) 37 37 K @VITTVMAP,@VITTARYTMP ; KILL OLD ARRAY VALUES 38 F J=1:1:VITRSLT(1) D ; FOR EACH VITAL IN THE LIST 39 . I $D(VITRSLT(J)) D 38 N VSORT,VCNT ; ARRAY FOR DATE SORTED VITALS INDEX 39 S VCNT=$$VITSORT(.VSORT,.VITRSLT) ; PUT VITALS IN DATE ORDER 40 ; AND COUNT THEM VSORT CONTAINS INDEXES ONLY 41 F J=1:1:VCNT D ; FOR EACH VITAL IN THE LIST 42 . I $D(VITRSLT(VSORT(J))) D 40 43 . . S VITVMAP=$NA(@VITTVMAP@(J)) 41 44 . . K @VITVMAP 42 45 . . I DEBUG W "VMAP= ",VITVMAP,! 43 . . S VITPTMP=VITRSLT(J) ; PULL OUT VITAL FROM RPC RETURN ARRAY 44 . . S @VITVMAP@("VITALSIGNSDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID FOR VITAL 46 . . S VITPTMP=VITRSLT(VSORT(J)) ; DATE SORTED VITAL FROM RETURN ARRAY 47 . . W "VITAL ",VSORT(J),! 48 . . W VITRSLT(VSORT(J))," ",$$FMDTOUTC^CCRUTIL($P(VITPTMP,U,4),"DT"),! 49 . . W $P(VITPTMP,U,4),! 50 . . S @VITVMAP@("VITALSIGNSDATAOBJECTID")="VITAL"_J ; UNIQUE OBJID 45 51 . . I $P(VITPTMP,U,2)="HT" D 46 52 . . . S @VITVMAP@("VITALSIGNSDATETIMETYPETEXT")="OBSERVED" … … 175 181 Q 176 182 ; 183 VITSORT(V1,V2) ; DATE SORT VITALS ARRAY AND RETURN INDEX IN V1 AND COUNT 184 ; AS EXTRINSIC 185 ; BOTH V1 AND V2 ARE PASSED BY REFERENCE 186 ; N VSRT ; TEMP FOR HASHING DATES 187 ; N ZI,ZJ,ZTMP,ZCNT,ZP1,ZP2 188 S ZCNT=0 ; COUNTING NUMBER OF VITALS 189 S ZTMP="" ; 190 F ZI=0:0 D Q:$O(V2(ZTMP))="" ; FOR EACH VITAL IN THE ARRAY 191 . S ZCNT=ZCNT+1 ; INCREMENT THE COUNT 192 . S ZTMP=$O(V2(ZTMP)) ; NEXT VITAL 193 . I $D(V2(ZTMP)) D ; IF THE RESULT EXISTS 194 . . S ZP1=$P($P(V2(ZTMP),U,4),".",1) ; THE DATE PIECE 195 . . S ZP2=$P($P(V2(ZTMP),U,4),".",2) ; THE TIME PIECE 196 . . S VSRT(ZP1,ZP2_"00000"_ZCNT)=ZCNT ; HASH ON DATE AND TIME 197 . . ; S VSRT($P(V2(ZTMP),U,4)_"000000"_ZCNT)=ZCNT ; PULL DATE 198 . W "ZTMP=",ZTMP," " 199 S V1(0)=ZCNT ; ARRAYS ARE THE SAME SIZE 200 S ZJ="" 201 ZWR V2 202 ZWR VSRT 203 F ZI=1:1:ZCNT D Q:$O(VSRT(ZJ))="" ; VISIT THE ARRAY IN DATE ORDER 204 . ; S ZJ=$O(VSRT(ZJ)) ; NEXT DATE 205 . ; S V1(ZI)=VSRT(ZJ) ; ASSIGN INDEX OF NEXT DATE 206 . S V1(ZI)=ZI ; PLUG FOR NOW, DATES NOT SORTED 207 Q ZCNT 208 ;
Note:
See TracChangeset
for help on using the changeset viewer.