Added entry points to GPLACTORS to get the patient information; changes in Template in GPLCCR0

This commit is contained in:
sam 2008-07-06 20:18:34 +00:00
parent 747942049f
commit 972e3e7d3c
3 changed files with 51 additions and 23 deletions

View File

@ -198,7 +198,7 @@ DISPNAME() ; Display Name; PUBLIC; Extrinsic
N NAME S NAME=$P(PT(0),"^",1) N NAME S NAME=$P(PT(0),"^",1)
Q $$NAMEFMT^XLFNAME(.NAME,"G","MXc") Q $$NAMEFMT^XLFNAME(.NAME,"G","MXc")
; "G" is Given Name First; "MXc" is Mixed Case, With Suffx Preceded by Comma ; "G" is Given Name First; "MXc" is Mixed Case, With Suffx Preceded by Comma
OB() ; Date of Birth; PUBLIC; Extrinsic DOB() ; Date of Birth; PUBLIC; Extrinsic
; PREREQ: PT Defined ; PREREQ: PT Defined
Q:$G(PT(0))="" "" Q:$G(PT(0))="" ""
N DOB S DOB=$P(PT(0),"^",3) N DOB S DOB=$P(PT(0),"^",3)

View File

@ -4,17 +4,26 @@ GPLACTORS ; CCDCCR/GPL - CCR/CCD PROCESSING FOR ACTORS ; 7/3/08
; PROCESS THE ACTORS SECTION OF THE CCR ; PROCESS THE ACTORS SECTION OF THE CCR
; ;
EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE EXTRACT(IPXML,ALST,AXML) ; EXTRACT ACTOR FROM ALST INTO PROVIDED XML TEMPLATE
; ; IPXML is the Input Actor Template into which we are going to substitute values
; This is straight XML. Values to be substituted are in @@VAL@@ format.
; ALST is the actor list global generated by ACTLST^GPLCCR and is in the following format
; ^TMP(7542,1,"ACTORS",0)=Count
; ^TMP(7542,1,"ACTORS",n)="ActorID^ActorType^ActorIEN"
; ActorType is an enum containing either "PROVIDER" "PATIENT" "SYSTEM"
; AXML is the output arrary, to contain XML.
N I,J,AMAP,AOID,ATYP,AIEN N I,J,AMAP,AOID,ATYP,AIEN
D CP^GPLXPATH(IPXML,AXML) ; MAKE A COPY OF ACTORS XML D CP^GPLXPATH(IPXML,AXML) ; MAKE A COPY OF ACTORS XML
D REPLACE^GPLXPATH(AXML,"","//Actors") ; DELETE THE INSIDES D REPLACE^GPLXPATH(AXML,"","//Actors") ; DELETE THE INSIDES
W "PROCESSING ACTORS ",! W "PROCESSING ACTORS ",!
F I=1:1:@ALST@(0) D ; PROCESS ALL ACTORS IN THE LIST F I=1:1:@ALST@(0) D ; PROCESS ALL ACTORS IN THE LIST
. I @ALST@(I)["@@" Q ; NOT A VALID ACTOR . I @ALST@(I)["@@" Q ; NOT A VALID ACTOR
. S AOID=$P(@ALST@(I),"^",1) ; ACTOR OBJECT ID . S AOID=$P(@ALST@(I),"^",1) ; ACTOR OBJECT ID
. S ATYP=$P(@ALST@(I),"^",2) ; ACTOR TYPE . S ATYP=$P(@ALST@(I),"^",2) ; ACTOR TYPE
. S AIEN=$P(@ALST@(I),"^",3) ; ACTOR RECORD NUMBER . S AIEN=$P(@ALST@(I),"^",3) ; ACTOR RECORD NUMBER
. I ATYP="" Q ; NOT A VALID ACTOR . I ATYP="" Q ; NOT A VALID ACTOR
. ; . ;
. W AOID_" "_ATYP_" "_AIEN,! . W AOID_" "_ATYP_" "_AIEN,!
. I ATYP="PATIENT" D ; PATIENT ACTOR TYPE . I ATYP="PATIENT" D ; PATIENT ACTOR TYPE
@ -47,24 +56,27 @@ PATIENT(INXML,ACTREC,OUTXML) ; PROCESS A PATIENT ACTOR
W "PROCESSING ACTOR PATIENT ",ACTREC,! W "PROCESSING ACTOR PATIENT ",ACTREC,!
; N AMAP ; N AMAP
S AMAP=$NA(^TMP($J,"AMAP")) S AMAP=$NA(^TMP($J,"AMAP"))
D INIT^CCRDPT(AIEN)
S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID S @AMAP@("ACTOROBJECTID")=AOID ;ACTOR OBJECT ID
S @AMAP@("ACTORGIVENNAME")="" S @AMAP@("ACTORGIVENNAME")=$$GIVEN^CCRDPT
S @AMAP@("ACTORMIDDLENAME")="" S @AMAP@("ACTORMIDDLENAME")=$$MIDDLE^CCRDPT
S @AMAP@("ACTORFAMILYNAME")="" S @AMAP@("ACTORFAMILYNAME")=$$FAMILY^CCRDPT
S @AMAP@("ACTORDATEOFBIRTH")="" S @AMAP@("ACTORDATEOFBIRTH")=$$DOB^CCRDPT
S @AMAP@("ACTORGENDER")="" S @AMAP@("ACTORGENDER")=$$GENDER^CCRDPT
S @AMAP@("ACTORSSN")="" S @AMAP@("ACTORSSN")=$$SSN^CCRDPT
S @AMAP@("ACTORSSNSOURCEID")="" S @AMAP@("ACTORSSNSOURCEID")=AOID
S @AMAP@("ACTORADDRESSTYPE")="" S @AMAP@("ACTORADDRESSTYPE")=$$ADDRTYPE^CCRDPT
S @AMAP@("ACTORADDRESSLINE1")="" S @AMAP@("ACTORADDRESSLINE1")=$$ADDR1^CCRDPT
S @AMAP@("ACTORADDRESSLINE2")="" S @AMAP@("ACTORADDRESSLINE2")=$$ADDR2^CCRDPT
S @AMAP@("ACTORADDRESSCITY")="" S @AMAP@("ACTORADDRESSCITY")=$$CITY^CCRDPT
S @AMAP@("ACTORADDRESSSTATE")="" S @AMAP@("ACTORADDRESSSTATE")=$$STATE^CCRDPT
S @AMAP@("ACTORADDRESSZIPCODE")="" S @AMAP@("ACTORADDRESSZIPCODE")=$$ZIP^CCRDPT
S @AMAP@("ACTORTELEPHONE")="" S @AMAP@("ACTORRESTEL")=$$RESTEL^CCRDPT
S @AMAP@("ACTORTELEPHONETYPE")="" S @AMAP@("ACTORWORKTEL")=$$WORKTEL^CCRDPT
S @AMAP@("ACTOREMAIL")="" S @AMAP@("ACTORCELLTEL")=$$CELLTEL^CCRDPT
S @AMAP@("ACTORADDRESSSOURCEID")="" S @AMAP@("ACTOREMAIL")=$$EMAIL^CCRDPT
S @AMAP@("ACTORADDRESSSOURCEID")=AOID
D DESTROY^CCRDPT
D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE D MAP^GPLXPATH(INXML,AMAP,OUTXML) ; MAP THE VARIABLE
Q Q
; ;

View File

@ -436,7 +436,11 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
;;<ExactDateTime>@@ACTORDATEOFBIRTH@@</ExactDateTime> ;;<ExactDateTime>@@ACTORDATEOFBIRTH@@</ExactDateTime>
;;</DateOfBirth> ;;</DateOfBirth>
;;<Gender> ;;<Gender>
;;<Code>
;;<Text>@@ACTORGENDER@@</Text> ;;<Text>@@ACTORGENDER@@</Text>
;;<Value>@@ACTORGENDER@@</Value>
;;<CodingSystem>2.16.840.1.113883.5.1</CodingSystem>
;;</Code>
;;</Gender> ;;</Gender>
;;</Person> ;;</Person>
;;<IDs> ;;<IDs>
@ -461,9 +465,21 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
;;<PostalCode>@@ACTORADDRESSZIPCODE@@</PostalCode> ;;<PostalCode>@@ACTORADDRESSZIPCODE@@</PostalCode>
;;</Address> ;;</Address>
;;<Telephone> ;;<Telephone>
;;<Value>@@ACTORTELEPHONE@@</Value> ;;<Value>@@ACTORRESTEL@@</Value>
;;<Type> ;;<Type>
;;<Text>@@ACTORTELEPHONETYPE@@</Text> ;;<Text>Residential Telephone</Text>
;;</Type>
;;</Telephone>
;;<Telephone>
;;<Value>@@ACTORWORKTEL@@</Value>
;;<Type>
;;<Text>Work Telephone</Text>
;;</Type>
;;</Telephone>
;;<Telephone>
;;<Value>@@ACTORCELLTEL@@</Value>
;;<Type>
;;<Text>Cell phone</Text>
;;</Type> ;;</Type>
;;</Telephone> ;;</Telephone>
;;<EMail> ;;<EMail>