1 | SCRPBK11 ;MJK/ALB - RPC Broker Utilities ; 27 FEB 96
|
---|
2 | ;;5.3;Scheduling;**41,520**;AUG 13, 1993;Build 26
|
---|
3 | ;
|
---|
4 | GETSEL(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 | ;
|
---|
30 | GETSELQ Q
|
---|
31 | ;
|
---|
32 | SET(X,INC,SCDATA) ; -- set value in return array
|
---|
33 | S INC=$G(INC)+1,SCDATA(INC)=X
|
---|
34 | Q
|
---|
35 | ;
|
---|
36 | DIV ; -- 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 | ;
|
---|
43 | TEAM ; -- 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 | ;
|
---|
56 | PRAC ; -- 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 | ;
|
---|
65 | ROLE ; -- 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 | ;
|
---|
78 | CLIN ; -- 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 | ;
|
---|
94 | USER ; -- get user class details
|
---|
95 | D SET("No additional information available at this time. ",.SCINC,.SCDATA)
|
---|
96 | Q
|
---|
97 | ;
|
---|