ACKQIPST ;HCIOFO/BH-Version 3 Post Installation routine ; 04/01/99
;;3.0;QUASAR;;Feb 11, 2000
;Per VHA Directive 10-93-142, this routine SHOULD NOT be modified.
;
N ACKTEST S ACKTEST=$$GET1^DIQ(509850.8,1,.1,"I")
I ACKTEST="S"!(ACKTEST="D") D Q
. S ACKTXT(1)="Installation Routine has already been run."
. S ACKTXT(2)="Therefore will only attempt to add The PIMS 'Clinic Workload' report option"
. S ACKTXT(3)="to the Quasar Reports menu. Will not update CDR Report parameter."
. S ACKTXT(4)=" " D MES^XPDUTL(.ACKTXT) K ACKTXT
. S ACKCHK=$$NEWCP^XPDUTL("POST1","OPTN^ACKQIPST")
. Q ; Return to KIDS & let KIDS run the checkpoint.
;
K ^TMP("ACKQIPST","INSTALLV3")
; Setup chkpoints for KIDS.
;
N ACKCHK
S ACKCHK=$$NEWCP^XPDUTL("POST1","REPORT^ACKQIPST")
; Updte Params file with input for CDR report. Virgin
; site - just set up site level on Params file,set Interface to PCE
; & CDR param values
;
S ACKCHK=$$NEWCP^XPDUTL("POST2","MAIN^ACKQIPST")
; Update Visit file with Appmnt Time, Div & Proc Vol. Also
; store Divs and Clins for later update into site params file.
;
S ACKCHK=$$NEWCP^XPDUTL("POST21")
; Keep track of visit date subscript of Visit file B X Ref
;
S ACKCHK=$$NEWCP^XPDUTL("POST22")
; Keep track of visit IEN subscript of Visit file B X Ref
;
S ACKCHK=$$NEWCP^XPDUTL("POST24")
; Keep track of secs within Apnt Time Gen.
;
S ACKCHK=$$NEWCP^XPDUTL("POST25")
; Keep track of mins within Appt Time Gen.
;
S ACKCHK=$$NEWCP^XPDUTL("POST26")
; Keep track of hrs within Appt Time Gen.
;
S ACKCHK=$$NEWCP^XPDUTL("POST3","PARAMSD^ACKQIPST")
; Update Div Values used within the above visits onto the site
; params file
;
S ACKCHK=$$NEWCP^XPDUTL("POST31")
; Keep track of Divs within the Temp global of Divs & Clins
;
S ACKCHK=$$NEWCP^XPDUTL("POST4","PARAMSC^ACKQIPST")
; Update Clin Vals used within the above visits onto the site
; params file
;
S ACKCHK=$$NEWCP^XPDUTL("POST41")
; Keep track of Divs within the Temp global of Divs & Clins
;
S ACKCHK=$$NEWCP^XPDUTL("POST42")
; Keep track of Clins within the Temp global of Divs & Clins
;
S ACKCHK=$$NEWCP^XPDUTL("POST5","OPTN^ACKQIPST")
S ACKCHK=$$NEWCP^XPDUTL("POST6","STAFF^ACKQIPS1")
;
Q ;Return to KIDS & let KIDS run the checkpoints.
;
REPORT ; Virgin Install : set up the .01 node
; Update CDR Report param
;
S ^TMP("ACKQIPST","SKIP")="0"
I $$GET1^DIQ(509850.8,1,.01)="" D
. S ^TMP("ACKQIPST","SKIP")="1" ; Keep note of Skip
. S DIC="^ACK(509850.8,",DIC(0)="L",DLAYGO=509850.8,ACKLAYGO="",DINUM=1
. S X="1" D FILE^DICN ; Do a FM call to set up Site .01 level
. ;
. D BMES^XPDUTL("Virgin Install - Site level being created on A&SP Site Parameters file.")
. ;
. K ACKARR
. S ACKARR(509850.8,1_",",2)="0" D FILE^DIE("K","ACKARR")
. D BMES^XPDUTL("Interface to PCE Parameter set to 'NO'.")
. K DA,DIK,ACKARR
;
I '$D(XPDQUES("POS1")) D
. D BMES^XPDUTL("CDR Report parameter not entered - Install will use default value of 'Site'.")
. S XPDQUES("POS1")="S" Q
;
N ACKARR
S ACKARR(509850.8,1_",",.1)=XPDQUES("POS1") D FILE^DIE("K","ACKARR")
D BMES^XPDUTL("CDR Report Parameter updated.")
K DA,DIK
Q
;
MAIN I ^TMP("ACKQIPST","SKIP") Q ; Virgin Site
;
; Loop thru the B X ref
; Clin val is used to get a Div value
; A unique time is gererated
; Updates Procs new Vol field with 1
; Appt. Time & the vols are updated within one FM call
; Divn is updated last
; All the above fields run X ref that sets the LAST EDITED IN
; QUASAR field to NOW
;
N ACKTXT,ACKAY1,ACKAY2,ACKAY3,ACKAY7,ACKAY8,ACKAY9,ACKQSEC,ACKARR1
K TARGET
S POST21=+$$PARCP^XPDUTL("POST21") ; VISIT DATE
S POST22=+$$PARCP^XPDUTL("POST22") ; VISIT IEN
S ACKS=+$$PARCP^XPDUTL("POST24")
S ACKM=+$$PARCP^XPDUTL("POST25")
S ACKH=+$$PARCP^XPDUTL("POST26")
;
S ACKTXT(1)=" "
S ACKTXT(2)="Looping through A&SP Clinic Visit File updating all visits with an Appnt."
S ACKTXT(3)="Time and Division value & all visits Procedures with a Volume value."
S ACKTXT(4)=" " D MES^XPDUTL(.ACKTXT) K ACKTXT
;
F S POST21=$O(^ACK(509850.6,"B",POST21)) Q:POST21="" D
. F S POST22=$O(^ACK(509850.6,"B",POST21,POST22)) Q:POST22="" D
. .;
. . S ACKQSEC=$$GET1^DIQ(509850.6,POST22_",",.25,"I")
. . I ACKQSEC'="" D
. . . S ACKARR1(509850.66,"+1,"_POST22_",",.01)=ACKQSEC
. . . D UPDATE^DIE("","ACKARR1","","")
. .;
. . S (ACKDIV,ACKCLIN)=""
. .; Derive Div from clinic
. . S ACKCLIN=$P($G(^ACK(509850.6,POST22,0)),U,6)
. . I ACKCLIN'="" S ACKDIV=$$GET1^DIQ(44,ACKCLIN_",",3.5,"I")
. .;
. .; Keep a list of all Divs with their Clins
. . I ACKCLIN'="",ACKDIV'="" S ^TMP("ACKQIPST","INSTALLV3",ACKDIV,ACKCLIN)=""
. .;---Generate Unique Appnt Time--
. . I ACKS=""!(ACKM="")!(ACKH="") S (ACKS,ACKM,ACKH)=0
. . I ACKS=60 S ACKS="0" S ACKM=+ACKM+1
. . I $L(ACKS)=1 S ACKS="0"_ACKS
. . S ACKTIME=ACKS
. . S ACKS=+ACKS+1
. . ;
. . I ACKM=60 S ACKM=0 S ACKH=+ACKH+1
. . I $L(ACKM)=1 S ACKM="0"_ACKM
. . ;
. . I ACKH=24 S ACKH="0"
. . I $L(ACKH)=1 S ACKH="0"_ACKH
. . S ACKTME="."_ACKH_ACKM_ACKTIME
. . ;
. . S AKAY7=+$$UPCP^XPDUTL("POST24",ACKS)
. . S ACKAY8=+$$UPCP^XPDUTL("POST25",ACKM)
. . S ACKAY9=+$$UPCP^XPDUTL("POST26",ACKH)
. .;---End of Appnt. Time Processing--
. . K ACKARR,TARGET,ERRMSG
. .; Do FM LIST to get all procs within the visit
. . D LIST^DIC(509850.61,","_POST22_",",".01","I","*","","","","","","TARGET","ERRMSG")
. . S POST23="" ;Initalise Proc IEN
. . F S POST23=$O(TARGET("DILIST",2,POST23)) Q:POST23="" D
. . .; Create an update array entry for each proc in the visit
. . . S ACKARR(509850.61,TARGET("DILIST",2,POST23)_","_POST22_",",.03)="1"
. .;
. .; Set update array with Appnt. Time
. . S ACKARR(509850.6,POST22_",",55)=ACKTME
. . D FILE^DIE("K","ACKARR") ;Run FM to update time & vols
. .;
. . K ACKARR ;Kill - Update vals have be updated onto visit file
. .;
. .; Set update array with Derived Div.
. . S ACKARR(509850.6,POST22_",",60)=ACKDIV
. . D FILE^DIE("K","ACKARR")
. . K ACKARR
. . S ACKAY1=+$$UPCP^XPDUTL("POST22",POST22)
. . Q
. S ACKAY2=+$$UPCP^XPDUTL("POST21",POST21)
. Q
;
D BMES^XPDUTL("Update of A&SP Clinic Visit records Complete.")
D BMES^XPDUTL("Temporary file of Clinics and Divisions Created.")
Q
;
PARAMSD ; Update site param file
I ^TMP("ACKQIPST","SKIP") Q ;Virgin Site
;
N ACKAY4
;
; Get Use Local Clin Nos, Use C&P and Bypass Audio values from
; Site level of Site Params file
;
D BMES^XPDUTL("Commencing update of the A&SP Site Parameters file.")
;
D GETS^DIQ(509850.8,1,".05;.07;.08","I","ACK","ERRMSG")
;
S ACKLCN=$G(ACK(509850.8,"1,",.05,"I"))
S ACKCNP=$G(ACK(509850.8,"1,",.07,"I"))
S ACKBAU=$G(ACK(509850.8,"1,",.08,"I"))
;
; Loop thru Div. level of temp. file
;
D BMES^XPDUTL("Looping through Division Level of the Temporary file creating new")
D BMES^XPDUTL("Division entries on the A&SP Site Parameters file.")
;
S POST31=+$$PARCP^XPDUTL("POST31")
F S POST31=$O(^TMP("ACKQIPST","INSTALLV3",POST31)) Q:POST31="" D
. S ACKAY4=+$$UPCP^XPDUTL("POST31",POST31)
.; For each Div. Set a new Div. level entry in Site params
.;
. S DIC="^ACK(509850.8,"_1_",2,"
. S DIC(0)="L"
. S DIC("P")="509850.83P"
. S DA=POST31
. S DA(1)=1
. S X=POST31
. S DINUM=POST31
. D FILE^DICN K DIC,DA
.;
.; Set following vals into new div. level of site params file
.;
. K ACKARR
. S ACKARR(509850.83,POST31_",1,",.02)="I"
. S ACKARR(509850.83,POST31_",1,",.03)="0"
. S ACKARR(509850.83,POST31_",1,",.04)=ACKLCN
. S ACKARR(509850.83,POST31_",1,",.06)=ACKCNP
. S ACKARR(509850.83,POST31_",1,",.07)=ACKBAU
.;
. D FILE^DIE("K","ACKARR")
. K ACKARR
Q
;
PARAMSC ; Loop thru Clins in temp file & add them to the
; relevant Divs.
I ^TMP("ACKQIPST","SKIP") Q ;Virgin Site
;
N ACKAY5,ACKAY6
S POST41=+$$PARCP^XPDUTL("POST41")
S POST42=+$$PARCP^XPDUTL("POST42")
;
D BMES^XPDUTL("Looping through Clinic Level of the Temporary file creating new Clinic")
D BMES^XPDUTL("entries within the Divisions.")
;
F S POST41=$O(^TMP("ACKQIPST","INSTALLV3",POST41)) Q:POST41="" D
. I '$D(^ACK(509850.8,1,2,POST41,0)) D BMES^XPDUTL("Error Setting up Division - "_$$GET1^DIQ(40.8,POST41,.01)) Q
. F S POST42=$O(^TMP("ACKQIPST","INSTALLV3",POST41,POST42)) Q:POST42="" D
. . S ACKAY5=+$$UPCP^XPDUTL("POST42",POST42)
. .; Set each clin into the Clin multiple within the Div.
. .; level of the site params file
. .; If first time thru create clin level
. .;
. . S DIC="^ACK(509850.8,"_1_",2,"_POST41_",1,"
. . S DIC(0)="L"
. . S DIC("P")="509850.831P"
. . S DA=POST42
. . S DA(1)=POST41
. . S DA(2)=1
. . S X=POST42
. . S DINUM=POST42
. . D FILE^DICN K DIC,DA
. S ACKAY6=+$$UPCP^XPDUTL("POST41",POST41)
;
D BMES^XPDUTL("Clinic update complete.")
;
; Set PCE Interface param to False
K ACKARR
S ACKARR(509850.8,1_",",2)="0" D FILE^DIE("K","ACKARR")
D BMES^XPDUTL("Interface to PCE Parameter set to False.")
K DA,DIK
;
K ^TMP("ACKQIPST","INSTALLV3") ; Kill temp Div/Clin file
D BMES^XPDUTL("Site Parameters file Update complete.")
Q
;
OPTN ; Place the SDCLINIC WORKLOAD option on menu.
S X=$$ADD^XPDMENU("ACKQAS REPORTS","SDCLINIC WORKLOAD","",25)
I X D BMES^XPDUTL("The PIMS 'Clinic Workload' report option"),MES^XPDUTL("has been added to the QUASAR 'Reports Menu.'")
I 'X D BMES^XPDUTL("Sorry. I was unable to place the PIMS 'Clinic Workload'"),MES^XPDUTL("report option on the QUASAR 'Reports Menu.'")
K X
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HACKQIPST 9690 printed Nov 22, 2024@17:42:19 Page 2
ACKQIPST ;HCIOFO/BH-Version 3 Post Installation routine ; 04/01/99
+1 ;;3.0;QUASAR;;Feb 11, 2000
+2 ;Per VHA Directive 10-93-142, this routine SHOULD NOT be modified.
+3 ;
+4 NEW ACKTEST
SET ACKTEST=$$GET1^DIQ(509850.8,1,.1,"I")
+5 IF ACKTEST="S"!(ACKTEST="D")
Begin DoDot:1
+6 SET ACKTXT(1)="Installation Routine has already been run."
+7 SET ACKTXT(2)="Therefore will only attempt to add The PIMS 'Clinic Workload' report option"
+8 SET ACKTXT(3)="to the Quasar Reports menu. Will not update CDR Report parameter."
+9 SET ACKTXT(4)=" "
DO MES^XPDUTL(.ACKTXT)
KILL ACKTXT
+10 SET ACKCHK=$$NEWCP^XPDUTL("POST1","OPTN^ACKQIPST")
+11 ; Return to KIDS & let KIDS run the checkpoint.
QUIT
End DoDot:1
QUIT
+12 ;
+13 KILL ^TMP("ACKQIPST","INSTALLV3")
+14 ; Setup chkpoints for KIDS.
+15 ;
+16 NEW ACKCHK
+17 SET ACKCHK=$$NEWCP^XPDUTL("POST1","REPORT^ACKQIPST")
+18 ; Updte Params file with input for CDR report. Virgin
+19 ; site - just set up site level on Params file,set Interface to PCE
+20 ; & CDR param values
+21 ;
+22 SET ACKCHK=$$NEWCP^XPDUTL("POST2","MAIN^ACKQIPST")
+23 ; Update Visit file with Appmnt Time, Div & Proc Vol. Also
+24 ; store Divs and Clins for later update into site params file.
+25 ;
+26 SET ACKCHK=$$NEWCP^XPDUTL("POST21")
+27 ; Keep track of visit date subscript of Visit file B X Ref
+28 ;
+29 SET ACKCHK=$$NEWCP^XPDUTL("POST22")
+30 ; Keep track of visit IEN subscript of Visit file B X Ref
+31 ;
+32 SET ACKCHK=$$NEWCP^XPDUTL("POST24")
+33 ; Keep track of secs within Apnt Time Gen.
+34 ;
+35 SET ACKCHK=$$NEWCP^XPDUTL("POST25")
+36 ; Keep track of mins within Appt Time Gen.
+37 ;
+38 SET ACKCHK=$$NEWCP^XPDUTL("POST26")
+39 ; Keep track of hrs within Appt Time Gen.
+40 ;
+41 SET ACKCHK=$$NEWCP^XPDUTL("POST3","PARAMSD^ACKQIPST")
+42 ; Update Div Values used within the above visits onto the site
+43 ; params file
+44 ;
+45 SET ACKCHK=$$NEWCP^XPDUTL("POST31")
+46 ; Keep track of Divs within the Temp global of Divs & Clins
+47 ;
+48 SET ACKCHK=$$NEWCP^XPDUTL("POST4","PARAMSC^ACKQIPST")
+49 ; Update Clin Vals used within the above visits onto the site
+50 ; params file
+51 ;
+52 SET ACKCHK=$$NEWCP^XPDUTL("POST41")
+53 ; Keep track of Divs within the Temp global of Divs & Clins
+54 ;
+55 SET ACKCHK=$$NEWCP^XPDUTL("POST42")
+56 ; Keep track of Clins within the Temp global of Divs & Clins
+57 ;
+58 SET ACKCHK=$$NEWCP^XPDUTL("POST5","OPTN^ACKQIPST")
+59 SET ACKCHK=$$NEWCP^XPDUTL("POST6","STAFF^ACKQIPS1")
+60 ;
+61 ;Return to KIDS & let KIDS run the checkpoints.
QUIT
+62 ;
REPORT ; Virgin Install : set up the .01 node
+1 ; Update CDR Report param
+2 ;
+3 SET ^TMP("ACKQIPST","SKIP")="0"
+4 IF $$GET1^DIQ(509850.8,1,.01)=""
Begin DoDot:1
+5 ; Keep note of Skip
SET ^TMP("ACKQIPST","SKIP")="1"
+6 SET DIC="^ACK(509850.8,"
SET DIC(0)="L"
SET DLAYGO=509850.8
SET ACKLAYGO=""
SET DINUM=1
+7 ; Do a FM call to set up Site .01 level
SET X="1"
DO FILE^DICN
+8 ;
+9 DO BMES^XPDUTL("Virgin Install - Site level being created on A&SP Site Parameters file.")
+10 ;
+11 KILL ACKARR
+12 SET ACKARR(509850.8,1_",",2)="0"
DO FILE^DIE("K","ACKARR")
+13 DO BMES^XPDUTL("Interface to PCE Parameter set to 'NO'.")
+14 KILL DA,DIK,ACKARR
End DoDot:1
+15 ;
+16 IF '$DATA(XPDQUES("POS1"))
Begin DoDot:1
+17 DO BMES^XPDUTL("CDR Report parameter not entered - Install will use default value of 'Site'.")
+18 SET XPDQUES("POS1")="S"
QUIT
End DoDot:1
+19 ;
+20 NEW ACKARR
+21 SET ACKARR(509850.8,1_",",.1)=XPDQUES("POS1")
DO FILE^DIE("K","ACKARR")
+22 DO BMES^XPDUTL("CDR Report Parameter updated.")
+23 KILL DA,DIK
+24 QUIT
+25 ;
MAIN ; Virgin Site
IF ^TMP("ACKQIPST","SKIP")
QUIT
+1 ;
+2 ; Loop thru the B X ref
+3 ; Clin val is used to get a Div value
+4 ; A unique time is gererated
+5 ; Updates Procs new Vol field with 1
+6 ; Appt. Time & the vols are updated within one FM call
+7 ; Divn is updated last
+8 ; All the above fields run X ref that sets the LAST EDITED IN
+9 ; QUASAR field to NOW
+10 ;
+11 NEW ACKTXT,ACKAY1,ACKAY2,ACKAY3,ACKAY7,ACKAY8,ACKAY9,ACKQSEC,ACKARR1
+12 KILL TARGET
+13 ; VISIT DATE
SET POST21=+$$PARCP^XPDUTL("POST21")
+14 ; VISIT IEN
SET POST22=+$$PARCP^XPDUTL("POST22")
+15 SET ACKS=+$$PARCP^XPDUTL("POST24")
+16 SET ACKM=+$$PARCP^XPDUTL("POST25")
+17 SET ACKH=+$$PARCP^XPDUTL("POST26")
+18 ;
+19 SET ACKTXT(1)=" "
+20 SET ACKTXT(2)="Looping through A&SP Clinic Visit File updating all visits with an Appnt."
+21 SET ACKTXT(3)="Time and Division value & all visits Procedures with a Volume value."
+22 SET ACKTXT(4)=" "
DO MES^XPDUTL(.ACKTXT)
KILL ACKTXT
+23 ;
+24 FOR
SET POST21=$ORDER(^ACK(509850.6,"B",POST21))
if POST21=""
QUIT
Begin DoDot:1
+25 FOR
SET POST22=$ORDER(^ACK(509850.6,"B",POST21,POST22))
if POST22=""
QUIT
Begin DoDot:2
+26 ;
+27 SET ACKQSEC=$$GET1^DIQ(509850.6,POST22_",",.25,"I")
+28 IF ACKQSEC'=""
Begin DoDot:3
+29 SET ACKARR1(509850.66,"+1,"_POST22_",",.01)=ACKQSEC
+30 DO UPDATE^DIE("","ACKARR1","","")
End DoDot:3
+31 ;
+32 SET (ACKDIV,ACKCLIN)=""
+33 ; Derive Div from clinic
+34 SET ACKCLIN=$PIECE($GET(^ACK(509850.6,POST22,0)),U,6)
+35 IF ACKCLIN'=""
SET ACKDIV=$$GET1^DIQ(44,ACKCLIN_",",3.5,"I")
+36 ;
+37 ; Keep a list of all Divs with their Clins
+38 IF ACKCLIN'=""
IF ACKDIV'=""
SET ^TMP("ACKQIPST","INSTALLV3",ACKDIV,ACKCLIN)=""
+39 ;---Generate Unique Appnt Time--
+40 IF ACKS=""!(ACKM="")!(ACKH="")
SET (ACKS,ACKM,ACKH)=0
+41 IF ACKS=60
SET ACKS="0"
SET ACKM=+ACKM+1
+42 IF $LENGTH(ACKS)=1
SET ACKS="0"_ACKS
+43 SET ACKTIME=ACKS
+44 SET ACKS=+ACKS+1
+45 ;
+46 IF ACKM=60
SET ACKM=0
SET ACKH=+ACKH+1
+47 IF $LENGTH(ACKM)=1
SET ACKM="0"_ACKM
+48 ;
+49 IF ACKH=24
SET ACKH="0"
+50 IF $LENGTH(ACKH)=1
SET ACKH="0"_ACKH
+51 SET ACKTME="."_ACKH_ACKM_ACKTIME
+52 ;
+53 SET AKAY7=+$$UPCP^XPDUTL("POST24",ACKS)
+54 SET ACKAY8=+$$UPCP^XPDUTL("POST25",ACKM)
+55 SET ACKAY9=+$$UPCP^XPDUTL("POST26",ACKH)
+56 ;---End of Appnt. Time Processing--
+57 KILL ACKARR,TARGET,ERRMSG
+58 ; Do FM LIST to get all procs within the visit
+59 DO LIST^DIC(509850.61,","_POST22_",",".01","I","*","","","","","","TARGET","ERRMSG")
+60 ;Initalise Proc IEN
SET POST23=""
+61 FOR
SET POST23=$ORDER(TARGET("DILIST",2,POST23))
if POST23=""
QUIT
Begin DoDot:3
+62 ; Create an update array entry for each proc in the visit
+63 SET ACKARR(509850.61,TARGET("DILIST",2,POST23)_","_POST22_",",.03)="1"
End DoDot:3
+64 ;
+65 ; Set update array with Appnt. Time
+66 SET ACKARR(509850.6,POST22_",",55)=ACKTME
+67 ;Run FM to update time & vols
DO FILE^DIE("K","ACKARR")
+68 ;
+69 ;Kill - Update vals have be updated onto visit file
KILL ACKARR
+70 ;
+71 ; Set update array with Derived Div.
+72 SET ACKARR(509850.6,POST22_",",60)=ACKDIV
+73 DO FILE^DIE("K","ACKARR")
+74 KILL ACKARR
+75 SET ACKAY1=+$$UPCP^XPDUTL("POST22",POST22)
+76 QUIT
End DoDot:2
+77 SET ACKAY2=+$$UPCP^XPDUTL("POST21",POST21)
+78 QUIT
End DoDot:1
+79 ;
+80 DO BMES^XPDUTL("Update of A&SP Clinic Visit records Complete.")
+81 DO BMES^XPDUTL("Temporary file of Clinics and Divisions Created.")
+82 QUIT
+83 ;
PARAMSD ; Update site param file
+1 ;Virgin Site
IF ^TMP("ACKQIPST","SKIP")
QUIT
+2 ;
+3 NEW ACKAY4
+4 ;
+5 ; Get Use Local Clin Nos, Use C&P and Bypass Audio values from
+6 ; Site level of Site Params file
+7 ;
+8 DO BMES^XPDUTL("Commencing update of the A&SP Site Parameters file.")
+9 ;
+10 DO GETS^DIQ(509850.8,1,".05;.07;.08","I","ACK","ERRMSG")
+11 ;
+12 SET ACKLCN=$GET(ACK(509850.8,"1,",.05,"I"))
+13 SET ACKCNP=$GET(ACK(509850.8,"1,",.07,"I"))
+14 SET ACKBAU=$GET(ACK(509850.8,"1,",.08,"I"))
+15 ;
+16 ; Loop thru Div. level of temp. file
+17 ;
+18 DO BMES^XPDUTL("Looping through Division Level of the Temporary file creating new")
+19 DO BMES^XPDUTL("Division entries on the A&SP Site Parameters file.")
+20 ;
+21 SET POST31=+$$PARCP^XPDUTL("POST31")
+22 FOR
SET POST31=$ORDER(^TMP("ACKQIPST","INSTALLV3",POST31))
if POST31=""
QUIT
Begin DoDot:1
+23 SET ACKAY4=+$$UPCP^XPDUTL("POST31",POST31)
+24 ; For each Div. Set a new Div. level entry in Site params
+25 ;
+26 SET DIC="^ACK(509850.8,"_1_",2,"
+27 SET DIC(0)="L"
+28 SET DIC("P")="509850.83P"
+29 SET DA=POST31
+30 SET DA(1)=1
+31 SET X=POST31
+32 SET DINUM=POST31
+33 DO FILE^DICN
KILL DIC,DA
+34 ;
+35 ; Set following vals into new div. level of site params file
+36 ;
+37 KILL ACKARR
+38 SET ACKARR(509850.83,POST31_",1,",.02)="I"
+39 SET ACKARR(509850.83,POST31_",1,",.03)="0"
+40 SET ACKARR(509850.83,POST31_",1,",.04)=ACKLCN
+41 SET ACKARR(509850.83,POST31_",1,",.06)=ACKCNP
+42 SET ACKARR(509850.83,POST31_",1,",.07)=ACKBAU
+43 ;
+44 DO FILE^DIE("K","ACKARR")
+45 KILL ACKARR
End DoDot:1
+46 QUIT
+47 ;
PARAMSC ; Loop thru Clins in temp file & add them to the
+1 ; relevant Divs.
+2 ;Virgin Site
IF ^TMP("ACKQIPST","SKIP")
QUIT
+3 ;
+4 NEW ACKAY5,ACKAY6
+5 SET POST41=+$$PARCP^XPDUTL("POST41")
+6 SET POST42=+$$PARCP^XPDUTL("POST42")
+7 ;
+8 DO BMES^XPDUTL("Looping through Clinic Level of the Temporary file creating new Clinic")
+9 DO BMES^XPDUTL("entries within the Divisions.")
+10 ;
+11 FOR
SET POST41=$ORDER(^TMP("ACKQIPST","INSTALLV3",POST41))
if POST41=""
QUIT
Begin DoDot:1
+12 IF '$DATA(^ACK(509850.8,1,2,POST41,0))
DO BMES^XPDUTL("Error Setting up Division - "_$$GET1^DIQ(40.8,POST41,.01))
QUIT
+13 FOR
SET POST42=$ORDER(^TMP("ACKQIPST","INSTALLV3",POST41,POST42))
if POST42=""
QUIT
Begin DoDot:2
+14 SET ACKAY5=+$$UPCP^XPDUTL("POST42",POST42)
+15 ; Set each clin into the Clin multiple within the Div.
+16 ; level of the site params file
+17 ; If first time thru create clin level
+18 ;
+19 SET DIC="^ACK(509850.8,"_1_",2,"_POST41_",1,"
+20 SET DIC(0)="L"
+21 SET DIC("P")="509850.831P"
+22 SET DA=POST42
+23 SET DA(1)=POST41
+24 SET DA(2)=1
+25 SET X=POST42
+26 SET DINUM=POST42
+27 DO FILE^DICN
KILL DIC,DA
End DoDot:2
+28 SET ACKAY6=+$$UPCP^XPDUTL("POST41",POST41)
End DoDot:1
+29 ;
+30 DO BMES^XPDUTL("Clinic update complete.")
+31 ;
+32 ; Set PCE Interface param to False
+33 KILL ACKARR
+34 SET ACKARR(509850.8,1_",",2)="0"
DO FILE^DIE("K","ACKARR")
+35 DO BMES^XPDUTL("Interface to PCE Parameter set to False.")
+36 KILL DA,DIK
+37 ;
+38 ; Kill temp Div/Clin file
KILL ^TMP("ACKQIPST","INSTALLV3")
+39 DO BMES^XPDUTL("Site Parameters file Update complete.")
+40 QUIT
+41 ;
OPTN ; Place the SDCLINIC WORKLOAD option on menu.
+1 SET X=$$ADD^XPDMENU("ACKQAS REPORTS","SDCLINIC WORKLOAD","",25)
+2 IF X
DO BMES^XPDUTL("The PIMS 'Clinic Workload' report option")
DO MES^XPDUTL("has been added to the QUASAR 'Reports Menu.'")
+3 IF 'X
DO BMES^XPDUTL("Sorry. I was unable to place the PIMS 'Clinic Workload'")
DO MES^XPDUTL("report option on the QUASAR 'Reports Menu.'")
+4 KILL X
+5 QUIT
+6 ;