From 51669c68747e8cf31774af7f313da7035b5e1b2e Mon Sep 17 00:00:00 2001 From: george Date: Sun, 23 May 2010 23:00:21 +0000 Subject: [PATCH] encounters --- p/C0CCCR.m | 1 + p/C0CCCR0.m | 37 +++++++++++++++++++++++++++---------- p/C0CPROC.m | 10 +++++++--- 3 files changed, 35 insertions(+), 13 deletions(-) diff --git a/p/C0CCCR.m b/p/C0CCCR.m index 5a9a316..93ebe32 100644 --- a/p/C0CCCR.m +++ b/p/C0CCCR.m @@ -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 diff --git a/p/C0CCCR0.m b/p/C0CCCR0.m index b231426..a94b862 100644 --- a/p/C0CCCR0.m +++ b/p/C0CCCR0.m @@ -627,24 +627,41 @@ LOAD(ARY) ; LOAD A CCR TEMPLATE INTO ARY PASSED BY NAME ;;@@ENCDATETIME@@ ;; ;; - ;;@@ENCTYPE@@ + ;;@@ENCTYPETXT@@ ;; - ;;@@ENCCODE@@ - ;;@@ENCCODESYS@@ + ;;@@ENCTYPECODE@@ + ;;@@ENCTYPECODESYS@@ ;; ;; - ;; - ;; - ;;@@ENCACTORID@@ - ;; - ;; - ;; + ;; + ;;@@ENCDESCTXT@@ + ;; + ;;@@ENCDESCCODE@@ + ;;@@ENCDESCCODESYS@@ + ;; + ;; ;; ;; ;;@@ENCLOCACTORID@@ ;; ;; - ;; + ;; + ;; + ;;@@ENCPRVACTORID@@ + ;; + ;; + ;; + ;;@@ENCINDTXT@@ + ;; + ;;@@ENCINDCODE@@ + ;;@@ENCINDCODESYS@@ + ;; + ;; + ;; + ;; + ;;@@ENCACTORID@@ + ;; + ;; ;;@@ENCCOMMENTID@@ ;; ;; diff --git a/p/C0CPROC.m b/p/C0CPROC.m index 38cd32b..80fd079 100644 --- a/p/C0CPROC.m +++ b/p/C0CPROC.m @@ -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