Changeset 134 for ccr/trunk/p
- Timestamp:
- Sep 3, 2008, 6:26:54 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCD.m
r123 r134 25 25 I Y<1 Q ; EXIT 26 26 S DFN=$P(Y,U,1) ; SET THE PATIENT 27 D XPAT(DFN,"","") ; EXPORT TO A FILE 28 Q 29 ; 30 XPAT(DFN,DIR,FN) ; EXPORT ONE PATIENT TO A FILE 31 ; DIR IS THE DIRECTORY, DEFAULTS IF NULL TO ^TMP("GPLCCR","ODIR") 32 ; FN IS FILE NAME, DEFAULTS IF NULL 27 33 ; N CCDGLO 28 34 D CCDRPC(.CCDGLO,DFN,"CCD","","","") 29 35 S OARY=$NA(^TMP("GPLCCR",$J,DFN,"CCD",1)) 30 S ONAM="PAT_"_DFN_"_CCD_V1.xml" 36 S ONAM=FN 37 I FN="" S ONAM="PAT_"_DFN_"_CCD_V1.xml" 31 38 S ODIRGLB=$NA(^TMP("GPLCCR","ODIR")) 32 39 I '$D(@ODIRGLB) D ; IF NOT ODIR HAS BEEN SET … … 34 41 . ;S @ODIRGLB="/home/cedwards/" 35 42 . ;S @ODIRGLB="/opt/wv/p/" 36 S ODIR=@ODIRGLB 37 D OUTPUT^GPLXPATH(OARY,ONAM,ODIR) 43 S ODIR=DIR 44 I DIR="" S ODIR=@ODIRGLB 45 N ZY 46 S ZY=$$OUTPUT^GPLXPATH(OARY,ONAM,ODIR) 47 W $P(ZY,U,2) 38 48 Q 39 49 ; … … 49 59 ; "TO" VARIABLES 50 60 ; IF NULL WILL DEFAULT TO "FROM" ORGANIZATION AND "TO" DFN 51 S DEBUG=061 I '$D(DEBUG) S DEBUG=0 52 62 N CCD S CCD=0 ; FLAG FOR PROCESSING A CCD 53 63 I CCRPART="CCD" S CCD=1 ; WE ARE PROCESSING A CCD -
ccr/trunk/p/GPLCCR.m
r111 r134 43 43 S ODIR=DIR 44 44 I DIR="" S ODIR=@ODIRGLB 45 D OUTPUT^GPLXPATH(OARY,ONAM,ODIR) 45 N ZY 46 S ZY=$$OUTPUT^GPLXPATH(OARY,ONAM,ODIR) 47 W $P(ZY,U,2) 46 48 Q 47 49 ; -
ccr/trunk/p/GPLXPATH.m
r125 r134 26 26 N Y 27 27 S Y=$$GTF^%ZISH(OUTARY,$QL(OUTARY),OUTDIR,OUTNAME) 28 I Y W "WROTE FILE: ",OUTNAME," TO ",OUTDIR,!29 ; $NA(^TMP(14216,"FILE",0)),3,"/home/wvehr3","test.xml")28 I Y Q 1_U_"WROTE FILE: "_OUTNAME_" TO "_OUTDIR 29 I 'Y Q 0_U_"ERROR WRITING FILE"_OUTNAME_" TO "_OUTDIR 30 30 Q 31 31 ; … … 366 366 . . S @OXML@(I)=TSTR ; COPY LINE WITH MAPPED VALUES 367 367 . . I DEBUG W TSTR 368 W "MAPPED",!368 I DEBUG W "MAPPED",! 369 369 Q 370 370 ; … … 374 374 S FOUND=0 375 375 S INTXT=0 376 W "DELETING EMPTY ELEMENTS",!376 I DEBUG W "DELETING EMPTY ELEMENTS",! 377 377 F I=1:1:(@THEXML@(0)-1) D ; LOOP THROUGH ENTIRE ARRAY 378 378 . S J=@THEXML@(I) 379 379 . I J["<text>" D 380 380 . . S INTXT=1 ; IN HTML SECTION, DON'T TRIM 381 . . W "IN HTML SECTION",!381 . . I DEBUG W "IN HTML SECTION",! 382 382 . N JM,JP,JPX ; JMINUS AND JPLUS 383 383 . S JM=@THEXML@(I-1) ; LINE BEFORE … … 387 387 . . S JPX=$TR(JP,"/","") ; REMOVE THE SLASH 388 388 . . I J=JPX D ; AN EMPTY ELEMENT ON TWO LINES 389 . . . W I,J,JP,!389 . . . I DEBUG W I,J,JP,! 390 390 . . . S FOUND=1 ; FOUND SOMETHING TO BE DELETED 391 391 . . . S DEL(I)="" ; SET LINE TO DELETE 392 392 . . . S DEL(I+1)="" ; SET NEXT LINE TO DELETE 393 393 . . I J["><" D ; AN EMPTY ELEMENT ON ONE LINE 394 . . . W I,J,!394 . . . I DEBUG W I,J,! 395 395 . . . S FOUND=1 ; FOUND SOMETHING TO BE DELETED 396 396 . . . S DEL(I)="" ; SET THE EMPTY LINE UP TO BE DELETED 397 397 . . . I JM=JPX D ; 398 . . . . W I,JM_J_JPX,!398 . . . . I DEBUG W I,JM_J_JPX,! 399 399 . . . . S DEL(I-1)="" 400 400 . . . . S DEL(I+1)="" ; SET THE SURROUNDING LINES FOR DEL
Note:
See TracChangeset
for help on using the changeset viewer.