includes testing version of de-identification code
This commit is contained in:
parent
0c6b5e13f0
commit
5f423ee03b
|
@ -35,7 +35,7 @@ TEST ;
|
|||
F S ZI=$O(GARY2(ZI)) Q:ZI="" D ;
|
||||
. N GTMP,G2
|
||||
. M G2=GARY2(ZI)
|
||||
. D DEMUXARY^C0CMXP("GTMP","G2",2)
|
||||
. D DEMUX2^C0CMXP("GTMP","G2",2)
|
||||
. M GARY3(ZI)=GTMP
|
||||
Q
|
||||
;
|
||||
|
@ -65,11 +65,15 @@ TEST3
|
|||
D XPATH(1,"/","GIDX","GARY",,REDUX)
|
||||
K C0CCBK("TAG")
|
||||
D SEPARATE^C0CMCCD("GARY2","GARY") ; SEPARATE FOR EASIER BROWSING
|
||||
D TEST3A
|
||||
Q
|
||||
;
|
||||
TEST3A ; INTERNAL ROUTINE
|
||||
S ZI=""
|
||||
F S ZI=$O(GARY2(ZI)) Q:ZI="" D ;
|
||||
. N GTMP,G2
|
||||
. M G2=GARY2(ZI)
|
||||
. D DEMUXARY^C0CMXP("GTMP","G2",2)
|
||||
. D DEMUX2^C0CMXP("GTMP","G2",2)
|
||||
. M GARY4(ZI)=GTMP
|
||||
Q
|
||||
;
|
||||
|
|
17
p/C0CMXP.m
17
p/C0CMXP.m
|
@ -228,6 +228,23 @@ DEMUXARY(OARY,IARY,DEPTH) ;CONVERT AN XPATH ARRAY PASSED AS IARY TO
|
|||
. E S @OARY@(ZL,ZM)=@IARY@(ZI)
|
||||
Q
|
||||
;
|
||||
DEMUX2(OARY,IARY,DEPTH) ;CONVERT AN XPATH ARRAY PASSED AS IARY TO
|
||||
; FORMAT @OARY@(x,variablename) where x is the first multiple
|
||||
; IF DEPTH=2, THE LAST 2 PARTS OF THE XPATH WILL BE USED
|
||||
N ZI,ZJ,ZK,ZL,ZM S ZI=""
|
||||
F S ZI=$O(@IARY@(ZI)) Q:ZI="" D ;
|
||||
. D DEMUX^C0CMXP("ZJ",ZI)
|
||||
. S ZK=$P(ZJ,"^",3)
|
||||
. S ZM=$RE($P($RE(ZK),"/",1))
|
||||
. I $G(DEPTH)=2 D ;LAST TWO PARTS OF XPATH USED FOR THE VARIABLE NAME
|
||||
. . S ZM=$RE($P($RE(ZK),"/",2))_"."_ZM
|
||||
. S ZL=$P(ZJ,"^",1)
|
||||
. I ZL="" S ZL=1
|
||||
. I $D(@OARY@(ZL,ZM)) D ;IT'S A DUP
|
||||
. . S @OARY@(ZL,ZM_"[2]")=@IARY@(ZI)
|
||||
. E S @OARY@(ZL,ZM)=@IARY@(ZI)
|
||||
Q
|
||||
;
|
||||
DEMUXXP1(OARY,IARY) ;IARY IS INCOMING XPATH ARRAY
|
||||
; BOTH IARY AND OARY ARE PASSED BY NAME
|
||||
; RETURNS A SIMPLE XPATH ARRAY WITHOUT MULTIPLES. DUPLICATES ARE REMOVED
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue