encounters

This commit is contained in:
george 2010-05-23 23:00:21 +00:00
parent 109c50e09e
commit 51669c6874
3 changed files with 35 additions and 13 deletions

View File

@ -153,6 +153,7 @@ INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS
E D PUSH^C0CXPATH(TAB,"EXTRACT;C0CVITAL;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""C0CCCR"",$J,DFN,""VITALS"")")
D PUSH^C0CXPATH(TAB,"MAP;C0CLABS;//ContinuityOfCareRecord/Body/Results;^TMP(""C0CCCR"",$J,DFN,""RESULTS"")")
D PUSH^C0CXPATH(TAB,"EXTRACT;C0CPROC;//ContinuityOfCareRecord/Body/Procedures;^TMP(""C0CCCR"",$J,DFN,""PROCEDURES"")")
D PUSH^C0CXPATH(TAB,"EXTRACT;C0CENC;//ContinuityOfCareRecord/Body/Encounters;^TMP(""C0CCCR"",$J,DFN,""ENCOUNTERS"")")
Q
;
HDRMAP(CXML,DFN) ; MAP HEADER VARIABLES: FROM, TO ECT

View File

@ -627,24 +627,41 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME
;;<ExactDateTime>@@ENCDATETIME@@</ExactDateTime>
;;</DateTime>
;;<Type>
;;<Text>@@ENCTYPE@@</Text>
;;<Text>@@ENCTYPETXT@@</Text>
;;<Code>
;;<Value>@@ENCCODE@@</Value>
;;<CodingSystem>@@ENCCODESYS@@</CodingSystem>
;;<Value>@@ENCTYPECODE@@</Value>
;;<CodingSystem>@@ENCTYPECODESYS@@</CodingSystem>
;;</Code>
;;</Type>
;;<Source>
;;<Actor>
;;<ActorID>@@ENCACTORID@@</ActorID>
;;</Actor>
;;</Source>
;;<Locations>
;;<Description>
;;<Text>@@ENCDESCTXT@@</Text>
;;<Code>
;;<Value>@@ENCDESCCODE@@</Value>
;;<CodingSystem>@@ENCDESCCODESYS@@</CodingSystem>
;;</Code>
;;</Description>
;;<Location>
;;<Actor>
;;<ActorID>@@ENCLOCACTORID@@</ActorID>
;;</Actor>
;;</Location>
;;</Locations>
;;<Practioner>
;;<Actor>
;;<ActorID>@@ENCPRVACTORID@@</ActorID>
;;</Actor>
;;</Practioner>
;;<Indication>
;;<Text>@@ENCINDTXT@@</Text>
;;<Code>
;;<Value>@@ENCINDCODE@@</Value>
;;<CodingSystem>@@ENCINDCODESYS@@</CodingSystem>
;;</Code>
;;</Indication>
;;<Source>
;;<Actor>
;;<ActorID>@@ENCACTORID@@</ActorID>
;;</Actor>
;;</Source>
;;<CommentID>@@ENCCOMMENTID@@</CommentID>
;;</Encounter>
;;</Encounters>

View File

@ -39,7 +39,9 @@ TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; CALLS ENTRY^C0CCPT TO GET PROCEDURES,
; EXIST. THIS IS SO THAT ADDITIONAL PROCEDURES CAN BE OBTAINED FROM
; THE SURGERY PACKGE AND ADDITIONAL COMMENTS FROM OTHER CCR SECTIONS
;
K VISIT,LST,NOTE
K VISIT,LST,NOTE,C0CLPRC
; C0CLPRC IS A LOOKUP TABLE FOR USE IN BUILDING ENCOUNTERS
; FORMAT C0CLPRC(VISITIEN,CPT)=PROCOBJECTID FOR BUILDING LINKS TO PROCEDURES
D ENTRY^C0CCPT(DFN,,,1) ; RETURNS ALL RESULTS IN VISIT LOCAL VARIABLE
; NEED TO ADD START AND END DATES FROM PARAMETERS
N ZI S ZI=""
@ -59,7 +61,8 @@ TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; CALLS ENTRY^C0CCPT TO GET PROCEDURES,
. . . I (ZCPT=PREVCPT)&(ZDATE=PREVDT) Q ; NO DUPS ALLOWED
. . . W !,ZCPT," ",ZDATE," ",ZPRV
. . . S ZRNF("PROCACTOROBJID")=ZPRV
. . . S ZRNF("PROCCODE")=$P(ZCPT,U,1)
. . . N PROCCODE S PROCCODE=$P(ZCPT,U,1)
. . . S ZRNF("PROCCODE")=PROCCODE
. . . S ZRNF("PROCCODESYS")="CPT-4"
. . . S ZRNF("PROCDATETEXT")="Procedure Date"
. . . S ZRNF("PROCDATETIME")=ZDATE
@ -70,7 +73,8 @@ TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; CALLS ENTRY^C0CCPT TO GET PROCEDURES,
. . . S ZRNF("PROCDESCTEXT")=$P(ZCPT,U,3)
. . . S ZRNF("PROCLINKID")="" ; NO LINKS YET
. . . S ZRNF("PROCLINKREL")="" ; NO LINKS YET
. . . S ZRNF("PROCOBJECTID")="PROCEDURE_"_ZI
. . . S ZRNF("PROCOBJECTID")="PROCEDURE_"_ZI_"_"_ZJ
. . . S C0CLPRC(ZI,PROCCODE)=ZRNF("PROCOBJECTID") ; LOOKUP TABLE FOR ENCOUNTERS
. . . S ZRNF("PROCSTATUS")="Completed" ; Is this right?
. . . S ZRNF("PROCTYPE")=$P(ZCPT,U,2) ; NEED TO ADD THIS TO TEMPLATE
. . . D RNF1TO2^C0CRNF(C0CPRC,"ZRNF") ; ADD THIS ROW TO THE ARRAY