fixed call to GPLXPATH to C0CXPATH

This commit is contained in:
cje 2009-09-15 16:26:23 +00:00
parent e44283a4ca
commit 59f9fd66b3
1 changed files with 14 additions and 13 deletions

View File

@ -1,5 +1,5 @@
C0CUTIL ;WV/C0C/SMH - Various Utilites for generating the CCR/CCD;06/15/08
;;1.0;C0C;;May 19, 2009;
C0CUTIL ;WV/C0C/SMH - Various Utilites for generating the CCR/CCD;06/15/08
;;0.1;C0C;;Jun 15, 2008;Build 29
;Copyright 2008-2009 Sam Habiel & George Lilly.
;Licensed under the terms of the GNU
;General Public License See attached copy of the License.
@ -21,7 +21,7 @@ C0CUTIL ;WV/C0C/SMH - Various Utilites for generating the CCR/CCD;06/15/08
W "No Entry at Top!"
Q
;
FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrinsic
FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrinsic
; FORMAT is Format of Date. Can be either D (Day) or DT (Date and Time)
; If not passed, or passed incorrectly, it's assumed that it is D.
; FM Date format is "YYYMMDD.HHMMSS" HHMMSS may not be supplied.
@ -57,7 +57,7 @@ FMDTOUTC(DATE,FORMAT) ; Convert Fileman Date to UTC Date Format; PUBLIC; Extrins
I $L($G(FORMAT)),FORMAT="DT" Q UTC ; Date with time.
E Q $P(UTC,"T")
;
SORTDT(V1,V2,ORDR) ; DATE SORT ARRAY AND RETURN INDEX IN V1 AND COUNT
SORTDT(V1,V2,ORDR) ; DATE SORT ARRAY AND RETURN INDEX IN V1 AND COUNT
; AS EXTRINSIC ORDR IS 1 OR -1 FOR FORWARD OR REVERSE
; DATE AND TIME ORDER. DEFAULT IS FORWARD
; V2 IS AN ARRAY OF DATES IN FILEMAN FORMAT
@ -78,17 +78,17 @@ SORTDT(V1,V2,ORDR) ; DATE SORT ARRAY AND RETURN INDEX IN V1 AND COUNT
S ZG=$Q(VSRT(""))
F D Q:ZG="" ;
. ; W ZG,!
. D PUSH^GPLXPATH("V1",@ZG)
. D PUSH^C0CXPATH("V1",@ZG)
. S ZG=$Q(@ZG)
I ORDR=-1 D ; HAVE TO REVERSE ORDER
. N ZG2
. F ZI=1:1:V1(0) D ; FOR EACH ELELMENT
. . S ZG2(V1(0)-ZI+1)=V1(ZI) ; SET IN REVERSE ORDER
. S ZG2(0)=V1(0)
. D CP^GPLXPATH("ZG2","V1") ; COPY OVER THE NEW ARRAY
. D CP^C0CXPATH("ZG2","V1") ; COPY OVER THE NEW ARRAY
Q ZCNT
;
DA2SNO(RTN,DNAME) ; LOOK UP DRUG ALLERGY CODE IN ^LEX
DA2SNO(RTN,DNAME) ; LOOK UP DRUG ALLERGY CODE IN ^LEX
; RETURNS AN ARRAY RTN PASSED BY REFERENCE
; THIS ROUTINE CAN BE USED AS AN RPC
; RTN(0) IS THE NUMBER OF ELEMENTS IN THE ARRAY
@ -103,7 +103,7 @@ DA2SNO(RTN,DNAME) ; LOOK UP DRUG ALLERGY CODE IN ^LEX
E S RTN(0)=0 ; NOT FOUND
Q
;
DASNO(DANAME) ; PRINTS THE SNOMED CODE FOR ALLERGY TO DRUG DANAME
DASNO(DANAME) ; PRINTS THE SNOMED CODE FOR ALLERGY TO DRUG DANAME
;
N DARTN
D DA2SNO(.DARTN,DANAME) ; CALL THE LOOKUP ROUTINE
@ -112,7 +112,7 @@ DASNO(DANAME) ; PRINTS THE SNOMED CODE FOR ALLERGY TO DRUG DANAME
E W !,"NOT FOUND",!
Q
;
DASNALL(WHICH) ; ROUTINE TO EXAMINE THE ADIS INDEX IN LEX AND RETRIEVE ALL
DASNALL(WHICH) ; ROUTINE TO EXAMINE THE ADIS INDEX IN LEX AND RETRIEVE ALL
; ASSOCIATED SNOMED CODES
N DASTMP,DASIEN,DASNO
S DASTMP=""
@ -122,11 +122,12 @@ DASNALL(WHICH) ; ROUTINE TO EXAMINE THE ADIS INDEX IN LEX AND RETRIEVE ALL
. W DASTMP,"=",DASNO,! ; PRINT IT OUT
Q
;
RPMS() ; Are we running on an RPMS system rather than Vista?
RPMS() ; Are we running on an RPMS system rather than Vista?
Q $G(DUZ("AG"))="I" ; If User Agency is Indian Health Service
VISTA() ; Are we running on Vanilla Vista?
VISTA() ; Are we running on Vanilla Vista?
Q $G(DUZ("AG"))="V" ; If User Agency is VA
WV() ; Are we running on WorldVista?
WV() ; Are we running on WorldVista?
Q $G(DUZ("AG"))="E" ; Code for WV.
OV() ; Are we running on OpenVista?
OV() ; Are we running on OpenVista?
Q $G(DUZ("AG"))="O" ; Code for OpenVista