fixed checking for LOINC codes
This commit is contained in:
parent
81f95f9ce5
commit
beaf1ea72e
10
p/GPLRIMA.m
10
p/GPLRIMA.m
|
@ -122,8 +122,10 @@ SETATTR(SDFN) ; SET ATTRIBUTES BASED ON VARS
|
|||
. . . I $P(ZR(ZI),"^",2)'="" D APOST("SATTR","RIMTBL","ALERTSCODE") ;CODES
|
||||
I $D(@SBASE@("RESULTS",1)) D ; IF THE PATIENT HAS LABS VARIABLES
|
||||
. D APOST("SATTR","RIMTBL","RESULTS")
|
||||
N ZR,ZI
|
||||
. N ZR,ZI
|
||||
. S ZR(0)=0 ; INITIALIZE TO NONE
|
||||
. D RPCGV(.ZR,SDFN,"RESULTS") ;CHECK FOR LABS CODES
|
||||
. ; D PARY^GPLXPATH("ZR") ;
|
||||
. I ZR(0)>0 D ; VAR LOOKUP WAS GOOD, CHECK FOR NON=NULL RETURN
|
||||
. . F ZI=1:1:ZR(0) D ; LOOP THROUGH RETURNED VAR^VALUE PAIRS
|
||||
. . . I $P(ZR(ZI),"^",2)="RESULTTESTCODINGSYSTEM" D ;
|
||||
|
@ -400,7 +402,7 @@ RPCGV(RTN,DFN,WHICH) ; RPC GET VARS
|
|||
; RETURNS IN RTN (PASSED BY REFERENCE) THE VARS AND VALUES
|
||||
; FOUND AT INARY RTN(X)="VAR^VALUE" RTN(0) IS THE COUNT
|
||||
; DFN IS THE PATIENT NUMBER.
|
||||
; WHICH IS "ALL" OR "MEDS" OR "VITALS" OR "PROBLEMS" OR "ALERTS" OR "LABS"
|
||||
; WHICH IS "ALL","MEDS","VITALS","PROBLEMS","ALERTS","RESULTS"
|
||||
; OR OTHER SECTIONS AS THEY ARE ADDED
|
||||
; THIS IS MEANT TO BE AVAILABLE AS AN RPC
|
||||
I '$D(RIMBASE) D ASETUP ; FOR COMMAND LINE CALLS
|
||||
|
@ -408,7 +410,7 @@ RPCGV(RTN,DFN,WHICH) ; RPC GET VARS
|
|||
S RTN(0)=0 ; DEFAULT NOTHING IS RETURNED
|
||||
N ZZGI
|
||||
I WHICH="ALL" D ; VARIABLES FROM ALL SECTIONS
|
||||
. F ZZGI="PROBLEMS","VITALS","MEDS","ALERTS","LABS" D ; FOR EACH SECTION
|
||||
. F ZZGI="PROBLEMS","VITALS","MEDS","ALERTS","RESULTS" D ; EACH SECTION
|
||||
. . D ZGVWRK(ZZGI) ; DO EACH SECTION
|
||||
E D ZGVWRK(WHICH) ; ONLY ONE SECTION ASKED FOR
|
||||
Q
|
||||
|
@ -432,7 +434,7 @@ ZGVWRK(ZWHICH) ; DO ONE SECTION FOR RPCGV
|
|||
;
|
||||
DPATV(DFN,IWHICH) ; DISPLAY VARS FOR PATIENT DFN THAT ARE MAINTAINED IN GPLRIM
|
||||
; ALONG WITH SAMPLE VALUES.
|
||||
; IWHICH IS "ALL" OR "MEDS" OR "VITALS" OR "PROBLEMS" OR "ALERTS" OR "LABS"
|
||||
; IWHICH IS "ALL","MEDS","VITALS","PROBLEMS","ALERTS","RESULTS"
|
||||
N GTMP
|
||||
I '$D(^TMP("GPLRIM","ATTR",DFN)) D ; RIM VARS NOT PRESENT
|
||||
. D ANALYZE(DFN,1) ; REFRESH THE RIM VARIABLES
|
||||
|
|
Loading…
Reference in New Issue