- Timestamp:
- Sep 21, 2008, 5:10:51 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLRIMA.m
r148 r155 365 365 Q 366 366 ; 367 RPCGV(RTN,DFN,WHICH) ; RPC GET VARS 368 ; RETURNS IN RTN (PASSED BY REFERENCE) THE VARS AND VALUES 369 ; FOUND AT INARY RTN(X)="VAR^VALUE" RTN(0) IS THE COUNT 370 ; DFN IS THE PATIENT NUMBER. 371 ; WHICH IS "ALL" OR "MEDS" OR "VITALS" OR "PROBLEMS" OR "ALERTS" OR "LABS" 372 ; OR OTHER SECTIONS AS THEY ARE ADDED 373 ; THIS IS MEANT TO BE AVAILABLE AS AN RPC 374 I '$D(RIMBASE) D ASETUP ; FOR COMMAND LINE CALLS 375 S ZVBASE=$NA(@RIMBASE@("VARS")) ; BASE OF VARIABLES 376 S RTN(0)=0 ; DEFAULT NOTHING IS RETURNED 377 N ZZGI 378 I WHICH="ALL" D ; VARIABLES FROM ALL SECTIONS 379 . F ZZGI="PROBLEMS","VITALS","MEDS" D ; FOR EACH SECTION 380 . . D ZGVWRK(ZZGI) ; DO EACH SECTION 381 E D ZGVWRK(WHICH) ; ONLY ONE SECTION ASKED FOR 382 Q 383 ; 384 ZGVWRK(ZWHICH) ; DO ONE SECTION FOR RPCGV 385 ; 386 N ZZGN ; NAME FOR SECTION VARIABLES 387 S ZZGN=$NA(@ZVBASE@(DFN,ZWHICH)) ; BASE OF VARS FOR SECTION 388 I '$D(@ZZGN@(0)) Q ; NO VARS FOR THIS SECTION 389 E D ; VARS EXIST 390 . N ZGVI 391 . F ZGVI=1:1:@ZZGN@(0) D ; FOR EACH MULTIPLE IN SECTION 392 . . K ZZGA N ZZGA ; TEMP ARRAY FOR SECTION VARS 393 . . K ZZGN2 N ZZGN2 ; NAME FOR MULTIPLE 394 . . S ZZGN2=$NA(@ZZGN@(ZGVI)) 395 . . ; W ZZGN2,!,$O(@ZZGN2@("")),! 396 . . D H2ARY^GPLXPATH("ZZGA",ZZGN2) ; CONVERT HASH TO ARRAY 397 . . ; D PARY^GPLXPATH("ZZGA") 398 . . D PUSHA^GPLXPATH("RTN","ZZGA") ; PUSH ARRAY INTO RETURN 399 Q 400 ; 401 DPATV(DFN,IWHICH) ; DISPLAY VARS FOR PATIENT DFN THAT ARE MAINTAINED IN GPLRIM 402 ; ALONG WITH SAMPLE VALUES. 403 ; IWHICH IS "ALL" OR "MEDS" OR "VITALS" OR "PROBLEMS" OR "ALERTS" OR "LABS" 404 N GTMP 405 D RPCGV(.GTMP,DFN,IWHICH) 406 D PARY^GPLXPATH("GTMP") 407 Q 408 ; -
ccr/trunk/p/GPLXPAT0.m
r124 r155 190 190 ;;>>>D INSINNER^GPLXPATH("G2","G2") 191 191 ;;>>?G2(8)="<FIFTH>" 192 ;;><PUSHA> 193 ;;>>>K GTMP,GTMP2 194 ;;>>>N GTMP,GTMP2 195 ;;>>>D PUSH^GPLXPATH("GTMP","A") 196 ;;>>>D PUSH^GPLXPATH("GTMP2","B") 197 ;;>>>D PUSH^GPLXPATH("GTMP2","C") 198 ;;>>>D PUSHA^GPLXPATH("GTMP","GTMP2") 199 ;;>>?GTMP(3)="C" 200 ;;>>?GTMP(0)=3 201 ;;><H2ARY> 202 ;;>>>K GTMP,GTMP2 203 ;;>>>S GTMP("TEST1")=1 204 ;;>>>D H2ARY^GPLXPATH("GTMP2","GTMP") 205 ;;>>?GTMP2(0)=1 206 ;;>>?GTMP2(1)="TEST1^1" 192 207 ;;></TEST> -
ccr/trunk/p/GPLXPATH.m
r149 r155 50 50 Q 51 51 ; 52 PUSHA(ADEST,ASRC) ; PUSH ASRC ONTO ADEST, BOTH PASSED BY NAME 53 ; 54 N ZGI 55 F ZGI=1:1:@ASRC@(0) D ; FOR ALL OF THE SOURCE ARRAY 56 . D PUSH(ADEST,@ASRC@(ZGI)) ; PUSH ONE ELEMENT 57 Q 58 ; 52 59 MKMDX(STK,RTN) ; MAKES A MUMPS INDEX FROM THE ARRAY STK 53 ; RTN IS SET TO //FIRST/SECOND/THIRD "FOR THREE ARRAY ELEMENTS60 ; RTN IS SET TO //FIRST/SECOND/THIRD FOR THREE ARRAY ELEMENTS 54 61 S RTN="" 55 62 N I … … 420 427 Q 421 428 ; 429 H2ARY(IARYRTN,IHASH) ; CONVERT IHASH TO RETURN ARRAY 430 ; 431 N H2I S H2I="" 432 ; W $O(@IHASH@(H2I)),! 433 F S H2I=$O(@IHASH@(H2I)) Q:H2I="" D ; FOR EACH ELEMENT OF THE HASH 434 . ; W H2I_"^"_@IHASH@(H2I),! 435 . D PUSH(IARYRTN,H2I_"^"_@IHASH@(H2I)) 436 . ; W @IARYRTN@(0),! 437 Q 438 ; 422 439 TEST ; Run all the test cases 423 440 D TESTALL^GPLUNIT("GPLXPAT0")
Note:
See TracChangeset
for help on using the changeset viewer.