C0CRPMS ; CCDCCR/GPL - CCR/CCD PROCESSING FOR RPMS ;1/14/09 14:33
;;1.2;CCD/CCR GENERATION UTILITIES;;Oct 30, 2012;Build 50
;
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU Affero General Public License as
; published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
;
; You should have received a copy of the GNU Affero General Public License
; along with this program. If not, see .
;
W "NO ENTRY FROM TOP",!
Q
;
DISPLAY ; RUN THE PCC DISPLAY ROUTINE
D ^APCDDISP
Q
;
VTYPES ;
D GETN2^C0CRNF("G1",9999999.07)
; ZWR G1
Q
;
VISITS(C0CDFN,C0CCNT) ;LIST VISIT DATES FOR PATIENT DFN
; C0CCNT IS A LIMIT ON HOW MANY VISITS TO DISPLAY ; DEFAULTS TO ALL
I '$D(C0CCNT) S C0CCNT=999999999
N G,GN
S G="" S GN=0
F S G=$O(^AUPNVSIT("AA",C0CDFN,G)) Q:(G="")!(GN>C0CCNT) D ;
. S GN=GN+1
. W $$FMDTOUTC^C0CUTIL(9999999-G),!
Q
;
VISITS2(C0CDFN,C0CCNT) ;SECOND VERSION USING NEXTV
;
N C0CG,GN
S C0CG=""
S GN=0
I '$D(C0CCNT) S C0CCNT=99999999
F S C0CG=$$NEXTV(C0CDFN,C0CG) Q:(C0CG="")!(GN'