I'm working on a set of narrative forms for one our Ortho specialists, and he requested several key items be bolded in the chart translation. The form is currently set up with listboxes that can be checked of, pushing them into an edit field as a document variable. The narrative itself is based in the whiteboard section of VFE, which calls on the document variables. At the bottom of the form is a commit button, which runs a combine function on each of the list box entries, and pulls the full narrative into a multi-line edit field so the provider is able to modify the final narrative and options.
This is an example of the whiteboard section of the narrative (which goes from the whiteboard to a MLEF for review and modification by provider):
cfmt(DOCUMENT.JCAP1,"B"," under live fluoroscopy. Excellent athrogram was demonstrated at the lower part of the SI joint in PA and lateral projections (as well as the upper portion; ","","")
When the narrative is pushed to the multi-line edit field, it pushes in the bold tags for display in the chart note. Example:
Excellent athrogram was demonstrated at the lower part of the SI joint in PA and lateral projections (as well as the upper portion; \b the joint capsule was noted to be intact\b0 )
When opening the text translation, "the joint capsule was noted to be intact" shows up as bold text as intended. Once the provider makes a change in the edit field, the edit field changes to add a second backslash. Example:
Excellent athrogram was demonstrated at the lower part of the SI joint in PA and lateral projections (as well as the upper portion; \\b the joint capsule was noted to be intact\\b0
I'm trying to figure out a way to get continue pushing the required text in bold to the chart translation, while keeping the ability for the provider to make changes in the edit field. I can't bold by Str since the provider may or may not make changes in the MLEF, and there are too many bolded variables on each form to break up the narrative into a series of separate edit fields.
Any help or ideas would be greatly appreciated!
I don't know if this would work, but push your document variable to another variable when it is first set and when there is a change do a compare and if they aren't the same, reset the document variable you are using for the CFMT function? Maybe that would prevent the \\. Have you looked at a trace to see what is actually happening? I played around with the numtoascii function building \b and \b0 in a quick text but that didn't work.
What if you used placeholder text for your bolding logic.
cfmt(DOCUMENT.JCAP1,””,” under live fluoroscopy. Excellent athrogram was demonstrated at the lower part of the SI joint in PA and lateral projections (as well as the upper portion; BEGINBOLD“,””,”ENDBOLD”)
Then replaced the placeholders with the symbols in the translation
cfmt(....
replacestr(replacestr(document.JCAP1 ,"BEGINBOLD","\b"),"ENDBOLD","\b0")
....)
This will prevent CPS from adjusting the /b-//b.
On a side note, I cannot replicate your problem in CPS12.0.6. When I enter //b it auto-converts it to /b. Perhaps it has to do with some logic in the form. If you send me the form I can take a look.
-James Caswell
David,
I've played around with some matching upon your suggestion, and the trouble is where to insert the bolded variables. I can't rely on an insert based on a string unless I write the entire narrative into a string to match the edited text, which could include anything from deletions to the addition of an exclamation mark.
James,
I'm not seeing anything bizarre in the trace - once the MLEF is modified on the user's side, it seems to be firing again which is adding the extra slash to the code. We are currently on 11.1.1.138, and this is the first time I've come across this particular problem.
If you'd like to email me at [email protected] , I'd be happy to include a copy of the MEL Trace, as well as the form for you to take a look at.
Thank you both for the suggestions!
on a separate note, does anyone know how to add the word "and" to the end of a list? I have listboxes tied to document variables and I want it to read like:
fevers, chills, and night sweats
as opposed to:
fevers, chills, night sweats.
Any help would be greatly appreciated
Went through my "Code Library" where I keep snippets of code I have gleaned from CHUG. Here are a few of them.
Don't know who all of them are but credit to Dr. David A. Nelson, Jr., Jerroll Jordet, and Michael Gibson (an All Star lineup if there ever was one).