I built a form that has a custom CPOE area similar to the CPS CPOE. When I save the form, I get the follow error:
ERROR: Unable to open library Utility. Functions will not be included in clinical kit
Any idea what this means?
It means that VFE cannot find the specified library name in the folder designated in VFE Options for library files. More information can be found in VFE Help - Reference - Configuring the application - directories.
A library file is a source code file created in VFE and saved as a '.lib' file. Libraries are USER created files that contain functions. From VFE Help:
Function Libraries are groups of functions that can be shared between forms. This allows a single function to be called from multiple forms without requiring the function to be copied to each form. This also reduces the size of the form itself because the functions are stored within another (text) component. Furthermore if a function needs to be updated for some reason (such as an error is found) this can be done in one place and all forms calling the function will reflect the changes.
The library you are speaking of *may* be the one created by Dr. Michael Thompson and posted to the Trading Post some time ago. I say may be because as user generated content, someone else could have create a library with the same name. If you want to test your form using Dr. Thompson's library, the link is below.
https://centricityusers.com/forum/general-purpose-function-libraries/
You might also want to review the VFE help file for assistance in understanding how they work.
So I found the missing Library...However, when I go to associate a problem in CPOE nothing shows up in the dropdown for me. Here is the fn I have:
!fn fnProbDropdown(strList)
{
local lCounter
local strProblemList
local lBuffer
local strFormattedList = ""
strProblemList = getfield(strList, "|", "")
for lCounter = 1, lCounter <= size(strProblemList), lCounter = lCounter + 1 do
strProblemList[lCounter] = getfield(strProblemList[lCounter], "^", "")
strFormattedList = strFormattedList + str(lCounter) + ". " + fnConvertProblemTypeToString(strProblemList[lCounter][1], FALSE) /* Number and prefix */
/* Need to remove commas from problem name */
lBuffer = strProblemList[lCounter][2]
lBuffer = ReplaceStr(lBuffer, ",", "\,")
strFormattedList = strFormattedList + lBuffer + ","
endfor
if (lCounter > 1) then
strFormattedList = remove(strFormattedList, size(strFormattedList))
endif
return strFormattedList
}