Changeset 22
- Timestamp:
- Jun 26, 2008, 1:51:24 PM (17 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR.m
r16 r22 48 48 . X CALL 49 49 . ; NOW INSERT THE RESULTS IN THE CCR BUFFER 50 . ;D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body")50 . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body") 51 51 . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),! 52 . D QOPEN^GPLXPATH("CCRBLD",CCRGLO,"//ContinuityOfCareRecord/Body")53 . D QUEUE^GPLXPATH("CCRBLD",OXML,1,@OXML@(0))54 . D QCLOSE^GPLXPATH("CCRBLD",CCRGLO,"//ContinuityOfCareRecord/Body")55 . I DEBUG W "GOING TO BUILD CCR",!56 . N CCRTMP57 . D BUILD^GPLXPATH("CCRBLD","CCRTMP")58 . I DEBUG F GPLI=1:1:CCRTMP(0) W CCRTMP(GPLI),!59 . D CP^GPLXPATH("CCRTMP",CCRGLO)52 . ; D QOPEN^GPLXPATH("CCRBLD",CCRGLO,"//ContinuityOfCareRecord/Body") 53 . ; D QUEUE^GPLXPATH("CCRBLD",OXML,1,@OXML@(0)) 54 . ; D QCLOSE^GPLXPATH("CCRBLD",CCRGLO,"//ContinuityOfCareRecord/Body") 55 . ; I DEBUG W "GOING TO BUILD CCR",! 56 . ; N CCRTMP 57 . ; D BUILD^GPLXPATH("CCRBLD","CCRTMP") 58 . ; I DEBUG F GPLI=1:1:CCRTMP(0) W CCRTMP(GPLI),! 59 . ; D CP^GPLXPATH("CCRTMP",CCRGLO) 60 60 Q 61 61 ; -
ccr/trunk/p/GPLCCR0.m
r16 r22 91 91 ;;<Code> 92 92 ;;<Value>@@PROBLEMCODEVALUE@@</Value> 93 ;;<CodingSystem> @@PROBLEMCODINGSYSTEM@@ICD9CM</CodingSystem>94 ;;<Version>@@PROBLEMCODINGVERSION@@ 2007</Version>93 ;;<CodingSystem>ICD9CM</CodingSystem> 94 ;;<Version>@@PROBLEMCODINGVERSION@@</Version> 95 95 ;;</Code> 96 96 ;;</Description> -
ccr/trunk/p/GPLPROBS.m
r3 r22 15 15 D LIST^ORQQPL3(.RPCRSLT,DFN,"") ; CALL THE PROBLEM LIST RPC 16 16 I '$D(RPCRSLT(0)) W "ERROR CALLING LIST^ORQQPL3 ",! Q 17 I DEBUGZWR RPCRSLT17 ZWR RPCRSLT 18 18 S TVMAP=$NA(^TMP($J,"PROBVALS")) 19 19 S TARYTMP=$NA(^TMP($J,"PROBARYTMP")) -
ccr/trunk/p/GPLUNIT.m
r3 r22 17 17 S ZARY(CNT)=TST ; put the test in the array 18 18 I $D(ZARY(BAT)) D ; NOT THE FIRST TEST IN BATTERY 19 . N II ; TEMP FOR ENDING TEST IN BATTERY19 . N II,TN ; TEMP FOR ENDING TEST IN BATTERY 20 20 . S II=$P(ZARY(BAT),"^",2) 21 21 . S $P(ZARY(BAT),"^",2)=II+1 22 22 I '$D(ZARY(BAT)) D ; FIRST TEST IN THIS BATTERY 23 23 . S ZARY(BAT)=CNT_"^"_CNT ; FIRST AND LAST TESTS IN BATTERY 24 . S ZARY("TESTS",BAT)="" ; PUT THE BATTERY IN THE TESTS INDEX 24 . ; S ZARY("TESTS",BAT)="" ; PUT THE BATTERY IN THE TESTS INDEX 25 . S TN=$NA(ZARY("TESTS")) 26 . D PUSH^GPLXPATH(TN,BAT) 25 27 S ZARY(0)=CNT ; update the array counter 26 28 Q … … 46 48 . . I LINE?." "1";;>>".E D ; test case found 47 49 . . . D ZT(.@ZARY,SECTION,$P(LINE,";;>>",2)) ; put the test in the array 48 S @ZARY@("ALL")="1"_"^"_@ZARY@(0) ; MAKE A BATTERY FOR ALL50 ; S @ZARY@("ALL")="1"_"^"_@ZARY@(0) ; MAKE A BATTERY FOR ALL 49 51 Q 50 52 ; 51 53 ZTEST(ZARY,WHICH) ; try out the tests using a passed array ZTEST 52 N I,ZX,ZR,ZP 53 S DEBUG=0 54 I '$D(ZARY(WHICH)) D ; TEST SECTION DOESN'T EXIST 55 . W "ERROR -- TEST SECTION DOESN'T EXIST -> ",WHICH,! 56 . Q ; EXIT 57 N FIRST,LAST 58 S FIRST=$P(ZARY(WHICH),"^",1) 59 S LAST=$P(ZARY(WHICH),"^",2) 60 F I=FIRST:1:LAST D 61 . I ZARY(I)?1">"1.E D ; NOT A TEST, JUST RUN THE STATEMENT 62 . . S ZP=$E(ZARY(I),2,$L(ZARY(I))) 63 . . ; W ZP,! 64 . . S ZX=ZP 65 . . W "RUNNING: "_ZP 66 . . X ZX 67 . . W "..SUCCESS: ",WHICH,! 68 . I ZARY(I)?1"?"1.E D ; THIS IS A TEST 69 . . S ZP=$E(ZARY(I),2,$L(ZARY(I))) 70 . . S ZX="S ZR="_ZP 71 . . W "TRYING: "_ZP 72 . . X ZX 73 . . W $S(ZR=1:"..PASSED ",1:"..FAILED "),! 74 . . I '$D(TPASSED) D ; NOT INITIALIZED YET 75 . . . S TPASSED=0 S TFAILED=0 76 . . I ZR S TPASSED=TPASSED+1 77 . . I 'ZR S TFAILED=TFAILED+1 78 Q 79 ; 54 N I,ZX,ZR,ZP 55 S DEBUG=0 56 I WHICH="ALL" D Q ; RUN ALL THE TESTS 57 . W "DOING ALL",! 58 . N J,NT 59 . S NT=$NA(ZARY("TESTS")) 60 . W NT,@NT@(0),! 61 . F J=1:1:@NT@(0) D ; 62 . . W @NT@(J),! 63 . . D ZTEST^GPLUNIT(@ZARY,@NT@(J)) 64 I '$D(ZARY(WHICH)) D ; TEST SECTION DOESN'T EXIST 65 . W "ERROR -- TEST SECTION DOESN'T EXIST -> ",WHICH,! 66 . Q ; EXIT 67 N FIRST,LAST 68 S FIRST=$P(ZARY(WHICH),"^",1) 69 S LAST=$P(ZARY(WHICH),"^",2) 70 F I=FIRST:1:LAST D 71 . I ZARY(I)?1">"1.E D ; NOT A TEST, JUST RUN THE STATEMENT 72 . . S ZP=$E(ZARY(I),2,$L(ZARY(I))) 73 . . ; W ZP,! 74 . . S ZX=ZP 75 . . W "RUNNING: "_ZP 76 . . X ZX 77 . . W "..SUCCESS: ",WHICH,! 78 . I ZARY(I)?1"?"1.E D ; THIS IS A TEST 79 . . S ZP=$E(ZARY(I),2,$L(ZARY(I))) 80 . . S ZX="S ZR="_ZP 81 . . W "TRYING: "_ZP 82 . . X ZX 83 . . W $S(ZR=1:"..PASSED ",1:"..FAILED "),! 84 . . I '$D(TPASSED) D ; NOT INITIALIZED YET 85 . . . S TPASSED=0 S TFAILED=0 86 . . I ZR S TPASSED=TPASSED+1 87 . . I 'ZR S TFAILED=TFAILED+1 88 Q 89 ; 80 90 TEST ; RUN ALL THE TEST CASES 81 91 N ZTMP -
ccr/trunk/p/GPLXPATH.m
r3 r22 189 189 . W "ERROR IN COPY BAD SOURCE LENGTH: ",CPSRC,! 190 190 . Q 191 ; I '$D(@CPDEST@(0)) S @CPDEST@(0)=0 ; IF THE DEST IS EMPTY, INITIALIZE 191 192 D QUEUE("CPINSTR",CPSRC,1,@CPSRC@(0)) ; BLIST FOR ENTIRE ARRAY 192 193 D BUILD("CPINSTR",CPDEST) … … 238 239 ; XML AT THE END OF THE XPATH POINT 239 240 ; INSXML AND INSNEW ARE PASSED BY NAME INSXPATH IS A VALUE 240 ;N INSBLD,INSTMP241 N INSBLD,INSTMP 241 242 I DEBUG W "DOING INSERT ",INSXML,INSNEW,INSXPATH,! 242 243 I DEBUG F G1=1:1:@INSXML@(0) W @INSXML@(G1),! 243 I '$D(@INSXML@(0)) D ; INSERT INTO AN EMPTY ARRAY 244 . W "DOING A BAD COPY",! 245 . D CP^GPLXPATH(INSNEW,INXML) ; JUST COPY INTO THE OUTPUT 244 I '$D(@INSXML@(0)) D Q ; INSERT INTO AN EMPTY ARRAY 245 . D CP^GPLXPATH(INSNEW,INSXML) ; JUST COPY INTO THE OUTPUT 246 246 I $D(@INSXML@(0)) D ; IF ORIGINAL ARRAY IS NOT EMPTY 247 . W "GOT HERE",!248 247 . I $D(INSXPATH) D ; XPATH PROVIDED 249 248 . . D QOPEN("INSBLD",INSXML,INSXPATH) ; COPY THE BEFORE … … 256 255 . I '$D(INSXPATH) D ; NO XPATH PROVIDED, CLOSE AT ROOT 257 256 . . D QCLOSE("INSBLD",INSXML,"//") ; CLOSE WITH ROOT XPATH 258 . D BUILD("INSBLD", INSTMP) ; PUT RESULTS IN INDEST259 . D CP^GPLXPATH( INSTMP,INSXML) ; COPY BUFFER TO SOURCE257 . D BUILD("INSBLD","INSTMP") ; PUT RESULTS IN INDEST 258 . D CP^GPLXPATH("INSTMP",INSXML) ; COPY BUFFER TO SOURCE 260 259 Q 261 260 ; … … 335 334 ; 336 335 TEST ; RUN ALL THE TEST CASES 337 N ZTMP338 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH")339 D ZTEST^GPLUNIT(.ZTMP,"ALL")340 W "PASSED: ",TPASSED,!341 W "FAILED: ",TFAILED,!342 W !343 ; W "THE TESTS!",!344 ; ZWR ZTMP345 Q346 ;336 N ZTMP 337 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH") 338 D ZTEST^GPLUNIT(.ZTMP,"ALL") 339 W "PASSED: ",TPASSED,! 340 W "FAILED: ",TFAILED,! 341 W ! 342 ; W "THE TESTS!",! 343 ; ZWR ZTMP 344 Q 345 ; 347 346 ZTEST(WHICH) ; RUN ONE SET OF TESTS 348 N ZTMP 349 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH") 350 D ZTEST^GPLUNIT(.ZTMP,WHICH) 351 Q 352 ; 347 N ZTMP 348 S DEBUG=1 349 D ZLOAD^GPLUNIT("ZTMP","GPLXPATH") 350 D ZTEST^GPLUNIT(.ZTMP,WHICH) 351 Q 352 ; 353 353 TLIST ; LIST THE TESTS 354 354 N ZTMP … … 494 494 ;;>>>D ZTEST^GPLXPATH("INITXML") 495 495 ;;>>>D QUERY^GPLXPATH("GXML","//FIRST/SECOND/THIRD/FIFTH","G2") 496 ;;>>>D INSERT^GPLXPATH("GXML","G2"," G3","//FIRST/SECOND/THIRD")497 ;;>>>D INSERT^GPLXPATH("G3","G2"," G4","//FIRST/SECOND/THIRD")498 ;;>>?G2(1)=G 3(9)496 ;;>>>D INSERT^GPLXPATH("GXML","G2","//FIRST/SECOND/THIRD") 497 ;;>>>D INSERT^GPLXPATH("G3","G2","//") 498 ;;>>?G2(1)=GXML(9) 499 499 ;;><REPLACE> 500 500 ;;>>>K G2,GBL,G3
Note:
See TracChangeset
for help on using the changeset viewer.