Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SCMCTSK7

SCMCTSK7.m

Go to the documentation of this file.
  1. SCMCTSK7 ;ALB/JDS - PCMM FTEE REPORT ; 8/23/05 11:46am
  1. ;;5.3;Scheduling;**297,581**;AUG 13, 1993;Build 16
  1. Q
  1. DIOEND ;End of FTEE report
  1. N XX
  1. W @IOF
  1. W !!!,"REPORT KEY",!!
  1. 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
  1. Q
  1. TIOEND ;
  1. ;;Column Heading Explanation of column heading
  1. ;;
  1. ;;Provider's Name The name of the Provider
  1. ;;TEAM The name of the team to which this position (and therefore provider) is assigned.
  1. ;;Team Position The name of the team position to which this provider is assigned
  1. ;;AP or PCP This column displays whether this provider is an Associate Primary Care Provider
  1. ;; (AP) or a Primary Care Provider (PCP)
  1. ;;Associated Clinic(s) The scheduling clinic(s) associated with this position/provider in the PCMM software
  1. ;;FTEE The number of hours the provider spends providing care expressed as a Full-Time Employee
  1. ;; Equivalent Examples: One FTEE=1.00=40 hours per week. 0.75 FTEE=30 hours per week. 0.50 FTEE=20 hours
  1. ;; per week. Percent FTEE is equal to 100 x the FTEE number on this report. For example FTEE=0.75= 75%
  1. ;;Patients for Position This represents the total maximum number of patients this provider is expected to care for on this panel
  1. ;; Allowed This number is entered in the PCMM GUI 'Primary Care Team Position Setup' window on the 'Settings' tab
  1. ;; Additional patients above this number may be assigned to the provider depending on local management policy
  1. ;;Patients for Position The actual current number of active patients assigned to this provider in PCMM at the time of this report
  1. ;; Actual This number displays on the PCMM GUI 'Primary Care Team Position Setup' window on the 'Settings' tab
  1. ;;Available Patient Openings The difference in the number of patients allowed and the actual number of patients currently assigned
  1. ;; If this is a positive number, additional patient assignments may be made
  1. ;; If this is a negative number (in parentheses,) the maximum number of patient assignments exceeds what is
  1. ;; indicated in PCMM. Local management decides whether to assign patients over the maximum number.
  1. ;;Adjusted Panel Size The Adjusted Panel Size column is the result of the Active Patients column divided by the FTEE (when not
  1. ;; 0) and is an attempt to standardize the panel size so comparisons can be made for providers that have
  1. ;; different FTEE values. Example, Active patients 500/0.85 FTEE=588. This is the number of patients this
  1. ;; provider would be expected to provide primary care for if their FTEE=1.0
  1. ;;FTEE and Panel Size Total The total number of FTEE, patients for positions allowed, patients for positions actual, and available
  1. ;; patient opening for this report. If this report is sorted on Associated Clinic, then subtotals for each
  1. ;; clinic and a total for the entire report print. If this report is sorted on Team, then subtotals for
  1. ;; each team and a total for the entire report print
  1. Q
  1. SETASC(RESULT,DATA) ;set associated clinics
  1. N ENTRY,OLD S ENTRY=+$G(DATA(0))
  1. I ENTRY I '$D(^SCTM(404.57,+ENTRY,5,0)) S ^(0)="^404.575PA^^"
  1. F I=0:0 S I=$O(^SCTM(404.57,+ENTRY,5,I)) Q:'I S OLD(I)=""
  1. 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
  1. .S DIC(0)="LM",DIC="^SCTM(404.57,"_ENTRY_",5,",X=(+A),DA(1)=ENTRY K OLD(+A) D ^DICN
  1. ;get rid of deleted
  1. 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
  1. Q
  1. DIS2 ;continue inactivation stuff
  1. ; Existing varibles
  1. ; ZERO = zero node of 404.43
  1. ; ENTRY = ien in 404.43
  1. ; Newed at this line lable
  1. ; DA = iens in 404.43 and 404.42
  1. ; DIE = file numbers 404.43 and 404.42
  1. ; DR = dr edit strings
  1. ; SCV1 = patient dfn
  1. ; SCV2 = is there team data 1 or 0
  1. ; SCV3 = team ien
  1. ; SCV4 = looper
  1. N DA,DIE,DR,SCV1,SCV2,SCV3,SCV4
  1. ;original code has next line commented
  1. ;I $P(ZERO,U,16)=1 Q
  1. ;next inactivate the patient team position assignment
  1. S DA=ENTRY,DIE="^SCPT(404.43,",DR=".04////"_DT_";.12////NA;.15///@;.13///@"
  1. D ^DIE K DIE
  1. ;check toggle for automatic team inactivations - site level
  1. ;if not 1 do not inactivate from team automatically (all teams)
  1. I $P($G(^SCTM(404.44,1,1)),U,10)'=1 Q
  1. S DA=$P(ZERO,U) Q:'DA
  1. ;check toggle for automatic team inactivations - team level
  1. ;if not 1 do not inactivate from team automaticaly (this team only)
  1. I $P($G(^SCPT(404.42,DA,0)),U,16)=1 Q
  1. S DIE="^SCPT(404.42,",DR=".09////"_DT_";.15////IU" D ^DIE K DIE
  1. S SCV1=$P($G(^SCPT(404.42,+$P(ZERO,U),0)),U) Q:SCV1=""
  1. ;make a call to GETALL^SCAPMCA(DFN)
  1. ;team info returned at ^TMP("SC",$J,DFN,"TM",IEN 404.51,IEN 404.42,"POS",IEN 404.43)
  1. S SCV2=$$GETALL^SCAPMCA(SCV1) Q:'1
  1. S SCV3=$P($G(^SCTM(404.57,+$P(ZERO,U,2),0)),U,2) Q:SCV3=""
  1. ;loop thru and inactivate all positions associated with this patient on this team
  1. S SCV4=0 F S SCV4=$O(^TMP("SC",$J,SCV1,"TM",SCV3,"POS",SCV4)) Q:'SCV4 D
  1. . S DA=SCV4
  1. . ;check for previous unassignment and quit if one exsists
  1. . I $P($G(^SCPT(404.43,SCV4,0)),U,4) Q
  1. . S DIE=404.43
  1. . S DR=".04////"_DT_";.12////NA;.15///@;.13///@"
  1. . D ^DIE K DIE
  1. K ^TMP("SC",$J,SCV1)
  1. Q