Changed CCRMEDS* to C0CMED*

This commit is contained in:
george 2009-03-22 19:26:00 +00:00
parent 26af30e6fa
commit 4d28c6a0f8
9 changed files with 28 additions and 29 deletions

View File

@ -150,7 +150,7 @@ INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS
W "TAB= ",TAB,!
; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS
D PUSH^C0CXPATH(TAB,"EXTRACT;C0CPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""C0CCCR"",$J,DFN,""PROBLEMS"")")
;D PUSH^C0CXPATH(TAB,"EXTRACT;C0CMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""C0CCCR"",$J,DFN,""MEDICATIONS"")")
;D PUSH^C0CXPATH(TAB,"EXTRACT;C0CMED;//ContinuityOfCareRecord/Body/Medications;^TMP(""C0CCCR"",$J,DFN,""MEDICATIONS"")")
I 'CCD D PUSH^C0CXPATH(TAB,"EXTRACT;C0CVITAL;//ContinuityOfCareRecord/Body/VitalSigns;^TMP(""C0CCCR"",$J,DFN,""VITALS"")")
Q
;

View File

@ -78,7 +78,7 @@ CCRRPC(CCRGRTN,DFN,CCRPARMS,CCRPART) ;RPC ENTRY POINT FOR CCR OUTPUT
D SET^C0CPARMS(CCRPARMS) ;SET PARAMETERS WITH CCRPARMS AS OVERRIDES
I '$D(TESTLAB) S TESTLAB=0 ; FLAG FOR TESTING RESULTS SECTION
I '$D(TESTALERT) S TESTALERT=1 ; FLAG FOR TESTING ALERTS SECTION
I '$D(TESTMEDS) S TESTMEDS=0 ; FLAG FOR TESTING CCRMEDS SECTION
I '$D(TESTMEDS) S TESTMEDS=0 ; FLAG FOR TESTING C0CMED SECTION
S TGLOBAL=$NA(^TMP("C0CCCR",$J,"TEMPLATE")) ; GLOBAL FOR STORING TEMPLATE
S CCRGLO=$NA(^TMP("C0CCCR",$J,DFN,"CCR")) ; GLOBAL FOR BUILDING THE CCR
S ACTGLO=$NA(^TMP("C0CCCR",$J,DFN,"ACTORS")) ; GLOBAL FOR ALL ACTORS
@ -134,7 +134,7 @@ INITSTPS(TAB) ; INITIALIZE CCR PROCESSING STEPS
I DEBUG W "TAB= ",TAB,!
; ORDER FOR CCR IS PROBLEMS,FAMILYHISTORY,SOCIALHISTORY,MEDICATIONS,VITALSIGNS,RESULTS,HEALTHCAREPROVIDERS
D PUSH^C0CXPATH(TAB,"EXTRACT;C0CPROBS;//ContinuityOfCareRecord/Body/Problems;^TMP(""C0CCCR"",$J,DFN,""PROBLEMS"")")
D PUSH^C0CXPATH(TAB,"EXTRACT;CCRMEDS;//ContinuityOfCareRecord/Body/Medications;^TMP(""C0CCCR"",$J,DFN,""MEDICATIONS"")")
D PUSH^C0CXPATH(TAB,"EXTRACT;C0CMED;//ContinuityOfCareRecord/Body/Medications;^TMP(""C0CCCR"",$J,DFN,""MEDICATIONS"")")
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,"MAP;C0CIMMU;//ContinuityOfCareRecord/Body/Immunizations;^TMP(""C0CCCR"",$J,DFN,""IMMUNE"")")

View File

@ -1,4 +1,4 @@
CCRMEDS ; CCDCCR/GPL - CCR/CCD PROCESSING FOR MEDICATIONS ;07/23/08 14:33
C0CMED ; CCDCCR/GPL - CCR/CCD PROCESSING FOR MEDICATIONS ;07/23/08 14:33
;;0.1;CCDCCR;;JUL 16,2008;
;Copyright 2008,2009 George Lilly, University of Minnesota and Sam Habiel.
;Licensed under the terms of the GNU General Public License.
@ -28,10 +28,10 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
;
N HASOP S HASOP=0 ; FLAG FOR HAS OUTPATIENT MEDS
N MEDCNT S MEDCNT=0 ; COUNT FOR MEDS ALREADY PROCESSED
; OUTPATIENT ACTIVE MEDS ARE PROCESSED IN EXTRACT^CCRMEDS1
; OUTPATIENT PENDING MEDS IN EXTRACT^CCRMEDS2
; NON-VA MEDS IN EXTRACT^CCRMEDS3
; INPATIENT MEDS IN EXTRACT^CCRMEDS4
; OUTPATIENT ACTIVE MEDS ARE PROCESSED IN EXTRACT^C0CMED1
; OUTPATIENT PENDING MEDS IN EXTRACT^C0CMED2
; NON-VA MEDS IN EXTRACT^C0CMED3
; INPATIENT MEDS IN EXTRACT^C0CMED4
; ALL OTHERS HERE
S MEDTVMAP=$NA(^TMP("C0CCCR",$J,"MEDMAP"))
K @MEDTVMAP ; CLEAR VARIABLE ARRAY
@ -40,18 +40,18 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
K @MEDTARYTMP ; KILL XML ARRAY
I $G(DUZ("AG"))="I" D Q ;
. ; I '$D(C0CTESTMEDS) G USERPC ; DELETE THIS LINE AFTER TESTING IS DONE
. D EXTRACT^CCRMEDS6(MEDXML,DFN,MEDOUTXML)
. D EXTRACT^C0CMED6(MEDXML,DFN,MEDOUTXML)
. ; I @MEDOUTXML@(0)=0 D USERPC ; FOR RPMS, USE THE RPC FOR MEDS
D EXTRACT^CCRMEDS1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @MEDOUTXML@(0)>0 D ; CCRMEDS FOUND ACTIVE OP MEDS
D EXTRACT^C0CMED1(MEDXML,DFN,MEDOUTXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @MEDOUTXML@(0)>0 D ; C0CMED FOUND ACTIVE OP MEDS
. S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML
. S MEDCNT=MEDCNT+@MEDTVMAP@(0) ; SAVE COUNT TO KNOW HOW TO ADD TO MAP
. W MEDCNT,!
. W "HAS ACTIVE OP MEDS",!
N PENDINGXML,MEDPENDING
S PENDINGXML="MEDPENDING" ;NAME FOR ARRAY
D EXTRACT^CCRMEDS2(MEDXML,DFN,PENDINGXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @PENDINGXML@(0)>0 D ; CCRMEDS FOUND PENDING OP MEDS
D EXTRACT^C0CMED2(MEDXML,DFN,PENDINGXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @PENDINGXML@(0)>0 D ; C0CMED FOUND PENDING OP MEDS
. S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML
. I @MEDOUTXML@(0)>0 D ; IF WE NEED TO COMBINE MEDS
. . D INSINNER^C0CXPATH(MEDOUTXML,PENDINGXML) ;ADD PENDING TO ACTIVE
@ -61,8 +61,8 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. W "HAS OP PENDING MEDS",!
N PENDINGXML,MEDPENDING
S PENDINGXML="MEDPENDING" ;NAME FOR ARRAY
D EXTRACT^CCRMEDS3(MEDXML,DFN,PENDINGXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @PENDINGXML@(0)>0 D ; CCRMEDS FOUND PENDING OP MEDS
D EXTRACT^C0CMED3(MEDXML,DFN,PENDINGXML) ; FIRST EXTRACT OUTPATIENT MEDS
I @PENDINGXML@(0)>0 D ; C0CMED FOUND PENDING OP MEDS
. ; S HASOP=1 ; SET FLAG TO KNOW HOW TO ADD XML
. I @MEDOUTXML@(0)>0 D ; IF WE NEED TO COMBINE MEDS
. . D INSINNER^C0CXPATH(MEDOUTXML,PENDINGXML) ;ADD NON-VA TO MEDS
@ -72,7 +72,7 @@ EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. W "HAS NON-VA MEDS",!
THEND ;
Q ; SKIPPING ALL THE REST OF THIS LOGIC.. IT IS NOT GOING TO BE NEEDED
; ONCE NON-VA AND IP MEDS WORK (CCRMEDS3 AND CCRMEDS4)
; ONCE NON-VA AND IP MEDS WORK (C0CMED3 AND C0CMED4)
USERPC ; ENTRY POINT FOR RPMS
N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF
D ACTIVE^ORWPS(.MEDRSLT,DFN)
@ -81,7 +81,6 @@ USERPC ; ENTRY POINT FOR RPMS
. S @MEDOUTXML@(0)=0
. Q
; I DEBUG ZWR MEDRSLT
M C0CMEDS=MEDRSLT
S MEDTVMAP=$NA(^TMP("C0CCCR",$J,"MEDMAP"))
S MEDTARYTMP=$NA(^TMP("C0CCCR",$J,"MEDARYTMP"))
; I 'HASOP K @MEDTVMAP,@MEDTARYTMP KILL MOVED TO TOP OF ROUTINE

View File

@ -1,4 +1,4 @@
CCRMEDS1 ; WV/CCDCCR/SMH - CCR/CCD PROCESSING FOR MEDICATIONS ;01/10/09
C0CMED1 ; WV/CCDCCR/SMH - CCR/CCD PROCESSING FOR MEDICATIONS ;01/10/09
;;0.1;CCDCCR;;JUL 16,2008;
;;Last modified Sat Jan 10 21:42:27 PST 2009
; Copyright 2009 WorldVistA. Licensed under the terms of the GNU
@ -52,7 +52,7 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
. S MEDCOUNT=MEDCOUNT+1
. I DEBUG W "RXIEN IS ",RXIEN,!
. S MAP=$NA(^TMP("C0CCCR",$J,"MEDMAP",MEDCOUNT))
. ; K @MAP DO NOT KILL HERE, WAS CLEARED IN CCRMEDS
. ; K @MAP DO NOT KILL HERE, WAS CLEARED IN C0CMED
. S @MEDMAP@(0)=@MEDMAP@(0)+1 ; INCREMENT TOTAL MEDS IN VAR ARRAY
. I DEBUG W "MAP= ",MAP,!
. N MED M MED=MEDS(RXIEN) ; PULL OUT MEDICATION FROM

View File

@ -1,4 +1,4 @@
CCRMEDS2 ; WV/CCDCCR/SMH - CCR/CCD Meds - Pending for Vista
C0CMED2 ; WV/CCDCCR/SMH - CCR/CCD Meds - Pending for Vista
;;0.1;CCDCCR;;JUL 16,2008;
;;Last Modified Sat Jan 10 21:41:14 PST 2009
; Copyright 2008 WorldVistA. Licensed under the terms of the GNU
@ -57,7 +57,7 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEM
. S MEDCOUNT=MEDCOUNT+1
. I DEBUG W "RXIEN IS ",RXIEN,!
. S MAP=$NA(^TMP("C0CCCR",$J,"MEDMAP",MEDCOUNT))
. ; K @MAP DON'T KILL MAP HERE, IT IS DONE IN CCRMEDS
. ; K @MAP DON'T KILL MAP HERE, IT IS DONE IN C0CMED
. S @MEDMAP@(0)=@MEDMAP@(0)+1 ; INCREMENT TOTAL MEDS IN VAR ARRAY
. I DEBUG W "MAP= ",MAP,!
. N MED M MED=MEDS(RXIEN) ; PULL OUT MEDICATION FROM

View File

@ -1,4 +1,4 @@
CCRMEDS3 ; WV/CCDCCR/SMH - Meds: Non-VA/Outside Meds for Vista
C0CMED3 ; WV/CCDCCR/SMH - Meds: Non-VA/Outside Meds for Vista
;;0.1;CCDCCR;;;
;;Last Modified: Sun Jan 11 05:45:03 UTC 2009
; Copyright 2009 WorldVistA. Licensed under the terms of the GNU

View File

@ -1,4 +1,4 @@
CCRMEDS4 ; WV/CCDCCR/SMH - CCR/CCD PROCESSING FOR MEDICATIONS - Inpatient Meds/Unit Dose ;10/13/08
C0CMED4 ; WV/CCDCCR/SMH - CCR/CCD PROCESSING FOR MEDICATIONS - Inpatient Meds/Unit Dose ;10/13/08
;;0.1;CCDCCR;;;
; Copyright 2008 WorldVistA. Licensed under the terms of the GNU
; General Public License See attached copy of the License.
@ -31,8 +31,8 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEM
; MAP is a mapping variable map (store result) for each med
;
; Inpatient Meds will be extracted using this routine and and the one following.
; Inpatient Meds Unit Dose is going to be CCRMEDS4
; Inpatient Meds IVs is going to be CCRMEDS5
; Inpatient Meds Unit Dose is going to be C0CMED4
; Inpatient Meds IVs is going to be C0CMED5
;
; We will use two Pharmacy ReEnginnering API's:
; PSS431^PSS55(DFN,PO,PSDATE,PEDATE,LIST) - provides most info

View File

@ -1,4 +1,4 @@
CCRMEDS6 ; WV/CCDCCR/SMH - Meds from RPMS: Outpatient Meds;01/10/09
C0CMED6 ; WV/CCDCCR/SMH - Meds from RPMS: Outpatient Meds;01/10/09
;;0.1;CCDCCR;;JUL 16,2008;
; Copyright 2008 WorldVistA. Licensed under the terms of the GNU
; General Public License See attached copy of the License.
@ -63,7 +63,7 @@ EXTRACT(MINXML,DFN,OUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
F S MEDCNT=$O(MEDS(MEDCNT)) Q:MEDCNT="" D ; for each medication in the list
. I DEBUG W "MEDCNT IS ",MEDCNT,!
. S MAP=$NA(^TMP("C0CCCR",$J,"MEDMAP",MEDCNT))
. ; K @MAP DO NOT KILL HERE, WAS CLEARED IN CCRMEDS
. ; K @MAP DO NOT KILL HERE, WAS CLEARED IN C0CMED
. S @MEDMAP@(0)=@MEDMAP@(0)+1 ; increment total meds in var array
. I DEBUG W "MAP= ",MAP,!
. S @MAP@("MEDOBJECTID")="MED"_MEDCNT ; MEDCNT FOR ID

View File

@ -165,10 +165,10 @@ MEDS
W "Getting Med Template into INXML using",!
W "QUERY^GPLXPATH(T,XPATH,""INXML"")",!!
D QUERY^GPLXPATH(T,XPATH,"INXML")
W "Executing EXTRACT^CCRMEDS(INXML,DFN,OUTXML)",!
W "Executing EXTRACT^C0CMED(INXML,DFN,OUTXML)",!
W "OUTXML will be ^TMP($J,""OUT"")",!
N OUTXML S OUTXML=$NA(^TMP($J,"OUT"))
D EXTRACT^CCRMEDS6("INXML",DFN,OUTXML)
D EXTRACT^C0CMED6("INXML",DFN,OUTXML)
D FILEOUT^C0CRNF(OUTXML,"TESTMEDS.xml")
Q
PAT