OK. I've written the code a bunch of different ways and it's still just populating the patient name. I was told to use patient.firstname. My statement is like this....blah blah blah (patient.firstname) blah blah blah. I have written it with quotes "blah blah blah" (patient.firstname) "blah blah" and "blah blah blah" + patient.firstname "blah blah." What am I missing?
Every time it still says patient.firstname with or without quotes depending on how I wrote it.
HELP! Much appreciated!
Try:
blah blah blah + {PATIENT.FIRSTNAME} + blah blah
Form text translation:
{CFMT(STR(PATIENT.FIRSTNAME), "1", "
", "1", "
")}
In a statement:
{if OBSNOW("HPI") <> "" then FMT(" "+PATIENT.FIRSTNAME + " " + PATIENT.LASTNAME + " is a " + PATIENT.FORMATTEDAGE + " " + PATIENT.SEX + ". ", ",1") else "" endif}
MEL commands need the {} to read. When using a command for the first time I like to go into Quick Text and insert the symbol, take note of what is inserted (I typically copy and paste it into notepad) then go into a update and test the quick text to confirm what is returned.
agreed
That didn't work. Once I pulled the form in and tested it, it threw some extra characters in but never populated the patient's name. This is very frustrating. You would think adding a name to a note would be easy....
Need to see the exact context of what you are doing. Send a screen shot.
Here are the screen shots in pdf. Where it says the patient in the note, I need it to pull in their name. This is an action button that puts text into his note for his plan.
First, I would change from 'set values' to 'RUNPROCESS'.
The MEL would then look like this:
OBSNOW("PLAN","The patient is ...." + str(PATIENT.FIRSTNAME) + " text continues...")
If you need to append the text, then use this:
OBSNOW("PLAN",OBSNOW("PLAN") + " The patient is ...." + str(PATIENT.FIRSTNAME) + " text continues...")
Be careful though, as the text appears to be quite long and the 2K limit might be an issue.
Either that or build a function and have that function provide all the text. You would add the function to the button and leave it at set values. You can also have the function determine the sex of the patient and change the "she" into "he" based on the patient sex.