SCMCTSK5 ;ALB/JDS - PCMM Inactivation Reports ; 03 Jun 2004 3:30 PM
;;5.3;Scheduling;**297,532,1015**;AUG 13, 1993;Build 21
Q
FLAG ;
;;Patients scheduled for inactivation from their Primary Care team and
;;Primary Care Provider assignments appear below. Inactivation will
;;occur on the Scheduled Date for Inactivation date unless the patient
;;has a completed appointment encounter with their current Primary Care
;;Provider (PCP) or their Associate Primary Care Provider (AP) before
;;that date. The patient may be reactivated to their previous PCP and PC
;;team if they return for care.
;;
;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for
;;PCMM automated inactivation of patients. The following is from that Directive.
;;
;;Inactivation of primary care patients from a PCMM panel occurs under the
;;following circumstances:
;;(2) (a) The patient expires and
;;(b) Newly assigned patients (either newly-enrolled patients or patients who
;;have been re-assigned to a different provider) who have not been seen by
;;their PCP or Associate Provider (AP) and 12 months have passed since
;;the time of assignment to that provider. This provides every PCP a 1-year
;;grace period for seeing patients added to their panel (either newly-enrolled
;;patients or patients transferred from a different panel) before they are
;;inactivated. Patients must be seen by their PCP or AP within 12 months of
;;being assigned, or they need to be inactivated from the PCP's panel.
;;(c) Established patients that have been assigned to the PCP's panel for more
;;than 12 months, but have not been seen by their PCP or AP in the past 24 months
;;need to be inactivated.
;;(3) Patients appropriate for removal are to be identified and inactivated on
;;a regular basis.
;;
;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
;;and the last day of the month.
;;
;;Patients Scheduled for Inactivation from Primary Care panels
;; Date
;; Scheduled
;;Patient Name SSN Provider Team for Inactivation
;;------------------------------------------------------------------------------
Q
EXT ;
;;By using the Extend Patients Inactivation Date option, these patients'
;;PCMM inactivation dates are now 60 days from their original inactivation date.
;;Inactivation will occur on the Date Scheduled for Inactivation unless the
;;patient has a completed appointment encounter with their current Primary
;;Care Provider (PCP) or their Associate Primary Care Provider (AP) before
;;that date.
;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for
;;PCMM automated inactivation of patients. The following is from that Directive.
;;
;;Inactivation of primary care patients from a PCMM panel occurs under the
;;following circumstances:
;;(2) (a) The patient expires and
;;(b) Newly assigned patients (either newly-enrolled patients or patients who
;;have been re-assigned to a different provider) who have not been seen by
;;their PCP or Associate Provider (AP) and 12 months have passed since
;;the time of assignment to that provider. This provides every PCP a 1-year
;;grace period for seeing patients added to their panel (either newly-enrolled
;;patients or patients transferred from a different panel) before they are
;;inactivated. Patients must be seen by their PCP or AP within 12 months of
;;being assigned, or they need to be inactivated from the PCP's panel.
;;(c) Established patients that have been assigned to the PCP's panel for more
;;than 12 months, but have not been seen by their PCP or AP in the past 24 months
;;need to be inactivated.
;;(3) Patients appropriate for removal are to be identified and inactivated on
;;a regular basis.
;;
;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
;;and the last day of the month.
;;
;;Patients with Extended PCMM Inactivation Dates
;; Date
;; Scheduled for
;;Patient Name SSN Provider Team Inactivation
;;------------------------------------------------------------------------------
Q
INACT ;
;;Patients inactivated from their Primary Care team and Primary Care Provider
;;assignments appear below. The patient may be reactivated to their previous PCP
;;and PC team if they return for care.
;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for PCMM
;;automated inactivation of patients. The following is from that Directive.
;;
;;Inactivation of primary care patients from a PCMM panel occurs under the
;;following circumstances:
;;(2) (a) The patient expires and
;;(b) Newly assigned patients (either newly-enrolled patients or patients who
;;have been re-assigned to a different provider) who have not been seen by
;;their PCP or Associate Provider (AP) and 12 months have passed since
;;the time of assignment to that provider. This provides every PCP a 1-year
;;grace period for seeing patients added to their panel (either newly-enrolled
;;patients or patients transferred from a different panel) before they are
;;inactivated. Patients must be seen by their PCP or AP within 12 months of
;;being assigned, or they need to be inactivated from the PCP's panel.
;;(c) Established patients that have been assigned to the PCP's panel for more
;;than 12 months, but have not been seen by their PCP or AP in the past 24 months
;;need to be inactivated.
;;(3) Patients appropriate for removal are to be identified and inactivated on
;;a regular basis..
;;
;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
;;and the last day of the month.
;;
;;Patients Automated Inactivations from Primary Care Panels
;; Date Reason
;; Patient Patient
;;Patient Name SSN Provider Team Inact Inact
;;-------------------------------------------------------------------------------
Q
PRIN ;
;;WARNING- The following primary care staff will be automatically
;;inactivated in PCMM software if a correct 'Person Class' and
;;'Provider Type' are not entered in the New Person File (#200) or
;;their role and position in the 'Position Setup' window is not
;;corrected to correspond with their 'Provider Type', 'Person
;;Class' and the Primary Care business rules stated below:
;;
;;1. Staff designated as Primary Care Providers (PCPs) in PCMM that
;; are not an Attending physician (Attending MD or Attending DO) NP
;; or PA, shall be inactivated from PCMM
;;2. Staff designated as Associate Providers (APs) in PCMM, that are not
;; a Resident/Intern (Physician) NP or PA shall be inactivated in
;; PCMM
;;3. All persons designated as an Associate Provider or Primary Care
;; Provider, who do not have the correct 'Provider Type' and 'Person
;; Class' entered in the New Person file (#200) in VistA, shall be
;; inactivated from their Primary Care positions in PCMM.
;;4. Please contact your PCMM Coordinator or Information Systems
;; to correct these problems
;;
;; PRIMARY CARE PROVIDERS SCHEDULDED FOR INACTIVATION
;;
;;Provider's Assoc Team Person # of Pts Sch Inac
;;Name Clinics Position Role Class Assigned Date
;;-------------------------------------------------------------------------------
;;
Q
GONE ;
;; PRIMARY CARE PROVIDERS INACTIVATED
;;
;;Provider's Assoc Team Person # of Pts Inac
;;Name Clinics Position Role Class Assigned Date
;;-------------------------------------------------------------------------------
;;
Q
MAIL(POS,T) ;Given POS as position set up who gets mail
I $D(^TMP("SCML",$J,"POS",POS)) Q
S ^TMP("SCML",$J,"POS",+$G(POS))=""
;who gets mail at this position
N TWO S TWO=$G(^SCTM(404.57,+$G(POS),2))
I $P(TWO,U,10) D ;get preceptor
.S PREC=+$$OKPREC3^SCMCLK(POS,DT) Q:'PREC
.D POS(PREC)
I $P(TWO,U,9)="T" D ;get team providers
.S T=$G(T)
.N I F I=0:0 S I=$O(^SCTM(404.57,"C",T,I)) Q:'I D POS(I)
I $P(TWO,U,9)="P" D ;get position providers
.D POS(POS) Q
Q
POS(P) ;provider
N A
S A=+$$GETPRTP^SCAPMCU2(P,DT) Q:'A
S ^TMP("SCML",$J,"POS",A)=""
S ^TMP("SCML",$J,"XM",A,POS)=""
Q
LINES(TYPE) ;Lines of Bulletin
N I,ZERO,ZERO1,Y
S Y=$$PDAT^SCMCGU("SD*5.3*297") X ^DD("DD")
F I=1:1 S A=$P($T(@($P("FLAG^INACT^EXT^PRIN^GONE",U,TYPE))+I),";;",2) Q:A="" D
.S ^TMP("SCMCTXT",$J,I,0)=$S(A["|DATE|":$P(A,"|DATE|",1)_Y,1:A)
;S ^TMP("SCMCTXT",$J,2,0)="Patient Team Position Dt "_$S($G(XMSUB)["Fla":"Flagged",1:"Inactivate")
S (CNT,HEAD)=$O(^TMP("SCMCTXT",$J,99),-1)+1
S DIV=""
F I=0:0 S I=$O(^TMP("SCMC",$J,I)) Q:'I S ENTRY=+$O(^(I,0)) D
.I TYPE>3 D MM(TYPE) Q
.S ZERO=$G(^SCPT(404.43,+ENTRY,0)),ZERO1=$G(^SCPT(404.42,+ZERO,0))
.D MAIL(+$P(ZERO,U,2),+$P(ZERO1,U,3)) ;find out which individuals get this
.D MAKEMAIL(TYPE)
Q
MAKEMAIL(TYPE) ;
D MAKEMAIL^SCMCTSK6(TYPE) Q
MM(TYPE) ;for providers
D MM^SCMCTSK6(TYPE) Q
PRMAIL(TYPE) ;
;Send mail to providers
D PRMAIL^SCMCTSK6(TYPE)
SCMCTSK5 ;ALB/JDS - PCMM Inactivation Reports ; 03 Jun 2004 3:30 PM
+1 ;;5.3;Scheduling;**297,532,1015**;AUG 13, 1993;Build 21
+2 QUIT
FLAG ;
+1 ;;Patients scheduled for inactivation from their Primary Care team and
+2 ;;Primary Care Provider assignments appear below. Inactivation will
+3 ;;occur on the Scheduled Date for Inactivation date unless the patient
+4 ;;has a completed appointment encounter with their current Primary Care
+5 ;;Provider (PCP) or their Associate Primary Care Provider (AP) before
+6 ;;that date. The patient may be reactivated to their previous PCP and PC
+7 ;;team if they return for care.
+8 ;;
+9 ;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for
+10 ;;PCMM automated inactivation of patients. The following is from that Directive.
+11 ;;
+12 ;;Inactivation of primary care patients from a PCMM panel occurs under the
+13 ;;following circumstances:
+14 ;;(2) (a) The patient expires and
+15 ;;(b) Newly assigned patients (either newly-enrolled patients or patients who
+16 ;;have been re-assigned to a different provider) who have not been seen by
+17 ;;their PCP or Associate Provider (AP) and 12 months have passed since
+18 ;;the time of assignment to that provider. This provides every PCP a 1-year
+19 ;;grace period for seeing patients added to their panel (either newly-enrolled
+20 ;;patients or patients transferred from a different panel) before they are
+21 ;;inactivated. Patients must be seen by their PCP or AP within 12 months of
+22 ;;being assigned, or they need to be inactivated from the PCP's panel.
+23 ;;(c) Established patients that have been assigned to the PCP's panel for more
+24 ;;than 12 months, but have not been seen by their PCP or AP in the past 24 months
+25 ;;need to be inactivated.
+26 ;;(3) Patients appropriate for removal are to be identified and inactivated on
+27 ;;a regular basis.
+28 ;;
+29 ;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
+30 ;;and the last day of the month.
+31 ;;
+32 ;;Patients Scheduled for Inactivation from Primary Care panels
+33 ;; Date
+34 ;; Scheduled
+35 ;;Patient Name SSN Provider Team for Inactivation
+36 ;;------------------------------------------------------------------------------
+37 QUIT
EXT ;
+1 ;;By using the Extend Patients Inactivation Date option, these patients'
+2 ;;PCMM inactivation dates are now 60 days from their original inactivation date.
+3 ;;Inactivation will occur on the Date Scheduled for Inactivation unless the
+4 ;;patient has a completed appointment encounter with their current Primary
+5 ;;Care Provider (PCP) or their Associate Primary Care Provider (AP) before
+6 ;;that date.
+7 ;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for
+8 ;;PCMM automated inactivation of patients. The following is from that Directive.
+9 ;;
+10 ;;Inactivation of primary care patients from a PCMM panel occurs under the
+11 ;;following circumstances:
+12 ;;(2) (a) The patient expires and
+13 ;;(b) Newly assigned patients (either newly-enrolled patients or patients who
+14 ;;have been re-assigned to a different provider) who have not been seen by
+15 ;;their PCP or Associate Provider (AP) and 12 months have passed since
+16 ;;the time of assignment to that provider. This provides every PCP a 1-year
+17 ;;grace period for seeing patients added to their panel (either newly-enrolled
+18 ;;patients or patients transferred from a different panel) before they are
+19 ;;inactivated. Patients must be seen by their PCP or AP within 12 months of
+20 ;;being assigned, or they need to be inactivated from the PCP's panel.
+21 ;;(c) Established patients that have been assigned to the PCP's panel for more
+22 ;;than 12 months, but have not been seen by their PCP or AP in the past 24 months
+23 ;;need to be inactivated.
+24 ;;(3) Patients appropriate for removal are to be identified and inactivated on
+25 ;;a regular basis.
+26 ;;
+27 ;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
+28 ;;and the last day of the month.
+29 ;;
+30 ;;Patients with Extended PCMM Inactivation Dates
+31 ;; Date
+32 ;; Scheduled for
+33 ;;Patient Name SSN Provider Team Inactivation
+34 ;;------------------------------------------------------------------------------
+35 QUIT
INACT ;
+1 ;;Patients inactivated from their Primary Care team and Primary Care Provider
+2 ;;assignments appear below. The patient may be reactivated to their previous PCP
+3 ;;and PC team if they return for care.
+4 ;;VHA DIRECTIVE 2003-063, ACTIVE PATIENTS IN PCMM, establishes the rules for PCMM
+5 ;;automated inactivation of patients. The following is from that Directive.
+6 ;;
+7 ;;Inactivation of primary care patients from a PCMM panel occurs under the
+8 ;;following circumstances:
+9 ;;(2) (a) The patient expires and
+10 ;;(b) Newly assigned patients (either newly-enrolled patients or patients who
+11 ;;have been re-assigned to a different provider) who have not been seen by
+12 ;;their PCP or Associate Provider (AP) and 12 months have passed since
+13 ;;the time of assignment to that provider. This provides every PCP a 1-year
+14 ;;grace period for seeing patients added to their panel (either newly-enrolled
+15 ;;patients or patients transferred from a different panel) before they are
+16 ;;inactivated. Patients must be seen by their PCP or AP within 12 months of
+17 ;;being assigned, or they need to be inactivated from the PCP's panel.
+18 ;;(c) Established patients that have been assigned to the PCP's panel for more
+19 ;;than 12 months, but have not been seen by their PCP or AP in the past 24 months
+20 ;;need to be inactivated.
+21 ;;(3) Patients appropriate for removal are to be identified and inactivated on
+22 ;;a regular basis..
+23 ;;
+24 ;;With PCMM patch SD*5.3*297 installed, inactivations occur on the fifteenth
+25 ;;and the last day of the month.
+26 ;;
+27 ;;Patients Automated Inactivations from Primary Care Panels
+28 ;; Date Reason
+29 ;; Patient Patient
+30 ;;Patient Name SSN Provider Team Inact Inact
+31 ;;-------------------------------------------------------------------------------
+32 QUIT
PRIN ;
+1 ;;WARNING- The following primary care staff will be automatically
+2 ;;inactivated in PCMM software if a correct 'Person Class' and
+3 ;;'Provider Type' are not entered in the New Person File (#200) or
+4 ;;their role and position in the 'Position Setup' window is not
+5 ;;corrected to correspond with their 'Provider Type', 'Person
+6 ;;Class' and the Primary Care business rules stated below:
+7 ;;
+8 ;;1. Staff designated as Primary Care Providers (PCPs) in PCMM that
+9 ;; are not an Attending physician (Attending MD or Attending DO) NP
+10 ;; or PA, shall be inactivated from PCMM
+11 ;;2. Staff designated as Associate Providers (APs) in PCMM, that are not
+12 ;; a Resident/Intern (Physician) NP or PA shall be inactivated in
+13 ;; PCMM
+14 ;;3. All persons designated as an Associate Provider or Primary Care
+15 ;; Provider, who do not have the correct 'Provider Type' and 'Person
+16 ;; Class' entered in the New Person file (#200) in VistA, shall be
+17 ;; inactivated from their Primary Care positions in PCMM.
+18 ;;4. Please contact your PCMM Coordinator or Information Systems
+19 ;; to correct these problems
+20 ;;
+21 ;; PRIMARY CARE PROVIDERS SCHEDULDED FOR INACTIVATION
+22 ;;
+23 ;;Provider's Assoc Team Person # of Pts Sch Inac
+24 ;;Name Clinics Position Role Class Assigned Date
+25 ;;-------------------------------------------------------------------------------
+26 ;;
+27 QUIT
GONE ;
+1 ;; PRIMARY CARE PROVIDERS INACTIVATED
+2 ;;
+3 ;;Provider's Assoc Team Person # of Pts Inac
+4 ;;Name Clinics Position Role Class Assigned Date
+5 ;;-------------------------------------------------------------------------------
+6 ;;
+7 QUIT
MAIL(POS,T) ;Given POS as position set up who gets mail
+1 IF $DATA(^TMP("SCML",$JOB,"POS",POS))
QUIT
+2 SET ^TMP("SCML",$JOB,"POS",+$GET(POS))=""
+3 ;who gets mail at this position
+4 NEW TWO
SET TWO=$GET(^SCTM(404.57,+$GET(POS),2))
+5 ;get preceptor
IF $PIECE(TWO,U,10)
Begin DoDot:1
+6 SET PREC=+$$OKPREC3^SCMCLK(POS,DT)
IF 'PREC
QUIT
+7 DO POS(PREC)
End DoDot:1
+8 ;get team providers
IF $PIECE(TWO,U,9)="T"
Begin DoDot:1
+9 SET T=$GET(T)
+10 NEW I
FOR I=0:0
SET I=$ORDER(^SCTM(404.57,"C",T,I))
IF 'I
QUIT
DO POS(I)
End DoDot:1
+11 ;get position providers
IF $PIECE(TWO,U,9)="P"
Begin DoDot:1
+12 DO POS(POS)
QUIT
End DoDot:1
+13 QUIT
POS(P) ;provider
+1 NEW A
+2 SET A=+$$GETPRTP^SCAPMCU2(P,DT)
IF 'A
QUIT
+3 SET ^TMP("SCML",$JOB,"POS",A)=""
+4 SET ^TMP("SCML",$JOB,"XM",A,POS)=""
+5 QUIT
LINES(TYPE) ;Lines of Bulletin
+1 NEW I,ZERO,ZERO1,Y
+2 SET Y=$$PDAT^SCMCGU("SD*5.3*297")
XECUTE ^DD("DD")
+3 FOR I=1:1
SET A=$PIECE($TEXT(@($PIECE("FLAG^INACT^EXT^PRIN^GONE",U,TYPE))+I),";;",2)
IF A=""
QUIT
Begin DoDot:1
+4 SET ^TMP("SCMCTXT",$JOB,I,0)=$SELECT(A["|DATE|":$PIECE(A,"|DATE|",1)_Y,1:A)
End DoDot:1
+5 ;S ^TMP("SCMCTXT",$J,2,0)="Patient Team Position Dt "_$S($G(XMSUB)["Fla":"Flagged",1:"Inactivate")
+6 SET (CNT,HEAD)=$ORDER(^TMP("SCMCTXT",$JOB,99),-1)+1
+7 SET DIV=""
+8 FOR I=0:0
SET I=$ORDER(^TMP("SCMC",$JOB,I))
IF 'I
QUIT
SET ENTRY=+$ORDER(^(I,0))
Begin DoDot:1
+9 IF TYPE>3
DO MM(TYPE)
QUIT
+10 SET ZERO=$GET(^SCPT(404.43,+ENTRY,0))
SET ZERO1=$GET(^SCPT(404.42,+ZERO,0))
+11 ;find out which individuals get this
DO MAIL(+$PIECE(ZERO,U,2),+$PIECE(ZERO1,U,3))
+12 DO MAKEMAIL(TYPE)
End DoDot:1
+13 QUIT
MAKEMAIL(TYPE) ;
+1 DO MAKEMAIL^SCMCTSK6(TYPE)
QUIT
MM(TYPE) ;for providers
+1 DO MM^SCMCTSK6(TYPE)
QUIT
PRMAIL(TYPE) ;
+1 ;Send mail to providers
+2 DO PRMAIL^SCMCTSK6(TYPE)