updates for deidentification

This commit is contained in:
george 2010-05-18 16:43:49 +00:00
parent f48b599262
commit 0c6b5e13f0
3 changed files with 45 additions and 2 deletions

View File

@ -90,10 +90,41 @@ PATIENT(INXML,AIEN,AOID,OUTXML) ; PROCESS A PATIENT ACTOR
S AMAP=$NA(^TMP($J,"AMAP"))
K @AMAP
D PEXTRACT(AMAP,AIEN,AOID) ;EXTRACT THE PATIENT ACTOR
I $P($$SITE^VASITE(),U,2)="OROVILLE HOSPITAL" S C0CDE=1
I $G(C0CDE)'="" D DEIDENT(AMAP,AIEN) ; DEIDENTIFY THE CCR
D MAP(INXML,AMAP,OUTXML) ;MAP TO XML
K @AMAP ; CLEAN UP BEHIND US
Q
;
DEIDENT(GPL,ZDFN) ; QUICK WAY TO DEIDENTIFY THE CCR
S @GPL@("ACTORADDRESSCITY")="ALTON"
S @GPL@("ACTORADDRESSLINE1")="1234 Somewhere Lane"
S @GPL@("ACTORADDRESSLINE2")=""
S @GPL@("ACTORADDRESSSOURCEID")="ACTORPATIENT_"_ZDFN
S @GPL@("ACTORADDRESSSTATE")="KANSAS"
S @GPL@("ACTORADDRESSTYPE")="Home"
S @GPL@("ACTORADDRESSZIPCODE")=67623
S @GPL@("ACTORCELLTEL")=""
S @GPL@("ACTORCELLTELTEXT")=""
S @GPL@("ACTORDATEOFBIRTH")="1957-12-25"
S @GPL@("ACTOREMAIL")=""
S @GPL@("ACTORFAMILYNAME")="ZZ PATIENT"_ZDFN
S @GPL@("ACTORGENDER")="MALE"
S @GPL@("ACTORGIVENNAME")="TEST"_ZDFN
S @GPL@("ACTORIEN")=2
S @GPL@("ACTORMIDDLENAME")="TWO"
S @GPL@("ACTOROBJECTID")="ACTORPATIENT_"_ZDFN
S @GPL@("ACTORRESTEL")="888-555-1212"
S @GPL@("ACTORRESTELTEXT")="Residential Telephone"
S @GPL@("ACTORSOURCEID")="ACTORSYSTEM_1"
S @GPL@("ACTORSSN")="769122557P"
S @GPL@("ACTORSSNSOURCEID")="ACTORPATIENT_"_ZDFN
S @GPL@("ACTORSSNTEXT")="SSN"
S @GPL@("ACTORSUFFIXNAME")=""
S @GPL@("ACTORWORKTEL")="888-121-1212"
S @GPL@("ACTORWORKTELTEXT")="Work Telephone"
Q
;
PEXTRACT(AMAP,AIEN,AOID) ; EXTRACT TO RETURN ARRAY RARY PASSED BY NAME
N ZX
S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID

View File

@ -190,10 +190,20 @@ ACTLST(AXML,ACTRTN) ; RETURN THE ACTOR LIST FOR THE XML IN AXML
; P3= IEN RECORD NUMBER FOR ACTOR - 2
N I,J,K,L
K @ACTRTN ; CLEAR RETURN ARRAY
F I=1:1:@AXML@(0) D ; FIRST FIX MISSING LINKS
. I @AXML@(I)?.E1"_<".E D ;
. . N ZA,ZB
. . S ZA=$P(@AXML@(I),">",1)_">"
. . S ZB="<"_$P(@AXML@(I),"<",3)
. . S @AXML@(I)=ZA_"ACTORORGANIZATION_1"_ZB
F I=1:1:@AXML@(0) D ; SCAN ALL LINES
. I @AXML@(I)?.E1"<ActorID>".E D ; THERE IS AN ACTOR THIS LINE
. . S J=$P($P(@AXML@(I),"<ActorID>",2),"</ActorID>",1)
. . I DEBUG W "<ActorID>=>",J,!
. . I $G(LINKDEBUG) W "<ActorID>=>",J,!
. . I J'="" S K(J)="" ; HASHING ACTOR
. I @AXML@(I)?.E1"<LinkID>".E D ; THERE IS AN ACTOR THIS LINE
. . S J=$P($P(@AXML@(I),"<LinkID>",2),"</LinkID>",1)
. . I $G(LINKDEBUG) W "<LinkID>=>",J,!
. . I J'="" S K(J)="" ; HASHING ACTOR
. . ; TO GET RID OF DUPLICATES
S I="" ; GOING TO $O THROUGH THE HASH

View File

@ -107,7 +107,9 @@ VISTA ; GETS THE PROBLEM LIST FOR VISTA
. S PTMP=RPCRSLT(J) ; PULL OUT PROBLEM FROM RPC RETURN ARRAY
. S @VMAP@("PROBLEMOBJECTID")="PROBLEM"_J ; UNIQUE OBJID FOR PROBLEM
. S @VMAP@("PROBLEMIEN")=$P(PTMP,U,1)
. S @VMAP@("PROBLEMSTATUS")=$S($P(PTMP,U,2)="A":"Active",1:"")
. S @VMAP@("PROBLEMSTATUS")=$S($P(PTMP,U,2)="A":"Active",$P(PTMP,U,2)="I":"Inactive",1:"")
. N ZPRIOR S ZPRIOR=$P(PTMP,U,14) ;PRIORITY FLAG
. S @VMAP@("PROBLEMSTATUS")=@VMAP@("PROBLEMSTATUS")_$S(ZPRIOR="A":"/Acute",ZPRIOR="C":"/Chronic",1:"") ; append Chronic and Accute to Status
. S @VMAP@("PROBLEMDESCRIPTION")=$P(PTMP,U,3)
. S @VMAP@("PROBLEMCODINGVERSION")=""
. S @VMAP@("PROBLEMCODEVALUE")=$P(PTMP,U,4)