I have an encounter type with multiple forms. I'm doing the translation for each form in the translation tab for a 'section' like this:
{
if(DOCUMENT.TIME_MAINTENANCE_INFUSE<>"" and DOCUMENT.MAINT_INF_D5W_NSS<>"" and DOCUMENT.INFU_RATE2<>"")then
FMT("Infusion Maintenance IV:","B") + HRET
+ "Time: " + str(DOCUMENT.TIME_MAINTENANCE_INFUSE)
+ " " + DOCUMENT.MAINT_INF_D5W_NSS + " at rate: "
+ str(DOCUMENT.INFU_RATE2) + " ml/hr." + HRET
else ""
endif
}{
if(DOCUMENT.DIPHENHYDRAMINE<>"")then
FMT("Diphenhydramine","B")+ " ("+DOCUMENT.MED_TYPE_DIPHEN +")" + " Exp. Date:"
+ DOCUMENT.EXP_DATE_DIPHEN+" Lot #: " +
OBSNOW("DIPHENHY LOT") + " NDC #: "+ str(OBSNOW("DT#1NDC")) + HRET
else ""
endif
}{
if(DOCUMENT.PROPH_DIPHEN<>"")then
DOCUMENT.PROPH_DIPHEN + ". "+ HRET
else ""
endif
} .....etc, etc,......
Each individual form prints perfectly without any extra white space. However, when I click 'Next' to move to the next form, about 10 lines of whitespace get added to the bottom of the translation from the first page.
I've clicked through every single item on every form and pressed 'Clear' for the Chart translation. Why is this white space there for items with ZERO translation?
I've even tried putting:
{ "" } in every translation tab, but this doesn't work either.
This would be hard to diagnose without looking at the form .dlg. Have you tried an update with just the form in question?
If I do not select an encounter type and open each form component individually, the chart note is printing is exactly as I want it. If certain fields are left blank, the white space is ignored (just like the code I posted indicates). If I put all the forms into an encounter type, each form prints well. Clicking 'Next' adds about 15 lines of whitespace in between the properly formatted text. It's not an overly major setback, but it's really annoying that I can't get rid of it.
Notes:
1) Each form has only one 'section' and I do all the chart note stuff in the translation tab for the section.
2)In EVERY single item on the page other than the section, I've cleared the translation areas.
3)I have absolutely no suppression block checkboxes chosen, and all the stuff on the "advanced" tab is left as default.
Adding suppression blocks in any arrangement doesn't seem to affect the situation at all.
So you've tried each form in a separate update without an encounter type and just inserting one form, not multiple forms, and there are no extra blank lines?
Then I'd try an empty update and insert the first form and then the second, and see if any blank lines appear before entering data.
If the blank lines appear only after entering data in the first form, then the issue is within the one of the forms.
If the blank lines don't appear when inserting each form to an empty update, then the issue is how you insert them into your doc template. Put the }{ together, not }
{, which causes a blank line between each form.
jjorder is 100% right
in the translation area.
any space afterthe } will represent a space in the translation
if you translation contains something like this
james } (try to eliminate any space between the } and the text that will follow.
beside any ENTER after the } also need to be eliminated because it will represent a line in the translation
In the code I've posted earlier (and in all the code in my forms), you can see that I only have:
}{code
code
code
}{code
code
code
}{......
and Never:
}
{code
code
code
}
{code
code code
}
{.......
I just now clicked the boxes that say "Suppress translation if field is not visible" for all my visibility fields, and this removed a significant portion of the white space. There's still about 5 lines in between each form component, but it looks significantly better.
I'll post what I find if I'm able to remove all of it.
Oops...when I was talking about the }{ in the doc template, what I meant was the brackets around the form names should be back to back like ][, like ]
[
After many days of trying to figure this out, I got rid of all the white space.
Solution:
My form had many overlapping visibility fields, which I now know were putting white space into the Chart Note if they were left visible at the time of clicking 'Next' .
First, I placed suppression blocks around each visibility field. Then, on the advanced tab for the item with the 'Begin Suppression Block' I chose "User Defined Condition" and typed in TRUE.
I'll probably use this approach from now on. I do all my translation stuff in an invisible text field. Then, I completely suppress all the form components other than this text field. That way, you can look at your translation MEL code and easily format it down to the nearest character.