Changeset 168 for ccr/trunk/p


Ignore:
Timestamp:
Sep 22, 2008, 5:35:23 PM (16 years ago)
Author:
George Lilly
Message:

added MEDSCODE attribute for MEDS that have codes in GPLRIMA analysis

File:
1 edited

Legend:

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

    r167 r168  
    100100    . ; W "POSTING PROBLEMS",!
    101101    I $D(@SBASE@("VITALS",1)) D APOST("SATTR","RIMTBL","VITALS")
    102     I $D(@SBASE@("MEDS",1)) D APOST("SATTR","RIMTBL","MEDS")
    103     ; D PATD^GPLRIMA(2,"MEDS","MEDPRODUCTNAMECODEVALUE") CHECK FOR MED CODES
     102    I $D(@SBASE@("MEDS",1)) D  ; IF THE PATIENT HAS MEDS VARIABLES
     103    . D APOST("SATTR","RIMTBL","MEDS")
     104    . N ZR,ZI
     105    . D GETPA(.ZR,SDFN,"MEDS","MEDPRODUCTNAMECODEVALUE") ;CHECK FOR MED CODES
     106    . I ZR(0)>0 D  ; VAR LOOKUP WAS GOOD, CHECK FOR NON=NULL RETURN
     107    . . F ZI=1:1:ZR(0) D  ; LOOP THROUGH RETURNED VAR^VALUE PAIRS
     108    . . . I $P(ZR(ZI),"^",2)'="" D APOST("SATTR","RIMTBL","MEDSCODE") ;CODES
     109    . ; D PATD^GPLRIMA(2,"MEDS","MEDPRODUCTNAMECODEVALUE") CHECK FOR MED CODES
    104110    D APOST("SATTR","RIMTBL","NOTEXTRACTED") ; OUTPUT NOT YET PRODUCED
    105111    W "ATTRIBUTES: ",SATTR,!
Note: See TracChangeset for help on using the changeset viewer.