WV30PST ;SLC/WAS-WV*1*30 POST INSTALLATION ROUTINE; Dec 18,2023@13:41
;;1.0;WOMEN'S HEALTH;**30**;Sep 30, 1998;Build 5
;
; Reference to BMES^XPDUTL in ICR #10141
; Reference to CHG^XPAR,GETLST^XPAR in ICR #2263
; Reference to ^DIC(9.4 in ICR #10048
;
POST ; Main entry point for Post-init items.
;
D BMES^XPDUTL("Post-installation begin...")
;
N PAR S PAR="WV COVER SHEET WEBSITES"
N WVRETURN D GETLST^XPAR(.WVRETURN,"ALL",PAR,"Q")
;
N INST,WIDX,CURVAL,VAL,PKG,ENT,ERROR,MSG
S WIDX=0
F WIDX=1:1:WVRETURN D
.S INST=$P(WVRETURN(WIDX),U,1)
.I INST="U. S. MEC for Contraceptive Use" S VAL="https://www.cdc.gov/reproductivehealth/contraception/mmwr/mec/summary.html"
.I INST="U. S. SPR for Contraceptive Use" S VAL="https://www.cdc.gov/reproductivehealth/contraception/mmwr/spr/summary.html"
.S CURVAL=$P(WVRETURN(WIDX),U,2)
.I CURVAL'=VAL D
..;
..; Update the value using XPAR
..;
..S PKG=$O(^DIC(9.4,"B","WOMEN'S HEALTH",0))
..S ENT=PKG_";DIC(9.4,"
..D CHG^XPAR(ENT,PAR,INST,VAL,.ERROR)
..I +ERROR S MSG=$P(ERROR,U,2) D BMES^XPDUTL(MSG) Q
..;
..D BMES^XPDUTL("Successfully updated weblink value for "_INST)
..D BMES^XPDUTL(" to "_VAL)
..;
;
D BMES^XPDUTL("Post-installation complete...")
;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HWV30PST 1262 printed Nov 22, 2024@17:56:22 Page 2
WV30PST ;SLC/WAS-WV*1*30 POST INSTALLATION ROUTINE; Dec 18,2023@13:41
+1 ;;1.0;WOMEN'S HEALTH;**30**;Sep 30, 1998;Build 5
+2 ;
+3 ; Reference to BMES^XPDUTL in ICR #10141
+4 ; Reference to CHG^XPAR,GETLST^XPAR in ICR #2263
+5 ; Reference to ^DIC(9.4 in ICR #10048
+6 ;
POST ; Main entry point for Post-init items.
+1 ;
+2 DO BMES^XPDUTL("Post-installation begin...")
+3 ;
+4 NEW PAR
SET PAR="WV COVER SHEET WEBSITES"
+5 NEW WVRETURN
DO GETLST^XPAR(.WVRETURN,"ALL",PAR,"Q")
+6 ;
+7 NEW INST,WIDX,CURVAL,VAL,PKG,ENT,ERROR,MSG
+8 SET WIDX=0
+9 FOR WIDX=1:1:WVRETURN
Begin DoDot:1
+10 SET INST=$PIECE(WVRETURN(WIDX),U,1)
+11 IF INST="U. S. MEC for Contraceptive Use"
SET VAL="https://www.cdc.gov/reproductivehealth/contraception/mmwr/mec/summary.html"
+12 IF INST="U. S. SPR for Contraceptive Use"
SET VAL="https://www.cdc.gov/reproductivehealth/contraception/mmwr/spr/summary.html"
+13 SET CURVAL=$PIECE(WVRETURN(WIDX),U,2)
+14 IF CURVAL'=VAL
Begin DoDot:2
+15 ;
+16 ; Update the value using XPAR
+17 ;
+18 SET PKG=$ORDER(^DIC(9.4,"B","WOMEN'S HEALTH",0))
+19 SET ENT=PKG_";DIC(9.4,"
+20 DO CHG^XPAR(ENT,PAR,INST,VAL,.ERROR)
+21 IF +ERROR
SET MSG=$PIECE(ERROR,U,2)
DO BMES^XPDUTL(MSG)
QUIT
+22 ;
+23 DO BMES^XPDUTL("Successfully updated weblink value for "_INST)
+24 DO BMES^XPDUTL(" to "_VAL)
+25 ;
End DoDot:2
End DoDot:1
+26 ;
+27 DO BMES^XPDUTL("Post-installation complete...")
+28 ;
+29 QUIT