ORQOCONV ; SLC/AGP - Utility report for Order Dialogs ;Dec 08, 2021@10:45:18
;;3.0;ORDER ENTRY/RESULTS REPORTING;**405**;DEC 17, 1997;Build 211
;
; DBIA 5133: reading ^PXRMD file #801.41
;
Q
;Prompt to determine what to when moving to the next quick order
ASK() ;
N DIR,Y
S DIR(0)="S^E:EDIT THIS QUICK ORDER;K:SKIP THIS QUICK ORDER;Q:QUIT THE CONVERSION UTILITY"
S DIR("A")="Select the action"
S DIR("B")="E"
S DIR("?")="Select the action"
S DIR("??")="^D HELP^ORQOCONV(2)"
D ^DIR
Q Y
;
;determine if the type of orders has a complex version of it.
CANBECOMPL(ORDIALOG) ;
N NAME
S NAME=$P(^ORD(101.41,ORDIALOG,0),U)
I NAME="PSJ OR PAT OE" Q 1
I NAME="PSO OERR" Q 1
I NAME="PSJ OR CLINIC OE" Q 1
I NAME="PSH OERR" Q 1
Q 0
;
CONT() ;
N DIR,Y
S DIR(0)="Y"
S DIR("A")="Process next Quick Order"
S DIR("B")="Yes"
S DIR("?")="Select Yes to continue to the next quick order. Or No to exit."
D ^DIR
Q Y
;
;determine if disable Quick Orders should be shown
SKIPDIS() ;
N DIR,Y
S DIR(0)="Y"
S DIR("A")="Skip Disable Quick Orders"
S DIR("B")="Yes"
S DIR("?")="Select Yes to skip disable quick orders."
D ^DIR
Q Y
;
REPTYPE() ;
N DIR,Y
S DIR(0)="S^A:SHOW ALL FIELDS IN THE QUICK ORDER;F:SHOW ONLY THE FIELDS THE UTILITY IS CHECKING"
S DIR("A")="Select the fields to display in the report"
S DIR("B")="A"
S DIR("?")="Select the display"
S DIR("??")="^D HELP^ORQOCONV(2)"
D ^DIR
Q Y
Q
;
;This write out a before and after of the QO and drop the user into the standard QO editor
EDITOR(QOIEN) ;
N ORDG,TEMP
W !,"Before value:"
D SHOW(QOIEN)
W !
S TEMP=$$ASK()
I TEMP[U!(TEMP="Q") Q -1
I TEMP="K" Q 0
S ORDG=$P($G(^ORD(101.41,QOIEN,0)),U,5)
W !
D QCK0^ORCMEDT1(QOIEN)
W !,"After value:"
D SHOW(QOIEN)
Q 1
;
;main entry point into the code. Convert is the identifier used by the code to determine what to do. WHERE is used to default how to find the QO.
;If Where is defined then line tag WHERE is not called.
EN(CONVERT,WHERE) ;
N ARRAY,PERARR,QOS,REPSUB,REPTYPE,RETMENU,RETSTRCT,SKIPDIS,SUB,TEMP,TYPE
S SUB="ORQOCONV",REPSUB="ORQOCONV REPORT"
K ^TMP($J,SUB),^TMP($J,REPSUB)
EN1 ;
D SETUP(.ARRAY,CONVERT)
D INSTR(CONVERT)
S QOS=+$O(ARRAY("A"),-1)
S TYPE=0
I QOS>1 S TYPE=$$GETQOSEL(.ARRAY) I TYPE[U Q
I TYPE=0 S TYPE=1
S TEMP=$$SPECIAL(CONVERT,.ARRAY)
I TEMP=U G EN1
I TEMP="^^" Q
EN2 ;
S REPTYPE=""
I WHERE="" S WHERE=$$WHERE
I WHERE=U S WHERE="" G EN1
I WHERE="^^"!(WHERE="Q") Q
I WHERE="S" D SPECIFIC Q
I WHERE="R" S REPTYPE=$$REPTYPE()
I REPTYPE=U Q
I REPTYPE="^^" G EN2
S SKIPDIS=0
I WHERE'="R",WHERE'="P" S SKIPDIS=$$SKIPDIS
I SKIPDIS=U Q
I SKIPDIS="^^" G EN2
W !!,"Collecting Quick Order List, this may take some time",!
S RETSTRCT=0,RETMENU=0
I WHERE'="P",WHERE'="A" S RETMENU=1
D GETQOS(TYPE,SUB,RETMENU,RETSTRCT,.ARRAY,SKIPDIS)
W !!,"Processing Quick Order List"
D PROCESS(.ARRAY,SUB,WHERE,.PERARR,REPSUB)
I WHERE="P" D PERREP(.PERARR)
I WHERE="R" D REPORT^ORQOCONV1(REPSUB,REPTYPE,.ARRAY)
K ^TMP($J,SUB),^TMP($J,REPSUB)
Q
;
FORMAT(TEXT) ;
N NL,NOUT,TEXTOUT,X
S NL=+$O(TEXT(""),-1)
D FORMAT^PXRMTEXT(1,80,.NL,.TEXT,.NOUT,.TEXTOUT)
F X=1:1:NOUT W !,TEXTOUT(X)
Q
;
GETQOS(TYPE,SUB,RETMENU,RETSTRCT,INPUTS,SKIPDIS) ;
N ARRAY,CNT,QOTYPES
S CNT=0 F S CNT=$O(INPUTS(TYPE,CNT)) Q:CNT'>0 D
.S QOTYPES(INPUTS(TYPE,CNT))=""
D FINDQO^ORQOUTL(.ARRAY,.QOTYPES,SUB,RETMENU,RETSTRCT,1,SKIPDIS)
Q
;
;This section is used to prompt the user for selection information to help limit the QO to search for.
;This is used if the GETQOSEL array is defined in the setup section.
GETQOSEL(INPUTS) ;
N CNT,DIR,HELP,PROMPT,Y
S HELP=+$G(INPUTS("GETQOSEL","HELPID"))
S PROMPT=$S($G(INPUTS("GETQOSEL","PROMPT"))'="":INPUTS("GETQOSEL","PROMPT"),1:"Select Quick Order Type")
I HELP=0 S HELP=3
S CNT=0,DIR(0)="S^" F S CNT=$O(INPUTS(CNT)) Q:CNT'>0 D
.I CNT=1 S DIR(0)=DIR(0)_CNT_":"_INPUTS(CNT) Q
.S DIR(0)=DIR(0)_";"_CNT_":"_INPUTS(CNT)
S DIR("A")=INPUTS("GETQOSEL","PROMPT")
S DIR("?")="Select the type of Quick Order to search for."
S DIR("??")="^D HELP^ORQOCONV("_HELP_")"
D ^DIR
Q Y
;
HASTEXT(ORDIALOG,IEN) ;
N CNT,INST,TIDX,VALUE
S CNT=0
S INST=0 F S INST=$O(ORDIALOG(IEN,INST)) Q:INST'>0!(CNT>0) D
.S VALUE=$G(ORDIALOG(IEN,INST)) I VALUE'["^TMP(" Q
.S TIDX=0 F S TIDX=$O(@VALUE@(TIDX)) Q:TIDX'>0!(CNT>0) D
..I @VALUE@(TIDX,0)'="" S CNT=CNT+1
Q $S(CNT>0:1,1:0)
;
;This is used to determine if a prompt has a value. This will only check prompts that were defined
;in the HASVALUE array that is defined in the SETUP line tag.
HASVALUE(ORDIALOG,ARRAY) ;
N CNT,IEN,NODE,NOVALUE,PROMPT,RESULT,TYPE
S NOVALUE=0
S PROMPT=""
F S PROMPT=$O(ARRAY("HASVALUE",PROMPT)) Q:PROMPT=""!(NOVALUE=1) D
.S NODE=$G(ORDIALOG("B",PROMPT))
.S IEN=+$P(NODE,U,2)
.I +$O(ORDIALOG(IEN,"?"),-1)=0 S NOVALUE=1 Q
.S TYPE=$P($G(ORDIALOG(IEN,0)),U)
.;I TYPE="W" BREAK
.S CNT=0 F S CNT=$O(ORDIALOG(IEN,CNT)) Q:CNT'>0!(NOVALUE=1) D
..I $G(ORDIALOG(IEN,CNT))="" S NOVALUE=1 Q
..I TYPE="W",'$$HASTEXT(.ORDIALOG,IEN) S NOVALUE=1 Q
..S NOVALUE=0
S RESULT=$S(NOVALUE=1:0,1:1)
Q RESULT
;
;Entry point to defined any specific instructions to display to the end user for the QO editor
INSTR(CONVERT) ;
N TEXT
I CONVERT="INDICATION" D
.S TEXT(1)="This option provides a quick way to update Quick Orders for the new indication prompt. "
.S TEXT(2)="This option will prompt filtering questions to help decrease the number of Quick Orders to"
.S TEXT(3)=" review in a session. For each Quick Orders that is found the user will automatically enter the Quick Order Editor."
I CONVERT="TITRATION" D
.S TEXT(1)="This option provides a quick way to update Quick Orders for the new titration prompt. This option will search "
.S TEXT(2)="for Complex Outpatient Quick Orders containing a 'Then' conjunction. For each Quick Orders that is found the user "
.S TEXT(3)="will automatically enter the Quick Order Editor."
I $D(TEXT) W ! D FORMAT(.TEXT)
Q
;
;this determine if the QO is a complex quick order by checking the instruction fields.
ISCOMPL(ORDIALOG) ;
N CNT,INSTR,RESULT
S RESULT=0
S INSTR=$$PTR^ORCD("OR GTX INSTRUCTIONS")
S CNT=0 F S CNT=$O(ORDIALOG(INSTR,CNT)) Q:CNT'>0!(RESULT>1) D
.I $G(ORDIALOG(INSTR,CNT))'="" S RESULT=RESULT+1
Q RESULT
;
;this execute any special logic defined in the SETUP line tag
DOLOGIC(ARRAY,ORDIALOG) ;
N CODE,RESULT,RET
S CODE=ARRAY("LOGIC")
X CODE
S RESULT=RET
Q RESULT
;
;This is used to determine if a prompt does not have a value. This will only check prompts that were defined
;in the NOVALUE array that is defined in the SETUP line tag.
NOVALUE(ORDIALOG,ARRAY) ;
N CNT,IEN,HASVALUE,NODE,PROMPT,RESULT,TYPE
S HASVALUE=0
S PROMPT=""
F S PROMPT=$O(ARRAY("NOVALUE",PROMPT)) Q:PROMPT=""!(HASVALUE=1) D
.S NODE=$G(ORDIALOG("B",PROMPT))
.S IEN=+$P(NODE,U,2)
.I IEN=0
.S TYPE=$P($G(ORDIALOG(IEN,0)),U)
.S CNT=0 F S CNT=$O(ORDIALOG(IEN,CNT)) Q:CNT'>0!(HASVALUE=1) D
..I TYPE="W",$$HASTEXT(.ORDIALOG,IEN) S HASVALUE=1 Q
..I $G(ORDIALOG(IEN,CNT))'="" S HASVALUE=1 Q
S RESULT=$S(HASVALUE=1:0,1:1)
Q RESULT
;
;Write out the personal quick assigned by users
PERREP(PERARR) ;
N IEN,NAME,NODE,QOIEN,TEMP,USER,USRARR
S QOIEN=0
F S QOIEN=$O(PERARR(QOIEN)) Q:QOIEN'>0 D
.S NODE=PERARR(QOIEN),IEN=0
.F S IEN=$O(^ORD(101.44,"C",QOIEN,IEN)) Q:IEN'>0 D
..S TEMP=^ORD(101.44,IEN,0)
..I TEMP'["ORWDQ USR" Q
..S USER=+$P(TEMP,"USR",2)
..S NAME=$$GET1^DIQ(200,USER_",",.01)
..S USRARR(NAME,$P(NODE,U,2))=NODE
S NAME=""
F S NAME=$O(USRARR(NAME)) Q:NAME="" D
.W !!,"User: "_NAME
.S TEMP=""
.F S TEMP=$O(USRARR(NAME,TEMP)) Q:TEMP="" D
..W !," Print Name: "_TEMP
H 1
Q
;
;searches for quick orders
PROCESS(ARRAY,SUB,WHERE,PERARR,REPSUB) ;
;WHERE can be set to A: ALL, M: QO assigned to menu, order set, reminder, N: Qo not assigned to menu, order set, R: for Report searches as All
N DONE,HASVALUE,NOVALUE,ORDIALOG,PROMPT,QOIEN,TEMP
S DONE=0
S QOIEN=0 F S QOIEN=$O(^TMP($J,SUB,QOIEN)) Q:QOIEN'>0!(DONE=1) D
.I WHERE'="P",^TMP($J,SUB,QOIEN,"ISPERQO")=1 Q
.I WHERE="M",'$D(^TMP($J,SUB,QOIEN,"ORDER MENUS")),'$D(^TMP($J,SUB,QOIEN,"REMINDER DIALOGS")) Q
.I WHERE="N"&($D(^TMP($J,SUB,QOIEN,"ORDER MENUS"))!($D(^TMP($J,SUB,QOIEN,"REMINDER DIALOGS")))) Q
.K ORDIALOG D GETQDLG^ORCD(QOIEN)
.;M ORDIALOG=^TMP($J,SUB,QOIEN,"ORDIALOG")
.I +$G(ARRAY("ISCOMPLEX"))=1,$$CANBECOMPL(ORDIALOG),$$ISCOMPL(.ORDIALOG)<2 Q
.I +$G(ARRAY("ISSIMPLE"))=1,$$CANBECOMPL(ORDIALOG),$$ISCOMPL(.ORDIALOG)>1 Q
.;I QOIEN=15689 BREAK
.S HASVALUE=0,NOVALUE=0
.I $D(ARRAY("NOVALUE"))>1,$$NOVALUE(.ORDIALOG,.ARRAY)=0 Q
.I $D(ARRAY("HASVALUE"))>1,$$HASVALUE(.ORDIALOG,.ARRAY)=0 Q
.I $G(ARRAY("LOGIC"))'="",$$DOLOGIC(.ARRAY,.ORDIALOG)=0 Q
.;what to do with personal qo
.I WHERE="P" D Q
..I ^TMP($J,SUB,QOIEN,"ISPERQO")=1 S PERARR(QOIEN)=^TMP($J,SUB,QOIEN)
.I WHERE="R" D Q
..S ^TMP($J,REPSUB,QOIEN)=$S($D(^TMP($J,SUB,QOIEN,"ORDER MENUS")):1,$D(^TMP($J,SUB,QOIEN,"REMINDER DIALOGS")):1,1:0)
.I ARRAY("ACTION")="E" D Q
..S TEMP=$$EDITOR(QOIEN)
..I TEMP=-1 S DONE=1 Q
..I TEMP=0 Q
..I $$CONT^ORQOCONV()'=1 S DONE=1
Q
;
;entry point to editor one specific quick order selected by the end user
SPECIFIC ;
N DIC,Y
S DIC="^ORD(101.41,",DIC(0)="AEMQZ"
S DIC("S")="I $P($G(^ORD(101.41,Y,0)),U,4)=""Q"""
D ^DIC
I Y=-1 Q
D EDITOR(+Y)
Q
;
SETUP(OUTPUT,INPUT) ;
I INPUT="INDICATION" D Q
.S OUTPUT(1)="All medication and supplies Quick Orders"
.S OUTPUT(1,1)="PSJ OR CLINIC OE",OUTPUT(1,2)="CLINIC OR PAT FLUID OE"
.S OUTPUT(1,3)="PSJI OR PAT FLUID OE",OUTPUT(1,4)="PSH OERR",OUTPUT(1,5)="PSO OERR"
.S OUTPUT(1,6)="PSO SUPPLY",OUTPUT(1,7)="PSJ OR PAT OE"
.S OUTPUT(2)="Clinic Medications"
.S OUTPUT(2,1)="PSJ OR CLINIC OE"
.S OUTPUT(3)="Clinic Infusions",OUTPUT(3,1)="CLINIC OR PAT FLUID OE"
.S OUTPUT(4)="Infusion",OUTPUT(4,1)="PSJI OR PAT FLUID OE"
.S OUTPUT(5)="Non-VA Meds (Documentation)",OUTPUT(5,1)="PSH OERR"
.S OUTPUT(6)="Out. Meds",OUTPUT(6,1)="PSO OERR"
.S OUTPUT(7)="Supplies",OUTPUT(7,1)="PSO SUPPLY"
.S OUTPUT(8)="Inpt. Meds",OUTPUT(8,1)="PSJ OR PAT OE"
.S OUTPUT("GETQOSEL","PROMPT")="Select which quick orders to convert"
.S OUTPUT("GETQOSEL","HELPID")=5
.;S OUTPUT("ISCOMPLEX")=1
.;S OUTPUT("ISSIMPLE")=0
.S OUTPUT("HASVALUE","COMMENTS")=""
.S OUTPUT("NOVALUE","INDICATION")=""
.S OUTPUT("ACTION")="E"
.S OUTPUT("SPECIAL")=1
.S OUTPUT("SPECIAL","HELPID")=4
.S OUTPUT("SPECIAL","HELP")="Select the prompt conditions to search for."
.S OUTPUT("SPECIAL","PROMPT")="Select prompt conditions"
.S OUTPUT("TYPE")="INDICATION"
I INPUT="TITRATION" D Q
.S OUTPUT(1)="Out. Meds",OUTPUT(1,1)="PSO OERR"
.S OUTPUT("NOVALUE","TITRATION")=""
.S OUTPUT("ACTION")="E"
.S OUTPUT("TYPE")="TITRATION"
.S OUTPUT("ISCOMPLEX")=1
.S OUTPUT("PROMPT","AND/THEN","*","VALUE")="T"
.S OUTPUT("LOGIC")="S RET=$$ASKTITR^ORCDPS3()"
Q
;
SHOW(IEN) ;
N CNT
K ^TMP($J,"OR DESC",IEN)
D EN^ORORDDSC(IEN,"OR DESC")
S CNT=0 F S CNT=$O(^TMP($J,"OR DESC",IEN,CNT)) Q:CNT'>0 D
.W !,^TMP($J,"OR DESC",IEN,CNT)
Q
;
SPECIAL(TYPE,ARRAY) ;
I +$G(ARRAY("SPECIAL"))=0 Q ""
N DIR,HELP,HELPID,PROMPT,RESULT,Y
S RESULT=""
S HELPID=$S(+$G(ARRAY("SPECIAL","HELPID"))>0:ARRAY("SPECIAL","HELPID"),1:0)
S PROMPT=$S($G(ARRAY("SPECIAL","PROMPT"))'="":ARRAY("SPECIAL","PROMPT"),1:"Select the action")
S HELP=$s($G(ARRAY("SPECIAL","HELP"))'="":ARRAY("SPECIAL","HELP"),1:"Select the correct action")
I TYPE="INDICATION" D Q RESULT
.S DIR(0)="S^B:Both populated comment and no Indication field defined;C:Populated Comment Only;I:No Indication field defined"
.S DIR("A")=PROMPT
.S DIR("?")=HELP
.I HELPID>0 S DIR("??")="^D HELP^ORQOCONV("_HELPID_")"
.D ^DIR
.S RESULT=Y
.I Y'="B",Y'="C",Y'="I" Q
.I Y="B" Q
.I Y="C" K ARRAY("NOVALUE")
.I Y="I" K ARRAY("HASVALUE")
Q RESULT
;
WHERE() ;
N DIR,STR,Y
S STR="S^A:ALL (excluding personal quick order);M:QO ASSIGNED TO ORDER MENUS, ORDER SETS, OR REMINDER DIALOGS;N:QO NOT ASSIGNED TO ANY OF THESE ITEMS;"
S STR=STR_"P:PERSONAL QUICK ORDER REPORT;S:SPECIFIC QUICK ORDER;R:REPORT OUTPUT ONLY;Q:QUIT THE UPDATE UTILITY"
S DIR(0)=STR
S DIR("A")="Which QO to convert?"
S DIR("??")="^D HELP^ORQOCONV(1)"
D ^DIR
Q Y
;
HELP(ID) ;
N CNT,TEXT
S CNT=0
I ID=1 D
.S CNT=CNT+1,TEXT(CNT)="Select ALL to non personal quick orders\\ \\"
.S CNT=CNT+1,TEXT(CNT)="Select QO ASSIGNED TO ORDER MENUS, ORDER SETS, OR REMINDER DIALOGS to convert"
.S CNT=CNT+1,TEXT(CNT)="quick orders that are used in one of the following: Order Menus, Order Sets,"
.S CNT=CNT+1,TEXT(CNT)="or Reminder Dialogs.\\ \\"
.S CNT=CNT+1,TEXT(CNT)="Select QO NOT ASSIGNED TO ANY OF THESE ITEMS to convert quick orders that are"
.S CNT=CNT+1,TEXT(CNT)="not use in the following: Order Menus, Order Sets, or Reminder Dialogs.\\ \\"
.S CNT=CNT+1,TEXT(CNT)="Select PERSONAL QUICK ORDER REPORT this option create a list of all personal quick orders"
.S CNT=CNT+1,TEXT(CNT)="by user that meets the search criteria.\\ \\"
.S CNT=CNT+1,TEXT(CNT)="Select REPORT OUTPUT ONLY to display a report of the Quick Orders that need to be reviewed"
.S CNT=CNT+1,TEXT(CNT)="Select SPECIFIC QUICK ORDER to convert an individual quick order."
I ID=2 S CNT=CNT+1,TEXT(CNT)="Select E to edit the quick order. Select K to skip this quick order and move to the next one. Select Q to exit the conversion utility."
I ID=3 S CNT=CNT+1,TEXT(CNT)="Select a specific quick order type to search for."
I ID=4 D
.S CNT=CNT+1,TEXT(CNT)="Select B to search for Quick Orders that have text in the comment field and the indication field is blank.\\ \\"
.S CNT=CNT+1,TEXT(CNT)="Select C to search for Quick Orders that have text in the comment field and the indication field can either be blank or defined.\\ \\"
.S CNT=CNT+1,TEXT(CNT)="Select I to search for Quick Orders that have a blank indication field."
I ID=5 D
.S CNT=CNT+1,TEXT(CNT)="Select a specific quick order type to search for or select All medication and supplies Quick Orders to search for all the listed quick order types."
I ID=6 D
.S CNT=CNT+1,TEXT(CNT)="Select A to show all fields in the quick order report or select F to only display the fields the conversion utility is checking against"
D FORMAT(.TEXT)
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HORQOCONV 14547 printed Oct 16, 2024@18:33:50 Page 2
ORQOCONV ; SLC/AGP - Utility report for Order Dialogs ;Dec 08, 2021@10:45:18
+1 ;;3.0;ORDER ENTRY/RESULTS REPORTING;**405**;DEC 17, 1997;Build 211
+2 ;
+3 ; DBIA 5133: reading ^PXRMD file #801.41
+4 ;
+5 QUIT
+6 ;Prompt to determine what to when moving to the next quick order
ASK() ;
+1 NEW DIR,Y
+2 SET DIR(0)="S^E:EDIT THIS QUICK ORDER;K:SKIP THIS QUICK ORDER;Q:QUIT THE CONVERSION UTILITY"
+3 SET DIR("A")="Select the action"
+4 SET DIR("B")="E"
+5 SET DIR("?")="Select the action"
+6 SET DIR("??")="^D HELP^ORQOCONV(2)"
+7 DO ^DIR
+8 QUIT Y
+9 ;
+10 ;determine if the type of orders has a complex version of it.
CANBECOMPL(ORDIALOG) ;
+1 NEW NAME
+2 SET NAME=$PIECE(^ORD(101.41,ORDIALOG,0),U)
+3 IF NAME="PSJ OR PAT OE"
QUIT 1
+4 IF NAME="PSO OERR"
QUIT 1
+5 IF NAME="PSJ OR CLINIC OE"
QUIT 1
+6 IF NAME="PSH OERR"
QUIT 1
+7 QUIT 0
+8 ;
CONT() ;
+1 NEW DIR,Y
+2 SET DIR(0)="Y"
+3 SET DIR("A")="Process next Quick Order"
+4 SET DIR("B")="Yes"
+5 SET DIR("?")="Select Yes to continue to the next quick order. Or No to exit."
+6 DO ^DIR
+7 QUIT Y
+8 ;
+9 ;determine if disable Quick Orders should be shown
SKIPDIS() ;
+1 NEW DIR,Y
+2 SET DIR(0)="Y"
+3 SET DIR("A")="Skip Disable Quick Orders"
+4 SET DIR("B")="Yes"
+5 SET DIR("?")="Select Yes to skip disable quick orders."
+6 DO ^DIR
+7 QUIT Y
+8 ;
REPTYPE() ;
+1 NEW DIR,Y
+2 SET DIR(0)="S^A:SHOW ALL FIELDS IN THE QUICK ORDER;F:SHOW ONLY THE FIELDS THE UTILITY IS CHECKING"
+3 SET DIR("A")="Select the fields to display in the report"
+4 SET DIR("B")="A"
+5 SET DIR("?")="Select the display"
+6 SET DIR("??")="^D HELP^ORQOCONV(2)"
+7 DO ^DIR
+8 QUIT Y
+9 QUIT
+10 ;
+11 ;This write out a before and after of the QO and drop the user into the standard QO editor
EDITOR(QOIEN) ;
+1 NEW ORDG,TEMP
+2 WRITE !,"Before value:"
+3 DO SHOW(QOIEN)
+4 WRITE !
+5 SET TEMP=$$ASK()
+6 IF TEMP[U!(TEMP="Q")
QUIT -1
+7 IF TEMP="K"
QUIT 0
+8 SET ORDG=$PIECE($GET(^ORD(101.41,QOIEN,0)),U,5)
+9 WRITE !
+10 DO QCK0^ORCMEDT1(QOIEN)
+11 WRITE !,"After value:"
+12 DO SHOW(QOIEN)
+13 QUIT 1
+14 ;
+15 ;main entry point into the code. Convert is the identifier used by the code to determine what to do. WHERE is used to default how to find the QO.
+16 ;If Where is defined then line tag WHERE is not called.
EN(CONVERT,WHERE) ;
+1 NEW ARRAY,PERARR,QOS,REPSUB,REPTYPE,RETMENU,RETSTRCT,SKIPDIS,SUB,TEMP,TYPE
+2 SET SUB="ORQOCONV"
SET REPSUB="ORQOCONV REPORT"
+3 KILL ^TMP($JOB,SUB),^TMP($JOB,REPSUB)
EN1 ;
+1 DO SETUP(.ARRAY,CONVERT)
+2 DO INSTR(CONVERT)
+3 SET QOS=+$ORDER(ARRAY("A"),-1)
+4 SET TYPE=0
+5 IF QOS>1
SET TYPE=$$GETQOSEL(.ARRAY)
IF TYPE[U
QUIT
+6 IF TYPE=0
SET TYPE=1
+7 SET TEMP=$$SPECIAL(CONVERT,.ARRAY)
+8 IF TEMP=U
GOTO EN1
+9 IF TEMP="^^"
QUIT
EN2 ;
+1 SET REPTYPE=""
+2 IF WHERE=""
SET WHERE=$$WHERE
+3 IF WHERE=U
SET WHERE=""
GOTO EN1
+4 IF WHERE="^^"!(WHERE="Q")
QUIT
+5 IF WHERE="S"
DO SPECIFIC
QUIT
+6 IF WHERE="R"
SET REPTYPE=$$REPTYPE()
+7 IF REPTYPE=U
QUIT
+8 IF REPTYPE="^^"
GOTO EN2
+9 SET SKIPDIS=0
+10 IF WHERE'="R"
IF WHERE'="P"
SET SKIPDIS=$$SKIPDIS
+11 IF SKIPDIS=U
QUIT
+12 IF SKIPDIS="^^"
GOTO EN2
+13 WRITE !!,"Collecting Quick Order List, this may take some time",!
+14 SET RETSTRCT=0
SET RETMENU=0
+15 IF WHERE'="P"
IF WHERE'="A"
SET RETMENU=1
+16 DO GETQOS(TYPE,SUB,RETMENU,RETSTRCT,.ARRAY,SKIPDIS)
+17 WRITE !!,"Processing Quick Order List"
+18 DO PROCESS(.ARRAY,SUB,WHERE,.PERARR,REPSUB)
+19 IF WHERE="P"
DO PERREP(.PERARR)
+20 IF WHERE="R"
DO REPORT^ORQOCONV1(REPSUB,REPTYPE,.ARRAY)
+21 KILL ^TMP($JOB,SUB),^TMP($JOB,REPSUB)
+22 QUIT
+23 ;
FORMAT(TEXT) ;
+1 NEW NL,NOUT,TEXTOUT,X
+2 SET NL=+$ORDER(TEXT(""),-1)
+3 DO FORMAT^PXRMTEXT(1,80,.NL,.TEXT,.NOUT,.TEXTOUT)
+4 FOR X=1:1:NOUT
WRITE !,TEXTOUT(X)
+5 QUIT
+6 ;
GETQOS(TYPE,SUB,RETMENU,RETSTRCT,INPUTS,SKIPDIS) ;
+1 NEW ARRAY,CNT,QOTYPES
+2 SET CNT=0
FOR
SET CNT=$ORDER(INPUTS(TYPE,CNT))
if CNT'>0
QUIT
Begin DoDot:1
+3 SET QOTYPES(INPUTS(TYPE,CNT))=""
End DoDot:1
+4 DO FINDQO^ORQOUTL(.ARRAY,.QOTYPES,SUB,RETMENU,RETSTRCT,1,SKIPDIS)
+5 QUIT
+6 ;
+7 ;This section is used to prompt the user for selection information to help limit the QO to search for.
+8 ;This is used if the GETQOSEL array is defined in the setup section.
GETQOSEL(INPUTS) ;
+1 NEW CNT,DIR,HELP,PROMPT,Y
+2 SET HELP=+$GET(INPUTS("GETQOSEL","HELPID"))
+3 SET PROMPT=$SELECT($GET(INPUTS("GETQOSEL","PROMPT"))'="":INPUTS("GETQOSEL","PROMPT"),1:"Select Quick Order Type")
+4 IF HELP=0
SET HELP=3
+5 SET CNT=0
SET DIR(0)="S^"
FOR
SET CNT=$ORDER(INPUTS(CNT))
if CNT'>0
QUIT
Begin DoDot:1
+6 IF CNT=1
SET DIR(0)=DIR(0)_CNT_":"_INPUTS(CNT)
QUIT
+7 SET DIR(0)=DIR(0)_";"_CNT_":"_INPUTS(CNT)
End DoDot:1
+8 SET DIR("A")=INPUTS("GETQOSEL","PROMPT")
+9 SET DIR("?")="Select the type of Quick Order to search for."
+10 SET DIR("??")="^D HELP^ORQOCONV("_HELP_")"
+11 DO ^DIR
+12 QUIT Y
+13 ;
HASTEXT(ORDIALOG,IEN) ;
+1 NEW CNT,INST,TIDX,VALUE
+2 SET CNT=0
+3 SET INST=0
FOR
SET INST=$ORDER(ORDIALOG(IEN,INST))
if INST'>0!(CNT>0)
QUIT
Begin DoDot:1
+4 SET VALUE=$GET(ORDIALOG(IEN,INST))
IF VALUE'["^TMP("
QUIT
+5 SET TIDX=0
FOR
SET TIDX=$ORDER(@VALUE@(TIDX))
if TIDX'>0!(CNT>0)
QUIT
Begin DoDot:2
+6 IF @VALUE@(TIDX,0)'=""
SET CNT=CNT+1
End DoDot:2
End DoDot:1
+7 QUIT $SELECT(CNT>0:1,1:0)
+8 ;
+9 ;This is used to determine if a prompt has a value. This will only check prompts that were defined
+10 ;in the HASVALUE array that is defined in the SETUP line tag.
HASVALUE(ORDIALOG,ARRAY) ;
+1 NEW CNT,IEN,NODE,NOVALUE,PROMPT,RESULT,TYPE
+2 SET NOVALUE=0
+3 SET PROMPT=""
+4 FOR
SET PROMPT=$ORDER(ARRAY("HASVALUE",PROMPT))
if PROMPT=""!(NOVALUE=1)
QUIT
Begin DoDot:1
+5 SET NODE=$GET(ORDIALOG("B",PROMPT))
+6 SET IEN=+$PIECE(NODE,U,2)
+7 IF +$ORDER(ORDIALOG(IEN,"?"),-1)=0
SET NOVALUE=1
QUIT
+8 SET TYPE=$PIECE($GET(ORDIALOG(IEN,0)),U)
+9 ;I TYPE="W" BREAK
+10 SET CNT=0
FOR
SET CNT=$ORDER(ORDIALOG(IEN,CNT))
if CNT'>0!(NOVALUE=1)
QUIT
Begin DoDot:2
+11 IF $GET(ORDIALOG(IEN,CNT))=""
SET NOVALUE=1
QUIT
+12 IF TYPE="W"
IF '$$HASTEXT(.ORDIALOG,IEN)
SET NOVALUE=1
QUIT
+13 SET NOVALUE=0
End DoDot:2
End DoDot:1
+14 SET RESULT=$SELECT(NOVALUE=1:0,1:1)
+15 QUIT RESULT
+16 ;
+17 ;Entry point to defined any specific instructions to display to the end user for the QO editor
INSTR(CONVERT) ;
+1 NEW TEXT
+2 IF CONVERT="INDICATION"
Begin DoDot:1
+3 SET TEXT(1)="This option provides a quick way to update Quick Orders for the new indication prompt. "
+4 SET TEXT(2)="This option will prompt filtering questions to help decrease the number of Quick Orders to"
+5 SET TEXT(3)=" review in a session. For each Quick Orders that is found the user will automatically enter the Quick Order Editor."
End DoDot:1
+6 IF CONVERT="TITRATION"
Begin DoDot:1
+7 SET TEXT(1)="This option provides a quick way to update Quick Orders for the new titration prompt. This option will search "
+8 SET TEXT(2)="for Complex Outpatient Quick Orders containing a 'Then' conjunction. For each Quick Orders that is found the user "
+9 SET TEXT(3)="will automatically enter the Quick Order Editor."
End DoDot:1
+10 IF $DATA(TEXT)
WRITE !
DO FORMAT(.TEXT)
+11 QUIT
+12 ;
+13 ;this determine if the QO is a complex quick order by checking the instruction fields.
ISCOMPL(ORDIALOG) ;
+1 NEW CNT,INSTR,RESULT
+2 SET RESULT=0
+3 SET INSTR=$$PTR^ORCD("OR GTX INSTRUCTIONS")
+4 SET CNT=0
FOR
SET CNT=$ORDER(ORDIALOG(INSTR,CNT))
if CNT'>0!(RESULT>1)
QUIT
Begin DoDot:1
+5 IF $GET(ORDIALOG(INSTR,CNT))'=""
SET RESULT=RESULT+1
End DoDot:1
+6 QUIT RESULT
+7 ;
+8 ;this execute any special logic defined in the SETUP line tag
DOLOGIC(ARRAY,ORDIALOG) ;
+1 NEW CODE,RESULT,RET
+2 SET CODE=ARRAY("LOGIC")
+3 XECUTE CODE
+4 SET RESULT=RET
+5 QUIT RESULT
+6 ;
+7 ;This is used to determine if a prompt does not have a value. This will only check prompts that were defined
+8 ;in the NOVALUE array that is defined in the SETUP line tag.
NOVALUE(ORDIALOG,ARRAY) ;
+1 NEW CNT,IEN,HASVALUE,NODE,PROMPT,RESULT,TYPE
+2 SET HASVALUE=0
+3 SET PROMPT=""
+4 FOR
SET PROMPT=$ORDER(ARRAY("NOVALUE",PROMPT))
if PROMPT=""!(HASVALUE=1)
QUIT
Begin DoDot:1
+5 SET NODE=$GET(ORDIALOG("B",PROMPT))
+6 SET IEN=+$PIECE(NODE,U,2)
+7 IF IEN=0
+8 SET TYPE=$PIECE($GET(ORDIALOG(IEN,0)),U)
+9 SET CNT=0
FOR
SET CNT=$ORDER(ORDIALOG(IEN,CNT))
if CNT'>0!(HASVALUE=1)
QUIT
Begin DoDot:2
+10 IF TYPE="W"
IF $$HASTEXT(.ORDIALOG,IEN)
SET HASVALUE=1
QUIT
+11 IF $GET(ORDIALOG(IEN,CNT))'=""
SET HASVALUE=1
QUIT
End DoDot:2
End DoDot:1
+12 SET RESULT=$SELECT(HASVALUE=1:0,1:1)
+13 QUIT RESULT
+14 ;
+15 ;Write out the personal quick assigned by users
PERREP(PERARR) ;
+1 NEW IEN,NAME,NODE,QOIEN,TEMP,USER,USRARR
+2 SET QOIEN=0
+3 FOR
SET QOIEN=$ORDER(PERARR(QOIEN))
if QOIEN'>0
QUIT
Begin DoDot:1
+4 SET NODE=PERARR(QOIEN)
SET IEN=0
+5 FOR
SET IEN=$ORDER(^ORD(101.44,"C",QOIEN,IEN))
if IEN'>0
QUIT
Begin DoDot:2
+6 SET TEMP=^ORD(101.44,IEN,0)
+7 IF TEMP'["ORWDQ USR"
QUIT
+8 SET USER=+$PIECE(TEMP,"USR",2)
+9 SET NAME=$$GET1^DIQ(200,USER_",",.01)
+10 SET USRARR(NAME,$PIECE(NODE,U,2))=NODE
End DoDot:2
End DoDot:1
+11 SET NAME=""
+12 FOR
SET NAME=$ORDER(USRARR(NAME))
if NAME=""
QUIT
Begin DoDot:1
+13 WRITE !!,"User: "_NAME
+14 SET TEMP=""
+15 FOR
SET TEMP=$ORDER(USRARR(NAME,TEMP))
if TEMP=""
QUIT
Begin DoDot:2
+16 WRITE !," Print Name: "_TEMP
End DoDot:2
End DoDot:1
+17 HANG 1
+18 QUIT
+19 ;
+20 ;searches for quick orders
PROCESS(ARRAY,SUB,WHERE,PERARR,REPSUB) ;
+1 ;WHERE can be set to A: ALL, M: QO assigned to menu, order set, reminder, N: Qo not assigned to menu, order set, R: for Report searches as All
+2 NEW DONE,HASVALUE,NOVALUE,ORDIALOG,PROMPT,QOIEN,TEMP
+3 SET DONE=0
+4 SET QOIEN=0
FOR
SET QOIEN=$ORDER(^TMP($JOB,SUB,QOIEN))
if QOIEN'>0!(DONE=1)
QUIT
Begin DoDot:1
+5 IF WHERE'="P"
IF ^TMP($JOB,SUB,QOIEN,"ISPERQO")=1
QUIT
+6 IF WHERE="M"
IF '$DATA(^TMP($JOB,SUB,QOIEN,"ORDER MENUS"))
IF '$DATA(^TMP($JOB,SUB,QOIEN,"REMINDER DIALOGS"))
QUIT
+7 IF WHERE="N"&($DATA(^TMP($JOB,SUB,QOIEN,"ORDER MENUS"))!($DATA(^TMP($JOB,SUB,QOIEN,"REMINDER DIALOGS"))))
QUIT
+8 KILL ORDIALOG
DO GETQDLG^ORCD(QOIEN)
+9 ;M ORDIALOG=^TMP($J,SUB,QOIEN,"ORDIALOG")
+10 IF +$GET(ARRAY("ISCOMPLEX"))=1
IF $$CANBECOMPL(ORDIALOG)
IF $$ISCOMPL(.ORDIALOG)<2
QUIT
+11 IF +$GET(ARRAY("ISSIMPLE"))=1
IF $$CANBECOMPL(ORDIALOG)
IF $$ISCOMPL(.ORDIALOG)>1
QUIT
+12 ;I QOIEN=15689 BREAK
+13 SET HASVALUE=0
SET NOVALUE=0
+14 IF $DATA(ARRAY("NOVALUE"))>1
IF $$NOVALUE(.ORDIALOG,.ARRAY)=0
QUIT
+15 IF $DATA(ARRAY("HASVALUE"))>1
IF $$HASVALUE(.ORDIALOG,.ARRAY)=0
QUIT
+16 IF $GET(ARRAY("LOGIC"))'=""
IF $$DOLOGIC(.ARRAY,.ORDIALOG)=0
QUIT
+17 ;what to do with personal qo
+18 IF WHERE="P"
Begin DoDot:2
+19 IF ^TMP($JOB,SUB,QOIEN,"ISPERQO")=1
SET PERARR(QOIEN)=^TMP($JOB,SUB,QOIEN)
End DoDot:2
QUIT
+20 IF WHERE="R"
Begin DoDot:2
+21 SET ^TMP($JOB,REPSUB,QOIEN)=$SELECT($DATA(^TMP($JOB,SUB,QOIEN,"ORDER MENUS")):1,$DATA(^TMP($JOB,SUB,QOIEN,"REMINDER DIALOGS")):1,1:0)
End DoDot:2
QUIT
+22 IF ARRAY("ACTION")="E"
Begin DoDot:2
+23 SET TEMP=$$EDITOR(QOIEN)
+24 IF TEMP=-1
SET DONE=1
QUIT
+25 IF TEMP=0
QUIT
+26 IF $$CONT^ORQOCONV()'=1
SET DONE=1
End DoDot:2
QUIT
End DoDot:1
+27 QUIT
+28 ;
+29 ;entry point to editor one specific quick order selected by the end user
SPECIFIC ;
+1 NEW DIC,Y
+2 SET DIC="^ORD(101.41,"
SET DIC(0)="AEMQZ"
+3 SET DIC("S")="I $P($G(^ORD(101.41,Y,0)),U,4)=""Q"""
+4 DO ^DIC
+5 IF Y=-1
QUIT
+6 DO EDITOR(+Y)
+7 QUIT
+8 ;
SETUP(OUTPUT,INPUT) ;
+1 IF INPUT="INDICATION"
Begin DoDot:1
+2 SET OUTPUT(1)="All medication and supplies Quick Orders"
+3 SET OUTPUT(1,1)="PSJ OR CLINIC OE"
SET OUTPUT(1,2)="CLINIC OR PAT FLUID OE"
+4 SET OUTPUT(1,3)="PSJI OR PAT FLUID OE"
SET OUTPUT(1,4)="PSH OERR"
SET OUTPUT(1,5)="PSO OERR"
+5 SET OUTPUT(1,6)="PSO SUPPLY"
SET OUTPUT(1,7)="PSJ OR PAT OE"
+6 SET OUTPUT(2)="Clinic Medications"
+7 SET OUTPUT(2,1)="PSJ OR CLINIC OE"
+8 SET OUTPUT(3)="Clinic Infusions"
SET OUTPUT(3,1)="CLINIC OR PAT FLUID OE"
+9 SET OUTPUT(4)="Infusion"
SET OUTPUT(4,1)="PSJI OR PAT FLUID OE"
+10 SET OUTPUT(5)="Non-VA Meds (Documentation)"
SET OUTPUT(5,1)="PSH OERR"
+11 SET OUTPUT(6)="Out. Meds"
SET OUTPUT(6,1)="PSO OERR"
+12 SET OUTPUT(7)="Supplies"
SET OUTPUT(7,1)="PSO SUPPLY"
+13 SET OUTPUT(8)="Inpt. Meds"
SET OUTPUT(8,1)="PSJ OR PAT OE"
+14 SET OUTPUT("GETQOSEL","PROMPT")="Select which quick orders to convert"
+15 SET OUTPUT("GETQOSEL","HELPID")=5
+16 ;S OUTPUT("ISCOMPLEX")=1
+17 ;S OUTPUT("ISSIMPLE")=0
+18 SET OUTPUT("HASVALUE","COMMENTS")=""
+19 SET OUTPUT("NOVALUE","INDICATION")=""
+20 SET OUTPUT("ACTION")="E"
+21 SET OUTPUT("SPECIAL")=1
+22 SET OUTPUT("SPECIAL","HELPID")=4
+23 SET OUTPUT("SPECIAL","HELP")="Select the prompt conditions to search for."
+24 SET OUTPUT("SPECIAL","PROMPT")="Select prompt conditions"
+25 SET OUTPUT("TYPE")="INDICATION"
End DoDot:1
QUIT
+26 IF INPUT="TITRATION"
Begin DoDot:1
+27 SET OUTPUT(1)="Out. Meds"
SET OUTPUT(1,1)="PSO OERR"
+28 SET OUTPUT("NOVALUE","TITRATION")=""
+29 SET OUTPUT("ACTION")="E"
+30 SET OUTPUT("TYPE")="TITRATION"
+31 SET OUTPUT("ISCOMPLEX")=1
+32 SET OUTPUT("PROMPT","AND/THEN","*","VALUE")="T"
+33 SET OUTPUT("LOGIC")="S RET=$$ASKTITR^ORCDPS3()"
End DoDot:1
QUIT
+34 QUIT
+35 ;
SHOW(IEN) ;
+1 NEW CNT
+2 KILL ^TMP($JOB,"OR DESC",IEN)
+3 DO EN^ORORDDSC(IEN,"OR DESC")
+4 SET CNT=0
FOR
SET CNT=$ORDER(^TMP($JOB,"OR DESC",IEN,CNT))
if CNT'>0
QUIT
Begin DoDot:1
+5 WRITE !,^TMP($JOB,"OR DESC",IEN,CNT)
End DoDot:1
+6 QUIT
+7 ;
SPECIAL(TYPE,ARRAY) ;
+1 IF +$GET(ARRAY("SPECIAL"))=0
QUIT ""
+2 NEW DIR,HELP,HELPID,PROMPT,RESULT,Y
+3 SET RESULT=""
+4 SET HELPID=$SELECT(+$GET(ARRAY("SPECIAL","HELPID"))>0:ARRAY("SPECIAL","HELPID"),1:0)
+5 SET PROMPT=$SELECT($GET(ARRAY("SPECIAL","PROMPT"))'="":ARRAY("SPECIAL","PROMPT"),1:"Select the action")
+6
*** ERROR ***
SET HELP=$s($GET(ARRAY("SPECIAL","HELP"))'="":ARRAY("SPECIAL","HELP"),1:"Select the correct action")
+7 IF TYPE="INDICATION"
Begin DoDot:1
+8 SET DIR(0)="S^B:Both populated comment and no Indication field defined;C:Populated Comment Only;I:No Indication field defined"
+9 SET DIR("A")=PROMPT
+10 SET DIR("?")=HELP
+11 IF HELPID>0
SET DIR("??")="^D HELP^ORQOCONV("_HELPID_")"
+12 DO ^DIR
+13 SET RESULT=Y
+14 IF Y'="B"
IF Y'="C"
IF Y'="I"
QUIT
+15 IF Y="B"
QUIT
+16 IF Y="C"
KILL ARRAY("NOVALUE")
+17 IF Y="I"
KILL ARRAY("HASVALUE")
End DoDot:1
QUIT RESULT
+18 QUIT RESULT
+19 ;
WHERE() ;
+1 NEW DIR,STR,Y
+2 SET STR="S^A:ALL (excluding personal quick order);M:QO ASSIGNED TO ORDER MENUS, ORDER SETS, OR REMINDER DIALOGS;N:QO NOT ASSIGNED TO ANY OF THESE ITEMS;"
+3 SET STR=STR_"P:PERSONAL QUICK ORDER REPORT;S:SPECIFIC QUICK ORDER;R:REPORT OUTPUT ONLY;Q:QUIT THE UPDATE UTILITY"
+4 SET DIR(0)=STR
+5 SET DIR("A")="Which QO to convert?"
+6 SET DIR("??")="^D HELP^ORQOCONV(1)"
+7 DO ^DIR
+8 QUIT Y
+9 ;
HELP(ID) ;
+1 NEW CNT,TEXT
+2 SET CNT=0
+3 IF ID=1
Begin DoDot:1
+4 SET CNT=CNT+1
SET TEXT(CNT)="Select ALL to non personal quick orders\\ \\"
+5 SET CNT=CNT+1
SET TEXT(CNT)="Select QO ASSIGNED TO ORDER MENUS, ORDER SETS, OR REMINDER DIALOGS to convert"
+6 SET CNT=CNT+1
SET TEXT(CNT)="quick orders that are used in one of the following: Order Menus, Order Sets,"
+7 SET CNT=CNT+1
SET TEXT(CNT)="or Reminder Dialogs.\\ \\"
+8 SET CNT=CNT+1
SET TEXT(CNT)="Select QO NOT ASSIGNED TO ANY OF THESE ITEMS to convert quick orders that are"
+9 SET CNT=CNT+1
SET TEXT(CNT)="not use in the following: Order Menus, Order Sets, or Reminder Dialogs.\\ \\"
+10 SET CNT=CNT+1
SET TEXT(CNT)="Select PERSONAL QUICK ORDER REPORT this option create a list of all personal quick orders"
+11 SET CNT=CNT+1
SET TEXT(CNT)="by user that meets the search criteria.\\ \\"
+12 SET CNT=CNT+1
SET TEXT(CNT)="Select REPORT OUTPUT ONLY to display a report of the Quick Orders that need to be reviewed"
+13 SET CNT=CNT+1
SET TEXT(CNT)="Select SPECIFIC QUICK ORDER to convert an individual quick order."
End DoDot:1
+14 IF ID=2
SET CNT=CNT+1
SET TEXT(CNT)="Select E to edit the quick order. Select K to skip this quick order and move to the next one. Select Q to exit the conversion utility."
+15 IF ID=3
SET CNT=CNT+1
SET TEXT(CNT)="Select a specific quick order type to search for."
+16 IF ID=4
Begin DoDot:1
+17 SET CNT=CNT+1
SET TEXT(CNT)="Select B to search for Quick Orders that have text in the comment field and the indication field is blank.\\ \\"
+18 SET CNT=CNT+1
SET TEXT(CNT)="Select C to search for Quick Orders that have text in the comment field and the indication field can either be blank or defined.\\ \\"
+19 SET CNT=CNT+1
SET TEXT(CNT)="Select I to search for Quick Orders that have a blank indication field."
End DoDot:1
+20 IF ID=5
Begin DoDot:1
+21 SET CNT=CNT+1
SET TEXT(CNT)="Select a specific quick order type to search for or select All medication and supplies Quick Orders to search for all the listed quick order types."
End DoDot:1
+22 IF ID=6
Begin DoDot:1
+23 SET CNT=CNT+1
SET TEXT(CNT)="Select A to show all fields in the quick order report or select F to only display the fields the conversion utility is checking against"
End DoDot:1
+24 DO FORMAT(.TEXT)
+25 QUIT
+26 ;