SCRPU4 ;ALB/CMM - PRINT PC TEAM/PRACT/ATTEND ; 29 Jun 99 04:11PM
;;5.3;PIMS;**41,177,1015,1016**;JUN 30, 2012;Build 20
;
PCMM(DFN,ADATE,PRINT) ; display primary care team, primary care provider and team phone for patient DFN on date ADATE
;DFN - patient ien
;ADATE - date to find primary care team, provider and team phone (default = today)
;PRINT - default 1 to print data; otherwise don't print
;
;CPRSGUI - Set by CPRS used to display MHTC in CPRS Patient Inquiry.
;
I '$D(PRINT) S PRINT=1
I PRINT'=""&(PRINT'=1) Q ;don't print data
I '$D(ADATE) S ADATE=DT
I ADATE="" S ADATE=DT
I '$D(DFN) Q
D TDATA^SDPPTEM(DFN,"",ADATE,"P")
I $G(CPRSGUI)=1 D START^SCMCMHTC(DFN)
Q
SCRPU4 ;ALB/CMM - PRINT PC TEAM/PRACT/ATTEND ; 29 Jun 99 04:11PM
+1 ;;5.3;PIMS;**41,177,1015,1016**;JUN 30, 2012;Build 20
+2 ;
PCMM(DFN,ADATE,PRINT) ; display primary care team, primary care provider and team phone for patient DFN on date ADATE
+1 ;DFN - patient ien
+2 ;ADATE - date to find primary care team, provider and team phone (default = today)
+3 ;PRINT - default 1 to print data; otherwise don't print
+4 ;
+5 ;CPRSGUI - Set by CPRS used to display MHTC in CPRS Patient Inquiry.
+6 ;
+7 IF '$DATA(PRINT)
SET PRINT=1
+8 ;don't print data
IF PRINT'=""&(PRINT'=1)
QUIT
+9 IF '$DATA(ADATE)
SET ADATE=DT
+10 IF ADATE=""
SET ADATE=DT
+11 IF '$DATA(DFN)
QUIT
+12 DO TDATA^SDPPTEM(DFN,"",ADATE,"P")
+13 IF $GET(CPRSGUI)=1
DO START^SCMCMHTC(DFN)
+14 QUIT