Changeset 45 for ccr/trunk/p
- Timestamp:
- Jul 5, 2008, 7:57:32 PM (16 years ago)
- Location:
- ccr/trunk/p
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLACTORS.m
r43 r45 4 4 ; PROCESS THE ACTORS SECTION OF THE CCR 5 5 ; 6 EXTRACT(IPXML,ALST, OUTXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE6 EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE 7 7 ; 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 ",! 10 12 F I=1:1:@ALST@(0) D ; PROCESS ALL ACTORS IN THE LIST 11 13 . I @ALST@(I)["@@" Q ; NOT A VALID ACTOR … … 15 17 . I ATYP="" Q ; NOT A VALID ACTOR 16 18 . ; 19 . W AOID_" "_ATYP_" "_AIEN,! 17 20 . I ATYP="PATIENT" D ; PATIENT ACTOR TYPE 18 21 . . D QUERY^GPLXPATH(IPXML,"//Actors/ACTOR-PATIENT","ATMP") … … 31 34 . . D PROVIDER("ATMP",@ALST@(I),"ATMP2") 32 35 . ; 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 38 37 ; 39 D MISSING^GPLXPATH( OUTXML,"ACTTMP") ; SEARCH XML FOR MISSING VARS38 D MISSING^GPLXPATH(AXML,"ACTTMP") ; SEARCH XML FOR MISSING VARS 40 39 I ACTTMP(0)>0 D ; IF THERE ARE MISSING VARS - 41 40 . ; STRINGS MARKED AS @@X@@ … … 46 45 PATIENT(INXML,ACTREC,OUTXML) ; PROCESS A PATIENT ACTOR 47 46 ; 48 N AMAP 47 W "PROCESSING ACTOR PATIENT ",ACTREC,! 48 ; N AMAP 49 S AMAP=$NA(^TMP($J,"AMAP")) 49 50 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 50 51 S @AMAP@("ACTORGIVENNAME")="" … … 70 71 SYSTEM(INXML,ACTREC,OUTXML) ; PROCESS A SYSTEM ACTOR 71 72 ; 72 N AMAP 73 ; N AMAP 74 S AMAP=$NA(^TMP($J,"AMAP")) 73 75 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 74 76 S @AMAP@("ACTORINFOSYSNAME")="" … … 79 81 NOK(INXML,ACTREC,OUTXML) ; PROCESS A NEXT OF KIN TYPE ACTOR 80 82 ; 81 N AMAP 83 ; N AMAP 84 S AMAP=$NA(^TMP($J,"AMAP")) 82 85 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 83 86 S @AMAP@("ACTORDISPLAYNAME")="" … … 89 92 PROVIDER(INXML,ACTREC,OUTXML) ; PROCESS A PROVIDER TYPE ACTOR 90 93 ; 91 N AMAP 94 ; N AMAP 95 S AMAP=$NA(^TMP($J,"AMAP")) 92 96 S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID 93 97 S @AMAP@("ACTORGIVENNAME")="" -
ccr/trunk/p/GPLCCR.m
r44 r45 67 67 . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),! 68 68 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") 69 72 Q 70 73 ; … … 83 86 . S @VMAP@("ACTORPATIENT")="ACTORPATIENT_"_DFN 84 87 . S @VMAP@("ACTORFROM")="ACTORPROVIDER_"_DUZ ; FROM DUZ - ??? 85 . S @VMAP@("ACTORFROM2")="ACTOR PROVIDER_"_DUZ ; NEED BETTER WAY88 . S @VMAP@("ACTORFROM2")="ACTORSYSTEM_1" ; SECOND FROM IS THE SYSTEM 86 89 . S @VMAP@("ACTORTO")="ACTORPATIENT_"_DFN ; FOR TEST PURPOSES, 87 90 . ; THIS IS THE USE CASE FOR THE PHR WHERE "TO" IS THE PATIENT … … 151 154 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR","","","") 152 155 ;;>>>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") 153 160 ;;></TEST>
Note:
See TracChangeset
for help on using the changeset viewer.