1. Can a defined “Order Set” name be placed in the DESCRIPTION argument of the function, MEL_ADD_ORDER?
2. If so, will it store and print each order in the order set?
3. If it prints, is it one order per page, or all orders of the order set on one page?
I don't believe they could because Order Sets are not any one Type or Category, and those are required parameters.
You can write a function to call a bunch of MEL_ADD_ORDERS to get the same effect. However for the reason David explained above it is a bit of reinventing the wheel. It depends on how badly you want to do it. In this circumstance each of the orders would print individually. You could do something like this in a button:
{fnorderset("Chem-6")}
Then have a function like this:
fn fnorderset(setName)
{
COND
CASE setName == "Chem-6"
//each of the MEL_ADD_ORDER statements go here
CASE setName == "Diabetic"
//next group goes here, and so on
ENDCOND
}
This is just off the top of my head. Hope it helps.
Brad
Using arrays, it is possible to do what you want, however it requires that the order information be stored in the code (hard coded), which is not always the better approach. Conversely, you could create a custom order list that holds only the individual orders in the order set, but that can really over populate your order custom list name list. To combat this, some have used a naming convention such as 'zOS_OrderSetName'. The 'z' pushes the name to the bottom of the list, the 'OS_' signifies that the contents pertain to an order set, and the 'OrderSetName' is the unique name you give to the order set.
Then using Custom Lists as the data source, you can loop through, identify and call the order set lists, and accomplish what you want. Note - it will print each order individually based on order type and service provider link.