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

SCMCTSK5.m

Go to the documentation of this file.
  1. SCMCTSK5 ;ALB/JDS - PCMM Inactivation Reports ;01/28/2013
  1. ;;5.3;Scheduling;**297,532,539,603**;AUG 13, 1993;Build 79
  1. ;
  1. Q
  1. FLAG ;
  1. ;;Patients scheduled for inactivation from their Patient Aligned Care
  1. ;;Team (PACT) assignments appear below.
  1. ;;
  1. ;;Flagging of primary care patients from a PCMM panel occurs each time
  1. ;;this Inactivation Task is run.
  1. ;;All providers assigned to a particular position are evaluated.
  1. ;;If a patient is assigned to PC position and a provider assigned to that
  1. ;;position has a preceptor all encounters for that patient will be
  1. ;;checked for matches with either the provider (preceptee) assigned to
  1. ;;that position or the provider (preceptor) assigned as preceptor to that
  1. ;;position. If a patient is assigned to the PC preceptor position then only
  1. ;;the encounters with the provider assigned as preceptor will be evaluated.
  1. ;;(a) If a patient is NEW as assigned to the position 12 months or less,
  1. ;;and it is the 8th month since being assigned to the position,
  1. ;;and the patient had no prior encounters with the PCP/APs in the preceding
  1. ;;8 months + 7 days then the patient is flagged for inactivation.
  1. ;;(b) If a patient is ESTABLISHED as assigned to the position more than
  1. ;;12 months and if the patient had no prior encounters with the PCP/AP in
  1. ;;the preceding 20 months + 7 days the patient is flagged for inactivation.
  1. ;;Inactivation will occur on the fifteenth and the last day of the month
  1. ;;unless the patient has a completed appointment encounter with their current
  1. ;;Primary Care Provider (PCP) or their Associate Primary Care Provider (AP)
  1. ;;before that date. The patient may be reactivated to their previous PCP and PC
  1. ;;team if they return for care.
  1. ;;This message is generated each time when at least one new occurrence of
  1. ;;flagging for inactivation takes place, and unconditionally on the 15th and
  1. ;;the last day of a month.
  1. ;;Patients scheduled for Inactivation from Primary Care panels
  1. ;; Dates
  1. ;; Scheduled
  1. ;;Patient Name SSN Provider Team for Inactivation
  1. ;;----------------------------------------------------------------------------
  1. Q
  1. EXT ;
  1. ;;By using the Extend Patient Inactivation Date option, these patients'
  1. ;;PCMM inactivation dates are now 183 days from their original inactivation date.
  1. ;;Inactivation occurs on the fifteenth and the last day of the month, unless
  1. ;;the patient has a completed appointment encounter with their current
  1. ;;Primary Care Provider (PCP) or their Associate Primary Care Provider (AP)
  1. ;;before that date. The patient may be reactivated to their previous PCP and PC
  1. ;;team if they return for care.
  1. ;;Patients with Extended PCMM Inactivation Dates
  1. ;; Date
  1. ;; Scheduled for
  1. ;;Patient Name SSN Provider Team Inactivation
  1. ;;---------------------------------------------------------------------------
  1. Q
  1. INACT ;
  1. ;;Patients inactivated from their Patient Aligned Care Team (PACT)
  1. ;;assignments appear below.
  1. ;;Inactivation occurs on the fifteenth and the last day of a month, unless
  1. ;;the patient has a completed appointment encounter with their current
  1. ;;Primary Care Provider (PCP) or their Associate Primary Care Provider (AP)
  1. ;;before that date.
  1. ;;Inactivation of primary care patients from a PCMM panel occurs under
  1. ;;the following circumstances:
  1. ;;(a) The patient expires
  1. ;;(b) Newly assigned patients (either newly-enrolled patients or patients who
  1. ;;have been re-assigned to a different provider) who have not been seen by
  1. ;;their PCP or Associate Provider (AP) and 12 months have passed since the
  1. ;;time of assignment to that provider. This provides every PCP a 1-year grace
  1. ;;period for seeing patients added to their panel (either newly-enrolled
  1. ;;patients or patients transferred from a different panel) before they are
  1. ;;inactivated. Patients must be seen by their PCP or AP within 8 months +7 days
  1. ;;of being assigned, or they need to be inactivated from the PCP's panel.
  1. ;;(c) Established patients that have been assigned to the PCP's panel for more
  1. ;;than 12 months, but have not been seen by their PCP or AP in the past
  1. ;;20 months +7 days need to be inactivated.
  1. ;;The patient may be reactivated to their previous PCP and PC team if they
  1. ;;return for care.
  1. ;;Patients Automated Inactivation from Primary Care Panels
  1. ;; Patient Patient
  1. ;;Patient Name SSN Provider Team Inact Date Inact
  1. ;;-------------------------------------------------------------------------------
  1. Q
  1. PRIN ;
  1. ;;WARNING- The following primary care staff will be automatically
  1. ;;inactivated in PCMM software if a correct 'Person Class' and
  1. ;;'Provider Type' are not entered in the New Person File (#200) or
  1. ;;their role and position in the 'Position Setup' window is not
  1. ;;corrected to correspond with their 'Provider Type', 'Person
  1. ;;Class' and the Primary Care business rules stated below:
  1. ;;
  1. ;;1. Staff designated as Primary Care Providers (PCPs) in PCMM that
  1. ;; are not an Attending physician (Attending MD or Attending DO) NP
  1. ;; or PA, shall be inactivated from PCMM
  1. ;;2. Staff designated as Associate Providers (APs) in PCMM, that are not
  1. ;; a Resident/Intern (Physician) NP or PA shall be inactivated in
  1. ;; PCMM
  1. ;;3. All persons designated as an Associate Provider or Primary Care
  1. ;; Provider, who do not have the correct 'Provider Type' and 'Person
  1. ;; Class' entered in the New Person file (#200) in VistA, shall be
  1. ;; inactivated from their Primary Care positions in PCMM.
  1. ;;4. Please contact your PCMM Coordinator or Information Systems
  1. ;; to correct these problems
  1. ;;
  1. ;; PRIMARY CARE PROVIDERS SCHEDULDED FOR INACTIVATION
  1. ;;
  1. ;;Provider's Assoc Team Person # of Pts Sch Inac
  1. ;;Name Clinics Position Role Class Assigned Date
  1. ;;-------------------------------------------------------------------------------
  1. ;;
  1. Q
  1. GONE ;
  1. ;; PRIMARY CARE PROVIDERS INACTIVATED
  1. ;;
  1. ;;Provider's Assoc Team Person # of Pts Inac
  1. ;;Name Clinics Position Role Class Assigned Date
  1. ;;-------------------------------------------------------------------------------
  1. ;;
  1. Q
  1. MAIL(POS,T) ;Given POS as position set up who gets mail
  1. I $D(^TMP("SCML",$J,"POS",POS)) Q
  1. S ^TMP("SCML",$J,"POS",+$G(POS))=""
  1. ;who gets mail at this position
  1. N TWO S TWO=$G(^SCTM(404.57,+$G(POS),2))
  1. I $P(TWO,U,10) D ;get preceptor
  1. .S PREC=+$$OKPREC3^SCMCLK(POS,DT) Q:'PREC
  1. .D POS(PREC)
  1. I $P(TWO,U,9)="T" D ;get team providers
  1. .S T=$G(T)
  1. .N I F I=0:0 S I=$O(^SCTM(404.57,"C",T,I)) Q:'I D POS(I)
  1. I $P(TWO,U,9)="P" D ;get position providers
  1. .D POS(POS) Q
  1. Q
  1. POS(P) ;provider
  1. N A
  1. S A=+$$GETPRTP^SCAPMCU2(P,DT) Q:'A
  1. S ^TMP("SCML",$J,"POS",A)=""
  1. S ^TMP("SCML",$J,"XM",A,POS)=""
  1. Q
  1. LINES(TYPE) ;Lines of Bulletin
  1. N I,ZERO,ZERO1,Y
  1. S Y=$$PDAT^SCMCGU("SD*5.3*297") X ^DD("DD")
  1. F I=1:1 S A=$P($T(@($P("FLAG^INACT^EXT^PRIN^GONE",U,TYPE))+I),";;",2) Q:A="" D
  1. .S ^TMP("SCMCTXT",$J,I,0)=$S(A["|DATE|":$P(A,"|DATE|",1)_Y,1:A)
  1. ;S ^TMP("SCMCTXT",$J,2,0)="Patient Team Position Dt "_$S($G(XMSUB)["Fla":"Flagged",1:"Inactivate")
  1. S (CNT,HEAD)=$O(^TMP("SCMCTXT",$J,99),-1)+1
  1. S DIV=""
  1. F I=0:0 S I=$O(^TMP("SCMC",$J,I)) Q:'I S ENTRY=+$O(^(I,0)) D
  1. .I TYPE>3 D MM(TYPE) Q
  1. .S ZERO=$G(^SCPT(404.43,+ENTRY,0)),ZERO1=$G(^SCPT(404.42,+ZERO,0))
  1. .D MAIL(+$P(ZERO,U,2),+$P(ZERO1,U,3)) ;find out which individuals get this
  1. .D MAKEMAIL(TYPE)
  1. Q
  1. MAKEMAIL(TYPE) ;
  1. D MAKEMAIL^SCMCTSK6(TYPE) Q
  1. MM(TYPE) ;for providers
  1. D MM^SCMCTSK6(TYPE) Q
  1. PRMAIL(TYPE) ;
  1. ;Send mail to providers
  1. D PRMAIL^SCMCTSK6(TYPE)