Changeset 104


Ignore:
Timestamp:
Aug 26, 2008, 8:27:36 PM (16 years ago)
Author:
George Lilly
Message:

batch CCR export support

Location:
ccr/trunk/p
Files:
3 edited

Legend:

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

    r101 r104  
    2525       I Y<1 Q  ; EXIT
    2626       S DFN=$P(Y,U,1) ; SET THE PATIENT
     27       D XPAT(DFN,"","") ; EXPORT TO A FILE
     28       Q
     29       ;
     30XPAT(DFN,DIR,FN) ; EXPORT ONE PATIENT TO A FILE
     31       ; DIR IS THE DIRECTORY, DEFAULTS IF NULL TO ^TMP("GPLCCR","ODIR")
     32       ; FN IS FILE NAME, DEFAULTS IF NULL
    2733       N CCRGLO
    2834       D CCRRPC(.CCRGLO,DFN,"CCR","","","")
    2935       S OARY=$NA(^TMP("GPLCCR",$J,DFN,"CCR",1))
    30        S ONAM="PAT_"_DFN_"_CCR_V1.xml"
     36       S ONAM=FN
     37       I FN="" S ONAM="PAT_"_DFN_"_CCR_V1.xml"
    3138       S ODIRGLB=$NA(^TMP("GPLCCR","ODIR"))
    3239       I '$D(@ODIRGLB) D  ; IF NOT ODIR HAS BEEN SET
     
    3441       . ;S @ODIRGLB="/home/cedwards/"
    3542       . S @ODIRGLB="/opt/wv/p/"
    36        S ODIR=@ODIRGLB
     43       S ODIR=DIR
     44       I DIR="" S ODIR=@ODIRGLB
    3745       D OUTPUT^GPLXPATH(OARY,ONAM,ODIR)
    3846       Q
     
    8189    . S IXML="INXML"
    8290    . S OXML=$P(XI,";",4) ; ARRAY FOR SECTION VALUES
     91    . ; K @OXML ; KILL EXPECTED OUTPUT ARRAY
    8392    . ; W OXML,!
    8493    . S CALL="D "_TAG_"^"_RTN_"(IXML,DFN,OXML)" ; SETUP THE CALL
  • ccr/trunk/p/GPLPROBS.m

    r97 r104  
    2929          ; INSERT^GPLXPATH IS USED TO APPEND THE PROBLEMS TO THE OUTPUT
    3030          ;
    31           N RPCRSLT,J,K,PTMP,X,VMAP,TBUF
     31          N RPCRSLT,J,K,PTMP,X,VMAP,TBU
     32          S TVMAP=$NA(^TMP("GPLCCR",$J,"PROBVALS"))
     33          S TARYTMP=$NA(^TMP("GPLCCR",$J,"PROBARYTMP"))
     34          K @TVMAP,@TARYTMP ; KILL OLD ARRAY VALUES
    3235          D LIST^ORQQPL3(.RPCRSLT,DFN,"") ; CALL THE PROBLEM LIST RPC
    3336          I '$D(RPCRSLT(1)) D  Q ; RPC RETURNS NULL
     
    3639          . ; Q
    3740          I DEBUG ZWR RPCRSLT
    38           S TVMAP=$NA(^TMP("GPLCCR",$J,"PROBVALS"))
    39           S TARYTMP=$NA(^TMP("GPLCCR",$J,"PROBARYTMP"))
    40           K @TVMAP,@TARYTMP ; KILL OLD ARRAY VALUES
    4141          F J=1:1:RPCRSLT(0)  D  ; FOR EACH PROBLEM IN THE LIST
    4242          . S VMAP=$NA(@TVMAP@(J))
  • ccr/trunk/p/GPLRIMA.m

    r102 r104  
    188188    . W "ZDX:",ZDX," ZCNT:",ZCOUNT,!
    189189    Q ZCOUNT
     190    ;
     191XCPAT(CPATCAT) ; EXPORT TO FILE ALL PATIENTS IN CATEGORY CPATCAT
     192    ;
     193    I '$D(RIMBASE) D ASETUP ; FOR COMMAND LINE CALLS
     194    N ZI,ZJ,ZC,ZPATBASE
     195    S ZPATBASE=$NA(@RIMBASE@("RIMTBL","PATS",CPATCAT))
     196    S ZI=""
     197    F ZJ=0:0 D  Q:$O(@ZPATBASE@(ZI))=""  ; TIL END
     198    . S ZI=$O(@ZPATBASE@(ZI))
     199    . D XPAT^GPLCCR(ZI,"","") ; EXPORT THE PATIENT TO A FILE
     200    Q
     201    ;
     202CPAT(CPATCAT) ; SHOW PATIENT DFNS FOR A CATEGORY CPATCAT
     203    ;
     204    I '$D(RIMBASE) D ASETUP ; FOR COMMAND LINE CALLS
     205    N ZI,ZJ,ZC,ZPATBASE
     206    S ZC=0 ; COUNT FOR SPACING THE PRINTOUT
     207    S ZPATBASE=$NA(@RIMBASE@("RIMTBL","PATS",CPATCAT))
     208    S ZI=""
     209    F ZJ=0:0 D  Q:$O(@ZPATBASE@(ZI))=""  ; TIL END
     210    . S ZI=$O(@ZPATBASE@(ZI))
     211    . S ZC=ZC+1 ; INCREMENT OUTPUT PER LINE COUNT
     212    . W ZI," "
     213    . I ZC=10 D  ; NEW LINE
     214    . . S ZC=0
     215    . . W !
     216    Q
    190217    ;
    191218APUSH(AMAP,AVAL) ; ADD AVAL TO ATTRIBUTE MAP AMAP (AMAP PASSED BY NAME)
Note: See TracChangeset for help on using the changeset viewer.