source: FOIAVistA/tag/r/SURGERY-SR/SROATMIT.m@ 1424

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

initial load of FOIAVistA 6/30/08 version

File size: 2.0 KB
Line 
1SROATMIT ;BIR/MAM - STUFF TRANMISSION IN ^TMP ;03/22/06
2 ;;3.0; Surgery ;**18,27,38,55,62,68,153**;24 Jun 93;Build 11
3 ;** NOTICE: This routine is part of an implementation of a nationally
4 ;** controlled procedure. Local modifications to this routine
5 ;** are prohibited.
6 ;
7 K ^TMP("SRA",$J),^TMP("SRAMSG",$J),^TMP("SRWL",$J) S SRATOT=0,SRASITE=+$P($$SITE^SROVAR,"^",3),(SRAMNUM,SRACNT)=1
8 S SRADFN=0 F S SRADFN=$O(^SRF("ARS","N","I",SRADFN)) Q:'SRADFN S SRTN=0 F S SRTN=$O(^SRF("ARS","N","I",SRADFN,SRTN)) Q:'SRTN S SR("RA")=$G(^SRF(SRTN,"RA")) I $P(SR("RA"),"^",2)="N" D CANCHK
9 S SRADFN=0 F S SRADFN=$O(^SRF("ARS","C","I",SRADFN)) Q:'SRADFN S SRTN=0 F S SRTN=$O(^SRF("ARS","C","I",SRADFN,SRTN)) Q:'SRTN S SR("RA")=$G(^SRF(SRTN,"RA")) D CANCHK
10 S SRADFN=0 F S SRADFN=$O(^SRF("ARS","N","C",SRADFN)) Q:'SRADFN S SRTN=0 F S SRTN=$O(^SRF("ARS","N","C",SRADFN,SRTN)) Q:'SRTN S SR("RA")=$G(^SRF(SRTN,"RA")) D STUFF
11 S SRATOTM=SRAMNUM D ^SROATM4
12 D ^SROATCM
13 D ^SROATMNO
14 D WL
15 I $D(ZTQUEUED) S ZTREQ="@"
16 Q
17STUFF ; stuff entries into ^TMP("SRA"
18 ; check ARS cross-reference
19 I $P(^SRF(SRTN,"RA"),"^",2)="C" K ^SRF("ARS","N","C",SRADFN,SRTN) K DR S DIE=130,DR="235///C",DA=SRTN D ^DIE K DR Q
20 I $P(SR("RA"),"^",2)'="N" Q
21 D CANCHK I 'OK Q
22 I $P(SR("RA"),"^",6)="N" S ^SRF("ARS","N","C",SRADFN,SRTN)=1 Q
23 I SRACNT+15>100 S SRACNT=1,SRAMNUM=SRAMNUM+1
24 S SRATOT=SRATOT+1,X=$E($P(^SRF(SRTN,0),"^",9),1,5)_"00",^TMP("SRWL",$J,X)=""
25 K SRA,VADM D ^SROATM1 K SHEMP,VADM,SRA
26 Q
27CANCHK ; check to see if case has been cancelled
28 S OK=1,X=$P($G(^SRF(SRTN,30)),"^") I X S OK=0
29 S X=$P($G(^SRF(SRTN,31)),"^",8) I X'="" S OK=0
30 I 'OK K DA,DIE,DR S DA=SRTN,DIE=130,DR="102///@;235///@;284///@;323///@" D ^DIE K DR,DA,DIE
31 Q
32WL ; send workload updates
33 N SRSEL S SRP=0,SRT=1,X=$$SITE^SROVAR,SRINST=$P(X,"^",2),SRSTATN=+$P(X,"^",3),SRDT=0,SRNOACK=1 D DTCHK
34 F S SRDT=$O(^TMP("SRWL",$J,SRDT)) Q:'SRDT I SRDT>SRLO S SRSEL=1 D ^SROAWL1
35 K ^TMP("SRWL",$J),SRLO
36 Q
37DTCHK N X,Y
38 S X=$E(DT,1,3),Y=+$E(DT,4,7),SRLO=$S(Y<1000:X-2,1:X-1)_"0900"
39 Q
Note: See TracBrowser for help on using the repository browser.