source: FOIAVistA/trunk/r/SCHEDULING-SD-SC/SCRPBK11.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1SCRPBK11 ;MJK/ALB - RPC Broker Utilities ; 27 FEB 96
2 ;;5.3;Scheduling;**41,520**;AUG 13, 1993;Build 26
3 ;
4GETSEL(SCDATA,SCTYPE,SCIEN) ;
5 ; -- get SELECTION entity data for details form
6 ;
7 ; input: SCTYPE := type of autolink (DIVISIOND, TEAM, ectc.)
8 ; SCIEN := ien of entity
9 ; output: SCDATA(1..n) := info about entity
10 ;
11 ; -- SEE BOTTOM OF SCRPBK FOR VARIABLE DEFINITIONS
12 ;
13 ; Related RPC: SCRP FILE ENTRY GETSELECTION
14 ;
15 N SC0,SCI,SCINC
16 S SCINC=0,SCID=+SCIEN
17 ;
18 IF SCTYPE="DIVISION" D DIV G GETSELQ
19 ;
20 IF SCTYPE="TEAM" D TEAM G GETSELQ
21 ;
22 IF SCTYPE="PRACTITIONER" D PRAC G GETSELQ
23 ;
24 IF SCTYPE="ROLE" D ROLE G GETSELQ
25 ;
26 IF SCTYPE="CLINIC" D CLIN G GETSELQ
27 ;
28 IF SCTYPE="USERCLASS" D USER G GETSELQ
29 ;
30GETSELQ Q
31 ;
32SET(X,INC,SCDATA) ; -- set value in return array
33 S INC=$G(INC)+1,SCDATA(INC)=X
34 Q
35 ;
36DIV ; -- get division details
37 D SET("Teams in Division:",.SCINC,.SCDATA)
38 D SET("------------------",.SCINC,.SCDATA)
39 S SCI=0 F S SCI=$O(^SCTM(404.51,"AINST",SCID,SCI)) Q:'SCI D
40 . D SET($P($G(^SCTM(404.51,SCI,0)),U),.SCINC,.SCDATA)
41 Q
42 ;
43TEAM ; -- get team description
44 N SC,SCFLE,SCIEN,SCDEF
45 S SCFLE=404.51,SCIEN=SCID_",",SCDEF="<none specified>"
46 D GETS^DIQ(SCFLE,SCID_",",50,"","SC")
47 D SET("Team Description:",.SCINC,.SCDATA)
48 D SET("-----------------",.SCINC,.SCDATA)
49 IF $O(SC(SCFLE,SCIEN,50,0)) D
50 . S SCI=0 F S SCI=$O(SC(SCFLE,SCIEN,50,SCI)) Q:'SCI S X=SC(SCFLE,SCIEN,50,SCI) D
51 . . D SET(X,.SCINC,.SCDATA)
52 ELSE D
53 . D SET(SCDEF,.SCINC,.SCDATA)
54 Q
55 ;
56PRAC ; -- get practitioner details
57 N SC,SCFLE,SCIEN,SCDEF
58 S SCFLE=200,SCIEN=SCID_",",SCDEF="<none specified>"
59 D GETS^DIQ(SCFLE,SCID_",","1;8;28","","SC")
60 D SET(" Initials: "_$S($G(SC(SCFLE,SCIEN,1))]"":SC(SCFLE,SCIEN,1),1:SCDEF),.SCINC,.SCDATA)
61 D SET("Mail Code: "_$S($G(SC(SCFLE,SCIEN,28))]"":SC(SCFLE,SCIEN,28),1:SCDEF),.SCINC,.SCDATA)
62 D SET(" Title: "_$S($G(SC(SCFLE,SCIEN,8))]"":SC(SCFLE,SCIEN,8),1:SCDEF),.SCINC,.SCDATA)
63 Q
64 ;
65ROLE ; -- get standard role description
66 N SC,SCFLE,SCIEN,SCDEF
67 S SCFLE=403.46,SCIEN=SCID_",",SCDEF="<none specified>"
68 D GETS^DIQ(SCFLE,SCID_",",1,"","SC")
69 D SET("Role Description:",.SCINC,.SCDATA)
70 D SET("-----------------",.SCINC,.SCDATA)
71 IF $O(SC(SCFLE,SCIEN,1,0)) D
72 . S SCI=0 F S SCI=$O(SC(SCFLE,SCIEN,1,SCI)) Q:'SCI S X=SC(SCFLE,SCIEN,1,SCI) D
73 . . D SET(X,.SCINC,.SCDATA)
74 ELSE D
75 . D SET(SCDEF,.SCINC,.SCDATA)
76 Q
77 ;
78CLIN ; -- get clinic details
79 N SC,SCFLE,SCIEN,SCDEF
80 S SCFLE=44,SCIEN=SCID_",",SCDEF="<none specified>"
81 D GETS^DIQ(SCFLE,SCID_",","1;3.5","","SC")
82 D SET("Abbreviation: "_$S($G(SC(SCFLE,SCIEN,1))]"":SC(SCFLE,SCIEN,1),1:SCDEF),.SCINC,.SCDATA)
83 D SET(" Division: "_$S($G(SC(SCFLE,SCIEN,3.5))]"":SC(SCFLE,SCIEN,3.5),1:SCDEF),.SCINC,.SCDATA)
84 D SET(" ",.SCINC,.SCDATA)
85 D SET("Associated Teams and Positions:",.SCINC,.SCDATA)
86 D SET("-------------------------------",.SCINC,.SCDATA)
87 S SCI=0 F S SCI=$O(^SCTM(404.57,"E",SCID,SCI)) Q:'SCI D
88 . S X=$G(^SCTM(404.57,SCI,0))
89 . D SET(" Team: "_$P($G(^SCTM(404.51,+$P(X,U,2),0)),U),.SCINC,.SCDATA)
90 . D SET(" Position: "_$P(X,U),.SCINC,.SCDATA)
91 . D SET(" ",.SCINC,.SCDATA)
92 Q
93 ;
94USER ; -- get user class details
95 D SET("No additional information available at this time. ",.SCINC,.SCDATA)
96 Q
97 ;
Note: See TracBrowser for help on using the repository browser.