source: FOIAVistA/tag/r/SCHEDULING-SD-SC/SCMCTSK7.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 5.7 KB
Line 
1SCMCTSK7 ;ALB/JDS - PCMM FTEE REPORT ; 8/23/05 11:46am
2 ;;5.3;Scheduling;**297**;AUG 13, 1993
3 Q
4DIOEND ;End of FTEE report
5 N XX
6 W @IOF
7 W !!!,"REPORT KEY",!!
8 F I=1:1 S A=$P($T(TIOEND+I),";;",2) Q:'$L(A) W !,A I $Y>(IOSL-4) I $G(IOST)["C-" R XX:DTIME W @IOF
9 Q
10TIOEND ;
11 ;;Column Heading Explanation of column heading
12 ;;
13 ;;Providers Name The name of the primary care Provider
14 ;;Institution Institution name, previously called Division, where patient receives primary care
15 ;;PC TEAM The name of the primary care team to which this position (and therefore provider) is assigned.
16 ;;Provider's Team Position The name of the Primary care team position to which this provider's assigned
17 ;;AP or PCP This column displays whether this provider is an Associate Primary Care Provider
18 ;; (AP) or a Primary Care Provider (PCP)
19 ;;Associated Clinic(s) The scheduling clinic(s) associated with this position/provider in the PCMM software
20 ;;Direct PC FTEE The number of hours the provider spends providing direct primary care expressed as a Full-Time Employee
21 ;; Equivalent Examples: One FTEE=1.00=40 hours per week. 0.75 FTEE=30 hours per week. 0.50 FTEE=20 hours
22 ;; per week. Percent FTEE is equal to 100 x the FTEE number on this report. For example FTEE=0.75= 75%
23 ;;Patients for Position This represents the total maximum number of patients this provider is expected to care for on this panel
24 ;; Allowed This number is entered in the PCMM GUI 'Primary Care Team Position Setup' window on the 'Settings' tab
25 ;; Additional patients above this number may be assigned to the provider depending on local management policy
26 ;;Patients for Position The actual current number of active patients assigned to this provider in PCMM at the time of this report
27 ;; Actual This number displays on the PCMM GUI 'Primary Care Team Position Setup' window on the 'Settings' tab
28 ;;Available Patient Openings The difference in the number of patients allowed and the actual number of patients currently assigned
29 ;; If this is a positive number, additional patient assignments may be made
30 ;; If this is a negative number (in parentheses,) the maximum number of patient assignments exceeds what is
31 ;; indicated in PCMM. Local management decides whether to assign patients over the maximum number.
32 ;;Adjusted Panel Size The Adjusted Panel Size column is the result of the Active Patients column divided by the FTEE (when not
33 ;; 0) and is an attempt to standardize the panel size so comparisons can be made for providers that have
34 ;; different FTEE values. Example, Active patients 500/0.85 FTEE=588. This is the number of patients this
35 ;; provider would be expected to provide primary care for if their FTEE=1.0
36 ;;FTEE and Panel Size Total The total number of FTEE, patients for positions allowed, patients for positions actual, and available
37 ;; patient opening for this report. If this report is sorted on Associated Clinic, then subtotals for each
38 ;; clinic and a total for the entire report print. If this report is sorted on PC Team, then subtotals for
39 ;; each team and a total for the entire report print
40 Q
41SETASC(RESULT,DATA) ;set associated clinics
42 N ENTRY,OLD S ENTRY=+$G(DATA(0))
43 I ENTRY I '$D(^SCTM(404.57,+ENTRY,5,0)) S ^(0)="^404.575PA^^"
44 F I=0:0 S I=$O(^SCTM(404.57,+ENTRY,5,I)) Q:'I S OLD(I)=""
45 F I=1:1 Q:'$D(DATA(I)) S A=$P(DATA(I),U,2) K OLD(+A) I '$D(^SCTM(404.57,+ENTRY,5,+A)) D
46 .S DIC(0)="LM",DIC="^SCTM(404.57,"_ENTRY_",5,",X=(+A),DA(1)=ENTRY K OLD(+A) D ^DICN
47 ;get rid of deleted
48 F I=0:0 S I=$O(OLD(I)) Q:'I S DIK="^SCTM(404.57,"_ENTRY_",5,",DA(1)=ENTRY,DA=I D ^DIK
49 Q
50DIS2 ;continue inactivation stuff
51 ; Existing varibles
52 ; ZERO = zero node of 404.43
53 ; ENTRY = ien in 404.43
54 ; Newed at this line lable
55 ; DA = iens in 404.43 and 404.42
56 ; DIE = file numbers 404.43 and 404.42
57 ; DR = dr edit strings
58 ; SCV1 = patient dfn
59 ; SCV2 = is there team data 1 or 0
60 ; SCV3 = team ien
61 ; SCV4 = looper
62 N DA,DIE,DR,SCV1,SCV2,SCV3,SCV4
63 ;original code has next line commented
64 ;I $P(ZERO,U,16)=1 Q
65 ;next inactivate the patient team position assignment
66 S DA=ENTRY,DIE="^SCPT(404.43,",DR=".04////"_DT_";.12////NA;.15///@;.13///@"
67 D ^DIE K DIE
68 ;check toggle for automatic team inactivations - site level
69 ;if not 1 do not inactivate from team automatically (all teams)
70 I $P($G(^SCTM(404.44,1,1)),U,10)'=1 Q
71 S DA=$P(ZERO,U) Q:'DA
72 ;check toggle for automatic team inactivations - team level
73 ;if not 1 do not inactivate from team automaticaly (this team only)
74 I $P($G(^SCPT(404.42,DA,0)),U,16)=1 Q
75 S DIE="^SCPT(404.42,",DR=".09////"_DT_";.15////IU" D ^DIE K DIE
76 S SCV1=$P($G(^SCPT(404.42,+$P(ZERO,U),0)),U) Q:SCV1=""
77 ;make a call to GETALL^SCAPMCA(DFN)
78 ;team info returned at ^TMP("SC",$J,DFN,"TM",IEN 404.51,IEN 404.42,"POS",IEN 404.43)
79 S SCV2=$$GETALL^SCAPMCA(SCV1) Q:'1
80 S SCV3=$P($G(^SCTM(404.57,+$P(ZERO,U,2),0)),U,2) Q:SCV3=""
81 ;loop thru and inactivate all positions associated with this patient on this team
82 S SCV4=0 F S SCV4=$O(^TMP("SC",$J,SCV1,"TM",SCV3,"POS",SCV4)) Q:'SCV4 D
83 . S DA=SCV4
84 . ;check for previous unassignment and quit if one exsists
85 . I $P($G(^SCPT(404.43,SCV4,0)),U,4) Q
86 . S DIE=404.43
87 . S DR=".04////"_DT_";.12////NA;.15///@;.13///@"
88 . D ^DIE K DIE
89 K ^TMP("SC",$J,SCV1)
90 Q
Note: See TracBrowser for help on using the repository browser.