the Variable "I" was being stepped on in the Meds processing.. newed it.
This commit is contained in:
parent
40551e4f37
commit
da93576617
46
p/GPLMEDS.m
46
p/GPLMEDS.m
|
@ -1,31 +1,31 @@
|
|||
GPLMEDS ; CCDCCR/CJE - CCR/CCD PROCESSING FOR MEDICATIONS ;07/23/08 14:33
|
||||
;;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.
|
||||
;
|
||||
;This program is free software; you can redistribute it and/or modify
|
||||
;it under the terms of the GNU General Public License as published by
|
||||
;the Free Software Foundation; either version 2 of the License, or
|
||||
;(at your option) any later version.
|
||||
;
|
||||
;This program is distributed in the hope that it will be useful,
|
||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;GNU General Public License for more details.
|
||||
;
|
||||
;You should have received a copy of the GNU General Public License along
|
||||
;with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
;
|
||||
;;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.
|
||||
;
|
||||
;This program is free software; you can redistribute it and/or modify
|
||||
;it under the terms of the GNU General Public License as published by
|
||||
;the Free Software Foundation; either version 2 of the License, or
|
||||
;(at your option) any later version.
|
||||
;
|
||||
;This program is distributed in the hope that it will be useful,
|
||||
;but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;GNU General Public License for more details.
|
||||
;
|
||||
;You should have received a copy of the GNU General Public License along
|
||||
;with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
;51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
;
|
||||
W "NO ENTRY FROM TOP",!
|
||||
Q
|
||||
;
|
||||
EXTRACT(MEDXML,DFN,MEDOUTXML) ; EXTRACT MEDICATIONS INTO PROVIDED XML TEMPLATE
|
||||
;
|
||||
; MEDXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
|
||||
; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE
|
||||
;
|
||||
N MEDRSLT,J,K,MEDPTMP,X,MEDVMAP,TBUF
|
||||
;
|
||||
; MEDXML AND OUTXML ARE PASSED BY NAME SO GLOBALS CAN BE USED
|
||||
; IMEDXML WILL CONTAIN ONLY THE MEDICATIONS SECTION OF THE OVERALL TEMPLATE
|
||||
;
|
||||
N MEDRSLT,I,J,K,MEDPTMP,X,MEDVMAP,TBUF
|
||||
D ACTIVE^ORWPS(.MEDRSLT,DFN)
|
||||
I '$D(MEDRSLT(1)) D ; NO MEDS FOR THIS PATIENT, EXIT
|
||||
. W "ERROR RUNNINIG MEDICATIONS RPC",!
|
||||
|
|
16
p/GPLUNIT.m
16
p/GPLUNIT.m
|
@ -123,21 +123,21 @@ GTSTS(GTZARY,RTN) ; return an array of test names
|
|||
Q
|
||||
;
|
||||
TESTALL(RNM) ; RUN ALL THE TESTS
|
||||
N I,J,TZTMP,TSTS,TOTP,TOTF
|
||||
N ZI,J,TZTMP,TSTS,TOTP,TOTF
|
||||
S TOTP=0 S TOTF=0
|
||||
D ZLOAD^GPLUNIT("TZTMP",RNM)
|
||||
D GTSTS(.TZTMP,"TSTS")
|
||||
F I=1:1:TSTS(0) D ;
|
||||
F ZI=1:1:TSTS(0) D ;
|
||||
. S TPASSED=0 S TFAILED=0
|
||||
. D ZTEST^GPLUNIT(.TZTMP,TSTS(I))
|
||||
. D ZTEST^GPLUNIT(.TZTMP,TSTS(ZI))
|
||||
. S TOTP=TOTP+TPASSED
|
||||
. S TOTF=TOTF+TFAILED
|
||||
. S $P(TSTS(I),"^",2)=TPASSED
|
||||
. S $P(TSTS(I),"^",3)=TFAILED
|
||||
. S $P(TSTS(ZI),"^",2)=TPASSED
|
||||
. S $P(TSTS(ZI),"^",3)=TFAILED
|
||||
F I=1:1:TSTS(0) D ;
|
||||
. W "TEST=> ",$P(TSTS(I),"^",1)
|
||||
. W " PASSED=>",$P(TSTS(I),"^",2)
|
||||
. W " FAILED=>",$P(TSTS(I),"^",3),!
|
||||
. W "TEST=> ",$P(TSTS(ZI),"^",1)
|
||||
. W " PASSED=>",$P(TSTS(ZI),"^",2)
|
||||
. W " FAILED=>",$P(TSTS(ZI),"^",3),!
|
||||
W "TOTAL=> PASSED:",TOTP," FAILED:",TOTF,!
|
||||
Q
|
||||
;
|
||||
|
|
|
@ -618,7 +618,7 @@ TLIST ; LIST THE TESTS
|
|||
;;>>>D ZTEST^GPLXPATH("INITXML")
|
||||
;;>>>D QUERY^GPLXPATH("GXML","//FIRST/SECOND/THIRD/FIFTH","G2")
|
||||
;;>>>D REPLACE^GPLXPATH("GXML","G2","//FIRST/SECOND")
|
||||
;;>>?GXML(3)="<FIFTH>"
|
||||
;;>>?GXML(2)="<FIFTH>"
|
||||
;;><INSINNER>
|
||||
;;>>>K GXML,G2,GBL,G3
|
||||
;;>>>D ZTEST^GPLXPATH("INITXML")
|
||||
|
|
Loading…
Reference in New Issue