Changeset 31
- Timestamp:
- Jul 1, 2008, 5:20:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR.m
r30 r31 10 10 S DFN=$P(Y,U,1) ; SET THE PATIENT 11 11 N CCRGLO 12 D CCRRPC(.CCRGLO,DFN,"CCR" )12 D CCRRPC(.CCRGLO,DFN,"CCR","","","") 13 13 S OARY=$NA(^TMP($J,DFN,"CCR",1)) 14 14 S ONAM="PAT_"_DFN_"_CCR_V1.xml" … … 17 17 Q 18 18 ; 19 CCRRPC(CCRGRTN,DFN,CCRPART) ; RPC ENTRY POINT FOR CCR OUTPUT 19 CCRRPC(CCRGRTN,DFN,CCRPART,TIME1,TIME2,HDRARY) ; RPC ENTRY POINT FOR CCR OUTPUT 20 ; CCRGRTN IS RETURN ARRAY PASSED BY NAME 21 ; DFN IS PATIENT IEN 22 ; CCRPART IS "CCR" FOR ENTIRE CCR, OR SECTION NAME FOR A PART OF THE 23 ; CCR BODY.. PARTS INCLUDE "PROBLEMS" "VITALS" ETC 24 ; TIME1 IS STARTING TIME TO INCLUDE - NULL MEANS ALL 25 ; TIME2 IS ENDING TIME TO INCLUDE TIME IS FILEMAN TIME - NULL MEANS NOW 26 ; HDRARY IS THE HEADER ARRAY DEFINING THE "FROM" AND "TO" VARIABLES 27 ; IF NULL WILL DEFAULT TO "FROM" DUZ AND "TO" DFN 20 28 S DEBUG=0 21 29 S TGLOBAL=$NA(^TMP($J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE … … 34 42 I DEBUG F I=1:1:@CCRGLO@(0) W @CCRGLO@(I),! 35 43 ; 36 D CCRHDR(CCRGLO,DFN) ; MAP HEADER VARIABLES 44 D HDRMAP(CCRGLO,DFN,HDRARY) ; MAP HEADER VARIABLES 45 ; 37 46 S CCRXTAB="^TMP($J,""CCRSTEP"")" ; GLOBAL TO STORE CCR PROCESSING STEPS 38 47 D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS … … 63 72 Q 64 73 ; 65 CCRHDR(CXML,DFN) ; MAP HEADER VARIABLES: FROM, TO ECT74 HDRMAP(CXML,DFN,IHDR) ; MAP HEADER VARIABLES: FROM, TO ECT 66 75 N VMAP S VMAP=$NA(^TMP($J,DFN,"HEADER")) 67 76 ; 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 77 I IHDR="" D ; HEADER ARRAY IS NOT PROVIDED, USE DEFAULTS 78 . S @VMAP@("ACTORPATIENT")="ACTORPATIENT_"_DFN 79 . S @VMAP@("ACTORFROM")="ACTORPROVIDER_"_DUZ ; FROM DUZ - ??? 80 . S @VMAP@("ACTORFROM2")="ACTORPROVIDER_"_DUZ ; NEED A BETTER WAY 81 . S @VMAP@("ACTORTO")="ACTORPATIENT_"_DFN ; FOR TEST PURPOSES, 82 . ; THIS IS THE USE CASE FOR THE PHR WHERE "TO" IS THE PATIENT 83 I IHDR'="" D ; HEADER VALUES ARE PROVIDED 84 . D CP^GPLXPATH(IHDR,VMAP) ; COPY HEADER VARIABLES TO MAP ARRAY 73 85 N CTMP 74 86 D MAP^GPLXPATH(CXML,VMAP,"CTMP") … … 78 90 ACTLST(AXML,ACTRTN) ; RETURN THE ACTOR LIST FOR THE XML IN AXML 79 91 ; AXML AND ACTRTN ARE PASSED BY NAME 80 N I,J,K 92 ; EACH ACTOR RECORD HAS 3 PARTS - IE IF OBJECTID=ACTORPATIENT_2 93 ; P1= OBJECTID - ACTORPATIENT_2 94 ; P2= OBJECT TYPE - PATIENT OR PROVIDER 95 ; P3= IEN RECORD NUMBER FOR ACTOR - 2 96 N I,J,K,L 81 97 K @ACTRTN ; CLEAR RETURN ARRAY 82 98 F I=1:1:@AXML@(0) D ; SCAN ALL LINES … … 84 100 . . S J=$P($P(@AXML@(I),"<ActorID>",2),"</ActorID>",1) 85 101 . . W "<ActorID>=>",J,! 86 . . S K(J)="" ; HASHING ACTOR TO GET RID OF MULTIPLES102 . . S K(J)="" ; HASHING ACTOR TO GET RID OF DUPLICATES 87 103 S I="" ; GOING TO $O THROUGH THE HASH 88 104 F J=0:0 D Q:$O(K(I))="" 89 105 . S I=$O(K(I)) ; WALK THROUGH THE HASH OF ACTORS 90 . D PUSH^GPLXPATH(ACTRTN,I) ; ADD THE ACTOR TO THE RETURN ARRAY 106 . S $P(L,U,1)=I ; FIRST PIECE IS THE OBJECT ID 107 . S $P(L,U,2)=$P($P(I,"ACTOR",2),"_",1) ; ACTOR TYPE: PATIENT/PROVIDER 108 . S $P(L,U,3)=$P(I,"_",2) ; IEN RECORD NUMBER FOR ACTOR 109 . D PUSH^GPLXPATH(ACTRTN,L) ; ADD THE ACTOR TO THE RETURN ARRAY 91 110 Q 92 111 ;
Note:
See TracChangeset
for help on using the changeset viewer.