description
Adds a new test or service order to the patient’s list of orders.
Note. MEL_ADD_ORDER cannot add referrals.
Do not use this function outside of a chart update; otherwise, the note will not be signed.
syntax
MEL_ADD_ORDER(TYPE,CATEGORY,DESCRIPTION, MODIFIER,DIAGNOSIS CODE(S),DIAGNOSIS CODE DESCRIPTION(S),COMMENT,UNITS, PRIORITY,AUTHORIZING PROVIDER, ORDERDATE)
arguments
type |
The type of order to be added:
T = Test
S = Service
Note. You cannot add a referral from an encounter form using MEL_ADD_ORDER.
|
category |
The order category to which this order belongs. Necessary because the same orders can exist in different categories. The specified category must be an existing order category
|
description |
The order description must match an existing order in the category used in the second argument. |
modifier |
Optional. A pipe (|) delimited list of order modifier codes associated with this order |
diagnosis codes
|
Optional. A pipe (|) delimited list of diagnosis codes associated with this order
|
diagnosis code descriptions |
Optional. A pipe (|) delimited list of diagnosis descriptions associated with this order. If the DIAGNOSIS CODES argument is used, the DIAGNOSIS CODE DESCRIPTIONS argument cannot be blank. The number of items in the codes list must match the number of items in the code descriptions list.
|
comment |
Optional. The instructions or comments associated with this order, up to 2000 characters. If you exceed the 2000-character limit, you will encounter an error. |
units |
Optional. The number of units for this order |
priority |
Optional. The priority of this order (N = normal, U = urgent, or S = stat) |
authorizing provider |
Optional. The login user name of the authorizing provider for this order. If this argument is left blank, the default authorizing provider is used (either the document or patient’s responsible provider as set up in Settings > Preferences > Chart > Order Entry).
|
orderdate |
Optional. The date the order is to be performed |
when to evaluate
This function does not support the ability to evaluate continuously.
returns
This function adds the specified order to the patient’s chart.
error handling
If you’ve used this function in an encounter form, the error code is not returned to the text translation. It is captured in MEL and can be used in conjunction with USEROK or USERYESNO to pop up an alert to the user, indicating that there is a problem with their data entry. To determine what type of error occurred, use the following error codes:
-1 : Invalid Order Type
-2 : Invalid order category
-3 : Invalid Description
-4 : Order obsolete
-5 : Invalid Diagnosis Code
-6 : Comments field too long
-7 : Invalid Priority
-8 : Invalid or obsolete authorizing provider
-9 : Invalid order date
-10: Invalid Modifier
-11: Additional information is required for this order
-12: Unequal number of diagnosis codes and diagnosis code descriptions
-13: Invalid quantity or units
comments
You may use a diagnosis that does not appear on the patient’s problem list. It will be added to the order, but will not appear on the patient’s problems list.
example
{MEL_ADD_ORDER("S","Cardiology Fee Ticket","Dual Chamber Electronic Analysis with reprogramming","26","ICD-410.9|ICD-401.1","ACUTE MI|HYPERTENSION","Include interpretation","1","S","Sam Mitchell MD","08/22/2003")}
Adds the specified service order to the patient’s order list, with two diagnosis, a modifier, comment, one unit of service, a priority of Stat, Sam Mitchell as the authorizing provider, and an order date of August 22, 2003
Change the part in red to DOCUMENT.ORDER_COMMENTS, the name of the field on your form, no quotes.
|