ORY85 ; slc/dcm - Patch 85 Post-init ;5/1/01 13:47 [6/15/01 12:37pm]
;;3.0;ORDER ENTRY/RESULTS REPORTING;**85**;Dec 17, 1997
;
PRE ; pre-install calls
N VER
S VER=+$P($T(VERSION^ORY85),";",3)
I $O(^ORD(101.24,0)) D
. D EN,COV,RPT,LAB
. K ^ORD(101.24)
. S ^ORD(101.24,0)="OE/RR REPORT^101.24"
Q
POST ; post-install calls
N VER
S VER=$P($T(VERSION^ORY85),";",3)
D EN,COV,RPT,LAB
I +$$PATCH^XPDUTL("TIU*1.0*100") D IDNOTES
D MVALL^ORWUL
D REMOK
D CLEANT0
D MAIL
Q
EN ;Convert a parameter
N ORX,ORI,DA,PARAM
D GETLST^XPAR(.ORX,"SYS","ORWOR COVER RETRIEVAL NEW","Q")
I $O(ORX(0)) Q ;New parameter has already been setup
K ORX
D GETLST^XPAR(.ORX,"PKG","ORWOR COVER RETRIEVAL","Q")
S PARAM="ORWOR COVER RETRIEVAL NEW",ORI=0
F S ORI=$O(ORX(ORI)) Q:'ORI S ORY=ORX(ORI) D
. I $P(ORY,"^")="c" D
.. S DA=$O(^ORD(101.24,"B","Postings",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV POSTINGS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="e" D
.. S DA=$O(^ORD(101.24,"B","Appointments/Visits/Admissions",0)) Q:'DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV APPOINTMENTS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="l" D
.. S DA=$O(^ORD(101.24,"B","Recent Lab Results",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV RECENT LAB RESULTS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="m" D
.. S DA=$O(^ORD(101.24,"B","Active Medications",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE MEDICATIONS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="p" D
.. S DA=$O(^ORD(101.24,"B","Active Problems",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE PROBLEMS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="r" D
.. S DA=$O(^ORD(101.24,"B","Clinical Reminders ",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV CLINICAL REMINDERS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="v" D
.. S DA=$O(^ORD(101.24,"B","Vitals",0)) I DA D DEL^XPAR("PKG",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV VITALS",0)) I DA D PUT^XPAR("PKG",PARAM,DA,$P(ORY,"^",2))
K ORX
D GETLST^XPAR(.ORX,"SYS","ORWOR COVER RETRIEVAL","Q")
S ORI=0
F S ORI=$O(ORX(ORI)) Q:'ORI S ORY=ORX(ORI) D
. I $P(ORY,"^")="c" D
.. S DA=$O(^ORD(101.24,"B","Postings",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV POSTINGS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="e" D
.. S DA=$O(^ORD(101.24,"B","Appointments/Visits/Admissions",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV APPOINTMENTS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="l" D
.. S DA=$O(^ORD(101.24,"B","Recent Lab Results",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV RECENT LAB RESULTS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="m" D
.. S DA=$O(^ORD(101.24,"B","Active Medications",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE MEDICATIONS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="p" D
.. S DA=$O(^ORD(101.24,"B","Active Problems",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV ACTIVE PROBLEMS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="r" D
.. S DA=$O(^ORD(101.24,"B","Clinical Reminders ",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV CLINICAL REMINDERS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
. I $P(ORY,"^")="v" D
.. S DA=$O(^ORD(101.24,"B","Vitals",0)) I DA D DEL^XPAR("SYS",PARAM,DA)
.. S DA=$O(^ORD(101.24,"B","ORCV VITALS",0)) I DA D PUT^XPAR("SYS",PARAM,DA,$P(ORY,"^",2))
Q
COV ;Setup Package level parameters for ORWCV1 COVERSHEET LIST
N P,T
S P="ORWCV1 COVERSHEET LIST",T="C"
D SET("Active Problems","ORCV ACTIVE PROBLEMS",P,1,T)
D SET("Allergies / Adverse Reactions","ORCV ALLERGIES",P,2,T)
D SET("Postings","ORCV POSTINGS",P,3,T)
D SET("Active Medications","ORCV ACTIVE MEDICATIONS",P,4,T)
D SET("Clinical Reminders ","ORCV CLINICAL REMINDERS",P,5,T)
D SET("Recent Lab Results","ORCV RECENT LAB RESULTS",P,6,T)
D SET("Vitals","ORCV VITALS",P,7,T)
D SET("Appointments/Visits/Admissions","ORCV APPOINTMENTS",P,8,T)
Q
RPT ;Setup Package level parameters for ORWRP REPORT LIST
N P,T
S P="ORWRP REPORT LIST",T="R"
D SET("HEALTH SUMMARY","ORRP HEALTH SUMMARY",P,5,T)
D SET("IMAGING","ORRP IMAGING",P,10,T)
D SET("LAB STATUS","ORRP LAB STATUS",P,15,T)
D SET("BLOOD BANK","ORRP BLOOD BANK",P,20,T)
D SET("ANATOMIC PATHOLOGY","ORRP ANATOMIC PATHOLOGY",P,25,T)
D SET("DIETETICS PROFILE","ORRP DIETETICS PROFILE",P,30,T)
D SET("NUTRITIONAL ASSESSMENT","ORRP NUTRITIONAL ASSESS",P,35,T)
D SET("VITALS CUMULATIVE","ORRP VITALS CUM",P,40,T)
D SET("PROCEDURES","ORRP PROCEDURES",P,45,T)
D SET("DAILY ORDER SUMMARY","ORRP DAILY ORDER SUMMARY",P,50,T)
D SET("ORDER SUMMARY FOR A DATE RANGE","ORRP ORDER SUM FOR A DATE RNG",P,55,T)
D SET("CHART COPY SUMMARY","ORRP CHART COPY SUMMARY",P,60,T)
D SET("OUTPATIENT RX PROFILE","ORRP OUTPATIENT RX PROFILE",P,65,T)
D SET("ZZNONAMEZZ","ORRP BCMA MED LOG",P,70,T)
D SET("ZZNONAMEZZ","ORRP BCMA MAH",P,75,T)
Q
LAB ;Setup Package level parameters for ORWRP REPORT LAB LIST
N P,T
S P="ORWRP REPORT LAB LIST",T="L"
D SET("MOST RECENT","ORL MOST RECENT",P,5,T)
D SET("CUMULATIVE","ORL CUMULATIVE",P,10,T)
D SET("ALL TESTS BY DATE","ORL ALL TESTS BY DATE",P,15,T)
D SET("SELECTED TESTS BY DATE","ORL SELECTED TESTS BY DATE",P,20,T)
D SET("WORKSHEET","ORL WORKSHEET",P,25,T)
D SET("GRAPH","ORL GRAPH",P,30,T)
D SET("MICROBIOLOGY","ORL MICROBIOLOGY",P,35,T)
D SET("ANATOMIC PATHOLOGY","ORL ANATOMIC PATHOLOGY",P,40,T)
D SET("BLOOD BANK","ORL BLOOD BANK",P,45,T)
D SET("LAB STATUS","ORL LAB STATUS",P,50,T)
Q
SET(ONAME,NAME,P,S,T) ;Set the parameter
;ONAME=OLD Report name
;NAME=Report name
;P=Parameter name
;S=Sequence (count)
;T=Tab
N DA
S DA=0
F S DA=$O(^ORD(101.24,"B",ONAME,DA)) Q:'DA I $P(^ORD(101.24,DA,0),"^",8)=T D DEL^XPAR("PKG",P,S)
S DA=0
F S DA=$O(^ORD(101.24,"B",NAME,DA)) Q:'DA I $P(^ORD(101.24,DA,0),"^",8)=T D PUT^XPAR("PKG",P,S,DA)
Q
;
REMOK ; Set up ORB ERASE ALL
D EN^XPAR("PKG","ORB ERASE ALL",1,"Y")
Q
;
CLEANT0 ; clean any T+0 set into parameters by mistake
N ENTITY,INST,PARAMS,PIEN,RNG
F RNG="START","STOP" D
.F PARAMS="ORQQAP SEARCH RANGE "_RNG,"ORQQVS SEARCH RANGE "_RNG,"ORLP DEFAULT CLINIC "_RNG_" DATE" D
..S PIEN=+$O(^XTV(8989.51,"B",PARAMS,0)) I 'PIEN Q
..S ENTITY="" F S ENTITY=$O(^XTV(8989.5,"AC",PIEN,ENTITY)) Q:ENTITY="" D
...I ENTITY'[";VA(200," Q
...I $G(^XTV(8989.5,"AC",PIEN,ENTITY,1))="T+0" D
....D EN^XPAR("USR.`"_ENTITY,PARAMS,1,"T")
Q
;
MAIL ; send bulletin of installation time
N COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
S COUNT=0
S XMSUB="Version "_$P($T(VERSION),";;",2)_" Installed"
S XMDUZ="CPRS PACKAGE"
F I="G.CPRS GUI INSTALL@ISC-SLC.DOMAIN.EXT",DUZ S XMY(I)=""
S XMTEXT="TEXT("
;
S X=$P($T(VERSION),";;",2)
D LINE("Version "_X_" has been installed.")
D LINE(" ")
D LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
;
D ^XMD
Q
LINE(DATA) ; set text into array
S COUNT=COUNT+1
S TEXT(COUNT)=DATA
Q
SENDPAR(ANAME) ; Return true if the current parameter should be sent
I ANAME="ORWCV1 COVERSHEET LIST" Q 1
I ANAME="ORWOR COVER RETRIEVAL NEW" Q 1
I ANAME="ORWDQ QUICK VIEW" Q 1
I ANAME="ORK EDITABLE BY USER" Q 1
I ANAME="ORK PROCESSING FLAG" Q 1
I ANAME="ORWDPS SUPPRESS DISPENSE MSG" Q 1
I ANAME="ORWDPS ROUTING DEFAULT" Q 1
I ANAME="ORB ERASE ALL" Q 1
I $E(ANAME,1,12)="ORWRP REPORT" Q 1
I $E(ANAME,1,6)="ORQQPX" Q 1
I $E(ANAME,1,6)="ORWPCE" Q 1
Q 0
IDNOTES ; Re-register TIU RPCs if TIU patch 100 previously installed
; TIU patch 100 registers these in its post-init
N MENU,I
S MENU="OR CPRS GUI CHART"
F I="TIU ID ATTACH ENTRY","TIU ID CAN ATTACH","TIU ID CAN RECEIVE","TIU ID DETACH ENTRY" D INSERT(MENU,I)
Q
;
INSERT(OPTION,RPC) ;
N FDA,FDAIEN,ERR,DIERR
S FDA(19,"?1,",.01)=OPTION
S FDA(19.05,"?+2,?1,",.01)=RPC
D UPDATE^DIE("E","FDA","FDAIEN","ERR")
Q
;
VERSION ;;15.12
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORY85 8427 printed Dec 13, 2024@02:43:14 Page 2
ORY85 ; slc/dcm - Patch 85 Post-init ;5/1/01 13:47 [6/15/01 12:37pm]
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**85**;Dec 17, 1997
+2 ;
PRE ; pre-install calls
+1 NEW VER
+2 SET VER=+$PIECE($TEXT(VERSION^ORY85),";",3)
+3 IF $ORDER(^ORD(101.24,0))
Begin DoDot:1
+4 DO EN
DO COV
DO RPT
DO LAB
+5 KILL ^ORD(101.24)
+6 SET ^ORD(101.24,0)="OE/RR REPORT^101.24"
End DoDot:1
+7 QUIT
POST ; post-install calls
+1 NEW VER
+2 SET VER=$PIECE($TEXT(VERSION^ORY85),";",3)
+3 DO EN
DO COV
DO RPT
DO LAB
+4 IF +$$PATCH^XPDUTL("TIU*1.0*100")
DO IDNOTES
+5 DO MVALL^ORWUL
+6 DO REMOK
+7 DO CLEANT0
+8 DO MAIL
+9 QUIT
EN ;Convert a parameter
+1 NEW ORX,ORI,DA,PARAM
+2 DO GETLST^XPAR(.ORX,"SYS","ORWOR COVER RETRIEVAL NEW","Q")
+3 ;New parameter has already been setup
IF $ORDER(ORX(0))
QUIT
+4 KILL ORX
+5 DO GETLST^XPAR(.ORX,"PKG","ORWOR COVER RETRIEVAL","Q")
+6 SET PARAM="ORWOR COVER RETRIEVAL NEW"
SET ORI=0
+7 FOR
SET ORI=$ORDER(ORX(ORI))
if 'ORI
QUIT
SET ORY=ORX(ORI)
Begin DoDot:1
+8 IF $PIECE(ORY,"^")="c"
Begin DoDot:2
+9 SET DA=$ORDER(^ORD(101.24,"B","Postings",0))
IF DA
DO DEL^XPAR("PKG",PARAM,DA)
+10 SET DA=$ORDER(^ORD(101.24,"B","ORCV POSTINGS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+11 IF $PIECE(ORY,"^")="e"
Begin DoDot:2
+12 SET DA=$ORDER(^ORD(101.24,"B","Appointments/Visits/Admissions",0))
if 'DA
QUIT
DO DEL^XPAR("PKG",PARAM,DA)
+13 SET DA=$ORDER(^ORD(101.24,"B","ORCV APPOINTMENTS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+14 IF $PIECE(ORY,"^")="l"
Begin DoDot:2
+15 SET DA=$ORDER(^ORD(101.24,"B","Recent Lab Results",0))
IF DA
DO DEL^XPAR("PKG",PARAM,DA)
+16 SET DA=$ORDER(^ORD(101.24,"B","ORCV RECENT LAB RESULTS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+17 IF $PIECE(ORY,"^")="m"
Begin DoDot:2
+18 SET DA=$ORDER(^ORD(101.24,"B","Active Medications",0))
IF DA
DO DEL^XPAR("PKG",PARAM,DA)
+19 SET DA=$ORDER(^ORD(101.24,"B","ORCV ACTIVE MEDICATIONS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+20 IF $PIECE(ORY,"^")="p"
Begin DoDot:2
+21 SET DA=$ORDER(^ORD(101.24,"B","Active Problems",0))
IF DA
DO DEL^XPAR("PKG",PARAM,DA)
+22 SET DA=$ORDER(^ORD(101.24,"B","ORCV ACTIVE PROBLEMS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+23 IF $PIECE(ORY,"^")="r"
Begin DoDot:2
+24 SET DA=$ORDER(^ORD(101.24,"B","Clinical Reminders ",0))
IF DA
DO DEL^XPAR("PKG",PARAM,DA)
+25 SET DA=$ORDER(^ORD(101.24,"B","ORCV CLINICAL REMINDERS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+26 IF $PIECE(ORY,"^")="v"
Begin DoDot:2
+27 SET DA=$ORDER(^ORD(101.24,"B","Vitals",0))
IF DA
DO DEL^XPAR("PKG",PARAM,DA)
+28 SET DA=$ORDER(^ORD(101.24,"B","ORCV VITALS",0))
IF DA
DO PUT^XPAR("PKG",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
End DoDot:1
+29 KILL ORX
+30 DO GETLST^XPAR(.ORX,"SYS","ORWOR COVER RETRIEVAL","Q")
+31 SET ORI=0
+32 FOR
SET ORI=$ORDER(ORX(ORI))
if 'ORI
QUIT
SET ORY=ORX(ORI)
Begin DoDot:1
+33 IF $PIECE(ORY,"^")="c"
Begin DoDot:2
+34 SET DA=$ORDER(^ORD(101.24,"B","Postings",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+35 SET DA=$ORDER(^ORD(101.24,"B","ORCV POSTINGS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+36 IF $PIECE(ORY,"^")="e"
Begin DoDot:2
+37 SET DA=$ORDER(^ORD(101.24,"B","Appointments/Visits/Admissions",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+38 SET DA=$ORDER(^ORD(101.24,"B","ORCV APPOINTMENTS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+39 IF $PIECE(ORY,"^")="l"
Begin DoDot:2
+40 SET DA=$ORDER(^ORD(101.24,"B","Recent Lab Results",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+41 SET DA=$ORDER(^ORD(101.24,"B","ORCV RECENT LAB RESULTS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+42 IF $PIECE(ORY,"^")="m"
Begin DoDot:2
+43 SET DA=$ORDER(^ORD(101.24,"B","Active Medications",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+44 SET DA=$ORDER(^ORD(101.24,"B","ORCV ACTIVE MEDICATIONS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+45 IF $PIECE(ORY,"^")="p"
Begin DoDot:2
+46 SET DA=$ORDER(^ORD(101.24,"B","Active Problems",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+47 SET DA=$ORDER(^ORD(101.24,"B","ORCV ACTIVE PROBLEMS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+48 IF $PIECE(ORY,"^")="r"
Begin DoDot:2
+49 SET DA=$ORDER(^ORD(101.24,"B","Clinical Reminders ",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+50 SET DA=$ORDER(^ORD(101.24,"B","ORCV CLINICAL REMINDERS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
+51 IF $PIECE(ORY,"^")="v"
Begin DoDot:2
+52 SET DA=$ORDER(^ORD(101.24,"B","Vitals",0))
IF DA
DO DEL^XPAR("SYS",PARAM,DA)
+53 SET DA=$ORDER(^ORD(101.24,"B","ORCV VITALS",0))
IF DA
DO PUT^XPAR("SYS",PARAM,DA,$PIECE(ORY,"^",2))
End DoDot:2
End DoDot:1
+54 QUIT
COV ;Setup Package level parameters for ORWCV1 COVERSHEET LIST
+1 NEW P,T
+2 SET P="ORWCV1 COVERSHEET LIST"
SET T="C"
+3 DO SET("Active Problems","ORCV ACTIVE PROBLEMS",P,1,T)
+4 DO SET("Allergies / Adverse Reactions","ORCV ALLERGIES",P,2,T)
+5 DO SET("Postings","ORCV POSTINGS",P,3,T)
+6 DO SET("Active Medications","ORCV ACTIVE MEDICATIONS",P,4,T)
+7 DO SET("Clinical Reminders ","ORCV CLINICAL REMINDERS",P,5,T)
+8 DO SET("Recent Lab Results","ORCV RECENT LAB RESULTS",P,6,T)
+9 DO SET("Vitals","ORCV VITALS",P,7,T)
+10 DO SET("Appointments/Visits/Admissions","ORCV APPOINTMENTS",P,8,T)
+11 QUIT
RPT ;Setup Package level parameters for ORWRP REPORT LIST
+1 NEW P,T
+2 SET P="ORWRP REPORT LIST"
SET T="R"
+3 DO SET("HEALTH SUMMARY","ORRP HEALTH SUMMARY",P,5,T)
+4 DO SET("IMAGING","ORRP IMAGING",P,10,T)
+5 DO SET("LAB STATUS","ORRP LAB STATUS",P,15,T)
+6 DO SET("BLOOD BANK","ORRP BLOOD BANK",P,20,T)
+7 DO SET("ANATOMIC PATHOLOGY","ORRP ANATOMIC PATHOLOGY",P,25,T)
+8 DO SET("DIETETICS PROFILE","ORRP DIETETICS PROFILE",P,30,T)
+9 DO SET("NUTRITIONAL ASSESSMENT","ORRP NUTRITIONAL ASSESS",P,35,T)
+10 DO SET("VITALS CUMULATIVE","ORRP VITALS CUM",P,40,T)
+11 DO SET("PROCEDURES","ORRP PROCEDURES",P,45,T)
+12 DO SET("DAILY ORDER SUMMARY","ORRP DAILY ORDER SUMMARY",P,50,T)
+13 DO SET("ORDER SUMMARY FOR A DATE RANGE","ORRP ORDER SUM FOR A DATE RNG",P,55,T)
+14 DO SET("CHART COPY SUMMARY","ORRP CHART COPY SUMMARY",P,60,T)
+15 DO SET("OUTPATIENT RX PROFILE","ORRP OUTPATIENT RX PROFILE",P,65,T)
+16 DO SET("ZZNONAMEZZ","ORRP BCMA MED LOG",P,70,T)
+17 DO SET("ZZNONAMEZZ","ORRP BCMA MAH",P,75,T)
+18 QUIT
LAB ;Setup Package level parameters for ORWRP REPORT LAB LIST
+1 NEW P,T
+2 SET P="ORWRP REPORT LAB LIST"
SET T="L"
+3 DO SET("MOST RECENT","ORL MOST RECENT",P,5,T)
+4 DO SET("CUMULATIVE","ORL CUMULATIVE",P,10,T)
+5 DO SET("ALL TESTS BY DATE","ORL ALL TESTS BY DATE",P,15,T)
+6 DO SET("SELECTED TESTS BY DATE","ORL SELECTED TESTS BY DATE",P,20,T)
+7 DO SET("WORKSHEET","ORL WORKSHEET",P,25,T)
+8 DO SET("GRAPH","ORL GRAPH",P,30,T)
+9 DO SET("MICROBIOLOGY","ORL MICROBIOLOGY",P,35,T)
+10 DO SET("ANATOMIC PATHOLOGY","ORL ANATOMIC PATHOLOGY",P,40,T)
+11 DO SET("BLOOD BANK","ORL BLOOD BANK",P,45,T)
+12 DO SET("LAB STATUS","ORL LAB STATUS",P,50,T)
+13 QUIT
SET(ONAME,NAME,P,S,T) ;Set the parameter
+1 ;ONAME=OLD Report name
+2 ;NAME=Report name
+3 ;P=Parameter name
+4 ;S=Sequence (count)
+5 ;T=Tab
+6 NEW DA
+7 SET DA=0
+8 FOR
SET DA=$ORDER(^ORD(101.24,"B",ONAME,DA))
if 'DA
QUIT
IF $PIECE(^ORD(101.24,DA,0),"^",8)=T
DO DEL^XPAR("PKG",P,S)
+9 SET DA=0
+10 FOR
SET DA=$ORDER(^ORD(101.24,"B",NAME,DA))
if 'DA
QUIT
IF $PIECE(^ORD(101.24,DA,0),"^",8)=T
DO PUT^XPAR("PKG",P,S,DA)
+11 QUIT
+12 ;
REMOK ; Set up ORB ERASE ALL
+1 DO EN^XPAR("PKG","ORB ERASE ALL",1,"Y")
+2 QUIT
+3 ;
CLEANT0 ; clean any T+0 set into parameters by mistake
+1 NEW ENTITY,INST,PARAMS,PIEN,RNG
+2 FOR RNG="START","STOP"
Begin DoDot:1
+3 FOR PARAMS="ORQQAP SEARCH RANGE "_RNG,"ORQQVS SEARCH RANGE "_RNG,"ORLP DEFAULT CLINIC "_RNG_" DATE"
Begin DoDot:2
+4 SET PIEN=+$ORDER(^XTV(8989.51,"B",PARAMS,0))
IF 'PIEN
QUIT
+5 SET ENTITY=""
FOR
SET ENTITY=$ORDER(^XTV(8989.5,"AC",PIEN,ENTITY))
if ENTITY=""
QUIT
Begin DoDot:3
+6 IF ENTITY'[";VA(200,"
QUIT
+7 IF $GET(^XTV(8989.5,"AC",PIEN,ENTITY,1))="T+0"
Begin DoDot:4
+8 DO EN^XPAR("USR.`"_ENTITY,PARAMS,1,"T")
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+9 QUIT
+10 ;
MAIL ; send bulletin of installation time
+1 NEW COUNT,DIFROM,I,START,TEXT,XMDUZ,XMSUB,XMTEXT,XMY
+2 SET COUNT=0
+3 SET XMSUB="Version "_$PIECE($TEXT(VERSION),";;",2)_" Installed"
+4 SET XMDUZ="CPRS PACKAGE"
+5 FOR I="G.CPRS GUI INSTALL@ISC-SLC.DOMAIN.EXT",DUZ
SET XMY(I)=""
+6 SET XMTEXT="TEXT("
+7 ;
+8 SET X=$PIECE($TEXT(VERSION),";;",2)
+9 DO LINE("Version "_X_" has been installed.")
+10 DO LINE(" ")
+11 DO LINE("Install complete: "_$$FMTE^XLFDT($$NOW^XLFDT()))
+12 ;
+13 DO ^XMD
+14 QUIT
LINE(DATA) ; set text into array
+1 SET COUNT=COUNT+1
+2 SET TEXT(COUNT)=DATA
+3 QUIT
SENDPAR(ANAME) ; Return true if the current parameter should be sent
+1 IF ANAME="ORWCV1 COVERSHEET LIST"
QUIT 1
+2 IF ANAME="ORWOR COVER RETRIEVAL NEW"
QUIT 1
+3 IF ANAME="ORWDQ QUICK VIEW"
QUIT 1
+4 IF ANAME="ORK EDITABLE BY USER"
QUIT 1
+5 IF ANAME="ORK PROCESSING FLAG"
QUIT 1
+6 IF ANAME="ORWDPS SUPPRESS DISPENSE MSG"
QUIT 1
+7 IF ANAME="ORWDPS ROUTING DEFAULT"
QUIT 1
+8 IF ANAME="ORB ERASE ALL"
QUIT 1
+9 IF $EXTRACT(ANAME,1,12)="ORWRP REPORT"
QUIT 1
+10 IF $EXTRACT(ANAME,1,6)="ORQQPX"
QUIT 1
+11 IF $EXTRACT(ANAME,1,6)="ORWPCE"
QUIT 1
+12 QUIT 0
IDNOTES ; Re-register TIU RPCs if TIU patch 100 previously installed
+1 ; TIU patch 100 registers these in its post-init
+2 NEW MENU,I
+3 SET MENU="OR CPRS GUI CHART"
+4 FOR I="TIU ID ATTACH ENTRY","TIU ID CAN ATTACH","TIU ID CAN RECEIVE","TIU ID DETACH ENTRY"
DO INSERT(MENU,I)
+5 QUIT
+6 ;
INSERT(OPTION,RPC) ;
+1 NEW FDA,FDAIEN,ERR,DIERR
+2 SET FDA(19,"?1,",.01)=OPTION
+3 SET FDA(19.05,"?+2,?1,",.01)=RPC
+4 DO UPDATE^DIE("E","FDA","FDAIEN","ERR")
+5 QUIT
+6 ;
VERSION ;;15.12