- Timestamp:
- Jul 1, 2008, 1:12:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr/trunk/p/GPLCCR.m
r28 r29 21 21 S TGLOBAL=$NA(^TMP($J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE 22 22 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 23 24 ; TO GET PART OF THE CCR RETURNED, PASS CCRPART="PROBLEMS" ETC 24 25 S CCRGRTN=$NA(^TMP($J,DFN,CCRPART)) ; RTN GLO NM OF PART OR ALL OF CCR … … 31 32 D REPLACE^GPLXPATH(CCRGLO,"","//ContinuityOfCareRecord/Actors") 32 33 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),! 34 35 ; 36 D CCRHDR(CCRGLO,DFN) ; MAP HEADER VARIABLES 35 37 S CCRXTAB="^TMP($J,""CCRSTEP"")" ; GLOBAL TO STORE CCR PROCESSING STEPS 36 38 D INITSTPS(CCRXTAB) ; INITIALIZED CCR PROCESSING STEPS … … 51 53 . D INSERT^GPLXPATH(CCRGLO,OXML,"//ContinuityOfCareRecord/Body") 52 54 . I DEBUG F GPLI=1:1:@OXML@(0) W @OXML@(GPLI),! 55 . D ACTLST^GPLCCR(CCRGLO,ACTGLO) 53 56 Q 54 57 ; … … 60 63 Q 61 64 ; 65 CCRHDR(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 ; 78 ACTLST(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 ; 62 89 TEST ; RUN ALL THE TEST CASES 63 90 ;D TESTALL^GPLUNIT("GPLCCR") 64 91 D ZTEST^GPLCCR("PROBLEMS") 65 W "TESTING TESTING 123",!92 W "TESTING RETURNED FROM PROBLMES",! 66 93 D ZTEST^GPLCCR("CCR") 67 94 Q … … 88 115 ;;>>>D CCRRPC^GPLCCR(.GPL,"2","CCR") 89 116 ;;>>?@GPL@(@GPL@(0))="</ContinutiyOfCareRecord>" 117 ;;><ACTLST> 118 ;;>>>N TCCR 119 ;;>>>D CCRRPC^GPLCCR(.TCCR,"2","CCR") 120 ;;>>>D ACTLST^GPLCCR("TCCR","ACTTEST") 90 121 ;;></TEST>
Note:
See TracChangeset
for help on using the changeset viewer.