ORYDLG ;SLC/MKB -- Postinit bulletin for order dialogs ;01/25/18 04:42
;;3.0;ORDER ENTRY/RESULTS REPORTING;**141,165,216,243,280,377**;Dec 17, 1997;Build 582
;
EN(PATCH,ORDLG,USERS) ; -- look for local copies of ORDLG(NAME) by package,
; send list in bulletin to DUZ, POSTMASTER, USERS(DUZ) when done
;
Q:$O(ORDLG(""))="" ;none
N ORZ,ORI,X,NM,I,OR0,PKG,DG,ORPKG,ORNATL,DLG,CNT,LR,PS
S ORZ(1)="The following nationally exported order dialogs have been modified by"
S X="this patch: ",ORI=1,NM="" F S NM=$O(ORDLG(NM)) Q:NM="" D
. S ORI=ORI+1,ORZ(ORI)=X_NM,X=" "
. S I=+$O(^ORD(101.41,"AB",NM,0)),OR0=$G(^ORD(101.41,I,0))
. S PKG=+$P(OR0,U,7),DG=+$P(OR0,U,5) S:PKG ORPKG(PKG,DG)=""
. S:$P(NM," ")="LR" LR=1 S:"^PS^PSJ^PSO^PSH^"[(U_$P(NM," ")_U) PS=1
D:$G(LR) LR D:$G(PS) PS ;reset FORMAT codes in changed dialogs
S I=0 F I=1:1 S X=$T(NATL+I) Q:X["ZZZZZ" S ORNATL($P(X,";",3))=""
S ORI=ORI+1,ORZ(ORI)="Please review and compare the following locally created order dialogs"
S ORI=ORI+1,ORZ(ORI)="that may be copies, for any necessary changes:",CNT=0
S PKG=0 F S PKG=$O(ORPKG(PKG)) Q:PKG<1 S DLG=0 D
. F S DLG=+$O(^ORD(101.41,"APKG",PKG,DLG)) Q:DLG<1 D
.. S OR0=$G(^ORD(101.41,DLG,0)) Q:$P(OR0,U,4)'="D"
.. Q:'$D(ORPKG(PKG,+$P(OR0,U,5))) ;included DispGrp
.. Q:$D(ORNATL($P(OR0,U))) S CNT=CNT+1
.. S ORI=ORI+1,ORZ(ORI)=$J(DLG,7)_" "_$P(OR0,U)
EN1 I CNT>0 D ;local copies found -> send bulletin
. N XMDUZ,XMY,I,XMSUB,XMTEXT,DIFROM
. S XMDUZ="PATCH OR*3*"_$G(PATCH)_" POSTINIT",XMY(.5)=""
. S:$G(DUZ) XMY(DUZ)="" S I=0 F S I=$O(USERS(I)) Q:I<1 S XMY(I)=""
. S XMSUB=XMDUZ_" COMPLETED",XMTEXT="ORZ(" D ^XMD
. D BMES^XPDUTL("Some national order dialogs have been modified in this patch;")
. D MES^XPDUTL("a bulletin has been sent to the installer listing local copies that")
. D MES^XPDUTL("may need to be reviewed and updated.")
Q
;
NATL ;;Nationally exported dialogs
;;FHW1
;;FHW2
;;FHW3
;;FHW7
;;FHW8
;;FHW OP MEAL
;;FHW SPECIAL MEAL
;;GMRAOR ALLERGY ENTER/EDIT
;;GMRCOR CONSULT
;;GMRCOR REQUEST
;;GMRVOR
;;LR OTHER LAB TESTS
;;OR GWCOND CONDITION
;;OR GWDIAG DIAGNOSIS
;;OR GWINST DNR
;;OR GXACTV OTHER ACTIVITY ORDER
;;OR GXMISC GENERAL
;;OR GXMOVE ADMIT PATIENT
;;OR GXMOVE DISCHARGE
;;OR GXMOVE EVENT
;;OR GXMOVE TRANSFER
;;OR GXMOVE TREATING SPECIALTY
;;OR GXPARM CALL HO ON
;;OR GXSKIN DRESSING CHANGE
;;OR GXTEXT TEXT ONLY ORDER
;;OR GXTEXT WORD PROCESSING ORDER
;;ORWD GENERIC ACTIVITY
;;ORWD GENERIC DIET
;;ORWD GENERIC NURSING
;;ORWD GENERIC VITALS
;;PS MEDS
;;PSH OERR
;;PSJ OR PAT OE
;;PSJI OR PAT FLUID OE
;;PSO OERR
;;PSO SUPPLY
;;RA OERR EXAM
;;SD RTC
;;PSJ OR CLINIC OE
;;CLINIC OR PAT FLUID OE
;;ZZZZZ
;
PS ; -- reset FORMAT values in PS dialogs
N DRUG,OI,STR,DLGNM,DLG,PRMT,DA
S DRUG=$$PTR("OR GTX DRUG NAME")
S OI=$$PTR("OR GTX ORDERABLE ITEM"),STR=$$PTR("OR GTX STRENGTH")
F DLGNM="PS MEDS","PSJ OR PAT OE","PSO OERR","PSO SUPPLY","PSH OERR" D
. S DLG=$$PTR(DLGNM)
. F PRMT=OI,STR D
.. S DA=+$O(^ORD(101.41,DLG,10,"D",PRMT,0))
.. S:DA $P(^ORD(101.41,DLG,10,DA,2),U,2)=("@"_DRUG)
Q
; IV dialog
S DLG=$$PTR("PSJI OR PAT FLUID OE"),PRMT=$$PTR("OR GTX INFUSION RATE")
S DA=+$O(^ORD(101.41,DLG,10,"D",PRMT,0))
I DA S $P(^ORD(101.41,DLG,10,DA,2),U,2)=("@"_$$PTR("OR GTX SCHEDULE"))
Q
;
LR ; -- reset FORMAT value in LR dialog
N DLG,PRMT,DA
S DLG=$$PTR("LR OTHER LAB TESTS"),PRMT=$$PTR("OR GTX SPECIMEN")
S DA=+$O(^ORD(101.41,DLG,10,"D",PRMT,0))
I DA S $P(^ORD(101.41,DLG,10,DA,2),U,2)=("="_$$PTR("OR GTX COLLECTION SAMPLE"))
Q
;
PTR(X) Q +$O(^ORD(101.41,"B",X,0))
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORYDLG 3700 printed Sep 02, 2024@19:28:23 Page 2
ORYDLG ;SLC/MKB -- Postinit bulletin for order dialogs ;01/25/18 04:42
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**141,165,216,243,280,377**;Dec 17, 1997;Build 582
+2 ;
EN(PATCH,ORDLG,USERS) ; -- look for local copies of ORDLG(NAME) by package,
+1 ; send list in bulletin to DUZ, POSTMASTER, USERS(DUZ) when done
+2 ;
+3 ;none
if $ORDER(ORDLG(""))=""
QUIT
+4 NEW ORZ,ORI,X,NM,I,OR0,PKG,DG,ORPKG,ORNATL,DLG,CNT,LR,PS
+5 SET ORZ(1)="The following nationally exported order dialogs have been modified by"
+6 SET X="this patch: "
SET ORI=1
SET NM=""
FOR
SET NM=$ORDER(ORDLG(NM))
if NM=""
QUIT
Begin DoDot:1
+7 SET ORI=ORI+1
SET ORZ(ORI)=X_NM
SET X=" "
+8 SET I=+$ORDER(^ORD(101.41,"AB",NM,0))
SET OR0=$GET(^ORD(101.41,I,0))
+9 SET PKG=+$PIECE(OR0,U,7)
SET DG=+$PIECE(OR0,U,5)
if PKG
SET ORPKG(PKG,DG)=""
+10 if $PIECE(NM," ")="LR"
SET LR=1
if "^PS^PSJ^PSO^PSH^"[(U_$PIECE(NM," ")_U)
SET PS=1
End DoDot:1
+11 ;reset FORMAT codes in changed dialogs
if $GET(LR)
DO LR
if $GET(PS)
DO PS
+12 SET I=0
FOR I=1:1
SET X=$TEXT(NATL+I)
if X["ZZZZZ"
QUIT
SET ORNATL($PIECE(X,";",3))=""
+13 SET ORI=ORI+1
SET ORZ(ORI)="Please review and compare the following locally created order dialogs"
+14 SET ORI=ORI+1
SET ORZ(ORI)="that may be copies, for any necessary changes:"
SET CNT=0
+15 SET PKG=0
FOR
SET PKG=$ORDER(ORPKG(PKG))
if PKG<1
QUIT
SET DLG=0
Begin DoDot:1
+16 FOR
SET DLG=+$ORDER(^ORD(101.41,"APKG",PKG,DLG))
if DLG<1
QUIT
Begin DoDot:2
+17 SET OR0=$GET(^ORD(101.41,DLG,0))
if $PIECE(OR0,U,4)'="D"
QUIT
+18 ;included DispGrp
if '$DATA(ORPKG(PKG,+$PIECE(OR0,U,5)))
QUIT
+19 if $DATA(ORNATL($PIECE(OR0,U)))
QUIT
SET CNT=CNT+1
+20 SET ORI=ORI+1
SET ORZ(ORI)=$JUSTIFY(DLG,7)_" "_$PIECE(OR0,U)
End DoDot:2
End DoDot:1
EN1 ;local copies found -> send bulletin
IF CNT>0
Begin DoDot:1
+1 NEW XMDUZ,XMY,I,XMSUB,XMTEXT,DIFROM
+2 SET XMDUZ="PATCH OR*3*"_$GET(PATCH)_" POSTINIT"
SET XMY(.5)=""
+3 if $GET(DUZ)
SET XMY(DUZ)=""
SET I=0
FOR
SET I=$ORDER(USERS(I))
if I<1
QUIT
SET XMY(I)=""
+4 SET XMSUB=XMDUZ_" COMPLETED"
SET XMTEXT="ORZ("
DO ^XMD
+5 DO BMES^XPDUTL("Some national order dialogs have been modified in this patch;")
+6 DO MES^XPDUTL("a bulletin has been sent to the installer listing local copies that")
+7 DO MES^XPDUTL("may need to be reviewed and updated.")
End DoDot:1
+8 QUIT
+9 ;
NATL ;;Nationally exported dialogs
+1 ;;FHW1
+2 ;;FHW2
+3 ;;FHW3
+4 ;;FHW7
+5 ;;FHW8
+6 ;;FHW OP MEAL
+7 ;;FHW SPECIAL MEAL
+8 ;;GMRAOR ALLERGY ENTER/EDIT
+9 ;;GMRCOR CONSULT
+10 ;;GMRCOR REQUEST
+11 ;;GMRVOR
+12 ;;LR OTHER LAB TESTS
+13 ;;OR GWCOND CONDITION
+14 ;;OR GWDIAG DIAGNOSIS
+15 ;;OR GWINST DNR
+16 ;;OR GXACTV OTHER ACTIVITY ORDER
+17 ;;OR GXMISC GENERAL
+18 ;;OR GXMOVE ADMIT PATIENT
+19 ;;OR GXMOVE DISCHARGE
+20 ;;OR GXMOVE EVENT
+21 ;;OR GXMOVE TRANSFER
+22 ;;OR GXMOVE TREATING SPECIALTY
+23 ;;OR GXPARM CALL HO ON
+24 ;;OR GXSKIN DRESSING CHANGE
+25 ;;OR GXTEXT TEXT ONLY ORDER
+26 ;;OR GXTEXT WORD PROCESSING ORDER
+27 ;;ORWD GENERIC ACTIVITY
+28 ;;ORWD GENERIC DIET
+29 ;;ORWD GENERIC NURSING
+30 ;;ORWD GENERIC VITALS
+31 ;;PS MEDS
+32 ;;PSH OERR
+33 ;;PSJ OR PAT OE
+34 ;;PSJI OR PAT FLUID OE
+35 ;;PSO OERR
+36 ;;PSO SUPPLY
+37 ;;RA OERR EXAM
+38 ;;SD RTC
+39 ;;PSJ OR CLINIC OE
+40 ;;CLINIC OR PAT FLUID OE
+41 ;;ZZZZZ
+42 ;
PS ; -- reset FORMAT values in PS dialogs
+1 NEW DRUG,OI,STR,DLGNM,DLG,PRMT,DA
+2 SET DRUG=$$PTR("OR GTX DRUG NAME")
+3 SET OI=$$PTR("OR GTX ORDERABLE ITEM")
SET STR=$$PTR("OR GTX STRENGTH")
+4 FOR DLGNM="PS MEDS","PSJ OR PAT OE","PSO OERR","PSO SUPPLY","PSH OERR"
Begin DoDot:1
+5 SET DLG=$$PTR(DLGNM)
+6 FOR PRMT=OI,STR
Begin DoDot:2
+7 SET DA=+$ORDER(^ORD(101.41,DLG,10,"D",PRMT,0))
+8 if DA
SET $PIECE(^ORD(101.41,DLG,10,DA,2),U,2)=("@"_DRUG)
End DoDot:2
End DoDot:1
+9 QUIT
+10 ; IV dialog
+11 SET DLG=$$PTR("PSJI OR PAT FLUID OE")
SET PRMT=$$PTR("OR GTX INFUSION RATE")
+12 SET DA=+$ORDER(^ORD(101.41,DLG,10,"D",PRMT,0))
+13 IF DA
SET $PIECE(^ORD(101.41,DLG,10,DA,2),U,2)=("@"_$$PTR("OR GTX SCHEDULE"))
+14 QUIT
+15 ;
LR ; -- reset FORMAT value in LR dialog
+1 NEW DLG,PRMT,DA
+2 SET DLG=$$PTR("LR OTHER LAB TESTS")
SET PRMT=$$PTR("OR GTX SPECIMEN")
+3 SET DA=+$ORDER(^ORD(101.41,DLG,10,"D",PRMT,0))
+4 IF DA
SET $PIECE(^ORD(101.41,DLG,10,DA,2),U,2)=("="_$$PTR("OR GTX COLLECTION SAMPLE"))
+5 QUIT
+6 ;
PTR(X) QUIT +$ORDER(^ORD(101.41,"B",X,0))