DGAUDITP ;ATG/JPN,ISL/DKA - VAS DG*5.3*964 POST-INSTALL ; 28 Jul 2021 8:30 AM
;;5.3;Registration;**964**;Aug 13, 1993;Build 323
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
; Reference to ^XOB(18.12 in ICR #7317
; Reference to RESCH^XUTMOPT in ICR #1472
; Reference to UPDATE^DIE in ICR #2053
; Reference to $$GET1^DIQ in ICR #2056
; Reference to NOW^%DTC in ICR #10000
; Reference to ^DIC in ICR #10006
; Reference to FILE^DICN in ICR #10009
; Reference to ^DIE in ICR #10018
; Reference to $$DT^XLFDT in ICR #10103
; Reference to $$FMDIFF^XLFDT in ICR #10103
; Reference to BMES^XPDUTL in ICR #10141
; Reference to MES^XPDUTL in ICR #10141
;
Q ; No entry from top
;
POST ; Execute post install logic
N DA,DIC,DIE,DO,DR,FDA,X,DGVIEN,DGVMSG,DGVNOW,DGVSTART,Y,DGY,DGSRVC,DGCNTXTRT,DGDTC,DGSTA3N
N DGOA,DGWA,DGEHT,DGOHT,DGOT,DGKY,DGES,DGEX,DGDEBUGON,DGMAXQUE,DGAUDSRV,DGMAILGRP,DGEXDAYS,DGBTSIZE,DGSD
N SVCIEN,SRVRIEN,LOCSVCIEN,DGVASINST,DGMSG,DGVASRV,MGRPOK,DGERR
;
D BMES^XPDUTL(">Updating WEB SERVICE (#18.02) file...")
S DGSRVC="DG VAS WEB SERVICE"
S DGCNTXTRT="/vsr/"
D REGREST^XOBWLIB(DGSRVC,DGCNTXTRT) ; REGREST^XOBWLIB handles all messaging.
;
S DGDTC=""
S DGSTA3N=+$$STA^XUAF4($$KSP^XUPARAM("INST"))
I $L(DGSTA3N) S DGDTC=$P($T(@DGSTA3N),";",2)
S DGSD=$$GET1^DIQ(18.12,$$FIND1^DIC(18.12,"","X","DG VAS WEB SERVER")_",",.04) ; Existing server default value from file 18.12
I $$PROD^XUPROD D
. S DGVASRV=$S(",AAC,DVR,SCR,"[(","_DGDTC_","):"rest.aitc.vas.domain.ext",",PHC,BYN,"[(","_DGDTC_","):"rest.pitc.vas.domain.ext",DGDTC="C11":"rest.aws.vas.domain.ext",1:"unknown.vas.server")
. Q:DGVASRV'="unknown.vas.server"
. N DGSTARS S $P(DGSTARS,"*",78)="*"
. D BMES^XPDUTL(DGSTARS),MES^XPDUTL("******** WARNING! ********** WARNING! ********* WARNING! ********")
. D BMES^XPDUTL("**** The DG VAS WEB SERVER could not be determined ! *******")
. D MES^XPDUTL("**** Please enter a Help Desk ticket for assistance. *******"),MES^XPDUTL(DGSTARS)
. D BMES^XPDUTL(DGSTARS),BMES^XPDUTL("")
I '$$PROD^XUPROD S DGVASRV=$S($L(DGSD):DGSD,1:"sandbox.vas.server")
;
D BMES^XPDUTL(">Updating WEB SERVER (#18.12) file...")
S FDA(18.12,"?+1,",.01)="DG VAS WEB SERVER" ; NAME
S FDA(18.12,"?+1,",.04)=DGVASRV ; SERVER
S FDA(18.12,"?+1,",.06)="ENABLED" ; STATUS 1-ENABLED / 0-DISABLED
S FDA(18.12,"?+1,",.07)=10 ; DEFAULT HTTP TIMEOUT
S FDA(18.12,"?+1,",3.01)="TRUE" ; SSL ENABLED
S FDA(18.12,"?+1,",3.02)="encrypt_only_tlsv12" ; SSL CONFIGURATION
S FDA(18.12,"?+1,",3.03)=443 ; SSL PORT
D UPDATE^DIE("E","FDA",,"MSGROOT")
I $D(MSGROOT("DIERR")) D BMES^XPDUTL($G(MSGROOT("DIERR",1,"TEXT",1)))
I '$D(MSGROOT("DIERR")) D BMES^XPDUTL("DG VAS WEB SERVER successfully filed for station "_DGSTA3N) D
. D MES^XPDUTL("and pointed to Data Center "_DGDTC_" server "_DGVASRV)
;
; File mail group if not already file
S MGRPOK=$$MGRPOK
;
; If Server and Service successfully filed, attach service to server
K FDA,MSGROOT
S SRVRIEN=$$FIND1^DIC(18.12,"","X","DG VAS WEB SERVER")
I $G(SRVRIEN) D
.S SVCIEN=0 F S SVCIEN=$O(^XOB(18.12,SRVRIEN,100,"B",SVCIEN)) Q:'SVCIEN I $$GET1^DIQ(18.02,SVCIEN,.01)="DG VAS WEB SERVICE" S LOCSVCIEN=SVCIEN Q
.S LOCSVCIEN=$S($G(LOCSVCIEN):LOCSVCIEN,1:"+1")
.S FDA(18.121,LOCSVCIEN_","_SRVRIEN_",",.01)="DG VAS WEB SERVICE" ; WEB SERVICE
.S FDA(18.121,LOCSVCIEN_","_SRVRIEN_",",.06)="ENABLED" ; STATUS 1-ENABLED / 0-DISABLED
.D UPDATE^DIE("E","FDA",,"MSGROOT")
; Set up scheduled task
N DIFROM ; This allows the Task ID to be generated
S DGVNOW=$E($$NOW^XLFDT,1,12)
S DGVSTART=$$FMADD^XLFDT(DGVNOW,,,3)
D RESCH^XUTMOPT("DG VAS EXPORT",DGVSTART,,"900S","L",.DGERR)
;
; Create the one and only entry in the DG VAS CONFIG File (#46.5) if it doesn't already exist.
S DGVASINST=$$FIND1^DIC(46.5,,"Q",1) I 'DGVASINST N FDA S FDA(46.5,"?+1,",.01)=1,FDA(46.5,"?+1,",.02)=0 D UPDATE^DIE("","FDA",,"DGMSG")
;
S DGMAXQUE=+$$GET^XPAR("ALL","DG VAS MAX QUEUE ENTRIES") I 'DGMAXQUE S DGMAXQUE=60000 D EN^XPAR("SYS","DG VAS MAX QUEUE ENTRIES",1,DGMAXQUE)
S DGWA=$$GET^XPAR("ALL","DG VAS MAX WRITE ATTEMPTS") I 'DGWA S DGWA=100 D EN^XPAR("SYS","DG VAS MAX WRITE ATTEMPTS",1,DGWA)
S DGDEBUGON=$$GET^XPAR("ALL","DG VAS DEBUGGING FLAG") I DGDEBUGON="" S DGDEBUGON=0 D EN^XPAR("SYS","DG VAS DEBUGGING FLAG",1,DGDEBUGON)
S DGMAILGRP=$$GET^XPAR("ALL","DG VAS MONITOR GROUP") I DGMAILGRP="" S DGMAILGRP="DG VAS MONITOR" D EN^XPAR("SYS","DG VAS MONITOR GROUP",1,DGMAILGRP)
S DGEXDAYS=$$GET^XPAR("ALL","DG VAS DAYS TO KEEP EXCEPTIONS") I 'DGEXDAYS S DGEXDAYS=3 D EN^XPAR("SYS","DG VAS DAYS TO KEEP EXCEPTIONS",1,DGEXDAYS)
S DGBTSIZE=$$GET^XPAR("ALL","DG VAS BATCH SIZE") I 'DGBTSIZE S DGBTSIZE=1000 D EN^XPAR("SYS","DG VAS BATCH SIZE",1,DGBTSIZE)
; JPN ADD EMAIL XPAR 3/31/21
I $$GET^XPAR("ALL","DG VAS MONITOR GROUP")="" D
. W !!?5,*7,"The DG VAS MONITOR GROUP was not created or set up correctly"
. W !?5,"You will need to either create this mail group in the DG VAS MODIFY "
. W !?5,"parameters, or contact Customer Service for assistance."
;
; ADD PEOPLE TO EMAIL GROUP
D EMAIL("DG*5.3*964")
Q
;
EMAIL(PATCH) ; send email when patch is installed
N DGVOFFN,DGVDUZ,DGSUBJ,DGMSG,DGXMTO,DGGLO,DGGLB,DGXMINSTR,DGVINST,DGSITE,DGAUDSTANUM,DGNOW,Y,%,DGEMAILI,DGEMAILE
S DGNOW=$$FMTE^XLFDT($$NOW^XLFDT)
S DGVDUZ=$G(DUZ)
S:DGVDUZ'="" DGVINST=$O(^VA(200,DGVDUZ,2,"AX1",1,"")) ; Get User's Default Division
S:$G(DGVINST)="" DGVINST=$$GET1^DIQ(8989.3,1,217,"I") ; Default Institution
S DGVOFFN=$$GET1^DIQ(4,DGVINST,100) ; Official VA Name
S DGSITE=$S(DGVOFFN'="":DGVOFFN,1:$$GET1^DIQ(8989.3,1,217))
S DGAUDSTANUM=$$GET1^DIQ(4,DGVINST,99)
I DGAUDSTANUM="" S DGAUDSTANUM=$$GET1^DIQ(4,$$GET1^DIQ(8989.3,1,217,"I"),99)
S DGSUBJ=PATCH_" installed at Station# "_$G(DGSITE)_" - "_$G(DGAUDSTANUM)
S DGSUBJ=$E(DGSUBJ,1,65)
S DGMSG(2)=""
S DGMSG(3)=" Name: "_$G(DGSITE)
S DGMSG(4)=" Station#: "_$$GET1^DIQ(4,DGVINST,99)
S DGMSG(5)=" Domain: "_$G(^XMB("NETNAME"))
S DGMSG(6)=" Date/Time: "_DGNOW
S DGMSG(7)=" By: "_$P($G(^VA(200,DUZ,0)),U,1)
S DGMSG(8)=""
S DGMSG(9)=""
S DGMSG(10)="Patch Version: "_$S($G(PATCH)'="":PATCH,1:"Unknown Install File ien")
;
;Copy mesage to OIT team?
I $$GOTLOCAL^XMXAPIG("DG VAS MONITOR") D
. S DGXMTO(DUZ)=""
. S DGEMAILI=$$GET^XPAR("ALL","DG VAS MONITOR GROUP")
. S DGEMAILE=$$GET1^DIQ(3.8,+$G(DGEMAILI),.01)
. S DGXMTO("G."_DGEMAILE)=""
. S DGXMINSTR("FROM")="noreply.domain.ext"
. D SENDMSG^XMXAPI(DUZ,DGSUBJ,"DGMSG",.DGXMTO,.DGXMINSTR)
. Q:'$D(^TMP("XMERR",$J)) ; no email problems
. ;
. D MES^XPDUTL("MailMan reported a problem trying to send the notification message.")
. D MES^XPDUTL(" ")
. S (DGGLO,DGGLB)="^TMP(""XMERR"","_$J
. S DGGLO=DGGLO_")"
. F S DGGLO=$Q(@DGGLO) Q:DGGLO'[DGGLB D MES^XPDUTL(" "_DGGLO_" = "_$G(@DGGLO))
. D MES^XPDUTL(" ")
Q
;
MGRPOK() ; Check for valid mail group
N DTOUT,DUOUT,Y,DGMGIEN,DGMGCOO,DGABORT,DGMGPAR,DGMGNAME,DGMGIEN
;If mail group doesn't exist, set it up
S DGMGIEN=$$GET^XPAR("ALL","DG VAS MONITOR GROUP")
I $G(DGMGIEN) S DGMGNAME=$$GET1^DIQ(3.8,+$G(DGEMAILI),.01)
S:'$L($G(DGMGNAME)) DGMGNAME="DG VAS MONITOR"
I $$GOTLOCAL^XMXAPIG(DGMGNAME) D Q 1 ; Mail group exists and has active members, we're done here
. D EN^XPAR("SYS","DG VAS MONITOR GROUP",1,DGMGNAME)
S DGMGIEN=$$FIND1^DIC(3.8,"","B",DGMGNAME)
; Mail group doesn't exist, add it
I 'DGMGIEN D MAILUSR(DGMGNAME,.DGABORT) Q:$G(DGABORT) 0
; Store mail group in parameter if not already there
I '$$GET^XPAR("ALL",DGMGNAME) D EN^XPAR("SYS","DG VAS MONITOR GROUP",1,DGMGNAME)
K DGMGPAR
Q 1
;
MAILUSR(DGMGNAME,DGABORT) ; Prompt for mail organizer and/or member
N DGMGCOMEM,DGMGPAR,DGDONE,DGMGCMY,DGMGPRS,DGMGPQT,DGMGPTP,DGMGPDS,DGMGPMY,DGMGPSL
S DGMGCOMEM=+$G(DUZ)
I $G(DUZ)>1 S DGMGPMY(+$G(DGMGCOMEM))=""
S DGMGPTP=0,DGMGPSL=0,DGMGPQT=0
S DGMGPDS(1)="Members of this mail group will receive various notifications that impact"
S DGMGPDS(2)="the VistA Audit Solution (VAS) Registration application."
S DGMGPRS=$$MG^XMBGRP(DGMGNAME,DGMGPTP,DGMGCOMEM,DGMGPSL,.DGMGPMY,.DGMGPDS,DGMGPQT)
I DGMGPRS D Q
. D BMES^XPDUTL(">>> "_DGMGNAME_" mail group added successfully!")
. D BMES^XPDUTL(">>> You have been added as a member of this mail group.")
. D MES^XPDUTL(" Please add members or remove yourself as appropriate.")
I 'DGMGPRS D BMES^XPDUTL("Unable to create "_DGMGNAME_" Mail Group.") S DGABORT=1
Q
;
; Station to Regional Data Center crosswalk. Used to determine the correct REST API DNS
; for the current VistA facility/station.
358 ;AAC;Manila Outpatient Clinic (Philippines)
402 ;AAC;VA Maine Healthcare Systems (Togus)
405 ;AAC;White River Junction VA Medical Center
436 ;AAC;VA Montana Health Care System (Ft. Harrison, Miles City)
437 ;AAC;Fargo VA Medical Center
438 ;AAC;Royal C. Johnson Veterans Memorial Medical Center (Sioux Falls)
442 ;AAC;Cheyenne VA Medical Center
459 ;AAC;VA Pacific Islands Health Care System (Honolulu)
460 ;AAC;Wilmington VA Medical Center
463 ;AAC;Alaska VA Healthcare System (Anchorage)
501 ;DVR;New Mexico VA Health Care System (Albuquerque)
502 ;AAC;Alexandria VA Health Care System (Pineville)
503 ;PHC;Altoona - James E. Van Zandt VA Medical Center
504 ;AAC;Amarillo VA Health Care System
506 ;PHC;VA Ann Arbor Healthcare System
508 ;PHC;Atlanta VA Health Care System
509 ;PHC;Charlie Norwood VA Medical Center (Augusta)
512 ;PHC;VA Maryland Health Care System (Baltimore, Loch Raven, Perry Point)
515 ;PHC;Battle Creek VA Medical Center
516 ;PHC;C.W. Bill Young VA Medical Center (Bay Pines)
517 ;PHC;Beckley VA Medical Center
518 ;PHC;Edith Nourse Rogers Memorial Veterans Hospital (Bedford VA)
519 ;AAC;West Texas VA Health Care System (Big Spring)
520 ;AAC;Gulf Coast Veterans Health Care System (Biloxi)
521 ;PHC;Birmingham VA Medical Center
523 ;PHC;VA Boston Health Care System (Jamaica Plain, Brockton, West Roxbury)
526 ;PHC;James J. Peters VA Medical Center (Bronx, NY)
528 ;PHC;Albany VA Medical Center (Samuel S. Stratton)
529 ;PHC;VA Butler Healthcare
531 ;C10;Boise VA Medical Center
534 ;PHC;Ralph H. Johnson VA Medical Center (Charleston)
537 ;AAC;Jesse Brown VA Medical Center (Chicago Westside, Chicago Lakeside)
538 ;PHC;Chillicothe VA Medical Center
539 ;PHC;Cincinnati VA Medical Center
540 ;PHC;Louis A. Johnson VA Medical Center (Clarksburg)
541 ;PHC;Louis Stokes Cleveland VA Medical Center
542 ;PHC;Coatesville VA Medical Center
544 ;PHC;Wm. Jennings Bryan Dorn VA Medical Center (Columbia)
546 ;PHC;Miami VA Healthcare System
548 ;PHC;West Palm Beach VA Medical Center
549 ;AAC;VA North Texas Health Care System (Dallas, Bonham)
550 ;PHC;VA Illiana Health Care System (Danville)
552 ;PHC;Dayton VA Medical Center
553 ;PHC;John D. Dingell VA Medical Center (Detroit)
554 ;DVR;VA Eastern Colorado Health Care System (ECHCS) (Denver, Fort Lyon)
556 ;AAC;Captain James A. Lovell Federal Health Care Center (North Chicago)
557 ;PHC;Carl Vinson VA Medical Center (Dublin)
558 ;PHC;Durham VA Medical Center
561 ;PHC;VA New Jersey Health Care System (East Orange, Lyons)
562 ;PHC;Erie VA Medical Center
564 ;AAC;Veterans Health Care System of the Ozarks (Fayetteville)
565 ;PHC;Fayetteville VA Medical Center
568 ;AAC;VA Black Hills Health Care System (Fort Meade, Hot Springs)
570 ;C10;Central California VA Health Care System (Fresno)
573 ;PHC;VA North Florida / South Georgia VA Health Care System (Gainesville, Lake City)
575 ;DVR;Grand Junction VA Medical Center
578 ;AAC;Edward Hines Jr. VA Hospital (Hines)
580 ;AAC;Michael E. DeBakey VA Medical Center (Houston)
581 ;PHC;Huntington VA Medical Center
583 ;PHC;Richard L. Roudebush VA Medical Center (Indianapolis)
585 ;AAC;Oscar G. Johnson VA Medical Center (Iron Mountain)
586 ;AAC;G.V. (Sonny) Montgomery VA Medical Center (Jackson)
589 ;AAC;Wichita Medical Center
590 ;PHC;Hampton VA Medical Center
593 ;DVR;VA Southern Nevada Healthcare System (Las Vegas)
595 ;PHC;Lebanon VA Medical Center
596 ;PHC;Lexington VA Medical Center (Leestown, Cooper)
598 ;AAC;Central Arkansas Veterans Healthcare System (North Little Rock, Little Rock)
600 ;DVR;VA Long Beach Heathcare System
603 ;PHC;Robley Rex VA Medical Center (Louisville)
605 ;DVR;Jerry L. Pettis Memorial VA Medical Center (Loma Linda)
607 ;AAC;William S. Middleton Memorial Veterans Hospital (Madison)
608 ;PHC;Manchester VA Medical Center
610 ;PHC;VA Northern Indiana Health Care System (Marion, Fort Wayne)
612 ;C10;VA Northern California Health Care System (Mather)
613 ;PHC;Martinsburg VA Medical Center
614 ;PHC;Memphis VA Medical Center
618 ;AAC;Minneapolis VA Medical Center
619 ;AAC;Central Alabama Veterans Health Care System (Tuskegee, Montgomery)
620 ;PHC;VA Hudson Valley Health Care System (Montrose, Castle Point)
621 ;PHC;James H. Quillen VA Medical Center (Mountain Home)
623 ;PHC;Jack C. Montgomery VA Medical Center (Muskogee)
626 ;PHC;VA Tennessee Valley Health Care System (Nashville, Murfreesboro)
629 ;AAC;Southeast Louisiana Veterans Health Care System (New Orleans)
630 ;PHC;VA New York Harbor Health Care System (Brooklyn, Manhattan)
631 ;PHC;VA Central Western Massachusetts Healthcare System (Formerly Northampton VA Medical Center)
632 ;PHC;Northport VA Medical Center
635 ;AAC;Oklahoma City VA Medical Center
636 ;C11;Iowa City VA Health Care System
637 ;PHC;Asheville VA Medical Center
640 ;C10;VA Palo Alto Health Care System (Menlo Park, Palo Alto, Livermore)
642 ;PHC;Philadelphia VA Medical Center
644 ;PHC;Phoenix VA Health Care System
646 ;PHC;VA Pittsburgh Health Care System (Pittsburgh University Dr., H. J. Heinz Campus)
648 ;C10;VA Portland Health Care System (Portland, Vancouver)
649 ;DVR;Northern Arizona VA Health Care System (Prescott)
650 ;PHC;Providence VA Medical Center
652 ;PHC;Hunter Holmes McGuire VA Medical Center (Richmond)
653 ;C10;VA Roseburg Healthcare System
654 ;C10;VA Sierra Nevada Health Care System (Reno)
655 ;PHC;Aleda E. Lutz VA Medical Center (Saginaw)
656 ;AAC;St. Cloud VA Health Care System
657 ;PHC;Marion Medical Center
658 ;PHC;Salem VA Medical Center
659 ;PHC;W.G. (Bill) Hefner VA Medical Center (Salisbury)
660 ;DVR;VA Salt Lake City Health Care System
662 ;DVR;San Francisco VA Medical Center
663 ;C10;VA Puget Sound Health Care System (Seattle, American Lake)
664 ;DVR;VA San Diego Healthcare System
666 ;DVR;Sheridan VA Medical Center
667 ;AAC;Overton Brooks VA Medical Center (Shreveport)
668 ;C10;Mann-Grandstaff VA Medical Center (Spokane)
671 ;AAC;South Texas Veterans Health Care System (San Antonio, Kerrville)
672 ;PHC;VA Caribbean Healthcare System (San Juan)
673 ;PHC;James A. Haley Veterans' Hospital (Tampa)
674 ;AAC;Central Texas Veterans Health Care System (Temple, Waco)
675 ;PHC;Orlando VA Medical Center
676 ;AAC;Tomah VA Medical Center
678 ;DVR;Southern Arizona VA Health Care System (Tucson)
679 ;PHC;Tuscaloosa VA Medical Center
687 ;AAC;Jonathan M. Wainwright Memorial VA Medical Center (Walla Walla)
688 ;PHC;Washington DC VA Medical Center
689 ;PHC;VA Connecticut Health Care System (West Haven, Newington)
691 ;C10;VA Greater Los Angeles Healthcare System (Los Angeles, West Los Angeles)
692 ;C10;VA Southern Oregon Rehabilitation Center & Clinics (White City)
693 ;PHC;Wilkes-Barre VA Medical Center
695 ;AAC;Clement J. Zablocki Veterans Affairs Medical Center (Milwaukee)
740 ;C11;VA Texas Valley Coastal Bend Health Care System
756 ;DVR;El Paso VA Health Care System
757 ;PHC;Chalmers P. Wylie VA Ambulatory Care Center (Columbus)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGAUDITP 15884 printed Nov 22, 2024@17:51:33 Page 2
DGAUDITP ;ATG/JPN,ISL/DKA - VAS DG*5.3*964 POST-INSTALL ; 28 Jul 2021 8:30 AM
+1 ;;5.3;Registration;**964**;Aug 13, 1993;Build 323
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 ; Reference to ^XOB(18.12 in ICR #7317
+5 ; Reference to RESCH^XUTMOPT in ICR #1472
+6 ; Reference to UPDATE^DIE in ICR #2053
+7 ; Reference to $$GET1^DIQ in ICR #2056
+8 ; Reference to NOW^%DTC in ICR #10000
+9 ; Reference to ^DIC in ICR #10006
+10 ; Reference to FILE^DICN in ICR #10009
+11 ; Reference to ^DIE in ICR #10018
+12 ; Reference to $$DT^XLFDT in ICR #10103
+13 ; Reference to $$FMDIFF^XLFDT in ICR #10103
+14 ; Reference to BMES^XPDUTL in ICR #10141
+15 ; Reference to MES^XPDUTL in ICR #10141
+16 ;
+17 ; No entry from top
QUIT
+18 ;
POST ; Execute post install logic
+1 NEW DA,DIC,DIE,DO,DR,FDA,X,DGVIEN,DGVMSG,DGVNOW,DGVSTART,Y,DGY,DGSRVC,DGCNTXTRT,DGDTC,DGSTA3N
+2 NEW DGOA,DGWA,DGEHT,DGOHT,DGOT,DGKY,DGES,DGEX,DGDEBUGON,DGMAXQUE,DGAUDSRV,DGMAILGRP,DGEXDAYS,DGBTSIZE,DGSD
+3 NEW SVCIEN,SRVRIEN,LOCSVCIEN,DGVASINST,DGMSG,DGVASRV,MGRPOK,DGERR
+4 ;
+5 DO BMES^XPDUTL(">Updating WEB SERVICE (#18.02) file...")
+6 SET DGSRVC="DG VAS WEB SERVICE"
+7 SET DGCNTXTRT="/vsr/"
+8 ; REGREST^XOBWLIB handles all messaging.
DO REGREST^XOBWLIB(DGSRVC,DGCNTXTRT)
+9 ;
+10 SET DGDTC=""
+11 SET DGSTA3N=+$$STA^XUAF4($$KSP^XUPARAM("INST"))
+12 IF $LENGTH(DGSTA3N)
SET DGDTC=$PIECE($TEXT(@DGSTA3N),";",2)
+13 ; Existing server default value from file 18.12
SET DGSD=$$GET1^DIQ(18.12,$$FIND1^DIC(18.12,"","X","DG VAS WEB SERVER")_",",.04)
+14 IF $$PROD^XUPROD
Begin DoDot:1
+15 SET DGVASRV=$SELECT(",AAC,DVR,SCR,"[(","_DGDTC_","):"rest.aitc.vas.domain.ext",",PHC,BYN,"[(","_DGDTC_","):"rest.pitc.vas.domain.ext",DGDTC="C11":"rest.aws.vas.domain.ext",1:"unknown.vas.server")
+16 if DGVASRV'="unknown.vas.server"
QUIT
+17 NEW DGSTARS
SET $PIECE(DGSTARS,"*",78)="*"
+18 DO BMES^XPDUTL(DGSTARS)
DO MES^XPDUTL("******** WARNING! ********** WARNING! ********* WARNING! ********")
+19 DO BMES^XPDUTL("**** The DG VAS WEB SERVER could not be determined ! *******")
+20 DO MES^XPDUTL("**** Please enter a Help Desk ticket for assistance. *******")
DO MES^XPDUTL(DGSTARS)
+21 DO BMES^XPDUTL(DGSTARS)
DO BMES^XPDUTL("")
End DoDot:1
+22 IF '$$PROD^XUPROD
SET DGVASRV=$SELECT($LENGTH(DGSD):DGSD,1:"sandbox.vas.server")
+23 ;
+24 DO BMES^XPDUTL(">Updating WEB SERVER (#18.12) file...")
+25 ; NAME
SET FDA(18.12,"?+1,",.01)="DG VAS WEB SERVER"
+26 ; SERVER
SET FDA(18.12,"?+1,",.04)=DGVASRV
+27 ; STATUS 1-ENABLED / 0-DISABLED
SET FDA(18.12,"?+1,",.06)="ENABLED"
+28 ; DEFAULT HTTP TIMEOUT
SET FDA(18.12,"?+1,",.07)=10
+29 ; SSL ENABLED
SET FDA(18.12,"?+1,",3.01)="TRUE"
+30 ; SSL CONFIGURATION
SET FDA(18.12,"?+1,",3.02)="encrypt_only_tlsv12"
+31 ; SSL PORT
SET FDA(18.12,"?+1,",3.03)=443
+32 DO UPDATE^DIE("E","FDA",,"MSGROOT")
+33 IF $DATA(MSGROOT("DIERR"))
DO BMES^XPDUTL($GET(MSGROOT("DIERR",1,"TEXT",1)))
+34 IF '$DATA(MSGROOT("DIERR"))
DO BMES^XPDUTL("DG VAS WEB SERVER successfully filed for station "_DGSTA3N)
Begin DoDot:1
+35 DO MES^XPDUTL("and pointed to Data Center "_DGDTC_" server "_DGVASRV)
End DoDot:1
+36 ;
+37 ; File mail group if not already file
+38 SET MGRPOK=$$MGRPOK
+39 ;
+40 ; If Server and Service successfully filed, attach service to server
+41 KILL FDA,MSGROOT
+42 SET SRVRIEN=$$FIND1^DIC(18.12,"","X","DG VAS WEB SERVER")
+43 IF $GET(SRVRIEN)
Begin DoDot:1
+44 SET SVCIEN=0
FOR
SET SVCIEN=$ORDER(^XOB(18.12,SRVRIEN,100,"B",SVCIEN))
if 'SVCIEN
QUIT
IF $$GET1^DIQ(18.02,SVCIEN,.01)="DG VAS WEB SERVICE"
SET LOCSVCIEN=SVCIEN
QUIT
+45 SET LOCSVCIEN=$SELECT($GET(LOCSVCIEN):LOCSVCIEN,1:"+1")
+46 ; WEB SERVICE
SET FDA(18.121,LOCSVCIEN_","_SRVRIEN_",",.01)="DG VAS WEB SERVICE"
+47 ; STATUS 1-ENABLED / 0-DISABLED
SET FDA(18.121,LOCSVCIEN_","_SRVRIEN_",",.06)="ENABLED"
+48 DO UPDATE^DIE("E","FDA",,"MSGROOT")
End DoDot:1
+49 ; Set up scheduled task
+50 ; This allows the Task ID to be generated
NEW DIFROM
+51 SET DGVNOW=$EXTRACT($$NOW^XLFDT,1,12)
+52 SET DGVSTART=$$FMADD^XLFDT(DGVNOW,,,3)
+53 DO RESCH^XUTMOPT("DG VAS EXPORT",DGVSTART,,"900S","L",.DGERR)
+54 ;
+55 ; Create the one and only entry in the DG VAS CONFIG File (#46.5) if it doesn't already exist.
+56 SET DGVASINST=$$FIND1^DIC(46.5,,"Q",1)
IF 'DGVASINST
NEW FDA
SET FDA(46.5,"?+1,",.01)=1
SET FDA(46.5,"?+1,",.02)=0
DO UPDATE^DIE("","FDA",,"DGMSG")
+57 ;
+58 SET DGMAXQUE=+$$GET^XPAR("ALL","DG VAS MAX QUEUE ENTRIES")
IF 'DGMAXQUE
SET DGMAXQUE=60000
DO EN^XPAR("SYS","DG VAS MAX QUEUE ENTRIES",1,DGMAXQUE)
+59 SET DGWA=$$GET^XPAR("ALL","DG VAS MAX WRITE ATTEMPTS")
IF 'DGWA
SET DGWA=100
DO EN^XPAR("SYS","DG VAS MAX WRITE ATTEMPTS",1,DGWA)
+60 SET DGDEBUGON=$$GET^XPAR("ALL","DG VAS DEBUGGING FLAG")
IF DGDEBUGON=""
SET DGDEBUGON=0
DO EN^XPAR("SYS","DG VAS DEBUGGING FLAG",1,DGDEBUGON)
+61 SET DGMAILGRP=$$GET^XPAR("ALL","DG VAS MONITOR GROUP")
IF DGMAILGRP=""
SET DGMAILGRP="DG VAS MONITOR"
DO EN^XPAR("SYS","DG VAS MONITOR GROUP",1,DGMAILGRP)
+62 SET DGEXDAYS=$$GET^XPAR("ALL","DG VAS DAYS TO KEEP EXCEPTIONS")
IF 'DGEXDAYS
SET DGEXDAYS=3
DO EN^XPAR("SYS","DG VAS DAYS TO KEEP EXCEPTIONS",1,DGEXDAYS)
+63 SET DGBTSIZE=$$GET^XPAR("ALL","DG VAS BATCH SIZE")
IF 'DGBTSIZE
SET DGBTSIZE=1000
DO EN^XPAR("SYS","DG VAS BATCH SIZE",1,DGBTSIZE)
+64 ; JPN ADD EMAIL XPAR 3/31/21
+65 IF $$GET^XPAR("ALL","DG VAS MONITOR GROUP")=""
Begin DoDot:1
+66 WRITE !!?5,*7,"The DG VAS MONITOR GROUP was not created or set up correctly"
+67 WRITE !?5,"You will need to either create this mail group in the DG VAS MODIFY "
+68 WRITE !?5,"parameters, or contact Customer Service for assistance."
End DoDot:1
+69 ;
+70 ; ADD PEOPLE TO EMAIL GROUP
+71 DO EMAIL("DG*5.3*964")
+72 QUIT
+73 ;
EMAIL(PATCH) ; send email when patch is installed
+1 NEW DGVOFFN,DGVDUZ,DGSUBJ,DGMSG,DGXMTO,DGGLO,DGGLB,DGXMINSTR,DGVINST,DGSITE,DGAUDSTANUM,DGNOW,Y,%,DGEMAILI,DGEMAILE
+2 SET DGNOW=$$FMTE^XLFDT($$NOW^XLFDT)
+3 SET DGVDUZ=$GET(DUZ)
+4 ; Get User's Default Division
if DGVDUZ'=""
SET DGVINST=$ORDER(^VA(200,DGVDUZ,2,"AX1",1,""))
+5 ; Default Institution
if $GET(DGVINST)=""
SET DGVINST=$$GET1^DIQ(8989.3,1,217,"I")
+6 ; Official VA Name
SET DGVOFFN=$$GET1^DIQ(4,DGVINST,100)
+7 SET DGSITE=$SELECT(DGVOFFN'="":DGVOFFN,1:$$GET1^DIQ(8989.3,1,217))
+8 SET DGAUDSTANUM=$$GET1^DIQ(4,DGVINST,99)
+9 IF DGAUDSTANUM=""
SET DGAUDSTANUM=$$GET1^DIQ(4,$$GET1^DIQ(8989.3,1,217,"I"),99)
+10 SET DGSUBJ=PATCH_" installed at Station# "_$GET(DGSITE)_" - "_$GET(DGAUDSTANUM)
+11 SET DGSUBJ=$EXTRACT(DGSUBJ,1,65)
+12 SET DGMSG(2)=""
+13 SET DGMSG(3)=" Name: "_$GET(DGSITE)
+14 SET DGMSG(4)=" Station#: "_$$GET1^DIQ(4,DGVINST,99)
+15 SET DGMSG(5)=" Domain: "_$GET(^XMB("NETNAME"))
+16 SET DGMSG(6)=" Date/Time: "_DGNOW
+17 SET DGMSG(7)=" By: "_$PIECE($GET(^VA(200,DUZ,0)),U,1)
+18 SET DGMSG(8)=""
+19 SET DGMSG(9)=""
+20 SET DGMSG(10)="Patch Version: "_$SELECT($GET(PATCH)'="":PATCH,1:"Unknown Install File ien")
+21 ;
+22 ;Copy mesage to OIT team?
+23 IF $$GOTLOCAL^XMXAPIG("DG VAS MONITOR")
Begin DoDot:1
+24 SET DGXMTO(DUZ)=""
+25 SET DGEMAILI=$$GET^XPAR("ALL","DG VAS MONITOR GROUP")
+26 SET DGEMAILE=$$GET1^DIQ(3.8,+$GET(DGEMAILI),.01)
+27 SET DGXMTO("G."_DGEMAILE)=""
+28 SET DGXMINSTR("FROM")="noreply.domain.ext"
+29 DO SENDMSG^XMXAPI(DUZ,DGSUBJ,"DGMSG",.DGXMTO,.DGXMINSTR)
+30 ; no email problems
if '$DATA(^TMP("XMERR",$JOB))
QUIT
+31 ;
+32 DO MES^XPDUTL("MailMan reported a problem trying to send the notification message.")
+33 DO MES^XPDUTL(" ")
+34 SET (DGGLO,DGGLB)="^TMP(""XMERR"","_$JOB
+35 SET DGGLO=DGGLO_")"
+36 FOR
SET DGGLO=$QUERY(@DGGLO)
if DGGLO'[DGGLB
QUIT
DO MES^XPDUTL(" "_DGGLO_" = "_$GET(@DGGLO))
+37 DO MES^XPDUTL(" ")
End DoDot:1
+38 QUIT
+39 ;
MGRPOK() ; Check for valid mail group
+1 NEW DTOUT,DUOUT,Y,DGMGIEN,DGMGCOO,DGABORT,DGMGPAR,DGMGNAME,DGMGIEN
+2 ;If mail group doesn't exist, set it up
+3 SET DGMGIEN=$$GET^XPAR("ALL","DG VAS MONITOR GROUP")
+4 IF $GET(DGMGIEN)
SET DGMGNAME=$$GET1^DIQ(3.8,+$GET(DGEMAILI),.01)
+5 if '$LENGTH($GET(DGMGNAME))
SET DGMGNAME="DG VAS MONITOR"
+6 ; Mail group exists and has active members, we're done here
IF $$GOTLOCAL^XMXAPIG(DGMGNAME)
Begin DoDot:1
+7 DO EN^XPAR("SYS","DG VAS MONITOR GROUP",1,DGMGNAME)
End DoDot:1
QUIT 1
+8 SET DGMGIEN=$$FIND1^DIC(3.8,"","B",DGMGNAME)
+9 ; Mail group doesn't exist, add it
+10 IF 'DGMGIEN
DO MAILUSR(DGMGNAME,.DGABORT)
if $GET(DGABORT)
QUIT 0
+11 ; Store mail group in parameter if not already there
+12 IF '$$GET^XPAR("ALL",DGMGNAME)
DO EN^XPAR("SYS","DG VAS MONITOR GROUP",1,DGMGNAME)
+13 KILL DGMGPAR
+14 QUIT 1
+15 ;
MAILUSR(DGMGNAME,DGABORT) ; Prompt for mail organizer and/or member
+1 NEW DGMGCOMEM,DGMGPAR,DGDONE,DGMGCMY,DGMGPRS,DGMGPQT,DGMGPTP,DGMGPDS,DGMGPMY,DGMGPSL
+2 SET DGMGCOMEM=+$GET(DUZ)
+3 IF $GET(DUZ)>1
SET DGMGPMY(+$GET(DGMGCOMEM))=""
+4 SET DGMGPTP=0
SET DGMGPSL=0
SET DGMGPQT=0
+5 SET DGMGPDS(1)="Members of this mail group will receive various notifications that impact"
+6 SET DGMGPDS(2)="the VistA Audit Solution (VAS) Registration application."
+7 SET DGMGPRS=$$MG^XMBGRP(DGMGNAME,DGMGPTP,DGMGCOMEM,DGMGPSL,.DGMGPMY,.DGMGPDS,DGMGPQT)
+8 IF DGMGPRS
Begin DoDot:1
+9 DO BMES^XPDUTL(">>> "_DGMGNAME_" mail group added successfully!")
+10 DO BMES^XPDUTL(">>> You have been added as a member of this mail group.")
+11 DO MES^XPDUTL(" Please add members or remove yourself as appropriate.")
End DoDot:1
QUIT
+12 IF 'DGMGPRS
DO BMES^XPDUTL("Unable to create "_DGMGNAME_" Mail Group.")
SET DGABORT=1
+13 QUIT
+14 ;
+15 ; Station to Regional Data Center crosswalk. Used to determine the correct REST API DNS
+16 ; for the current VistA facility/station.
358 ;AAC;Manila Outpatient Clinic (Philippines)
402 ;AAC;VA Maine Healthcare Systems (Togus)
405 ;AAC;White River Junction VA Medical Center
436 ;AAC;VA Montana Health Care System (Ft. Harrison, Miles City)
437 ;AAC;Fargo VA Medical Center
438 ;AAC;Royal C. Johnson Veterans Memorial Medical Center (Sioux Falls)
442 ;AAC;Cheyenne VA Medical Center
459 ;AAC;VA Pacific Islands Health Care System (Honolulu)
460 ;AAC;Wilmington VA Medical Center
463 ;AAC;Alaska VA Healthcare System (Anchorage)
501 ;DVR;New Mexico VA Health Care System (Albuquerque)
502 ;AAC;Alexandria VA Health Care System (Pineville)
503 ;PHC;Altoona - James E. Van Zandt VA Medical Center
504 ;AAC;Amarillo VA Health Care System
506 ;PHC;VA Ann Arbor Healthcare System
508 ;PHC;Atlanta VA Health Care System
509 ;PHC;Charlie Norwood VA Medical Center (Augusta)
512 ;PHC;VA Maryland Health Care System (Baltimore, Loch Raven, Perry Point)
515 ;PHC;Battle Creek VA Medical Center
516 ;PHC;C.W. Bill Young VA Medical Center (Bay Pines)
517 ;PHC;Beckley VA Medical Center
518 ;PHC;Edith Nourse Rogers Memorial Veterans Hospital (Bedford VA)
519 ;AAC;West Texas VA Health Care System (Big Spring)
520 ;AAC;Gulf Coast Veterans Health Care System (Biloxi)
521 ;PHC;Birmingham VA Medical Center
523 ;PHC;VA Boston Health Care System (Jamaica Plain, Brockton, West Roxbury)
526 ;PHC;James J. Peters VA Medical Center (Bronx, NY)
528 ;PHC;Albany VA Medical Center (Samuel S. Stratton)
529 ;PHC;VA Butler Healthcare
531 ;C10;Boise VA Medical Center
534 ;PHC;Ralph H. Johnson VA Medical Center (Charleston)
537 ;AAC;Jesse Brown VA Medical Center (Chicago Westside, Chicago Lakeside)
538 ;PHC;Chillicothe VA Medical Center
539 ;PHC;Cincinnati VA Medical Center
540 ;PHC;Louis A. Johnson VA Medical Center (Clarksburg)
541 ;PHC;Louis Stokes Cleveland VA Medical Center
542 ;PHC;Coatesville VA Medical Center
544 ;PHC;Wm. Jennings Bryan Dorn VA Medical Center (Columbia)
546 ;PHC;Miami VA Healthcare System
548 ;PHC;West Palm Beach VA Medical Center
549 ;AAC;VA North Texas Health Care System (Dallas, Bonham)
550 ;PHC;VA Illiana Health Care System (Danville)
552 ;PHC;Dayton VA Medical Center
553 ;PHC;John D. Dingell VA Medical Center (Detroit)
554 ;DVR;VA Eastern Colorado Health Care System (ECHCS) (Denver, Fort Lyon)
556 ;AAC;Captain James A. Lovell Federal Health Care Center (North Chicago)
557 ;PHC;Carl Vinson VA Medical Center (Dublin)
558 ;PHC;Durham VA Medical Center
561 ;PHC;VA New Jersey Health Care System (East Orange, Lyons)
562 ;PHC;Erie VA Medical Center
564 ;AAC;Veterans Health Care System of the Ozarks (Fayetteville)
565 ;PHC;Fayetteville VA Medical Center
568 ;AAC;VA Black Hills Health Care System (Fort Meade, Hot Springs)
570 ;C10;Central California VA Health Care System (Fresno)
573 ;PHC;VA North Florida / South Georgia VA Health Care System (Gainesville, Lake City)
575 ;DVR;Grand Junction VA Medical Center
578 ;AAC;Edward Hines Jr. VA Hospital (Hines)
580 ;AAC;Michael E. DeBakey VA Medical Center (Houston)
581 ;PHC;Huntington VA Medical Center
583 ;PHC;Richard L. Roudebush VA Medical Center (Indianapolis)
585 ;AAC;Oscar G. Johnson VA Medical Center (Iron Mountain)
586 ;AAC;G.V. (Sonny) Montgomery VA Medical Center (Jackson)
589 ;AAC;Wichita Medical Center
590 ;PHC;Hampton VA Medical Center
593 ;DVR;VA Southern Nevada Healthcare System (Las Vegas)
595 ;PHC;Lebanon VA Medical Center
596 ;PHC;Lexington VA Medical Center (Leestown, Cooper)
598 ;AAC;Central Arkansas Veterans Healthcare System (North Little Rock, Little Rock)
600 ;DVR;VA Long Beach Heathcare System
603 ;PHC;Robley Rex VA Medical Center (Louisville)
605 ;DVR;Jerry L. Pettis Memorial VA Medical Center (Loma Linda)
607 ;AAC;William S. Middleton Memorial Veterans Hospital (Madison)
608 ;PHC;Manchester VA Medical Center
610 ;PHC;VA Northern Indiana Health Care System (Marion, Fort Wayne)
612 ;C10;VA Northern California Health Care System (Mather)
613 ;PHC;Martinsburg VA Medical Center
614 ;PHC;Memphis VA Medical Center
618 ;AAC;Minneapolis VA Medical Center
619 ;AAC;Central Alabama Veterans Health Care System (Tuskegee, Montgomery)
620 ;PHC;VA Hudson Valley Health Care System (Montrose, Castle Point)
621 ;PHC;James H. Quillen VA Medical Center (Mountain Home)
623 ;PHC;Jack C. Montgomery VA Medical Center (Muskogee)
626 ;PHC;VA Tennessee Valley Health Care System (Nashville, Murfreesboro)
629 ;AAC;Southeast Louisiana Veterans Health Care System (New Orleans)
630 ;PHC;VA New York Harbor Health Care System (Brooklyn, Manhattan)
631 ;PHC;VA Central Western Massachusetts Healthcare System (Formerly Northampton VA Medical Center)
632 ;PHC;Northport VA Medical Center
635 ;AAC;Oklahoma City VA Medical Center
636 ;C11;Iowa City VA Health Care System
637 ;PHC;Asheville VA Medical Center
640 ;C10;VA Palo Alto Health Care System (Menlo Park, Palo Alto, Livermore)
642 ;PHC;Philadelphia VA Medical Center
644 ;PHC;Phoenix VA Health Care System
646 ;PHC;VA Pittsburgh Health Care System (Pittsburgh University Dr., H. J. Heinz Campus)
648 ;C10;VA Portland Health Care System (Portland, Vancouver)
649 ;DVR;Northern Arizona VA Health Care System (Prescott)
650 ;PHC;Providence VA Medical Center
652 ;PHC;Hunter Holmes McGuire VA Medical Center (Richmond)
653 ;C10;VA Roseburg Healthcare System
654 ;C10;VA Sierra Nevada Health Care System (Reno)
655 ;PHC;Aleda E. Lutz VA Medical Center (Saginaw)
656 ;AAC;St. Cloud VA Health Care System
657 ;PHC;Marion Medical Center
658 ;PHC;Salem VA Medical Center
659 ;PHC;W.G. (Bill) Hefner VA Medical Center (Salisbury)
660 ;DVR;VA Salt Lake City Health Care System
662 ;DVR;San Francisco VA Medical Center
663 ;C10;VA Puget Sound Health Care System (Seattle, American Lake)
664 ;DVR;VA San Diego Healthcare System
666 ;DVR;Sheridan VA Medical Center
667 ;AAC;Overton Brooks VA Medical Center (Shreveport)
668 ;C10;Mann-Grandstaff VA Medical Center (Spokane)
671 ;AAC;South Texas Veterans Health Care System (San Antonio, Kerrville)
672 ;PHC;VA Caribbean Healthcare System (San Juan)
673 ;PHC;James A. Haley Veterans' Hospital (Tampa)
674 ;AAC;Central Texas Veterans Health Care System (Temple, Waco)
675 ;PHC;Orlando VA Medical Center
676 ;AAC;Tomah VA Medical Center
678 ;DVR;Southern Arizona VA Health Care System (Tucson)
679 ;PHC;Tuscaloosa VA Medical Center
687 ;AAC;Jonathan M. Wainwright Memorial VA Medical Center (Walla Walla)
688 ;PHC;Washington DC VA Medical Center
689 ;PHC;VA Connecticut Health Care System (West Haven, Newington)
691 ;C10;VA Greater Los Angeles Healthcare System (Los Angeles, West Los Angeles)
692 ;C10;VA Southern Oregon Rehabilitation Center & Clinics (White City)
693 ;PHC;Wilkes-Barre VA Medical Center
695 ;AAC;Clement J. Zablocki Veterans Affairs Medical Center (Milwaukee)
740 ;C11;VA Texas Valley Coastal Bend Health Care System
756 ;DVR;El Paso VA Health Care System
757 ;PHC;Chalmers P. Wylie VA Ambulatory Care Center (Columbus)