source: FOIAVistA/trunk/r/SURGERY-SR/SROPAT.m@ 1800

Last change on this file since 1800 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1SROPAT ;B'HAM ISC/MAM - TRANSMIT PATIENT INFO ON REFERRAL ; 20 FEB 1990 7:00 AM
2 ;;3.0; Surgery ;;24 Jun 93
3 W @IOF,! S SRSOUT=0
4 K DIC,DA S DIC=2,DIC(0)="QEAMZ",DIC("A")="Transmit data for which Patient ? " D ^DIC I Y<0 S SRSOUT=1 G END
5 S DFN=+Y D DEM^VADPT,ELIG^VADPT,ADD^VADPT
6 K DIC S DIC=4.2,DIC(0)="QEAMZ",DIC("A")="Transmit Patient Information to which Medical Center ? " D ^DIC I Y<0 S SRSOUT=1 G END
7 S X="G.SURGERY REFERRAL@"_$P(Y(0),"^"),XMY(X)=""
8 K ^TMP("SR",$J)
9 S ^TMP("SR",$J,1)="Patient Name: "_$P(VADM(1),"^"),^TMP("SR",$J,2)="ID#: "_VA("PID")
10 S ^TMP("SR",$J,3)="Date of Birth: "_$P(VADM(3),"^",2)_" Sex: "_$P(VADM(5),"^",2),^TMP("SR",$J,4)="Marital Status: "_$P(VADM(10),"^",2)
11 S ^TMP("SR",$J,5)="Religion: "_$P(VADM(9),"^",2),^TMP("SR",$J,6)="Elig. Code: "_$P(VAEL(1),"^",2)
12 S ^TMP("SR",$J,7)="Period of Service: "_$P(VAEL(2),"^",2),^TMP("SR",$J,8)="Veteran (Y/N): "_$S($P(VAEL(4),"^"):"YES",1:"NO")
13 S ^TMP("SR",$J,9)="Patient Type: "_$P(VAEL(6),"^",2)
14 S ^TMP("SR",$J,10)=" ",^TMP("SR",$J,11)=" "
15 S ^TMP("SR",$J,12)="Patient Address: "
16 S ^TMP("SR",$J,13)=VAPA(1),^TMP("SR",$J,14)=VAPA(4)_", "_$P(VAPA(5),"^",2)_" "_VAPA(6),^TMP("SR",$J,16)="Home Phone: "_VAPA(8)
17 S XMSUB="REFERRAL FOR SURGERY",XMTEXT="^TMP(""SR"",$J,",XMDUZ=DUZ D ^XMD
18 W !!,"Message Transmitted..."
19END I 'SRSOUT W !!,"Press RETURN to continue " R X:DTIME
20 K DA,DIC,SRSOUT,VADM,VAEL,VAPA,X,XMDUZ,XMSUB,XMTEXT,XMY,Y,^TMP("SR",$J) W @IOF
21 Q
Note: See TracBrowser for help on using the repository browser.