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 ; 03 Jun 2004 3:30 PM
  1. ;;5.3;Scheduling;**297,532,1015**;AUG 13, 1993;Build 21
  1. Q
  1. FLAG ;
  1. ;;Patients scheduled for inactivation from their Primary Care team and
  1. ;;Primary Care Provider assignments appear below. Inactivation will
  1. ;;occur on the Scheduled Date for Inactivation date unless the patient
  1. ;;has a completed appointment encounter with their current Primary Care
  1. ;;Provider (PCP) or their Associate Primary Care Provider (AP) before
  1. ;;that date. The patient may be reactivated to their previous PCP and PC
  1. ;;team if they return for care.
  1. ;;
  1. ;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for
  1. ;;PCMM automated inactivation of patients. The following is from that Directive.
  1. ;;
  1. ;;Inactivation of primary care patients from a PCMM panel occurs under the
  1. ;;following circumstances:
  1. ;;(2) (a) The patient expires and
  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
  1. ;;the time of assignment to that provider. This provides every PCP a 1-year
  1. ;;grace 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 12 months of
  1. ;;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 24 months
  1. ;;need to be inactivated.
  1. ;;(3) Patients appropriate for removal are to be identified and inactivated on
  1. ;;a regular basis.
  1. ;;
  1. ;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
  1. ;;and the last day of the month.
  1. ;;
  1. ;;Patients Scheduled for Inactivation from Primary Care panels
  1. ;; Date
  1. ;; Scheduled
  1. ;;Patient Name SSN Provider Team for Inactivation
  1. ;;------------------------------------------------------------------------------
  1. Q
  1. EXT ;
  1. ;;By using the Extend Patients Inactivation Date option, these patients'
  1. ;;PCMM inactivation dates are now 60 days from their original inactivation date.
  1. ;;Inactivation will occur on the Date Scheduled for Inactivation unless the
  1. ;;patient has a completed appointment encounter with their current Primary
  1. ;;Care Provider (PCP) or their Associate Primary Care Provider (AP) before
  1. ;;that date.
  1. ;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for
  1. ;;PCMM automated inactivation of patients. The following is from that Directive.
  1. ;;
  1. ;;Inactivation of primary care patients from a PCMM panel occurs under the
  1. ;;following circumstances:
  1. ;;(2) (a) The patient expires and
  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
  1. ;;the time of assignment to that provider. This provides every PCP a 1-year
  1. ;;grace 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 12 months of
  1. ;;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 24 months
  1. ;;need to be inactivated.
  1. ;;(3) Patients appropriate for removal are to be identified and inactivated on
  1. ;;a regular basis.
  1. ;;
  1. ;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
  1. ;;and the last day of the month.
  1. ;;
  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 Primary Care team and Primary Care Provider
  1. ;;assignments appear below. The patient may be reactivated to their previous PCP
  1. ;;and PC team if they return for care.
  1. ;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for PCMM
  1. ;;automated inactivation of patients. The following is from that Directive.
  1. ;;
  1. ;;Inactivation of primary care patients from a PCMM panel occurs under the
  1. ;;following circumstances:
  1. ;;(2) (a) The patient expires and
  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
  1. ;;the time of assignment to that provider. This provides every PCP a 1-year
  1. ;;grace 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 12 months of
  1. ;;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 24 months
  1. ;;need to be inactivated.
  1. ;;(3) Patients appropriate for removal are to be identified and inactivated on
  1. ;;a regular basis..
  1. ;;
  1. ;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
  1. ;;and the last day of the month.
  1. ;;
  1. ;;Patients Automated Inactivations from Primary Care Panels
  1. ;; Date Reason
  1. ;; Patient Patient
  1. ;;Patient Name SSN Provider Team Inact 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)