Changeset 313
- Timestamp:
- Jan 5, 2009, 4:33:43 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/CCRMEDS.m
r242 r313 38 38 S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) 39 39 K @MEDTARYTMP ; KILL XML ARRAY 40 I $D(^TMP("GPLCCR","RPMS")) G USERPC ; FOR RPMS, USE THE RPC FOR MEDS 40 41 D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS 41 42 I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS … … 69 70 Q ; SKIPPING ALL THE REST OF THIS LOGIC.. IT IS NOT GOING TO BE NEEDED 70 71 ; ONCE NON-VA AND IP MEDS WORK (CCRMEDS3 AND CCRMEDS4) 72 USERPC ; ENTRY POINT FOR RPMS 71 73 N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF 72 74 D ACTIVE^ORWPS(.MEDRSLT,DFN) … … 100 102 . S ZJ=$P(ZA(ZI),U,1) ; INDEX OF FIRST LINE OF MED IN MEDRSLT 101 103 . S MEDPTMP=MEDRSLT(ZJ) ; PULL OUT FIRST LINE OF MED 102 . I $P(MEDPTMP,U,1)?1"~OP" Q ; SKIP OP ACTIVE AND PENDING104 . ;I $P(MEDPTMP,U,1)?1"~OP" Q ; SKIP OP ACTIVE AND PENDING 103 105 . S MEDCNT=MEDCNT+1 ; WE ARE GOING TO ADD A MED 104 106 . S MEDVMAP=$NA(@MEDTVMAP@(MEDCNT)) ; START PAST OP ACTIVE MEDS … … 151 153 . . . S RXIEN=$$DIGITS($P($P(MEDPTMP,U,2),";",1)) ; GET JUST LEADING DIGITS 152 154 . . . I DEBUG W "RXIEN=",RXIEN,! ; 153 . . . D RX^PSO52API(DFN,"MEDCODE",RXIEN) ; EXTRACT THE RX RECORD TO ^TMP155 . . . ;D RX^PSO52API(DFN,"MEDCODE",RXIEN) ; EXTRACT THE RX RECORD TO ^TMP 154 156 . . . I $D(^TMP($J,"MEDCODE",DFN,RXIEN,27)) D ; IF SUCCESS 155 157 . . . . S @MEDVMAP@("MEDPRODUCTNAMECODEVALUE")=^TMP($J,"MEDCODE",DFN,RXIEN,27) -
ccr/trunk/p/CCRVA200.m
r122 r313 88 88 Q "Work" 89 89 ; 90 ADDLINE1( DUZ) ; Get Address associated with this instituation; PUBLIC; EXTRINSIC90 ADDLINE1(ADUZ) ; Get Address associated with this instituation; PUBLIC; EXTRINSIC ; CHANGED PARAMETER TO ADUZ TO KEEP FROM CRASHING GPL 1/09 91 91 ; INPUT: DUZ ByVal 92 92 ; Output: String. … … 111 111 Q "" 112 112 ; 113 CITY(DUZ) ; Get City for Institution. PUBLIC; EXTRINSIC 113 CITY(ADUZ) ; Get City for Institution. PUBLIC; EXTRINSIC 114 ;GPL CHANGED PARAMETER TO ADUZ TO KEEP $$SITE^VASITE FROM CRASHING 114 115 ; INPUT: DUZ ByVal 115 116 ; Output: String. … … 123 124 Q "" 124 125 ; 125 STATE( DUZ) ; Get State for Institution. PUBLIC; EXTRINSIC126 STATE(ADUZ) ; Get State for Institution. PUBLIC; EXTRINSIC 126 127 ; INPUT: DUZ ByVal 127 128 ; Output: String. … … 135 136 Q "" 136 137 ; 137 POSTCODE( DUZ) ; Get Postal Code for Institution. PUBLIC; EXTRINSIC138 POSTCODE(ADUZ) ; Get Postal Code for Institution. PUBLIC; EXTRINSIC 138 139 ; INPUT: DUZ ByVal 139 140 ; OUTPUT: String. -
ccr/trunk/p/GPLLABS.m
r282 r313 71 71 S C0CIN=@C0CV@(0) ; COUNT OF RESULTS (OBR) 72 72 N C0CRTMP ; AREA TO BUILD ONE RESULT REQUEST AND ALL TESTS FOR IT 73 N C0CRBASE S C0CRBASE=$NA(^TMP($J,"TESTTMP")) ;WORK AREA 74 N C0CRBLD ; BUILD LIST FOR XML - THE BUILD IS DELAYED UNTIL THE END 75 ; TO IMPROVE PERFORMANCE 76 D QUEUE^GPLXPATH("C0CRBLD","C0CRT",1,1) ;<Results> 73 77 F C0CI=1:1:C0CIN D ; LOOP THROUGH VARIABLES 74 . K C0CMAP,C0CTMP,C0CRTMP ;EMPTY OUT LAST BATCH OF VARIABLES 78 . K C0CMAP,C0CTMP ;EMPTY OUT LAST BATCH OF VARIABLES 79 . S C0CRTMP=$NA(@C0CRBASE@(C0CI)) ;PARTITION OF WORK AREA FOR EACH TEST 75 80 . S C0CMAP=$NA(@C0CV@(C0CI)) ; 76 81 . I 'C0CQT W "MAPOBR:",C0CMAP,! 77 82 . ;MAPPING FOR TEST REQUEST GOES HERE 78 . D MAP^GPLXPATH("C0CRT",C0CMAP,"C0CRTMP") ; MAP OBR DATA 83 . D MAP^GPLXPATH("C0CRT",C0CMAP,C0CRTMP) ; MAP OBR DATA 84 . ;D QOPEN^GPLXPATH("C0CRBLD",C0CRTMP,C0CIS) ;1ST PART OF XML 85 . D QUEUE^GPLXPATH("C0CRBLD",C0CRTMP,2,@C0CRTMP@(0)-4) ;UP TO <Test> 79 86 . I $D(@C0CMAP@("M","TESTS",0)) D ; TESTS EXIST 80 87 . . S C0CJN=@C0CMAP@("M","TESTS",0) ; NUMBER OF TESTS 81 88 . . K C0CTO ; CLEAR OUTPUT VARIABLE 82 89 . . F C0CJ=1:1:C0CJN D ;FOR EACH TEST RESULT 83 . . . K C0CTMAP,C0CTMP ; EMPTY MAPS FOR TEST RESULTS 90 . . . K C0CTMAP ; EMPTY MAPS FOR TEST RESULTS 91 . . . S C0CTMP=$NA(@C0CRBASE@(C0CI,C0CJ)) ;WORK AREA FOR TEST RESULTS 84 92 . . . S C0CTMAP=$NA(@C0CMAP@("M","TESTS",C0CJ)) ; 85 93 . . . I 'C0CQT W "MAPOBX:",C0CTMAP,! 86 . . . D MAP^GPLXPATH("C0CTT",C0CTMAP,"C0CTMP") ; MAP TO TMP 94 . . . D MAP^GPLXPATH("C0CTT",C0CTMAP,C0CTMP) ; MAP TO TMP 95 . . . I C0CJ=1 S C0CJS=2 E S C0CJS=1 ;FIRST TIME,SKIP THE <Test> 96 . . . I C0CJ=C0CJN S C0CJE=@C0CTMP@(0)-1 E S C0CJE=@C0CTMP@(0) ;</Test> 97 . . . S C0CJS=1 S C0CJE=@C0CTMP@(0) ; INSERT ALL OF THE TEXT XML 98 . . . D QUEUE^GPLXPATH("C0CRBLD",C0CTMP,C0CJS,C0CJE) ; ADD TO BUILD LIST 87 99 . . . ;I C0CJ=1 D ; FIRST TIME, JUST COPY 88 100 . . . ;. D CP^GPLXPATH("C0CTMP","C0CTO") ; START BUILDING TEST XML 89 101 . . . ;E D INSINNER^GPLXPATH("C0CTO","C0CTMP") 90 102 . . . ; 91 . . . D PUSHA^GPLXPATH("C0CTO","C0CTMP") ;ADD THE TEST TO BUFFER103 . . . ;D PUSHA^GPLXPATH("C0CTO",C0CTMP) ;ADD THE TEST TO BUFFER 92 104 . . ; I 'C0CQT D PARY^GPLXPATH("C0CTO") 93 . . D INSINNER^GPLXPATH("C0CRTMP","C0CTO","//Results/Result/Test") ;INSERT TST 94 . I C0CI=1 D ; FIRST TIME, COPY INSTEAD OF INSERT 95 . . D CP^GPLXPATH("C0CRTMP","RTN") ; 96 . E D INSINNER^GPLXPATH("RTN","C0CRTMP") ; INSERT THIS TEST REQUEST 105 . . ;D INSINNER^GPLXPATH(C0CRTMP,"C0CTO","//Results/Result/Test") ;INSERT TST 106 . ;D QCLOSE^GPLXPATH("C0CRBLD",C0CRTMP,"//Results/Result/Test") ;END OF XML 107 . D QUEUE^GPLXPATH("C0CRBLD","C0CRT",C0CRT(0)-1,C0CRT(0)-1) ;</Result> 108 . ;I C0CI=1 D ; FIRST TIME, COPY INSTEAD OF INSERT 109 . . ;D CP^GPLXPATH(C0CRTMP,"RTN") ; 110 . ;E D INSINNER^GPLXPATH("RTN",C0CRTMP) ; INSERT THIS TEST REQUEST 111 D QUEUE^GPLXPATH("C0CRBLD","C0CRT",C0CRT(0),C0CRT(0)) ;</Results> 112 D BUILD^GPLXPATH("C0CRBLD","RTN") ;RENDER THE XML 113 K @C0CRBASE ; CLEAR OUT TEMPORARY STURCTURE 97 114 Q 98 115 ; … … 180 197 . . . S XV("RESULTTESTCODINGSYSTEM")=C0CVAR("C3") ; PRIMARY DISPLAY NAME 181 198 . . . S XV("RESULTTESTDESCRIPTIONTEXT")=C0CVAR("C2") ; USE PRIMARY TEXT 199 . . N C0CZG S C0CZG=XV("RESULTTESTNORMALDESCRIPTIONTEXT") ; 200 . . S XV("RESULTTESTNORMALDESCRIPTIONTEXT")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE 201 . . S C0CZG=XV("RESULTTESTVALUE") 202 . . S XV("RESULTTESTVALUE")=$$SYMENC^MXMLUTL(C0CZG) ;ESCAPE 182 203 . I C0CTYP="OBX" D ; PROCESS TEST RESULTS 183 204 . . I C0CLOBX=0 D ; FIRST TEST RESULT FOR THIS SECTION … … 219 240 Q 220 241 LOBX ; 242 Q 243 ; 244 OUT(DFN) ; WRITE OUT A CCR THAT HAS JUST BEEN PROCESSED (FOR TESTING) 245 N GA,GF,GD 246 S GA=$NA(^TMP("GPLCCR",$J,DFN,"CCR",1)) 247 S GF="RPMS_CCR_"_DFN_"_"_DT_".xml" 248 S GD=^TMP("GPLCCR","ODIR") 249 W $$OUTPUT^GPLXPATH(GA,GF,GD) 221 250 Q 222 251 ; -
ccr/trunk/p/GPLPROBS.m
r146 r313 33 33 S TARYTMP=$NA(^TMP("GPLCCR",$J,"PROBARYTMP")) 34 34 K @TVMAP,@TARYTMP ; KILL OLD ARRAY VALUES 35 D LIST^ORQQPL3(.RPCRSLT,DFN,"") ; CALL THE PROBLEM LIST RPC 35 ;D LIST^ORQQPL3(.RPCRSLT,DFN,"") ; CALL THE PROBLEM LIST RPC 36 D GET^BGOPROB(.RPCRSLT,DFN) ; CALL THE PROBLEM LIST RPC 36 37 I '$D(RPCRSLT(1)) D Q ; RPC RETURNS NULL 37 38 . W "NULL RESULT FROM LIST^ORQQPL3 ",! -
ccr/trunk/p/GPLXPATH.m
r279 r313 372 372 . . . . . S TVAL=@INARY@(TNAM) ; PULL OUT MAPPED VALUE 373 373 . . . . E D DOFLD ; PROCESS A FIELD 374 . . . S TVAL=$$SYMENC^MXMLUTL(TVAL) ;MAKE SURE THE VALUE IS XML SAFE 374 375 . . . S TSTR=TSTR_TVAL_$P(@IXML@(I),"@@",J+1) ; ADD VAR AND PART AFTER 375 376 . . S @OXML@(I)=TSTR ; COPY LINE WITH MAPPED VALUES
Note:
See TracChangeset
for help on using the changeset viewer.