When I initially set up a text component with:
{LOC.NAME}
{LOC.ADDRESS1} {LOC.ADDRESS2}
{LOC.CITY}, {LOC.STATE} {LOC.ZIP}
{LOC.PRIMPHONE} Fax: {LOC.FAXPHONE}
It seemed to be fine, but now I get the invalid row error pretty consistently but not all the time as sometimes it still works fine.
Anyway to make sure this works every time?
Thanks in advance.
Why do you get an invalid row? Because not assigned to a location code?
Inside a letter I just included the following logic:
{if size(PATIENT.ADDRESS2)>0 then PATIENT.ADDRESS2 else PATIENT.CITY + ", " + PATIENT.STATE + " " + PATIENT.ZIP endif}
{if size(PATIENT.ADDRESS2)>0 then PATIENT.CITY + ", " + PATIENT.STATE + " " + PATIENT.ZIP else "" endif}
I probably could have combined all into one if statement. But, would the size function help you verify valid data prior to printing?
I can try that, but I'm in a text component pulling LOC symbols into the update. Letter gives me no trouble. I did run across this lovely statement in the help:
"This symbol is available only for printing; you cannot use it in other places in the application or Encounter Form Editor."
LOC will be very hit or miss in an update since it was never intended to be used there. For my forms that display as letters, I ended up just querying the data from the database through my C# program via RUNTEXTPROCESS().
Try this:
{DOCUMENT.LOCOFCARENAME}
{find("LookupLoc","Address1","Name",DOCUMENT.LOCOFCARENAME)}
{find("LookupLoc","Address2","Name",DOCUMENT.LOCOFCARENAME)}
{find("LookupLoc","City","Name",DOCUMENT.LOCOFCARENAME)}, {find("LookupLoc","State","Name",DOCUMENT.LOCOFCARENAME)} {find("LookupLoc","Zip","Name",DOCUMENT.LOCOFCARENAME)}
{find("LookupLoc","primPhone","Name",DOCUMENT.LOCOFCARENAME)} Fax:{find("LookupLoc","faxPhone","Name",DOCUMENT.LOCOFCARENAME)}
Interesting, I'm somewhat familiar with the language, but roughly how can it work with Centricity if you don't mind.
Seems to work great. Thank you. I haven't used find yet so I will definitely keep it in mind for pulling things.
I just recently learned how to use it myself. I am not sure if there is much documentation on the tables you can use but what I did to figure this one out for you is go to my centricity folder and highlight all mldefs*.txt files and open them in notepad++. (if you don't have notepad++ you should definitely download it)
I then did a search and told it to look in all open files for "Object: Loc". I tried "Object: _Loc" and "Object: Location" first before I finally found what I was looking for. It told me that there were a few matches in mldefs8.txt. I probably could have searched for "LOCREG" which is the name of the database table that locations are in as well since it was referenced in the file.
I am not sure if there is any specific documentation on the mldefs files but if anyone knows, please let me know.