Changeset 29 for ccr


Ignore:
Timestamp:
Jul 1, 2008, 1:12:30 PM (16 years ago)
Author:
George Lilly
Message:

Derive Actor list TMP($J,DFN,"ACTORS",*)

File:
1 edited

Legend:

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

    r28 r29  
    2121        S TGLOBAL=$NA(^TMP($J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE
    2222        S CCRGLO=$NA(^TMP($J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
     23        S ACTGLO=$NA(^TMP($J,DFN,"ACTORS")); GLOBAL FOR ALL ACTORS IN CCR
    2324        ; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC
    2425        S CCRGRTN=$NA(^TMP($J,DFN,CCRPART)) ; RTN GLO NM OF PART OR ALL OF CCR
     
    3132        D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Actors")
    3233        D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Signatures")
    33         F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),!
     34        I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),!
    3435        ;
     36        D CCRHDR(CCRGLO,DFN) ; MAP HEADER VARIABLES
    3537        S CCRXTAB="^TMP($J,""CCRSTEP"")" ; GLOBAL TO STORE CCR PROCESSING STEPS
    3638        D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS
     
    5153        . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body")
    5254        . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),!
     55        . D ACTLST^GPLCCR(CCRGLO,ACTGLO)
    5356        Q
    5457        ;
     
    6063        Q
    6164         ;
     65CCRHDR(CXML,DFN) ; MAP HEADER VARIABLES: FROM, TO ECT
     66        N VMAP S VMAP=$NA(^TMP($J,DFN,"HEADER"))
     67        ; K @VMAP
     68        S @VMAP@("ACTORPATIENT")="ACTORPATIENT_"_DFN
     69        S @VMAP@("ACTORFROM")="ACTORPROVIDER_"_DUZ ; FROM DUZ - ???
     70        S @VMAP@("ACTORFROM2")="ACTORPROVIDER_"_DUZ ; NEED A BETTER WAY
     71        S @VMAP@("ACTORTO")="ACTORPATIENT_"_DFN  ; FOR TEST PURPOSES,
     72        ; THIS IS THE USE CASE FOR THE PHR WHERE "TO" IS THE PATIENT
     73        N CTMP
     74        D MAP^GPLXPATH(CXML,VMAP,"CTMP")
     75        D CP^GPLXPATH("CTMP",CXML)
     76        Q
     77        ;
     78ACTLST(AXML,ACTRTN) ; RETURN THE ACTOR LIST FOR THE XML IN AXML
     79        ; AXML AND ACTRTN ARE PASSED BY NAME
     80        N I,J,K
     81        K @ACTRTN ; CLEAR RETURN ARRAY
     82        F I=1:1:@AXML@(0) D  ; SCAN ALL LINES
     83        . I @AXML@(I)?.E1"<ActorID>".E D  ; THERE IS AN ACTOR ON THIS LINE
     84        . . S J=$P($P(@AXML@(I),"<ActorID>",2),"</ActorID>",1)
     85        . . W "<ActorID>=>",J,!
     86        . . D PUSH^GPLXPATH(ACTRTN,J)
     87        Q
     88        ;
    6289TEST   ; RUN ALL THE TEST CASES
    6390      ;D TESTALL^GPLUNIT("GPLCCR")
    6491      D ZTEST^GPLCCR("PROBLEMS")
    65       W "TESTING TESTING 123",!
     92      W "TESTING RETURNED FROM PROBLMES",!
    6693      D ZTEST^GPLCCR("CCR")
    6794      Q
     
    88115;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR")
    89116;;>>?@GPL@(@GPL@(0))="</ContinutiyOfCareRecord>"
     117;;><ACTLST>
     118;;>>>N TCCR
     119;;>>>D CCRRPC^GPLCCR(.TCCR,"2","CCR")
     120;;>>>D ACTLST^GPLCCR("TCCR","ACTTEST")
    90121;;></TEST>
Note: See TracChangeset for help on using the changeset viewer.