added Immunizations to RIM variable analysis code.. changed global for

parms to  ^TMP("C0CPARMS",$J)
This commit is contained in:
george 2009-02-04 20:18:25 +00:00
parent bfab33053b
commit 39dad84c43
3 changed files with 17 additions and 8 deletions

View File

@ -22,7 +22,7 @@ SET(INPARMS) ;INITIALIZE RUNTIME PARMS USING INPARMS TO OVERRIDE DEFAULTS
; THE SAME FORMAT IS USED BY RPC AND COMMAND LINE ENTRY POINTS
;
N PTMP ;
S C0CPARMS=$NA(^TMP($J,"C0CPARMS")) ;BASE FOR THIS RUN
S C0CPARMS=$NA(^TMP("C0CPARMS",$J)) ;BASE FOR THIS RUN
;K @C0CPARMS ;START WITH EMPTY PARMS; MAY NOT WANT TO DO THIS KILL
I $G(INPARMS)'="" D ; OVERRIDES PROVIDED
. N C0CI S C0CI=""
@ -39,7 +39,7 @@ SET(INPARMS) ;INITIALIZE RUNTIME PARMS USING INPARMS TO OVERRIDE DEFAULTS
;
CHECK ; CHECK TO SEE IF PARMS ARE PRESENT, ELSE RUN SET
;
I '$D(C0CPARMS) S C0CPARMS=$NA(^TMP($J,"C0CPARMS")) ;SHOULDN'T HAPPEN
I '$D(C0CPARMS) S C0CPARMS=$NA(^TMP("C0CPARMS",$J)) ;SHOULDN'T HAPPEN
I '$D(@C0CPARMS) D SET("SETWITHCHECK:1")
Q
;

View File

@ -37,6 +37,12 @@ MAP(IPXML,DFN,OUTXML) ; MAP IMMUNIZATIONS
. . E D ;NOT THE FIRST
. . . D INSINNER^GPLXPATH(OUTXML,"C0CZT")
E S @OUTXML@(0)=0 ; SIGNAL NO IMMUNIZATIONS
N IMMUTMP,I
D MISSING^GPLXPATH(OUTXML,"IMMUTMP") ; SEARCH XML FOR MISSING VARS
I IMMUTMP(0)>0 D ; IF THERE ARE MISSING VARS -
. ; STRINGS MARKED AS @@X@@
. W !,"IMMUNE Missing list: ",!
. F I=1:1:IMMUTMP(0) W IMMUTMP(I),!
Q
;
EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
@ -95,11 +101,7 @@ EXTRACT(IPXML,DFN,OUTXML) ; EXTRACT IMMUNIZATIONS INTO VARIABLES
. . . S @VMAP@("IMMUNEPRODUCTNAMETEXT")=C0CIN ;NAME
. . . S @VMAP@("IMMUNEPRODUCTCODE")="" ; CVX CODE
. . . S @VMAP@("IMMUNEPRODUCTCODESYSTEM")="" ;NO CODE
N IMMUTMP,I
D MISSING^GPLXPATH(ARYTMP,"IMMUTMP") ; SEARCH XML FOR MISSING VARS
I IMMUTMP(0)>0 D ; IF THERE ARE MISSING VARS -
. ; STRINGS MARKED AS @@X@@
. W !,"IMMUNE Missing list: ",!
. F I=1:1:IMMUTMP(0) W IMMUTMP(I),!
N C0CIRIM S C0CIRIM=$NA(^TMP("GPLRIM","VARS",DFN,"IMMUNE"))
M @C0CIRIM=@TVMAP ; PERSIST RIM VARIABLES
Q
;

View File

@ -108,6 +108,11 @@ SETATTR(SDFN) ; SET ATTRIBUTES BASED ON VARS
. D APOST("SATTR","RIMTBL","PROBLEMS")
. ; W "POSTING PROBLEMS",!
I $D(@SBASE@("VITALS",1)) D APOST("SATTR","RIMTBL","VITALS")
I $D(@SBASE@("IMMUNE",1)) D ;IMMUNIZATIONS PRESENT
. D APOST("SATTR","RIMTBL","IMMUNE")
. N ZR,ZI
. D GETPA(.ZR,SDFN,"IMMUNE","IMMUNEPRODUCTCODE")
. I ZR(0)>0 D APOST("SATTR","RIMTBL","IMMUNECODE") ;IMMUNIZATION CODES
I $D(@SBASE@("MEDS",1)) D ; IF THE PATIENT HAS MEDS VARIABLES
. D APOST("SATTR","RIMTBL","MEDS")
. N ZR,ZI
@ -306,6 +311,8 @@ AINIT ; INITIALIZE ATTRIBUTE TABLE
D APUSH(RIMTBL,"VITALSNOCODE")
D APUSH(RIMTBL,"VITALSDATE")
D APUSH(RIMTBL,"VITALSNODATE")
D APUSH(RIMTBL,"IMMUNE")
D APUSH(RIMTBL,"IMMUNECODE")
D APUSH(RIMTBL,"MEDS")
D APUSH(RIMTBL,"MEDSCODE")
D APUSH(RIMTBL,"MEDSNOCODE")