Lots of experience with EFE, but I'm new to VFE.
Is there a way to have a long list of visibility items, that will "restack" themselves without leaving blank lines for nonvisible items ?
I would like to build a form that would show Protocols due. It would restack the list, rather than leave spaces where things are not due. Like a webpage, it would build itself on the fly....
e.g. The list is: where x is done and 0 is not done
Flu shot -0
Pneumovax -x
Pap smear -0
Colonoscopy -x
Heb B vaccine -0
The form would list items, with action buttons for orders as follows:
Flu shot ACTION BUTTON
Pap smear ACTION BUTTON
Hep B vax ACTION BUTTON
AND NOT LIKE THIS:
Flu shot ACTION BUTTON
[invisible Pneumovax so blank line here]
Pap smear ACTION BUTTON
[invisible Colonoscopy so blank line here]
Hep B vax ACTION BUTTON
By the way, if you've built a Protocols action form like this, I'd love to see it!
Cheers.
Charles Zelnick MD
I've done this with a text component that sends the order when the text component is called (using a quicktext, at this point). Here's the logic:
{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","LDL", "contains", "any") == "" then "" else MEL_ADD_ORDER("T", "Labs", "LIPID PANEL", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0"))+"LIPIDs ordered, " endif}
If no lipids needed, the output is "" which means nothing happens. I have parsed my protocols this way to either display what a medical assistant needs to do for me (have the diabetic patient remove their shoes and set the monofilament on the counter) or push the orders to the orders module as noted above.
Thanks, this is a really great trick!
I just worked this out after trying to solve that issue for a few years. Multiple previous forum posts here about protocols expressed frustration with no easy way to parse the information. I hope others trying to work out managing protocols find this post.
My favorite part is using MEL_ADD_ORDER to push the order by default so that no further thought is needed. If the order really isn't needed it can be removed when reviewing orders module, but no extra click is needed if a provider agrees with the suggestion.
Hi! Would you mind sharing all of your hard work? I took a MU checklist form off this site previously and tweeked it a bit but I would like to see what you have too if you don't mind.
Thanks a bunch.
Kathy
Here's an expanded example of the above logic. This is used at visit check in to prep the visit. We'll plan to improve this using a visual form editor component rather than all the text and quicktexts (so that the text translation doesn't stay in the note, it's more organized and the quicktexts are replaced by buttons):
{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","SYSTOLIC", "contains", "any") == "" then "" else "Patient needs a BP reading documented. " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","MAMMOGRAM", "contains", "any") == "" then "" else "Needs a mammogram, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","COLON", "contains", "any") == "" then "" else "Needs a colonoscopy referral, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","PAP", "contains", "any") == "" then "" else "Needs a pap, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","FOOT", "contains", "any") == "" then "" else "Have the patient remove shoes and socks for a monofilament exam. " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","LDL", "contains", "any") == "" then "" else MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "LIPID PANEL", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0"))+MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "LFT's (AST & ALT)", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0"))+ "LIPIDs/ALT/AST ordered, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","Hct", "contains", "any") == "" then "" else MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "CBC W/Auto Diff", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) + "CBC ordered, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","POTASSIUM", "contains", "any") == "" then (if LISTSUBSET(LISTPROTOCOLDUE(),"comma","GLUCOSE", "contains", "any") == "" then (if LISTSUBSET(LISTPROTOCOLDUE(),"comma","CREATININE", "contains", "any") == "" then "" else "BMP ordered, " + MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "BMP", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) endif) else "BMP ordered, " + MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "BMP", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) endif) else "BMP ordered, " + MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "BMP", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","HGBA1C", "contains", "any") == "" then "" else MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "HBA1C", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) + "HgbA1c ordered, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","TSH", "contains", "any") == "" then "" else MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "TSH", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) + "TSH ordered, " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","MICROAL", "contains", "any") == "" then "" else (MEL_ADD_ORDER("T", "Labs SFM (Test orders)", "MICROALBUMIN", "", "", "", "", "", "", "", ADDDATES(str(._TODAYSDATE), "0", "0", "0")) + "microalbumin ordered, please obtain a urine sample, ") endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","cult", "contains", "any") == "" then "" else "
The patient needs a urine culture. Please arrange this. " endif}
{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","flu", "contains", "any") == "" then "" else "
Recommend a flu shot. .flu " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","pneumo", "contains", "any") == "" then "" else "
Recommend a pnuemonia vaccine. .pneumo " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","tdap", "contains", "any") == "" then "" else "
Recommend a Tdap. .tdap " endif}
Extra vaccine code (.extrainj )
Any vaccines, verify no allergy (.addallergies )
{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","PARTNER", "contains", "any") == "" then "" else "
If the patient would like testing for sexually transmitted infections please orders this with .stdorder " endif}{if LISTSUBSET(LISTPROTOCOLDUE(),"comma","PSA",
"contains", "any") == "" then "" else "
PSA test or defer per this last discussion regarding PSA testing (may be blank): " + fmt(LASTOBSVALUEDATE("PSARECACT"), "I") + "
If no previous discussion or last discussion over 2 years ago, use PSA informational handout to solicit patient preference and document their response, draw per their preference.
" endif}
(.blooddraw )