Changeset 45


Ignore:
Timestamp:
Jul 5, 2008, 7:57:32 PM (16 years ago)
Author:
George Lilly
Message:

Actor processing shell is operational

Location:
ccr/trunk/p
Files:
2 edited

Legend:

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

    r43 r45  
    44           ;  PROCESS THE ACTORS SECTION OF THE CCR
    55           ;
    6 EXTRACT(IPXML,ALST,OUTXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE
     6EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE
    77           ;
    8            N I,J,ATMP,FIRST,AMAP,AOID,ATYP,AIEN
    9            S FIRST=1 ; NEED TO KNOW WHICH IS THE FIRST ACTOR
     8           N I,J,AMAP,AOID,ATYP,AIEN
     9           D CP^GPLXPATH(IPXML,AXML) ; MAKE A COPY OF ACTORS XML
     10           D REPLACE^GPLXPATH(AXML,"","//Actors") ; DELETE THE INSIDES
     11           W "PROCESSING ACTORS ",!
    1012           F I=1:1:@ALST@(0) D  ; PROCESS ALL ACTORS IN THE LIST
    1113           . I @ALST@(I)["@@" Q ; NOT A VALID ACTOR
     
    1517           . I ATYP="" Q ; NOT A VALID ACTOR
    1618           . ;
     19           . W AOID_" "_ATYP_" "_AIEN,!
    1720           . I ATYP="PATIENT" D  ; PATIENT ACTOR TYPE
    1821           . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PATIENT","ATMP")
     
    3134           . . D PROVIDER("ATMP",@ALST@(I),"ATMP2")
    3235           . ;
    33            . I FIRST D  ; FIRST TIME , ONLY COPY THE ARRAY
    34            . . D CP^GPLXPATH("ATMP",OUTXML) ;
    35            . . S FIRST=0 ; NO LONGER THE FIRST TIME
    36            . I 'FIRST D  ; ALL NON-FIRST ACTORS MUST BE INSERTED
    37            . . D INSERT^GPLXPATH("ATMP","//",OUTXML) ; INSERT AT ROOT
     36           . D INSINNER^GPLXPATH(AXML,"ATMP2") ; INSERT INTO ROOT
    3837           ;
    39            D MISSING^GPLXPATH(OUTXML,"ACTTMP") ; SEARCH XML FOR MISSING VARS
     38           D MISSING^GPLXPATH(AXML,"ACTTMP") ; SEARCH XML FOR MISSING VARS
    4039           I ACTTMP(0)>0  D  ; IF THERE ARE MISSING VARS -
    4140           . ; STRINGS MARKED AS @@X@@
     
    4645PATIENT(INXML,ACTREC,OUTXML) ; PROCESS A PATIENT ACTOR
    4746     ;
    48      N AMAP
     47     W "PROCESSING ACTOR PATIENT ",ACTREC,!
     48     ; N AMAP
     49     S AMAP=$NA(^TMP($J,"AMAP"))
    4950     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    5051     S @AMAP@("ACTORGIVENNAME")=""
     
    7071SYSTEM(INXML,ACTREC,OUTXML) ; PROCESS A SYSTEM ACTOR
    7172     ;
    72      N AMAP
     73     ; N AMAP
     74     S AMAP=$NA(^TMP($J,"AMAP"))
    7375     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    7476     S @AMAP@("ACTORINFOSYSNAME")=""
     
    7981NOK(INXML,ACTREC,OUTXML) ; PROCESS A NEXT OF KIN TYPE ACTOR
    8082     ;
    81      N AMAP
     83     ; N AMAP
     84     S AMAP=$NA(^TMP($J,"AMAP"))
    8285     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    8386     S @AMAP@("ACTORDISPLAYNAME")=""
     
    8992PROVIDER(INXML,ACTREC,OUTXML) ; PROCESS A PROVIDER TYPE ACTOR
    9093     ;
    91      N AMAP
     94     ; N AMAP
     95     S AMAP=$NA(^TMP($J,"AMAP"))
    9296     S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
    9397     S @AMAP@("ACTORGIVENNAME")=""
  • ccr/trunk/p/GPLCCR.m

    r44 r45  
    6767    . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),!
    6868    D ACTLST^GPLCCR(CCRGLO,ACTGLO) ; GEN THE ACTOR LIST
     69    D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Actors","ACTT")
     70    D EXTRACT^GPLACTORS("ACTT",ACTGLO,"ACTT2")
     71    D INSINNER^GPLXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors")
    6972    Q
    7073    ;
     
    8386    . S @VMAP@("ACTORPATIENT")="ACTORPATIENT_"_DFN
    8487    . S @VMAP@("ACTORFROM")="ACTORPROVIDER_"_DUZ ; FROM DUZ - ???
    85     . S @VMAP@("ACTORFROM2")="ACTORPROVIDER_"_DUZ ; NEED BETTER WAY
     88    . S @VMAP@("ACTORFROM2")="ACTORSYSTEM_1" ; SECOND FROM IS THE SYSTEM
    8689    . S @VMAP@("ACTORTO")="ACTORPATIENT_"_DFN  ; FOR TEST PURPOSES,
    8790    . ; THIS IS THE USE CASE FOR THE PHR WHERE "TO" IS THE PATIENT
     
    151154 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR","","","")
    152155 ;;>>>D ACTLST^GPLCCR(GPL,"ACTTEST")
     156 ;;><ACTORS>
     157 ;;>>>D ZTEST^GPLCCR("ACTLST")
     158 ;;>>>D QUERY^GPLXPATH(TGLOBAL,"//ContinuityOfCareRecord/Actors","G2")
     159 ;;>>>D EXTRACT^GPLACTORS("G2","ACTTEST","G3")
    153160 ;;></TEST>
Note: See TracChangeset for help on using the changeset viewer.