source: WorldVistAEHR/trunk/r/SCHEDULING-SD-SC/SCMCDDA.m@ 1147

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

initial load of WorldVistAEHR

File size: 1.3 KB
Line 
1SCMCDDA ;bp/cmf - extension of SCMCDD ; 21 December 1999
2 ;;5.3;Scheduling;**204,297**;AUG 13, 1993
3 ;1
4BADNEWDT() ; not a stand alone function!! called from NEWHIST^SCMCDD
5 ; ; ensure team/team position is active on DATE
6 I FILE=404.59 D I +SCOK=0 Q 1
7 . D OKTMTP(IEN,DATE)
8 . Q
9 ;
10 I FILE=404.52 D I +SCOK=0 Q 1
11 . D OKTMTP(IEN,DATE)
12 . D OKTP(IEN,DATE)
13 . ;;bp/cmf if not active, delete newhist entry here?!? [SCHIEN]
14 . Q
15 ;
16 Q 0
17 ;
18BADCHGDT() ; not a stand alone function!! called from OKCHGDT^SCMCDD
19 I FILE=404.59 D I +SCOK=0 Q 1
20 . N SCTP
21 . S SCTP=$P(SCNODE,U)
22 . D OKTMTP(SCTP,DATE)
23 . Q
24 ;
25 I FILE=404.52 D I +SCOK=0 Q 1
26 . N SCTP
27 . S SCTP=$P(SCNODE,U)
28 . D OKTMTP(SCTP,DATE)
29 . D OKTP(SCTP,DATE)
30 . Q
31 ;
32 Q 0
33 ;
34OKTMTP(SC1,SC2) ;
35 ; sc1 := team position ien
36 ; sc2 := assignment date
37 N SCNODE,SCTM
38 S SCNODE=$G(^SCTM(404.57,SC1,0),"BAD")
39 I SCNODE="BAD" S SCOK="0^Bad Team Position entry." Q
40 S SCTM=$P(SCNODE,U,2)
41 S SCNODE=$G(^SCTM(404.51,SCTM,0),"BAD")
42 I SCNODE="BAD" S SCOK="0^Bad Team entry." Q
43 S SCX=+$$DATES^SCAPMCU1(404.58,SCTM,SC2)
44 I SCX<1 S SCOK="0^Team not active on selected date."
45 Q
46 ;
47OKTP(SC1,SC2) ;
48 ; sc1 := team position ien
49 ; sc2 := assignment date
50 S SCX=+$$DATES^SCAPMCU1(404.59,SC1,SC2)
51 I SCX<1 S SCOK="0^Team Position not active on selected date."
52 Q
53 ;
Note: See TracBrowser for help on using the repository browser.