To find out who signed an obsterm, you will need to use a MEL function
LIST_OBS(observation,status,list_type,format)
where
observation = name of an obsterm
status = "signed"
list_type = "delimited"
format – "value" or "valuedate"
I am assuming you are using Visual Form Editor to edit your forms.
In VFE, your form is on the left, and then on the right is a white space area for putting MEL code.
If you type LIST_OBS in the white space to the right of the form,
then highlight LIST_OBS and hit the keyboard F1 key,
it should open up Centricity Help to the page describing LIST_OBS.
(Delete LIST_OBS after you have the HELP open, as it was just a way to open to that particular MEL function so you can read up on it.)
OK - so here is a taste of what MEL coding for this is like:
Example:
// define a local variable retlist - to store the returned values in
// get data for obsterm "HEIGHT"
local retlist=""
retlist = LIST_OBS("HEIGHT","signed","delimited","valuedate")
LIST_OBS returns data into the "retlist" variable in the following format:
Field # |
Description |
Example |
1 |
Observation Value |
69 |
2 |
Observation Date |
01/01/2003 |
3 |
Observation Time |
5:05:00 PM |
4 |
Signing User |
Jerry Lewis, M.D.
Note. Blank if unsigned
|
5 |
Entering User |
Dean Martin |
6 |
Flags |
AA |
7 |
Comment |
Measured with ruler |
8 |
State |
F |
9 |
Location of Care |
Eastside |
10 |
Document Type |
Phone Note |
11 |
Visible Document ID |
23 |
Note: delimited - Returns a delimited list of all observation information,
with pipes(|) between observation records
and carets (^) between fields.
so the data returned (for example) looks like this:
71 (07/11/2003 11:20:00 AM)^07/11/2003^11:20:00 AM^Julius Hibbard^Julius Hibbard^^^^Westside^Office Visit^235|70 (07/11/2003 11:19:30 AM)^07/11/2003^11:19:30 AM^Julius Hibbard^Julius Hibbard^^^^Enterprise Clinic - ALL^Office Visit^234|71.5 (06/09/2003 2:13:50 PM)^06/09/2003^2:13:50 PM^Harry Winston MD^Harry Winston MD^^^^Eastside^Office Visit^89
And then you have to have more MEL code to split out the data until you can pull out just field (4) the Signing User.
The MEL Code to do that would look something like this, and uses another MEL function called GETFIELD (you can look it up the same way I showed you for LIST_OBS):
local anAry, aRow
local signedBy = "", dateSigned=""
anAry = GETFIELD(retlist,"|","") //store the rows of data into anAry
//take the first row stored in anAry
aRow = GETFIELD(anAry[1],"^","") //store the fields of the first row into aRow
signedBy = aRow[4]
dateSigned = aRow[2]
This is basically what you need to do. I am not sure if the first row is going to always be the most recently signed, or if you need to put this into a FOR loop and check dates.
Posted : June 13, 2014 6:57 am