Can anyone help with this?
It won't insert a medication....
I think it is the blank fields, but I don;t want anything in those fields, especially not the enddate
MEL_ADD_MEDICATION("MIRENA 20 MCG/24HR IU IUD", "IUD Inserted",._todaysdate,"69757","","1","0","Y","","z30.430|z30.9","IUD Insertion|Contraception Management","false","")
You may need to provide more information before I can answer the question. However, it appears you are wanting to insert the current date as the start date parameter (3rd parameter). The MEL_ADD_MEDICATION function requires all parameters to be strings. Try using:
str(._todaysdate)
instead of ._todaysdate
It appears this function requires an end date (5th parameter) to be specified as well. Hopefully it will accept an empty string ("") as you currently have in your code string if the medication has no specified end date.
I agree about the date format. Mine puts in 10 months from today as an end date, but here's a working example.
{MEL_ADD_MEDICATION("FLUVIRIN INJ", "Administered on "+str(._TODAYSDATE), str(._TODAYSDATE),"66521011610", ADDDATES(str(._TODAYSDATE), "0", "10", "0"), "0", "0")}
Thank you both, for the help and speedy replies!!
definitely the lack of "str(._todaysdate)" was hanging it up.
A blank string is also valid for historical drugs, in case you were wondering. Thank you for the working sample as well!
You are welcome. Not converting dates to strings is a common oversight when dealing with MEL functions that require dates. I can't tell you how many times I have done the same thing when using the ._todaysdate symbol. Glad you are back on track!