PXRM68P ; ALB/ART - Inactivate MHV Reminders ;07/28/2017
;;2.0;CLINICAL REMINDERS;**68**;Feb 04, 2005;Build 2
;
Q
;The purpose of this routine is to rescind old national reminders
;that are no longer needed. The name is changed to add "ZZVA" in the
;place of VA, and inactivate it.
;There are no linked reminder dialogs for these VA-MHA reminders.
;
;Public, Supported ICRs
; #2053 - Data Base Server API: Editing Utilities (DIE)
; #10141 - XPDUTL - Public APIs for KIDS
;=================================================
EN ;Start of loop for rescinding national reminders
D BMES^XPDUTL("Rescinding outdated National Reminders")
;
N II,OREM,OREMDA,PNAME,REM,PXRMN
N TEMP,TEXT,ZZREM
;
;Update the reminders
S PXRMN=$P($$NOW^XLFDT(),".")
F II=1:1 S TEMP=$T(TEXT+II),OREM=$P(TEMP,";",3) Q:OREM="END" D
. S ZZREM=$P(TEMP,";",4)
. S OREMDA=+$O(^PXD(811.9,"B",OREM,0))
. I OREMDA>0 D
. . K REM
. . S PNAME=$P($G(^PXD(811.9,OREMDA,0)),"^",3) ;get print name
. . S REM(1,811.9,OREMDA_",",.01)=ZZREM ;name
. . S REM(1,811.9,OREMDA_",",1.2)="ZZ "_PNAME ;print name
. . S REM(1,811.9,OREMDA_",",1.6)=1 ;inactive flag
. . ; inactive change date (1.7) is updated by trigger on inactive flag
. . S REM(1,811.9,OREMDA_",",69)=PXRMN ;rescission date
. . D FILE^DIE("K","REM(1)")
. . S TEXT(1)="Rescinding reminder: "_OREM
. . S TEXT(2)="It was renamed to: "_ZZREM
. . S TEXT(3)=""
. . D BMES^XPDUTL(.TEXT)
Q
;=================================================
TEXT ;
;;VA-MHV BMI > 25.0;ZZVA-MHV BMI > 25.0
;;VA-MHV CERVICAL CANCER SCREEN;ZZVA-MHV CERVICAL CANCER SCREEN
;;VA-MHV COLORECTAL CANCER SCREEN;ZZVA-MHV COLORECTAL CANCER SCREEN
;;VA-MHV DIABETES FOOT EXAM;ZZVA-MHV DIABETES FOOT EXAM
;;VA-MHV DIABETES HBA1C;ZZVA-MHV DIABETES HBA1C
;;VA-MHV DIABETES RETINAL EXAM;ZZVA-MHV DIABETES RETINAL EXAM
;;VA-MHV HYPERTENSION;ZZVA-MHV HYPERTENSION
;;VA-MHV INFLUENZA VACCINE;ZZVA-MHV INFLUENZA VACCINE
;;VA-MHV LDL CONTROL;ZZVA-MHV LDL CONTROL
;;VA-MHV LIPID MEASUREMENT;ZZVA-MHV LIPID MEASUREMENT
;;VA-MHV MAMMOGRAM SCREENING;ZZVA-MHV MAMMOGRAM SCREENING
;;VA-MHV PNEUMOVAX;ZZVA-MHV PNEUMOVAX
;;END
Q
;=================================================
UNDO ;Undo all the changes
N II,OREM,OREMDA,PNAME,TEMP,REM,ZZREM,ZZREMDA
F II=1:1 S TEMP=$T(TEXT+II),OREM=$P(TEMP,";",3) Q:OREM="END" D
. S ZZREM=$P(TEMP,";",4)
. S OREMDA=+$O(^PXD(811.9,"B",OREM,0))
. I OREMDA>0 Q
. S ZZREMDA=+$O(^PXD(811.9,"B",ZZREM,0))
. I ZZREMDA>0 D
. . S PNAME=$P($G(^PXD(811.9,ZZREMDA,0)),"^",3)
. . K REM
. . S REM(1,811.9,ZZREMDA_",",.01)=OREM ;name
. . S REM(1,811.9,ZZREMDA_",",1.2)=$P(PNAME,"ZZ ",$L(PNAME,"ZZ ")) ;print name
. . S REM(1,811.9,ZZREMDA_",",1.6)="" ;inactive flag
. . S REM(1,811.9,ZZREMDA_",",1.7)="" ;inactive change date
. . S REM(1,811.9,ZZREMDA_",",69)="" ;rescission date
. . D FILE^DIE("K","REM(1)")
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXRM68P 2940 printed Oct 16, 2024@17:43:42 Page 2
PXRM68P ; ALB/ART - Inactivate MHV Reminders ;07/28/2017
+1 ;;2.0;CLINICAL REMINDERS;**68**;Feb 04, 2005;Build 2
+2 ;
+3 QUIT
+4 ;The purpose of this routine is to rescind old national reminders
+5 ;that are no longer needed. The name is changed to add "ZZVA" in the
+6 ;place of VA, and inactivate it.
+7 ;There are no linked reminder dialogs for these VA-MHA reminders.
+8 ;
+9 ;Public, Supported ICRs
+10 ; #2053 - Data Base Server API: Editing Utilities (DIE)
+11 ; #10141 - XPDUTL - Public APIs for KIDS
+12 ;=================================================
EN ;Start of loop for rescinding national reminders
+1 DO BMES^XPDUTL("Rescinding outdated National Reminders")
+2 ;
+3 NEW II,OREM,OREMDA,PNAME,REM,PXRMN
+4 NEW TEMP,TEXT,ZZREM
+5 ;
+6 ;Update the reminders
+7 SET PXRMN=$PIECE($$NOW^XLFDT(),".")
+8 FOR II=1:1
SET TEMP=$TEXT(TEXT+II)
SET OREM=$PIECE(TEMP,";",3)
if OREM="END"
QUIT
Begin DoDot:1
+9 SET ZZREM=$PIECE(TEMP,";",4)
+10 SET OREMDA=+$ORDER(^PXD(811.9,"B",OREM,0))
+11 IF OREMDA>0
Begin DoDot:2
+12 KILL REM
+13 ;get print name
SET PNAME=$PIECE($GET(^PXD(811.9,OREMDA,0)),"^",3)
+14 ;name
SET REM(1,811.9,OREMDA_",",.01)=ZZREM
+15 ;print name
SET REM(1,811.9,OREMDA_",",1.2)="ZZ "_PNAME
+16 ;inactive flag
SET REM(1,811.9,OREMDA_",",1.6)=1
+17 ; inactive change date (1.7) is updated by trigger on inactive flag
+18 ;rescission date
SET REM(1,811.9,OREMDA_",",69)=PXRMN
+19 DO FILE^DIE("K","REM(1)")
+20 SET TEXT(1)="Rescinding reminder: "_OREM
+21 SET TEXT(2)="It was renamed to: "_ZZREM
+22 SET TEXT(3)=""
+23 DO BMES^XPDUTL(.TEXT)
End DoDot:2
End DoDot:1
+24 QUIT
+25 ;=================================================
TEXT ;
+1 ;;VA-MHV BMI > 25.0;ZZVA-MHV BMI > 25.0
+2 ;;VA-MHV CERVICAL CANCER SCREEN;ZZVA-MHV CERVICAL CANCER SCREEN
+3 ;;VA-MHV COLORECTAL CANCER SCREEN;ZZVA-MHV COLORECTAL CANCER SCREEN
+4 ;;VA-MHV DIABETES FOOT EXAM;ZZVA-MHV DIABETES FOOT EXAM
+5 ;;VA-MHV DIABETES HBA1C;ZZVA-MHV DIABETES HBA1C
+6 ;;VA-MHV DIABETES RETINAL EXAM;ZZVA-MHV DIABETES RETINAL EXAM
+7 ;;VA-MHV HYPERTENSION;ZZVA-MHV HYPERTENSION
+8 ;;VA-MHV INFLUENZA VACCINE;ZZVA-MHV INFLUENZA VACCINE
+9 ;;VA-MHV LDL CONTROL;ZZVA-MHV LDL CONTROL
+10 ;;VA-MHV LIPID MEASUREMENT;ZZVA-MHV LIPID MEASUREMENT
+11 ;;VA-MHV MAMMOGRAM SCREENING;ZZVA-MHV MAMMOGRAM SCREENING
+12 ;;VA-MHV PNEUMOVAX;ZZVA-MHV PNEUMOVAX
+13 ;;END
+14 QUIT
+15 ;=================================================
UNDO ;Undo all the changes
+1 NEW II,OREM,OREMDA,PNAME,TEMP,REM,ZZREM,ZZREMDA
+2 FOR II=1:1
SET TEMP=$TEXT(TEXT+II)
SET OREM=$PIECE(TEMP,";",3)
if OREM="END"
QUIT
Begin DoDot:1
+3 SET ZZREM=$PIECE(TEMP,";",4)
+4 SET OREMDA=+$ORDER(^PXD(811.9,"B",OREM,0))
+5 IF OREMDA>0
QUIT
+6 SET ZZREMDA=+$ORDER(^PXD(811.9,"B",ZZREM,0))
+7 IF ZZREMDA>0
Begin DoDot:2
+8 SET PNAME=$PIECE($GET(^PXD(811.9,ZZREMDA,0)),"^",3)
+9 KILL REM
+10 ;name
SET REM(1,811.9,ZZREMDA_",",.01)=OREM
+11 ;print name
SET REM(1,811.9,ZZREMDA_",",1.2)=$PIECE(PNAME,"ZZ ",$LENGTH(PNAME,"ZZ "))
+12 ;inactive flag
SET REM(1,811.9,ZZREMDA_",",1.6)=""
+13 ;inactive change date
SET REM(1,811.9,ZZREMDA_",",1.7)=""
+14 ;rescission date
SET REM(1,811.9,ZZREMDA_",",69)=""
+15 DO FILE^DIE("K","REM(1)")
End DoDot:2
End DoDot:1
+16 QUIT
+17 ;