Changeset 167 for ccr


Ignore:
Timestamp:
Sep 22, 2008, 4:12:52 PM (16 years ago)
Author:
George Lilly
Message:

intergrated CCRMEDS processing with GPLMEDS to get PENDING and Non-VA meds

Location:
ccr/trunk/p
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ccr/trunk/p/GPLMEDS.m

    r166 r167  
    2626   ; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE
    2727   ;
     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",!
    2836   N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF
    2937   D ACTIVE^ORWPS(.MEDRSLT,DFN)
     
    3644   S MEDTVMAP=$NA(^TMP("GPLCCR",$J,"MEDMAP"))
    3745   S MEDTARYTMP=$NA(^TMP("GPLCCR",$J,"MEDARYTMP"))
    38    K @MEDTVMAP,@MEDTARYTMP
     46   I 'HASOP K @MEDTVMAP,@MEDTARYTMP
    3947   ; FIRST GO THROUGH MEDRSLT ARRAY AND COUNT MEDS AND LINES IN MEDS
    4048   ; ZA(0) IS TOTAL NUMBER OF MEDS ZA(ZI) IS LINES IN MED ZI
     
    5462   F ZI=1:1:ZA(0) D  ; FOR EACH MED
    5563   . I DEBUG W "ZI IS ",ZI,!
    56    . S MEDVMAP=$NA(@MEDTVMAP@(ZI))
     64   . S MEDVMAP=$NA(@MEDTVMAP@(ZI+MEDCNT)) ; START PAST OP ACTIVE MEDS
    5765   . K @MEDVMAP
    5866   . I DEBUG W "VMAP= ",MEDVMAP,!
    5967   . S ZJ=$P(ZA(ZI),U,1) ; INDEX OF FIRST LINE OF MED IN MEDRSLT
    6068   . 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
    6271   . I $P(MEDPTMP,"^",11)="" S @MEDVMAP@("MEDISSUEDATETXT")=""
    6372   . E  S @MEDVMAP@("MEDISSUEDATETXT")=$$FMDTOUTC^CCRUTIL($P(MEDPTMP,"^",11),"DT") ; GETS LAST FILL DATE
     
    140149   . K @MEDARYTMP
    141150   . D MAP^GPLXPATH(MEDXML,MEDVMAP,MEDARYTMP)
    142    . I ZI=1 D  ; FIRST ONE IS JUST A COPY
     151   . I ZI=1&('HASOP) D  ; FIRST ONE IS JUST A COPY MAKE SURE OP IS NOT THERE
    143152   . . ; W "FIRST ONE",!
    144153   . . D CP^GPLXPATH(MEDARYTMP,MEDOUTXML)
    145    . I ZI>1 D  ; AFTER THE FIRST, INSERT INNER XML
     154   . E  D  ; AFTER THE FIRST OR IF THERE ARE OP, INSERT INNER XML
    146155   . . D INSINNER^GPLXPATH(MEDOUTXML,MEDARYTMP)
    147156   N MEDTMP,MEDI
  • ccr/trunk/p/GPLRIMA.m

    r166 r167  
    101101    I $D(@SBASE@("VITALS",1)) D APOST("SATTR","RIMTBL","VITALS")
    102102    I $D(@SBASE@("MEDS",1)) D APOST("SATTR","RIMTBL","MEDS")
     103    ; D PATD^GPLRIMA(2,"MEDS","MEDPRODUCTNAMECODEVALUE") CHECK FOR MED CODES
    103104    D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED
    104105    W "ATTRIBUTES: ",SATTR,!
  • ccr/trunk/p/GPLXPATH.m

    r156 r167  
    448448 Q
    449449 ;
     450DXVARS(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 ;
    450466TEST     ; Run all the test cases
    451467 D TESTALL^GPLUNIT("GPLXPAT0")
Note: See TracChangeset for help on using the changeset viewer.