Changeset 167
- Timestamp:
- Sep 22, 2008, 4:12:52 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLMEDS.m
r166 r167 26 26 ; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE 27 27 ; 28 N HASOP S HASOP=0 ; FLAG FOR HAS OUTPATIENT MEDS 29 N MEDCNT S MEDCNT=0 ; COUNT FOR MEDS ALREADY PROCESSED 30 ; OUTPATIENT MEDS ARE PROCESSED IN EXTRACT^CCRMEDS, ALL OTHERS HERE 31 D EXTRACT^CCRMEDS(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS 32 I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS 33 . S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML 34 . S MEDCNT=@MEDOUTXML@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP 35 . W "HAS ACTIVE OP MEDS",! 28 36 N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF 29 37 D ACTIVE^ORWPS(.MEDRSLT,DFN) … … 36 44 S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP")) 37 45 S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP")) 38 K @MEDTVMAP,@MEDTARYTMP46 I 'HASOP K @MEDTVMAP,@MEDTARYTMP 39 47 ; FIRST GO THROUGH MEDRSLT ARRAY AND COUNT MEDS AND LINES IN MEDS 40 48 ; ZA(0) IS TOTAL NUMBER OF MEDS ZA(ZI) IS LINES IN MED ZI … … 54 62 F ZI=1:1:ZA(0) D ; FOR EACH MED 55 63 . I DEBUG W "ZI IS ",ZI,! 56 . S MEDVMAP=$NA(@MEDTVMAP@(ZI ))64 . S MEDVMAP=$NA(@MEDTVMAP@(ZI+MEDCNT)) ; START PAST OP ACTIVE MEDS 57 65 . K @MEDVMAP 58 66 . I DEBUG W "VMAP= ",MEDVMAP,! 59 67 . S ZJ=$P(ZA(ZI),U,1) ; INDEX OF FIRST LINE OF MED IN MEDRSLT 60 68 . S MEDPTMP=MEDRSLT(ZJ) ; PULL OUT FIRST LINE OF MED 61 . S @MEDVMAP@("MEDOBJECTID")="MED"_ZI ; UNIQUE OBJID FOR MEDS 69 . I $P(MEDPTMP,U,1)?1"~OP"&$P(MEDPTMP,"^",10)="ACTIVE" Q ; SKIP OP ACTIVE 70 . S @MEDVMAP@("MEDOBJECTID")="MED"_(ZI+MEDCNT) ; UNIQUE OBJID FOR MEDS 62 71 . I $P(MEDPTMP,"^",11)="" S @MEDVMAP@("MEDISSUEDATETXT")="" 63 72 . E S @MEDVMAP@("MEDISSUEDATETXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT") ; GETS LAST FILL DATE … … 140 149 . K @MEDARYTMP 141 150 . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP) 142 . I ZI=1 D ; FIRST ONE IS JUST A COPY151 . I ZI=1&('HASOP) D ; FIRST ONE IS JUST A COPY MAKE SURE OP IS NOT THERE 143 152 . . ; W "FIRST ONE",! 144 153 . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML) 145 . I ZI>1 D ; AFTER THE FIRST, INSERT INNER XML154 . E D ; AFTER THE FIRST OR IF THERE ARE OP, INSERT INNER XML 146 155 . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP) 147 156 N MEDTMP,MEDI -
ccr/trunk/p/GPLRIMA.m
r166 r167 101 101 I $D(@SBASE@("VITALS",1)) D APOST("SATTR","RIMTBL","VITALS") 102 102 I $D(@SBASE@("MEDS",1)) D APOST("SATTR","RIMTBL","MEDS") 103 ; D PATD^GPLRIMA(2,"MEDS","MEDPRODUCTNAMECODEVALUE") CHECK FOR MED CODES 103 104 D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED 104 105 W "ATTRIBUTES: ",SATTR,! -
ccr/trunk/p/GPLXPATH.m
r156 r167 448 448 Q 449 449 ; 450 DXVARS(DXIN) ;DISPLAY ALL VARIABLES IN A TEMPLATE 451 ; IF PARAMETERS ARE NULL, DEFAULTS TO CCR TEMPLATE 452 ; 453 N DXUSE,DTMP ; DXUSE IS NAME OF VARIABLE, DTMP IS VARIABLE IF NOT SUPPLIED 454 I DXIN="CCR" D ; NEED TO GO GET CCR TEMPLATE 455 . D LOAD^GPLCCR0("DTMP") ; LOAD CCR TEMPLATE INTO DXTMP 456 . S DXUSE="DTMP" ; DXUSE IS NAME 457 E I DXIN="CCD" D ; NEED TO GO GET CCD TEMPLATE 458 . D LOAD^GPLCCD1("DTMP") ; LOAD CCR TEMPLATE INTO DXTMP 459 . S DXUSE="DTMP" ; DXUSE IS NAME 460 E S DXUSE=DXIN ; IF PASSED THE TEMPLATE TO USE 461 N DVARS ; PUT VARIABLE NAME RESULTS IN ARRAY HERE 462 D XVARS("DVARS",DXUSE) ; PULL OUT VARS 463 D PARY^GPLXPATH("DVARS") ;AND DISPLAY THEM 464 Q 465 ; 450 466 TEST ; Run all the test cases 451 467 D TESTALL^GPLUNIT("GPLXPAT0")
Note:
See TracChangeset
for help on using the changeset viewer.