ORY519 ;ISP/LMT - OR*3*519 Post-Install ;Oct 15, 2020@08:13:25
;;3.0;ORDER ENTRY/RESULTS REPORTING;**519**;Dec 17, 1997;Build 36
;
; This routine uses the following ICRs:
; #7129 - File #18.12 (private)
; 4478 - File 8925.1, Field .04 (private)
;
Q
;
POST ;
;
; ZEXCEPT: XPDQUES
N ORPDMPPORT,ORPDMPSERVER,ORPDMPUN,ORPDMPPW,ORSSLCONFIG
;
; Set Parameter Values
D SETPARAM
;
; Setup web services
S ORPDMPSERVER=$$TRIM^XLFSTR($G(XPDQUES("POST1SERVER")))
S ORPDMPPORT=$$TRIM^XLFSTR($G(XPDQUES("POST2PORT")))
S ORPDMPUN=$$TRIM^XLFSTR($G(XPDQUES("POST3UN")))
S ORPDMPPW=$G(XPDQUES("POST4PW"))
S ORSSLCONFIG=$$TRIM^XLFSTR($G(XPDQUES("POST5SSLCONFIG")))
D WSSETUP(ORPDMPSERVER,ORPDMPPORT,ORPDMPUN,ORPDMPPW,ORSSLCONFIG)
;
D DLGBULL
;
Q
;
;
SETPARAM ;
;
N ORERR,ORPAR,ORVAL,ORINST,ORX
;
S ORPAR="OR PDMP REVIEW FORM"
;
S ORVAL="Delegate Review Form"
S ORVAL(1,0)="LBL^Last prior PDMP query was completed on |LASTDATE|.^black;1^^Center"
S ORVAL(2,0)=" "
S ORVAL(3,0)="RB^No prescription(s) for controlled substances outside the VA were found "
S ORVAL(4,0)="in the last |DAYS| days.^0"
S ORVAL(5,0)=" "
S ORVAL(6,0)="RB^Prescription(s) which have been filled outside the VA in the last "
S ORVAL(7,0)="|DAYS| days are noted.^0^Please be sure to record any active/chronic"
S ORVAL(8,0)="medications discovered from PDMP query in the ""Non-VA Medications"" "
S ORVAL(9,0)="section of the ""Meds"" Tab in CPRS."
D SETPARVAL(ORPAR,"D","PKG",.ORVAL)
;
S ORVAL="Provider Review Form"
S ORVAL(1,0)="LBL^Last prior PDMP query was completed on |LASTDATE|.^black;1^^Center"
S ORVAL(2,0)=" "
S ORVAL(3,0)="RB^No prescription(s) for controlled substances outside the VA were found "
S ORVAL(4,0)="in the last |DAYS| days.^0"
S ORVAL(5,0)=" "
S ORVAL(6,0)="RB^Prescription(s) filled outside the VA in the last |DAYS| days are "
S ORVAL(7,0)="noted. However, they do not raise significant safety concerns and do not "
S ORVAL(8,0)="influence the treatment plan at this time.^0^Please be sure to record any "
S ORVAL(9,0)="active/chronic medications discovered from PDMP query in the ""Non-VA"
S ORVAL(10,0)="Medications"" section of the ""Meds"" Tab in CPRS."
S ORVAL(11,0)=" "
S ORVAL(12,0)="RB^Prescription(s) filled outside the VA in the last |DAYS| days are "
S ORVAL(13,0)="noted. Safety concerns will be discussed with the patient and documented "
S ORVAL(14,0)="as part of ongoing treatment planning.^0^Please be sure to record any"
S ORVAL(15,0)="active/chronic medications discovered from PDMP query in the ""Non-VA"
S ORVAL(16,0)="Medications"" section of the ""Meds"" Tab in CPRS."
S ORVAL(17,0)=" "
S ORVAL(18,0)="RB^Prescription(s) filled outside the VA are noted and will be addressed "
S ORVAL(19,0)="as follows:^1^Please be sure to record any active/chronic medications"
S ORVAL(20,0)="discovered from PDMP query in the ""Non-VA Medications"" section of the"
S ORVAL(21,0)="""Meds"" Tab in CPRS."
D SETPARVAL(ORPAR,"P","PKG",.ORVAL)
;
S ORPAR="OR PDMP NOTE TEXT"
;
S ORVAL="Reason Text"
S ORVAL(1,0)="The clinical justification for this PDMP query is to review controlled "
S ORVAL(2,0)="substances prescribed outside of the VA, and any additional information "
S ORVAL(3,0)="that may become available, as an important component of standard clinical "
S ORVAL(4,0)="care, and in accordance with VHA policy."
D SETPARVAL(ORPAR,"R","PKG",.ORVAL)
;
S ORVAL="Canned Delegate Statement"
S ORVAL(1,0)="The VA prescriber, for which I am a delegate, will be alerted of these"
S ORVAL(2,0)="PDMP findings through co-signature of this progress note."
D SETPARVAL(ORPAR,"CD","PKG",.ORVAL)
;
S ORVAL="Disclosure Text"
S ORVAL(1,0)="Patient information was shared with the PDMP Appriss Gateway."
D SETPARVAL(ORPAR,"D","PKG",.ORVAL)
;
S ORVAL="Error Text"
S ORVAL(1,0)="An error occurred attempting to communicate with the Prescription Drug"
S ORVAL(2,0)="Monitoring Program Clearinghouse. "
S ORVAL(3,0)="Error information:"
D SETPARVAL(ORPAR,"E","PKG",.ORVAL)
;
S ORVAL="No Data Text"
S ORVAL(1,0)="No patient data was returned from the PDMP Clearinghouse."
D SETPARVAL(ORPAR,"N","PKG",.ORVAL)
;
S ORPAR="OR PDMP DISCLOSED TO"
S ORVAL="PDMP Appriss Gateway"
D SETPARVAL(ORPAR,"A","PKG",ORVAL)
S ORVAL="State PDMP"
D SETPARVAL(ORPAR,"M","PKG",ORVAL)
;
S ORPAR="OR PDMP BACKGROUND RETRIEVAL"
S ORVAL="YES"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP COMMENT LIMIT"
S ORVAL=250
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP COPY/PASTE ENABLED"
S ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP DAYS BETWEEN REVIEWS"
S ORVAL=90
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP DELEGATION ENABLED"
S ORVAL="YES"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP NOTE TITLE"
S ORVAL=$$FIND1^DIC(8925.1,"","X","STATE PRESCRIPTION DRUG MONITORING PROGRAM","","I $P(^(0),U,4)=""DOC""","ORERR") ;ICR 4478
I ORVAL<1 D BMES("Error. Could not find 'STATE PRESCRIPTION DRUG MONITORING PROGRAM' doc.")
I ORVAL>0 D
. S ORVAL="`"_ORVAL
. D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP OPEN TIMEOUT"
S ORVAL=10
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP POLLING INTERVAL"
S ORVAL=2
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP SHOW BUTTON"
S ORVAL="ALWAYS"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP TIME TO CACHE URL"
S ORVAL=12
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP TIMEOUT QUERY"
S ORVAL=300
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP TURN ON"
S ORVAL="YES"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP USE DEFAULT BROWSER"
S ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="OR PDMP PERSON CLASS"
S ORINST=0
F ORX="V090100","V090110","V090107","V090102","V090103","V090106","V090111","V090104","V090105","V090109","V090108","V090301","V090302","V090303" D
. S ORINST=ORINST+1
. S ORVAL=ORX
. D SETPARVAL(ORPAR,ORINST,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST/CTB FEATURE SWITCH",ORVAL="OFF"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST/CTB FEATURE SWITCH",ORVAL="OFF"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB ORDER CNSLT",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB RECEIVE",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB SCHEDULE",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB CANCEL",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB EDITRES",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB DC",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB FORWARD",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB COMMENT",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB SIGFIND",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB ADMIN COMP",ORVAL="NO"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST TEST URL",ORVAL="https://dst-beta.domain.ext"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST PROD URL",ORVAL="https://dst.domain.ext"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST CONS DECISION",ORVAL="/cprs-api/v2/dst-decision/"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST CONS SAVE",ORVAL="/cprs-api/v2/consult/save"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN CTB PATH",ORVAL="/ctb/"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
S ORPAR="ORQQCN DST PATH",ORVAL="/v2/"
D SETPARVAL(ORPAR,1,"PKG",.ORVAL)
;
Q
;
;
SETPARVAL(ORPAR,ORINST,ORENT,ORVAL) ;
;
N ORERR
;
D BMES("Setting "_$G(ORENT)_" value for parameter "_ORPAR_" ("_ORINST_")...")
;
D EN^XPAR(ORENT,ORPAR,ORINST,.ORVAL,.ORERR)
K ORVAL
I +$G(ORERR)>0 D MES(" ERROR #"_$P(ORERR,U)_": "_$P(ORERR,U,2)) Q
D MES(" DONE")
;
Q
;
;
WSSETUP(ORPDMPSERVER,ORPDMPPORT,ORPDMPUN,ORPDMPPW,ORSSLCONFIG) ;
;
N ORERRMSG,ORFDA,ORIENS,ORNAME
;
D BMES("Setting up Web Service Entries...")
;
I $G(ORPDMPSERVER)="" D Q
. D MES("Skipping... Web Server Name not defined")
I $G(ORPDMPPORT)="" D Q
. D MES("Skipping... Port Number not defined")
I $G(ORPDMPUN)="" D Q
. D MES("Skipping... Username not defined")
I $G(ORPDMPPW)="" D Q
. D MES("Skipping... Password not defined")
I $G(ORSSLCONFIG)="" D Q
. D MES("Skipping... SSL Config not defined")
;
; Create Web service Entry
D REGREST^XOBWLIB("PDMP WEB SERVICE","csp/resthsb/pdmp/PDMP.API.REST")
;
; Create Web Server
S ORNAME="PDMP SERVER"
I '$$PROD^XUPROD S ORNAME="PDMP TEST SERVER"
S ORIENS="?+1,"
S ORFDA(18.12,ORIENS,.01)=ORNAME ; NAME
S ORFDA(18.12,ORIENS,.04)=ORPDMPSERVER ; SERVER
S ORFDA(18.12,ORIENS,.06)="ENABLED" ; STATUS 1-ENABLED / 0-DISABLED
S ORFDA(18.12,ORIENS,.07)=180 ; DEFAULT HTTP TIMEOUT
S ORFDA(18.12,ORIENS,1.01)="YES" ; LOGIN REQUIRED
S ORFDA(18.12,ORIENS,3.01)="TRUE" ; SSL ENABLED
S ORFDA(18.12,ORIENS,3.02)=ORSSLCONFIG ; SSL CONFIGURATION
S ORFDA(18.12,ORIENS,3.03)=ORPDMPPORT ; SSL PORT
S ORFDA(18.12,ORIENS,200)=ORPDMPUN ; USERNAME
S ORFDA(18.12,ORIENS,300)=ORPDMPPW ; PASSWORD
;
S ORIENS="?+2,"_ORIENS
S ORFDA(18.121,ORIENS,.01)="PDMP WEB SERVICE"
S ORFDA(18.121,ORIENS,.06)="ENABLED"
;
D UPDATE^DIE("EU","ORFDA","ORIENROOT") ; ICR 7129
;
I $D(^TMP("DIERR",$J)) D
. D MES("The following errors occurred:")
. D MSG^DIALOG("AE",.ORERRMSG)
. D MES^XPDUTL(.ORERRMSG)
;
Q
;
;
BMES(STR) ;
; Write string
D BMES^XPDUTL($$TRIM^XLFSTR($$CJ^XLFSTR(STR,$G(IOM,80)),"R"," "))
Q
MES(STR) ;
; Write string
D MES^XPDUTL($$TRIM^XLFSTR($$CJ^XLFSTR(STR,$G(IOM,80)),"R"," "))
Q
SENDDLG(ANAME) ;Return true if the current order dialog should be sent
I ANAME="GMRCOR CONSULT" Q 1
I ANAME="OR GTX DST ID" Q 1
I ANAME="OR GTX DST STATUS MSG" Q 1
Q 0
;
DLGBULL ;Send bulletin about modified dialogs (on first install)
N ORD
S ORD("GMRCOR CONSULT")=""
D EN^ORYDLG(519,.ORD)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY519 10514 printed Nov 22, 2024@17:52:25 Page 2
ORY519 ;ISP/LMT - OR*3*519 Post-Install ;Oct 15, 2020@08:13:25
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**519**;Dec 17, 1997;Build 36
+2 ;
+3 ; This routine uses the following ICRs:
+4 ; #7129 - File #18.12 (private)
+5 ; 4478 - File 8925.1, Field .04 (private)
+6 ;
+7 QUIT
+8 ;
POST ;
+1 ;
+2 ; ZEXCEPT: XPDQUES
+3 NEW ORPDMPPORT,ORPDMPSERVER,ORPDMPUN,ORPDMPPW,ORSSLCONFIG
+4 ;
+5 ; Set Parameter Values
+6 DO SETPARAM
+7 ;
+8 ; Setup web services
+9 SET ORPDMPSERVER=$$TRIM^XLFSTR($GET(XPDQUES("POST1SERVER")))
+10 SET ORPDMPPORT=$$TRIM^XLFSTR($GET(XPDQUES("POST2PORT")))
+11 SET ORPDMPUN=$$TRIM^XLFSTR($GET(XPDQUES("POST3UN")))
+12 SET ORPDMPPW=$GET(XPDQUES("POST4PW"))
+13 SET ORSSLCONFIG=$$TRIM^XLFSTR($GET(XPDQUES("POST5SSLCONFIG")))
+14 DO WSSETUP(ORPDMPSERVER,ORPDMPPORT,ORPDMPUN,ORPDMPPW,ORSSLCONFIG)
+15 ;
+16 DO DLGBULL
+17 ;
+18 QUIT
+19 ;
+20 ;
SETPARAM ;
+1 ;
+2 NEW ORERR,ORPAR,ORVAL,ORINST,ORX
+3 ;
+4 SET ORPAR="OR PDMP REVIEW FORM"
+5 ;
+6 SET ORVAL="Delegate Review Form"
+7 SET ORVAL(1,0)="LBL^Last prior PDMP query was completed on |LASTDATE|.^black;1^^Center"
+8 SET ORVAL(2,0)=" "
+9 SET ORVAL(3,0)="RB^No prescription(s) for controlled substances outside the VA were found "
+10 SET ORVAL(4,0)="in the last |DAYS| days.^0"
+11 SET ORVAL(5,0)=" "
+12 SET ORVAL(6,0)="RB^Prescription(s) which have been filled outside the VA in the last "
+13 SET ORVAL(7,0)="|DAYS| days are noted.^0^Please be sure to record any active/chronic"
+14 SET ORVAL(8,0)="medications discovered from PDMP query in the ""Non-VA Medications"" "
+15 SET ORVAL(9,0)="section of the ""Meds"" Tab in CPRS."
+16 DO SETPARVAL(ORPAR,"D","PKG",.ORVAL)
+17 ;
+18 SET ORVAL="Provider Review Form"
+19 SET ORVAL(1,0)="LBL^Last prior PDMP query was completed on |LASTDATE|.^black;1^^Center"
+20 SET ORVAL(2,0)=" "
+21 SET ORVAL(3,0)="RB^No prescription(s) for controlled substances outside the VA were found "
+22 SET ORVAL(4,0)="in the last |DAYS| days.^0"
+23 SET ORVAL(5,0)=" "
+24 SET ORVAL(6,0)="RB^Prescription(s) filled outside the VA in the last |DAYS| days are "
+25 SET ORVAL(7,0)="noted. However, they do not raise significant safety concerns and do not "
+26 SET ORVAL(8,0)="influence the treatment plan at this time.^0^Please be sure to record any "
+27 SET ORVAL(9,0)="active/chronic medications discovered from PDMP query in the ""Non-VA"
+28 SET ORVAL(10,0)="Medications"" section of the ""Meds"" Tab in CPRS."
+29 SET ORVAL(11,0)=" "
+30 SET ORVAL(12,0)="RB^Prescription(s) filled outside the VA in the last |DAYS| days are "
+31 SET ORVAL(13,0)="noted. Safety concerns will be discussed with the patient and documented "
+32 SET ORVAL(14,0)="as part of ongoing treatment planning.^0^Please be sure to record any"
+33 SET ORVAL(15,0)="active/chronic medications discovered from PDMP query in the ""Non-VA"
+34 SET ORVAL(16,0)="Medications"" section of the ""Meds"" Tab in CPRS."
+35 SET ORVAL(17,0)=" "
+36 SET ORVAL(18,0)="RB^Prescription(s) filled outside the VA are noted and will be addressed "
+37 SET ORVAL(19,0)="as follows:^1^Please be sure to record any active/chronic medications"
+38 SET ORVAL(20,0)="discovered from PDMP query in the ""Non-VA Medications"" section of the"
+39 SET ORVAL(21,0)="""Meds"" Tab in CPRS."
+40 DO SETPARVAL(ORPAR,"P","PKG",.ORVAL)
+41 ;
+42 SET ORPAR="OR PDMP NOTE TEXT"
+43 ;
+44 SET ORVAL="Reason Text"
+45 SET ORVAL(1,0)="The clinical justification for this PDMP query is to review controlled "
+46 SET ORVAL(2,0)="substances prescribed outside of the VA, and any additional information "
+47 SET ORVAL(3,0)="that may become available, as an important component of standard clinical "
+48 SET ORVAL(4,0)="care, and in accordance with VHA policy."
+49 DO SETPARVAL(ORPAR,"R","PKG",.ORVAL)
+50 ;
+51 SET ORVAL="Canned Delegate Statement"
+52 SET ORVAL(1,0)="The VA prescriber, for which I am a delegate, will be alerted of these"
+53 SET ORVAL(2,0)="PDMP findings through co-signature of this progress note."
+54 DO SETPARVAL(ORPAR,"CD","PKG",.ORVAL)
+55 ;
+56 SET ORVAL="Disclosure Text"
+57 SET ORVAL(1,0)="Patient information was shared with the PDMP Appriss Gateway."
+58 DO SETPARVAL(ORPAR,"D","PKG",.ORVAL)
+59 ;
+60 SET ORVAL="Error Text"
+61 SET ORVAL(1,0)="An error occurred attempting to communicate with the Prescription Drug"
+62 SET ORVAL(2,0)="Monitoring Program Clearinghouse. "
+63 SET ORVAL(3,0)="Error information:"
+64 DO SETPARVAL(ORPAR,"E","PKG",.ORVAL)
+65 ;
+66 SET ORVAL="No Data Text"
+67 SET ORVAL(1,0)="No patient data was returned from the PDMP Clearinghouse."
+68 DO SETPARVAL(ORPAR,"N","PKG",.ORVAL)
+69 ;
+70 SET ORPAR="OR PDMP DISCLOSED TO"
+71 SET ORVAL="PDMP Appriss Gateway"
+72 DO SETPARVAL(ORPAR,"A","PKG",ORVAL)
+73 SET ORVAL="State PDMP"
+74 DO SETPARVAL(ORPAR,"M","PKG",ORVAL)
+75 ;
+76 SET ORPAR="OR PDMP BACKGROUND RETRIEVAL"
+77 SET ORVAL="YES"
+78 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+79 ;
+80 SET ORPAR="OR PDMP COMMENT LIMIT"
+81 SET ORVAL=250
+82 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+83 ;
+84 SET ORPAR="OR PDMP COPY/PASTE ENABLED"
+85 SET ORVAL="NO"
+86 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+87 ;
+88 SET ORPAR="OR PDMP DAYS BETWEEN REVIEWS"
+89 SET ORVAL=90
+90 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+91 ;
+92 SET ORPAR="OR PDMP DELEGATION ENABLED"
+93 SET ORVAL="YES"
+94 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+95 ;
+96 SET ORPAR="OR PDMP NOTE TITLE"
+97 ;ICR 4478
SET ORVAL=$$FIND1^DIC(8925.1,"","X","STATE PRESCRIPTION DRUG MONITORING PROGRAM","","I $P(^(0),U,4)=""DOC""","ORERR")
+98 IF ORVAL<1
DO BMES("Error. Could not find 'STATE PRESCRIPTION DRUG MONITORING PROGRAM' doc.")
+99 IF ORVAL>0
Begin DoDot:1
+100 SET ORVAL="`"_ORVAL
+101 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
End DoDot:1
+102 ;
+103 SET ORPAR="OR PDMP OPEN TIMEOUT"
+104 SET ORVAL=10
+105 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+106 ;
+107 SET ORPAR="OR PDMP POLLING INTERVAL"
+108 SET ORVAL=2
+109 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+110 ;
+111 SET ORPAR="OR PDMP SHOW BUTTON"
+112 SET ORVAL="ALWAYS"
+113 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+114 ;
+115 SET ORPAR="OR PDMP TIME TO CACHE URL"
+116 SET ORVAL=12
+117 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+118 ;
+119 SET ORPAR="OR PDMP TIMEOUT QUERY"
+120 SET ORVAL=300
+121 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+122 ;
+123 SET ORPAR="OR PDMP TURN ON"
+124 SET ORVAL="YES"
+125 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+126 ;
+127 SET ORPAR="OR PDMP USE DEFAULT BROWSER"
+128 SET ORVAL="NO"
+129 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+130 ;
+131 SET ORPAR="OR PDMP PERSON CLASS"
+132 SET ORINST=0
+133 FOR ORX="V090100","V090110","V090107","V090102","V090103","V090106","V090111","V090104","V090105","V090109","V090108","V090301","V090302","V090303"
Begin DoDot:1
+134 SET ORINST=ORINST+1
+135 SET ORVAL=ORX
+136 DO SETPARVAL(ORPAR,ORINST,"PKG",.ORVAL)
End DoDot:1
+137 ;
+138 SET ORPAR="ORQQCN DST/CTB FEATURE SWITCH"
SET ORVAL="OFF"
+139 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+140 ;
+141 SET ORPAR="ORQQCN DST/CTB FEATURE SWITCH"
SET ORVAL="OFF"
+142 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+143 ;
+144 SET ORPAR="ORQQCN CTB ORDER CNSLT"
SET ORVAL="NO"
+145 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+146 ;
+147 SET ORPAR="ORQQCN CTB RECEIVE"
SET ORVAL="NO"
+148 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+149 ;
+150 SET ORPAR="ORQQCN CTB SCHEDULE"
SET ORVAL="NO"
+151 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+152 ;
+153 SET ORPAR="ORQQCN CTB CANCEL"
SET ORVAL="NO"
+154 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+155 ;
+156 SET ORPAR="ORQQCN CTB EDITRES"
SET ORVAL="NO"
+157 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+158 ;
+159 SET ORPAR="ORQQCN CTB DC"
SET ORVAL="NO"
+160 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+161 ;
+162 SET ORPAR="ORQQCN CTB FORWARD"
SET ORVAL="NO"
+163 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+164 ;
+165 SET ORPAR="ORQQCN CTB COMMENT"
SET ORVAL="NO"
+166 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+167 ;
+168 SET ORPAR="ORQQCN CTB SIGFIND"
SET ORVAL="NO"
+169 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+170 ;
+171 SET ORPAR="ORQQCN CTB ADMIN COMP"
SET ORVAL="NO"
+172 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+173 ;
+174 SET ORPAR="ORQQCN DST TEST URL"
SET ORVAL="https://dst-beta.domain.ext"
+175 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+176 ;
+177 SET ORPAR="ORQQCN DST PROD URL"
SET ORVAL="https://dst.domain.ext"
+178 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+179 ;
+180 SET ORPAR="ORQQCN DST CONS DECISION"
SET ORVAL="/cprs-api/v2/dst-decision/"
+181 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+182 ;
+183 SET ORPAR="ORQQCN DST CONS SAVE"
SET ORVAL="/cprs-api/v2/consult/save"
+184 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+185 ;
+186 SET ORPAR="ORQQCN CTB PATH"
SET ORVAL="/ctb/"
+187 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+188 ;
+189 SET ORPAR="ORQQCN DST PATH"
SET ORVAL="/v2/"
+190 DO SETPARVAL(ORPAR,1,"PKG",.ORVAL)
+191 ;
+192 QUIT
+193 ;
+194 ;
SETPARVAL(ORPAR,ORINST,ORENT,ORVAL) ;
+1 ;
+2 NEW ORERR
+3 ;
+4 DO BMES("Setting "_$GET(ORENT)_" value for parameter "_ORPAR_" ("_ORINST_")...")
+5 ;
+6 DO EN^XPAR(ORENT,ORPAR,ORINST,.ORVAL,.ORERR)
+7 KILL ORVAL
+8 IF +$GET(ORERR)>0
DO MES(" ERROR #"_$PIECE(ORERR,U)_": "_$PIECE(ORERR,U,2))
QUIT
+9 DO MES(" DONE")
+10 ;
+11 QUIT
+12 ;
+13 ;
WSSETUP(ORPDMPSERVER,ORPDMPPORT,ORPDMPUN,ORPDMPPW,ORSSLCONFIG) ;
+1 ;
+2 NEW ORERRMSG,ORFDA,ORIENS,ORNAME
+3 ;
+4 DO BMES("Setting up Web Service Entries...")
+5 ;
+6 IF $GET(ORPDMPSERVER)=""
Begin DoDot:1
+7 DO MES("Skipping... Web Server Name not defined")
End DoDot:1
QUIT
+8 IF $GET(ORPDMPPORT)=""
Begin DoDot:1
+9 DO MES("Skipping... Port Number not defined")
End DoDot:1
QUIT
+10 IF $GET(ORPDMPUN)=""
Begin DoDot:1
+11 DO MES("Skipping... Username not defined")
End DoDot:1
QUIT
+12 IF $GET(ORPDMPPW)=""
Begin DoDot:1
+13 DO MES("Skipping... Password not defined")
End DoDot:1
QUIT
+14 IF $GET(ORSSLCONFIG)=""
Begin DoDot:1
+15 DO MES("Skipping... SSL Config not defined")
End DoDot:1
QUIT
+16 ;
+17 ; Create Web service Entry
+18 DO REGREST^XOBWLIB("PDMP WEB SERVICE","csp/resthsb/pdmp/PDMP.API.REST")
+19 ;
+20 ; Create Web Server
+21 SET ORNAME="PDMP SERVER"
+22 IF '$$PROD^XUPROD
SET ORNAME="PDMP TEST SERVER"
+23 SET ORIENS="?+1,"
+24 ; NAME
SET ORFDA(18.12,ORIENS,.01)=ORNAME
+25 ; SERVER
SET ORFDA(18.12,ORIENS,.04)=ORPDMPSERVER
+26 ; STATUS 1-ENABLED / 0-DISABLED
SET ORFDA(18.12,ORIENS,.06)="ENABLED"
+27 ; DEFAULT HTTP TIMEOUT
SET ORFDA(18.12,ORIENS,.07)=180
+28 ; LOGIN REQUIRED
SET ORFDA(18.12,ORIENS,1.01)="YES"
+29 ; SSL ENABLED
SET ORFDA(18.12,ORIENS,3.01)="TRUE"
+30 ; SSL CONFIGURATION
SET ORFDA(18.12,ORIENS,3.02)=ORSSLCONFIG
+31 ; SSL PORT
SET ORFDA(18.12,ORIENS,3.03)=ORPDMPPORT
+32 ; USERNAME
SET ORFDA(18.12,ORIENS,200)=ORPDMPUN
+33 ; PASSWORD
SET ORFDA(18.12,ORIENS,300)=ORPDMPPW
+34 ;
+35 SET ORIENS="?+2,"_ORIENS
+36 SET ORFDA(18.121,ORIENS,.01)="PDMP WEB SERVICE"
+37 SET ORFDA(18.121,ORIENS,.06)="ENABLED"
+38 ;
+39 ; ICR 7129
DO UPDATE^DIE("EU","ORFDA","ORIENROOT")
+40 ;
+41 IF $DATA(^TMP("DIERR",$JOB))
Begin DoDot:1
+42 DO MES("The following errors occurred:")
+43 DO MSG^DIALOG("AE",.ORERRMSG)
+44 DO MES^XPDUTL(.ORERRMSG)
End DoDot:1
+45 ;
+46 QUIT
+47 ;
+48 ;
BMES(STR) ;
+1 ; Write string
+2 DO BMES^XPDUTL($$TRIM^XLFSTR($$CJ^XLFSTR(STR,$GET(IOM,80)),"R"," "))
+3 QUIT
MES(STR) ;
+1 ; Write string
+2 DO MES^XPDUTL($$TRIM^XLFSTR($$CJ^XLFSTR(STR,$GET(IOM,80)),"R"," "))
+3 QUIT
SENDDLG(ANAME) ;Return true if the current order dialog should be sent
+1 IF ANAME="GMRCOR CONSULT"
QUIT 1
+2 IF ANAME="OR GTX DST ID"
QUIT 1
+3 IF ANAME="OR GTX DST STATUS MSG"
QUIT 1
+4 QUIT 0
+5 ;
DLGBULL ;Send bulletin about modified dialogs (on first install)
+1 NEW ORD
+2 SET ORD("GMRCOR CONSULT")=""
+3 DO EN^ORYDLG(519,.ORD)