Hello there!
The formatting is working out great! It is very labor intensive but works well. One quick question, how do I add in additional check box translations into the statement? E.G.: So, I would need to add in the CFMT for a check box item.....
{!if DOCUMENT.TEST_DOSE__22 == "" then
DOCUMENT.TEST_DOSE__22 = "1.Test dose: 25 mg Iron Dextran undiluted x1 - slow IVP over 5 minutes."+ HRET + "2. Observe 1 hour, monitoring for allergic reaction" + HRET + "3. After observation 475 mg Iron Dextran IV x1 in 250ml 0.9% NS x 1 over 15 minutes(do not exceed 50mg/minute)." + HRET + "4. Observe 30 minutes, monitoring for allergic reaction." + HRET + "5. Discharge if vitals are stable." + HRET + "6. Return for Iron protocol for RLS every 2 weeks as needed for restless legs."
else ""
endif
}
{!if DOCUMENT.TEST_DOSE__22 == "" then
DOCUMENT.TEST_DOSE__22 = "1.Test dose: 25 mg Iron Dextran undiluted x1 – slow IVP over 5 minutes."+ HRET + "2. Observe 1 hour, monitoring for allergic reaction" + HRET + "3. After observation 475 mg Iron Dextran IV x1 in 250ml 0.9% NS x 1 over 15 minutes(do not exceed 50mg/minute)." + HRET + "4. Observe 30 minutes, monitoring for allergic reaction." + HRET + "5. Discharge if vitals are stable." + HRET + "6. Return for Iron protocol for RLS every 2 weeks as needed for restless legs." + CFMT(, , , ) + CFMT(, , , )
else ""
endif
}
This is what i have but it will not pull in the check box.....
{!if DOCUMENT.IRON21 == "" then
DOCUMENT.TEST_DOSE__222112 = FMT("Herpes Risk:","U")+ HRET + CFMT(DOCUMENT.PREVIOUS_HIS, "B,U") + HRET
else ""
endif
}
{!if DOCUMENT.IRON21 == ""
and (DOCUMENT.TEST_DOSE__222112 <> ""
or DOCUMENT.PREVIOUS_HIS <> "") then
DOCUMENT.TEST_DOSE__222112 = FMT("Herpes Risk:","U")+ HRET + CFMT(DOCUMENT.PREVIOUS_HIS, "B,U") + HRET
else ""
endif
}
Great! It works for one but not multiple..... I will keep trying!
So, this is what I have thus far: it will not pull in the check boxes when checked...
Also, in the edit field where the display is for the text, it is showing B/O etc.... I am sure it is due to the formatting and I do not think it can be avoided but what are your thoughts?
{!if DOCUMENT.IRON21 == ""
and (DOCUMENT.TEST_DOSE__222112 <> ""
or DOCUMENT.CONSENT_FORM <> ""
or DOCUMENT.TB_EXPOSURE_ <> ""
or DOCUMENT.PREVIOUS_HIS <> ""
or DOCUMENT.PREVIOUS_VAR) then
DOCUMENT.TEST_DOSE__222112 = FMT("Herpes Risk:","U")+ HRET + CFMT(DOCUMENT.CONSENT_FORM,"B") + HRET + CFMT(DOCUMENT.TB_EXPOSURE_,"B")+ HRET + CFMT(DOCUMENT.PREVIOUS_HIS, "B,U") + HRET + CFMT(DOCUMENT.PREVIOUS_VAR,"B")
else ""
endif
}
CFMT and FMT are not designed to work in multiline edit fields like that, they are supposed to be used in text translations. Also after DOCUMENT.PREVIOUS_VAR you are missing the <> "" part. You could display unformatted text in the edit field, kind of how you have it but without the formatting stuff and write different code for the translation -
{!if DOCUMENT.IRON21 == ""
and (DOCUMENT.TEST_DOSE__222112 <> ""
or DOCUMENT.CONSENT_FORM <> ""
or DOCUMENT.TB_EXPOSURE_ <> ""
or DOCUMENT.PREVIOUS_HIS <> ""
or DOCUMENT.PREVIOUS_VAR <> "") then
DOCUMENT.TEST_DOSE__222112 = "Herpes Risk:"+ HRET + DOCUMENT.CONSENT_FORM + HRET +
DOCUMENT.TB_EXPOSURE_ + HRET +
DOCUMENT.PREVIOUS_HIS + HRET +
DOCUMENT.PREVIOUS_VAR else ""
endif
}
In the chart Note section of your edit field try
{!if DOCUMENT.IRON21 == ""
and (DOCUMENT.TEST_DOSE__222112 <> ""
or DOCUMENT.CONSENT_FORM <> ""
or DOCUMENT.TB_EXPOSURE_ <> ""
or DOCUMENT.PREVIOUS_HIS <> ""
or DOCUMENT.PREVIOUS_VAR <> "") then
FMT("Herpes Risk:","U")+ HRET + CFMT(DOCUMENT.CONSENT_FORM,"B","","","
") + CFMT(DOCUMENT.TB_EXPOSURE_,"B","","","
") + CFMT(DOCUMENT.PREVIOUS_HIS, "B,U","","","
") + CFMT(DOCUMENT.PREVIOUS_VAR,"B","","","
") else ""
endif
}
I didnt test this, but something like that would probably work better for you
Thanks! I will give it a go... I have redone this form several times - if I try and place the actual translation into the edit field itself, I get build errors like EFE Watchers and it does not seem to function correctly. The only way I could get it to work so that they can make changes and keep the formatting they want is to write it how I did.... I will try this out though and see how it goes!
I have the same problem with a PE form that I am building to mimick the CCC one. I have built the form and made it work with a data field option or an add text button option, but the providers would ultimately like it to work just like the CCC. How would I format the coding for that to stop the duplication of the check box choices when you check something in the next system?
This is your problem -
{CFMT(OBSNOW("EYE EXAM", PE(OBSNOW("EYE EXAM"),DOCUMENT.EY2,DOCUMENT.EY3)), "", "
", "B", "")}
You are adding the observation back into itself causing it to duplicate anytime the function runs, change this to a document variable, and then make your normal and prior buttons save to that document variable as well and the duplication should end
Thank you, that works in the document, but how do i make it populate into the comment box so that they may manipulate the check box text if they want?
That can get messy, you can change the connection type to the observation on the multiline edit field but then anytime another checkbox is checked or unchecked it will overwrite the changes the user made. Im not familiar with the CCC form maybe it works the same way anyway
Can I do something like this then assign the document.general to obsnow("gen appear") in some kind of way? I am a beginner at MEL so.......
{DOCUMENT.GENERAL = (DOCUMENT.GENERAL
+ ", " + DOCUMENT.GEN1 + ", " + DOCUMENT.GEN2 + HRET)
}
Or is that wishful thinking?
That will have the same effect of overwriting the variable. The problem is whenever one of theses
{DOCUMENT.GENERAL = (DOCUMENT.GENERAL
+ ", " + DOCUMENT.GEN1 + ", " + DOCUMENT.GEN2 + HRET)
}
changes, it clears DOCUMENT.GENERAL and writes it over with the new info. The way you have the translation set up will record the observations properly. There isn't really a much better way to do this with the listboxes.
Well, dang it. Thanks for trying to help. I may play around and try to use a hidden field somehow like they talked about above for the ROS form and see if I can make that work somehow.