source: Scheduling/trunk/m/BSDX03.m@ 798

Last change on this file since 798 was 614, checked in by Sam Habiel, 15 years ago

Initial committ of scheduling package

File size: 1.3 KB
Line 
1BSDX03 ; IHS/OIT/HMW - WINDOWS SCHEDULING RPCS ;
2 ;;2.0;IHS WINDOWS SCHEDULING;;NOV 01, 2007
3 ;
4 ;
5 Q
6 ;
7XR2S(BSDXDA) ;EP
8 ;XR2 is the ARSRC xref for the
9 ;RESOURCE field of the BSDX APPOINTMENT file
10 ;Format is ^BSDXAPPT("ARSRC",RESOURCEID,STARTTIME,APPTID)
11 Q:'$D(^BSDXAPPT(BSDXDA,0))
12 N BSDXNOD,BSDXAPPID,BSDXRSID,BSDXS
13 S BSDXNOD=^BSDXAPPT(BSDXDA,0)
14 S BSDXAPPID=BSDXDA
15 S BSDXRSID=$P(BSDXNOD,U,7)
16 Q:'+BSDXAPPID>0
17 Q:'+BSDXRSID>0
18 S BSDXS=$P(BSDXNOD,U)
19 Q:'+BSDXS
20 S ^BSDXAPPT("ARSRC",BSDXRSID,BSDXS,BSDXAPPID)=""
21 Q
22 ;
23XR2K(BSDXA) ;EP
24 Q:'$D(^BSDXAPPT(BSDXA,0))
25 N BSDXNOD,BSDXAPPID,BSDXRSID,BSDXS
26 S BSDXNOD=^BSDXAPPT(BSDXA,0)
27 S BSDXAPPID=BSDXA
28 S BSDXRSID=$P(BSDXNOD,U,7)
29 S BSDXS=$P(BSDXNOD,U)
30 Q:'+BSDXAPPID>0
31 Q:'+BSDXRSID>0
32 Q:'+BSDXS>0
33 K ^BSDXAPPT("ARSRC",BSDXRSID,BSDXS,BSDXAPPID)
34 Q
35XR4S(BSDXDA) ;EP
36 ;XR4 is the ARSCT xref for the
37 ;STARTTIME field of the BSDX ACCESS BLOCK file
38 ;Format is ^BSDXAB("ARSCT",RESOURCEID,STARTTIME,DA)
39 Q:'$D(^BSDXAB(BSDXDA,0))
40 N BSDXNOD,BSDXR,BSDXS
41 S BSDXNOD=^BSDXAB(BSDXDA,0)
42 S BSDXR=$P(BSDXNOD,U)
43 S BSDXS=$P(BSDXNOD,U,2)
44 Q:'+BSDXR>0
45 Q:'+BSDXS>0
46 S ^BSDXAB("ARSCT",BSDXR,BSDXS,BSDXDA)=""
47 Q
48 ;
49XR4K(BSDXDA) ;EP
50 Q:'$D(^BSDXAB(BSDXDA,0))
51 N BSDXNOD,BSDXR,BSDXS
52 S BSDXNOD=^BSDXAB(BSDXDA,0)
53 S BSDXR=$P(BSDXNOD,U)
54 S BSDXS=$P(BSDXNOD,U,2)
55 Q:'+BSDXR>0
56 Q:'+BSDXS>0
57 K ^BSDXAB("ARSCT",BSDXR,BSDXS,BSDXDA)
58 Q
Note: See TracBrowser for help on using the repository browser.