source: WorldVistAEHR/trunk/r/LAB_SERVICE-LR-LS/LRAPALRT.m@ 776

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

initial load of WorldVistAEHR

File size: 1.2 KB
Line 
1LRAPALRT ;DALOI/CKA - SEND AN AP ALERT AFTER THE REPORT HAS BEEN RELEASED;2/26/08
2 ;;5.2;LAB SERVICE;**365**;Sep 27, 1994;Build 9
3 ;
4 ;
5 N LRMSG,LREND,LRQUIT,LRIENS,LRSF,LRZ
6 S LRQUIT=0
7 D SECTION^LRAPRES
8 I LRQUIT D END Q
9 D ACCYR^LRAPRES
10 I LRQUIT D END Q
11 D LOOKUP^LRAPUTL(.LRDATA,LRH(0),LRO(68),LRSS,LRAD,LRAA)
12 I LRDATA<1 S LRQUIT=1
13 I LRQUIT D END Q
14 I 'LRAU D
15 .S LRDFN=LRDATA,LRI=LRDATA(1)
16 .S LRA=^LR(LRDFN,LRSS,LRI,0)
17 .S LRIENS=LRI_","_LRDFN_","
18 .S LRZ(2)=$$GET1^DIQ(LRSF,LRIENS,.11,"I")
19 .S LRAC=$$GET1^DIQ(LRSF,LRIENS,.06,"I")
20 .D:'LRZ(2)
21 ..W $C(7)
22 ..S LRMSG="Report has not been released. An alert cannot be sent."
23 ..D EN^DDIOL(LRMSG,"","!!") K LRMSG
24 ..S LRQUIT=1 Q
25 I LRQUIT D END Q
26 I LRAU D
27 .S LRDFN=LRDATA
28 .I $G(^LR(LRDFN,"AU"))="" D Q
29 ..S LRMSG="No information found for this accession in the "
30 ..S LRMSG=LRMSG_"LAB DATA file (#63)."
31 ..D EN^DDIOL(LRMSG,"","!!") K LRMSG
32 ..S LRQUIT=1 Q
33 .S LRZ=$$GET1^DIQ(63,LRDFN_",",14.7,"I")
34 .D:'LRZ
35 ..W $C(7)
36 ..S LRMSG="Report has not been released. An alert cannot be sent."
37 ..D EN^DDIOL(LRMSG,"","!!") K LRMSG
38 ..S LRQUIT=1 Q
39 .S LRA=^LR(LRDFN,"AU")
40 .S LRI=$P(LRA,U)
41 .S LRAC=$$GET1^DIQ(63,LRDFN_",",14,"I")
42 I LRQUIT D END Q
43 D MAIN^LRAPRES1(LRDFN,LRSS,LRI,LRSF,LRP,LRAC)
44END D END^LRAPRES
45 Q
Note: See TracBrowser for help on using the repository browser.