1 | GPLACTORS ; CCDCCR/GPL - CCR/CCD PROCESSING FOR ACTORS ; 7/3/08
|
---|
2 | ;;0.1;CCDCCR;nopatch;noreleasedate
|
---|
3 | ;
|
---|
4 | ; PROCESS THE ACTORS SECTION OF THE CCR
|
---|
5 | ;
|
---|
6 | EXTRACT(IPXML,ALST,OUTXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE
|
---|
7 | ;
|
---|
8 | N I,J,ATMP,FIRST,AMAP,AOID,ATYP,AIEN
|
---|
9 | S FIRST=1 ; NEED TO KNOW WHICH IS THE FIRST ACTOR
|
---|
10 | F I=1:1:@ALST@(0) D ; PROCESS ALL ACTORS IN THE LIST
|
---|
11 | . I @ALST@(I)["@@" Q ; NOT A VALID ACTOR
|
---|
12 | . S AOID=$P(@ALST@(I),"^",1) ; ACTOR OBJECT ID
|
---|
13 | . S ATYP=$P(@ALST@(I),"^",2) ; ACTOR TYPE
|
---|
14 | . S AIEN=$P(@ALST@(I),"^",3) ; ACTOR RECORD NUMBER
|
---|
15 | . I ATYP="" Q ; NOT A VALID ACTOR
|
---|
16 | . ;
|
---|
17 | . ; MAP ACTOR VARIABLES HERE
|
---|
18 | . ;
|
---|
19 | . S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
|
---|
20 | . S @AMAP@("ACTORGIVENNAME")=""
|
---|
21 | . S @AMAP@("ACTORMIDDLENAME")=""
|
---|
22 | . S @AMAP@("ACTORFAMILYNAME")=""
|
---|
23 | . S @AMAP@("ACTORDATEOFBIRTH")=""
|
---|
24 | . S @AMAP@("ACTORGENDER")=""
|
---|
25 | . S @AMAP@("ACTORSSN")=""
|
---|
26 | . S @AMAP@("ACTORSSNSOURCEID")=""
|
---|
27 | . S @AMAP@("ACTORADDRESSTYPE")=""
|
---|
28 | . S @AMAP@("ACTORADDRESSLINE1")=""
|
---|
29 | . S @AMAP@("ACTORADDRESSLINE2")=""
|
---|
30 | . S @AMAP@("ACTORADDRESSCITY")=""
|
---|
31 | . S @AMAP@("ACTORADDRESSSTATE")=""
|
---|
32 | . S @AMAP@("ACTORADDRESSZIPCODE")=""
|
---|
33 | . S @AMAP@("ACTORTELEPHONE")=""
|
---|
34 | . S @AMAP@("ACTORTELEPHONETYPE")=""
|
---|
35 | . S @AMAP@("ACTOREMAIL")=""
|
---|
36 | . S @AMAP@("ACTORADDRESSSOURCEID")=""
|
---|
37 | . S @AMAP@("ACTORINFOSYSNAME")=""
|
---|
38 | . S @AMAP@("ACTORINFOSYSSOURCEID")=""
|
---|
39 | . S @AMAP@("ACTORDISPLAYNAME")=""
|
---|
40 | . S @AMAP@("ACTORRELATION")=""
|
---|
41 | . S @AMAP@("ACTORRELATIONSOURCEID")=""
|
---|
42 | . S @AMAP@("ACTORSPECIALITY")=""
|
---|
43 | . ;
|
---|
44 | . ;
|
---|
45 | . D MAP^GPLXPATH(INXML,AMAP,"ATMP") ; MAP THE VARIABLE
|
---|
46 | . I FIRST D ; FIRST TIME , ONLY COPY THE ARRAY
|
---|
47 | . . D CP^GPLXPATH("ATMP",OUTXML) ;
|
---|
48 | . . S FIRST=0 ; NO LONGER THE FIRST TIME
|
---|
49 | . I 'FIRST D ; ALL NON-FIRST ACTORS MUST BE INSERTED
|
---|
50 | . . D INSERT^GPLXPATH("ATMP","//",OUTXML) ; INSERT AT ROOT
|
---|
51 | ;
|
---|
52 | Q
|
---|
53 | ;
|
---|
54 |
|
---|