encounters
This commit is contained in:
parent
a1e8b34e70
commit
baa42bf9e2
|
@ -130,6 +130,11 @@ CCRRPC(CCRGRTN,DFN,CCRPARMS,CCRPART) ;RPC ENTRY POINT FOR CCR OUTPUT
|
|||
D QUERY^C0CXPATH(TGLOBAL,"//ContinuityOfCareRecord/Actors","ACTT")
|
||||
D EXTRACT^C0CACTOR("ACTT",ACTGLO,"ACTT2")
|
||||
D INSINNER^C0CXPATH(CCRGLO,"ACTT2","//ContinuityOfCareRecord/Actors")
|
||||
K ACTT,ACTT2
|
||||
D QUERY^C0CXPATH(TGLOBAL,"//ContinuityOfCareRecord/Comments","CMTT")
|
||||
D EXTRACT^C0CCMT("CMTT",DFN,"CMTT2")
|
||||
D INSINNER^C0CXPATH(CCRGLO,"CMTT2","//ContinuityOfCareRecord/Comments")
|
||||
K CMTT,CMTT2
|
||||
N TRIMI,J,DONE S DONE=0
|
||||
F TRIMI=0:0 D Q:DONE ; DELETE UNTIL ALL EMPTY ELEMENTS ARE GONE
|
||||
. S J=$$TRIM^C0CXPATH(CCRGLO) ; DELETE EMPTY ELEMENTS
|
||||
|
|
11
p/C0CENC.m
11
p/C0CENC.m
|
@ -21,16 +21,10 @@ C0CENC ; CCDCCR/GPL - CCR/CCD PROCESSING FOR ENCOUNTERS ; 05/21/10
|
|||
W "NO ENTRY FROM TOP",!
|
||||
Q
|
||||
;
|
||||
SETVARS ; INITIAL TEMPORARY VARIABLES
|
||||
S C0CENC=$NA(^TMP("C0CENC",$J,DFN))
|
||||
S C0CPRC=$NA(^TMP("C0CPRC",$J,DFN))
|
||||
S C0CNTE=$NA(^TMP("C0CNTE",$J,DFN))
|
||||
Q
|
||||
;
|
||||
EXTRACT(ENCXML,DFN,ENCOUT) ; EXTRACT ENCOUNTERS INTO XML TEMPLATE
|
||||
; ENCXML AND ENCOUT ARE PASSED BY NAME SO GLOBALS CAN BE USED
|
||||
;
|
||||
D SETVARS ;
|
||||
D SETVARS^C0CPROC ; SET UP VARIABLES FOR PROCEDUCRES, ENCOUNTERS, AND NOTES
|
||||
I '$D(@C0CENC) D TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; GET VARS IF NOT THERE
|
||||
D MAP(ENCXML,C0CENC,ENCOUT) ;MAP RESULTS FOR ENCOUNTERS
|
||||
Q
|
||||
|
@ -44,7 +38,7 @@ TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; CALLS ENTRY^C0CCPT TO GET PROCEDURES,
|
|||
; THE SURGERY PACKGE AND ADDITIONAL COMMENTS FROM OTHER CCR SECTIONS
|
||||
;
|
||||
;K VISIT,LST,NOTE
|
||||
I '$D(C0CPRC) D SETVARS ; INITIALIZE WORK AREAS IF NOT ALREADY THERE
|
||||
I '$D(C0CPRC) D SETVARS^C0CPROC ; INITIALIZE WORK AREAS IF NOT ALREADY THERE
|
||||
I '$D(VISIT) D ENTRY^C0CCPT(DFN,,,1) ; RETURNS VISIT LOCAL VARIABLE
|
||||
; NEED TO ADD START AND END DATES FROM PARAMETERS
|
||||
N ZI S ZI=""
|
||||
|
@ -98,6 +92,7 @@ TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; CALLS ENTRY^C0CCPT TO GET PROCEDURES,
|
|||
. . M @C0CNTE@(ZI,"TEXT")=VISIT(ZI,"TEXT") ; COPY THE TEXT OF THE NOTE
|
||||
. . S @C0CNTE@(ZI,"COMMENTOBJECTID")="NOTE_"_ZI
|
||||
. . S @C0CNTE@(ZI,"CMTDATETIME")=ZDATE ; DATE OF THE NOTE
|
||||
. . S @C0CNTE@(ZI,"ACTORSOURCEID")=ZPRV ; SOURCE OF THE NOTE
|
||||
. . S ZRNF("ENCCOMMENTID")="NOTE_"_ZI ; POINT TO THE NOTE FROM THE ENCOUNTER
|
||||
. D RNF1TO2^C0CRNF(C0CENC,"ZRNF") ; ADD THIS ROW TO THE ARRAY
|
||||
. ;S PREVCPT=ZCPT
|
||||
|
|
10
p/C0CPROC.m
10
p/C0CPROC.m
|
@ -21,12 +21,16 @@ C0CPROC ; CCDCCR/GPL - CCR/CCD PROCESSING FOR PROCEDURES ; 01/21/10
|
|||
W "NO ENTRY FROM TOP",!
|
||||
Q
|
||||
;
|
||||
SETVARS ; SET UP VARIABLES FOR PROCEDURES, ENCOUNTERS, AND NOTES
|
||||
S C0CENC=$NA(^TMP("C0CCCR",$J,"C0CENC",DFN))
|
||||
S C0CPRC=$NA(^TMP("C0CCCR",$J,"C0CPRC",DFN))
|
||||
S C0CNTE=$NA(^TMP("C0CCCR",$J,"C0CNTE",DFN))
|
||||
Q
|
||||
;
|
||||
EXTRACT(PROCXML,DFN,PROCOUT) ; EXTRACT PROCEDURES INTO XML TEMPLATE
|
||||
; PROCXML AND PROCOUT ARE PASSED BY NAME SO GLOBALS CAN BE USED
|
||||
;
|
||||
S C0CENC=$NA(^TMP("C0CENC",$J,DFN))
|
||||
S C0CPRC=$NA(^TMP("C0CPRC",$J,DFN))
|
||||
S C0CNTE=$NA(^TMP("C0CNTE",$J,DFN))
|
||||
D SETVARS ; SET UP VARIABLES
|
||||
I '$D(@C0CPRC) D TIUGET(DFN,C0CENC,C0CPRC,C0CNTE) ; GET VARS IF NOT THERE
|
||||
D MAP(PROCXML,C0CPRC,PROCOUT) ;MAP RESULTS FOR PROCEDURES
|
||||
Q
|
||||
|
|
Loading…
Reference in New Issue