Changeset 974 for ccr/trunk/p


Ignore:
Timestamp:
Oct 4, 2010, 1:46:18 PM (14 years ago)
Author:
George Lilly
Message:

modifications to clean up temp storage after processing

Location:
ccr/trunk/p
Files:
5 edited

Legend:

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

    r783 r974  
    4141 N C0CRTN  ; RETURN ARRAY
    4242 D CCRRPC(.C0CRTN,DFN,XPARMS,"CCR")
    43  S OARY=$NA(^TMP("C0CCCR",$J,DFN,"CCR",1))
     43 S OARY=$NA(^TMP("C0CCUR",$J,DFN,"CCR",1))
    4444 S ONAM=UFN
    4545 I UFN="" S ONAM="PAT_"_DFN_"_CCR_V1_0_0.xml"
     
    6262 ;
    6363 N G1
    64  S G1=$NA(^TMP("C0CCCR",$J,DFN,"CCR"))
     64 S G1=$NA(^TMP("C0CCUR",$J,DFN,"CCR"))
    6565 I $D(@G1@(0)) D  ; CCR EXISTS
    6666 . D PARY^C0CXPATH(G1)
     
    7878 ; SEE C0CPARMS FOR A COMPLETE LIST OF SUPPORTED PARAMETERS
    7979 K ^TMP("C0CCCR",$J) ; CLEAN UP THE GLOBAL BEFORE WE USE IT
     80 M ^TMP("C0CSAV",$J)=^TMP($J) ; SAVING CALLER'S TMP SETTINGS
     81 K ^TMP($J) ; START CLEAN
    8082 I '$D(DEBUG) S DEBUG=0
    8183 S CCD=0 ; NEED THIS FLAG TO DISTINGUISH FROM CCD
     
    8991 I '$D(TESTMEDS) S TESTMEDS=0 ; FLAG FOR TESTING C0CMED SECTION
    9092 S TGLOBAL=$NA(^TMP("C0CCCR",$J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE
    91  S CCRGLO=$NA(^TMP("C0CCCR",$J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
     93 S CCRGLO=$NA(^TMP("C0CCUR",$J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
    9294 S ACTGLO=$NA(^TMP("C0CCCR",$J,DFN,"ACTORS")) ; GLOBAL FOR ALL ACTORS
    9395 ; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC
     
    142144 . I J=0 S DONE=1 ; DONE WHEN TRIM RETURNS FALSE
    143145 ;S CCRGRTN=$NA(^TMP("C0CCCR",$J,DFN,CCRPART)) ; RTN GLOBAL OF PART OR ALL
    144  M CCRGRTN=^TMP("C0CCCR",$J,DFN,CCRPART) ; RTN GLOBAL OF PART OR ALL
     146 I CCRPART="CCR" M CCRGRTN=@CCRGLO ; ENTIRE CCR
     147 E  M CCRGRTN=^TMP("C0CCCR",$J,DFN,CCRPART) ; RTN GLOBAL OF PART
    145148 I '$D(C0CNRPC) S ^TMP("C0CRPC",$H,"RESULT",CCRGRTN(0))=""
    146  ;K ^TMP("C0CCCR",$J) ; BEGIN TO CLEAN UP
     149 K ^TMP("C0CCCR",$J) ; BEGIN TO CLEAN UP
     150 K ^TMP($J) ; REALLY CLEAN UP
     151 M ^TMP($J)=^TMP("C0CSAV",$J) ; RESTORE CALLER'S $J
    147152 Q
    148153 ;
  • ccr/trunk/p/C0CMED.m

    r973 r974  
    7676 N PEND S PEND=$NA(^TMP($J,"MED","PEND")) ; Pending Meds
    7777 N NVA S NVA=$NA(^TMP($J,"MED","NVA")) ; non-VA Meds
     78 K @HIST K @PEND K @NVA ; MAKE SURE THEY ARE EMPTY
    7879 S @HIST@(0)=0,@PEND@(0)=0,@NVA@(0)=0 ; At first, they are all empty... (prevent undefined errors)
    7980 ; N IPIV ; Inpatient IV Meds
     
    9495 . E  D CP^C0CXPATH(NVA,MEDOUTXML)
    9596 . W:$G(DEBUG) "HAS NON-VA MEDS",!
     97 N ZI
     98 S ZI=$NA(^TMP("C0CCCR",$J,"MEDMAP"))
     99 M ^TMP("C0CRIM","VARS",DFN,"MEDS")=@ZI ; PERSIST MEDS VARIABLES
     100 K @ZI ; CLEAN UP MED MAP AFTER - GPL 10/10
     101 K @PEND
     102 K @HIST
     103 K @NVA
    96104 Q
    97105 
  • ccr/trunk/p/C0CMED2.m

    r508 r974  
    258258 . . S MEDFIRST=0 ; RESET FIRST FLAG
    259259 . . D CP^C0CXPATH(RESULT,OUTXML) ; First one is a copy
    260  . D:'MEDFIRST INSINNER^C0CXPATH(OUTXML,RESULT) ; AFTER FIRST, INSERT INNER XML
     260 . D:'MEDFIRST INSINNER^C0CXPATH(OUTXML,RESULT) ; AFTER FIRST, INSERT INNER
    261261 N MEDTMP,MEDI
    262262 D MISSING^C0CXPATH(OUTXML,"MEDTMP") ; SEARCH XML FOR MISSING VARS
  • ccr/trunk/p/C0CMED3.m

    r697 r974  
    105105 . . . S NDFIEN=$P(NDFDATA(20),U)
    106106 . . . S VAPROD=$P(NDFDATA(22),U)
     107 . . . S @MAP@("MEDPRODUCTNAMETEXT")=$$GET1^DIQ(50.68,VAPROD,.01) ;
     108 . . ; GPL - RESET THE NAME TO THE REAL NAME OF THE DRUG NOW THAT WE
     109 . . ;   HAVE IT.
    107110 . . ;
    108111 . . ; NDFIEN is not necessarily defined; it won't be if the drug
     
    256259 . W "MEDICATION MISSING ",!
    257260 . F MEDI=1:1:MEDTMP(0) W MEDTMP(MEDI),!
    258  N ZI
    259  S ZI=$NA(^TMP("C0CCCR",$J,"MEDMAP"))
    260  M ^TMP("C0CRIM","VARS",DFN,"MEDS")=@ZI ; PERSIST MEDS VARIABLES
    261261 Q
    262262 ;
  • ccr/trunk/p/C0CPARMS.m

    r508 r974  
    2424 N PTMP ;
    2525 S C0CPARMS=$NA(^TMP("C0CPARMS",$J)) ;BASE FOR THIS RUN
    26  ;K @C0CPARMS ;START WITH EMPTY PARMS; MAY NOT WANT TO DO THIS KILL
     26 K @C0CPARMS ;START WITH EMPTY PARMS; MAY NOT WANT TO DO THIS KILL
    2727 I $G(INPARMS)'="" D  ; OVERRIDES PROVIDED
    2828 . N C0CI S C0CI=""
Note: See TracChangeset for help on using the changeset viewer.