source: FOIAVistA/tag/r/SURGERY-SR/SROASWP1.m@ 1693

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

initial load of FOIAVistA 6/30/08 version

File size: 1.3 KB
Line 
1SROASWP1 ;B'HAM ISC/MAM - MOVE RISK TO FILE 130 ; 13 APR 1992 3:35 pm
2 ;;3.0; Surgery ;;24 Jun 93
3 S ^TMP("CONVERT","NO MATCH",1)="The following entries in the SURGERY RISK ASSESSMENT file (139) cannot be",^TMP("CONVERT","NO MATCH",2)="converted because the patient has no surgical cases entered in the SURGERY"
4 S ^TMP("CONVERT","NO MATCH",3)="file (130).",^TMP("CONVERT","NO MATCH",4)=" ",SRCNT=4
5 W !!,"Deleting all Assessments in which the patient entered has no Surgery cases",!,"on file" S SRAN=0 F S SRAN=$O(^SRA(SRAN)) Q:'SRAN S DFN=$P(^SRA(SRAN,0),"^") I '$O(^SRF("B",DFN,0)) W "." D MSGLINE,DELETE
6 I $D(^TMP("CONVERT","NO MATCH",5)) D SENDMSG
7 I '$O(^SRA(0)) Q
8 Q
9DELETE ; delete assessment from 139
10 S DA=SRAN,DIK="^SRA(" D ^DIK Q
11 Q
12MSGLINE ; store info for mail message
13 S SRA(0)=^SRA(SRAN,0),DFN=$P(SRA(0),"^") D DEM^VADPT S SRANAME=VADM(1)_" ("_VA("PID")_")",DATE=$P(SRA(0),"^",5),DATE=$E(DATE,4,5)_"/"_$E(DATE,6,7)_"/"_$E(DATE,2,3)
14 S SRCNT=SRCNT+1,^TMP("CONVERT","NO MATCH",SRCNT)=SRANAME_" DATE OF OPERATION: "_DATE
15 Q
16SENDMSG ; send mail message
17 S XMY("G.RISK ASSESSMENT@"_^XMB("NETNAME"))=""
18 S XMSUB="RISK ASSESSMENT ENTRIES NOT CONVERTED, NO MATCHES",XMDUZ="RISK ASSESSMENT CONVERSION",XMTEXT="^TMP(""CONVERT"",""NO MATCH"","
19 N I D ^XMD K XMSUB,XMDUZ,XMTEXT,XMY
20 Q
Note: See TracBrowser for help on using the repository browser.