[613] | 1 | SCMCMM ;ALB/REW - MailMessages Utilities ; 11/4/99 9:29am
|
---|
| 2 | ;;5.3;Scheduling;**41,177,205**;AUG 13, 1993
|
---|
| 3 | ;1
|
---|
| 4 | PCMAIL(DFN,SCARRAY,SCDATE) ;load standard patient pc info into mail message
|
---|
| 5 | ; DFN - ptr to Patient File
|
---|
| 6 | ; SCARRAY - Literal value of XMTEXT ARRAY
|
---|
| 7 | ; SCDATE - Date of interest - default=dt
|
---|
| 8 | ; Returned: Ending Line Count for Array
|
---|
| 9 | ;
|
---|
| 10 | N SCLNCNT,SCPCTM,SCPHONE,SCPCAT,SCPCPR,SCPCAP
|
---|
| 11 | S SCDATE=$G(SCDATE,DT)
|
---|
| 12 | S SCLNCNT=+$O(@SCARRAY@(9999999),-1) ; the current number of lines
|
---|
| 13 | S SCPCTM=$$NMPCTM^SCAPMCU2(DFN,SCDATE,1)
|
---|
| 14 | I SCPCTM D
|
---|
| 15 | .S SCPHONE=$P($G(^SCTM(404.51,+SCPCTM,0)),U,2)
|
---|
| 16 | .S:$L(SCPHONE) SCPHONE=" Phone: "_SCPHONE
|
---|
| 17 | .S SCPCTM=$P(SCPCTM,U,2)
|
---|
| 18 | .S SCPCAT=$P($$NMPCPR^SCAPMCU2(DFN,SCDATE,2),U,2)
|
---|
| 19 | .S SCPCPR=$P($$NMPCPR^SCAPMCU2(DFN,SCDATE,1),U,2)
|
---|
| 20 | .S SCPCAP=$P($$NMPCPR^SCAPMCU2(DFN,SCDATE,3),U,2)
|
---|
| 21 | IF $L(SCPCTM) D
|
---|
| 22 | .D SETLN(" ")
|
---|
| 23 | .D SETLN("Current Primary Care Management Data: ")
|
---|
| 24 | .D:$L(SCPCTM) SETLN(" PC Team: "_SCPCTM_SCPHONE)
|
---|
| 25 | .D:$L(SCPCPR) SETLN(" PC Provider(PCP): "_SCPCPR)
|
---|
| 26 | .D:$L(SCPCAP) SETLN(" Associate Provider(AP): "_SCPCAP)
|
---|
| 27 | .D:$L(SCPCAT) SETLN(" PC Attending: "_SCPCAT)
|
---|
| 28 | ELSE D
|
---|
| 29 | .D SETLN(" ")
|
---|
| 30 | .D SETLN("No Current Primary Care Management Data")
|
---|
| 31 | END Q SCLNCNT
|
---|
| 32 | ;
|
---|
| 33 | SETLN(TEXT) ;
|
---|
| 34 | ;Note - This is not a stand-alone call - needs scarray,sclncnt
|
---|
| 35 | Q:$G(TEXT)=""
|
---|
| 36 | ; increments SCLNCNT, adds text to @scarray@(sclncnt)
|
---|
| 37 | S SCLNCNT=SCLNCNT+1
|
---|
| 38 | ;
|
---|
| 39 | ;djb/bp Some rtns that call this rtn have text array in ARRY(counter)
|
---|
| 40 | ;and others use ARRY(counter,0). Add code to handle both types.
|
---|
| 41 | ;New code begin
|
---|
| 42 | I $D(@SCARRAY@((SCLNCNT-1),0)) S @SCARRAY@(SCLNCNT,0)=TEXT
|
---|
| 43 | E S @SCARRAY@(SCLNCNT)=TEXT
|
---|
| 44 | ;New code end
|
---|
| 45 | ;Old code begin
|
---|
| 46 | ;S @SCARRAY@(SCLNCNT)=TEXT
|
---|
| 47 | ;Old code end
|
---|
| 48 | ;
|
---|
| 49 | Q
|
---|