Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SRO3P90

SRO3P90.m

Go to the documentation of this file.
SRO3P90 ;B'HAM ISC/MAM - TRANSMIT STROKE FOR CARDIACC ASSESSMENTS ; [ 07/02/97  9:09 AM ]
 ;;3.0; Surgery ;**90**;24 Jun 93
 K ^TMP("SRA",$J) S SRATOT=0,SRASITE=+$P($$SITE^SROVAR,"^",3),(SRAMNUM,SRACNT)=1
 S SRADFN=0 F  S SRADFN=$O(^SRF("ARS","C","T",SRADFN)) Q:'SRADFN  S SRTN=0 F  S SRTN=$O(^SRF("ARS","C","T",SRADFN,SRTN)) Q:'SRTN  D STUFF
 I 'SRACNT Q
 S SRATOTM=SRAMNUM D SENDMSG
 K ^TMP("SRA",$J),SRADFN,SRATOT,SRACNT,SRASITE,SRAMNUM,SRTN
 Q
STUFF ; stuff entries into ^TMP("SRA"
 I $P($G(^SRF(SRTN,205)),"^",21)'="Y" Q
 ;
 S SRACNT=SRACNT+1
 I SRACNT>500 S SRACNT=1,SRAMNUM=SRAMNUM+1
 S SRATOT=SRATOT+1 K SRA,VADM
 S SRA(0)=^SRF(SRTN,0)
 S DFN=$P(SRA(0),"^") N I D DEM^VADPT S SRANAME=VADM(1),Z=$P(VADM(3),"^"),SRSDATE=$P(SRA(0),"^",9),Y=$E(SRSDATE,1,7)
 S ^TMP("SRA",$J,SRAMNUM,SRACNT)=$J(SRASITE,3)_$J(SRTN,10)_$J(SRSDATE,12)_VA("PID")
 Q
SENDMSG ; create mail message and transmit
 S ISC=0,NAME=$G(^XMB("NETNAME")) I NAME["FORUM"!(NAME["ISC-")!($E(NAME,1,3)="ISC")!(NAME["ISC.") S ISC=1
 I ISC S XMY("G.RISK ASSESSMENT@"_^XMB("NETNAME"))=""
 I 'ISC S XMY("G.CARDIAC RISK ASSESSMENTS@DENVER.DOMAIN.EXT")=""
 S SRATDATE=$E(DT,4,5)_"/"_$E(DT,6,7)_"/"_$E(DT,2,3)
 N DIFROM S XMSUB=$P($$SITE^SROVAR,"^",2)_": STROKE/CVA ("_SRAMNUM_" OF "_SRATOTM_")  "_SRATDATE,XMDUZ="RISK ASSESSMENT SCNR",XMTEXT="^TMP(""SRA"","_$J_","_SRAMNUM_"," N I D ^XMD
 ;
 Q