I am working on a form for entering the five ASQ Ages and Stages Questionnaire category and calculating the score totals.
The MEL below is working perfect for calculating the 5 manually entered edit field values and it is pushing the values to the correct obsterm.
I'm now running into a glitch with the visibility for each stage. The visibility works fine for selecting the stage and displaying the correct form section, but the score is not calculating for additional stages.
I've tried creating unique document variable names and created a secondary MEL expression to represent these new names, but it is not calculating.
I've tried keeping the document variable names the same, which of course calculates and pushes the total score, but this prevents the MEL that pushes the individual category scores to their obsterms from working.
Is there an easier way? Or at least a way that works? I will need to create 21 stages, each with it's own visibility section, and each with it's own unique 5 category edit fields that push to those obs. All stages use the same total score obsterm.
Any help with this would be very much appreciated. Thank you.
{
DOCUMENT.SCORE
}
{
DOCUMENT.SCORE =
val(DOCUMENT.ASQ2COMMTOT) +
val(DOCUMENT.ASQ2GMTOT) +
val(DOCUMENT.ASQ2FMTOT) +
val(DOCUMENT.ASQ2PSTOT) +
val(DOCUMENT.ASQ2PERSOC)
}
{
if (DOCUMENT.SCORE <> "") then
obsnow("ASQTOTSCORE", DOCUMENT.SCORE)
else
""
endif}
{
if (DOCUMENT.ASQ2COMMTOT <> "") then
obsnow("ASQ12COMMTOT", DOCUMENT.ASQ2COMMTOT)
else
""
endif}
{
if (DOCUMENT.ASQ2GMTOT <> "") then
obsnow("ASQ12GMTOT", DOCUMENT.ASQ2GMTOT)
else
""
endif}
{
if (DOCUMENT.ASQ2FMTOT <> "") then
obsnow("ASQ12FMTOT", DOCUMENT.ASQ2FMTOT)
else
""
endif}
{
if (DOCUMENT.ASQ2PSTOT <> "") then
obsnow("ASQ12PSTOT", DOCUMENT.ASQ2PSTOT)
else
""
endif}
{
if (DOCUMENT.ASQ2PERSOC <> "") then
obsnow("ASQ12PERSOC", DOCUMENT.ASQ2PERSOC)
else
""
endif}
?
?
?
?
I needed to rethink this and figured it out.
Visibility based on radio list selections. Need to calculate 5
manually entered category scores to a grand total score, pushing each to
their respective obsterms, different for each selected stage visibility.
Each visibility section offered the same 5 category edit fields, set as
document variables, unique for each stage and category, for manual entry
of selected stage category scores. These scores would push to their unique
stage obsterm.
Each radio button stage visibility section requierd it's own unique MEL
expression that pointed to that section's unique document variables. I
entered this MEL expression into a Data display set to MEL Expression. I
resized this to hide.
Each visibility section also needed its own unique MEL for pushing the
obs. This MEL was also entered into a Data display set to MEL Expression that I resized to hide.
Here are both MEL expressions for the radio list selection "stage 2". I replaced the stage # and obs for each stage's visibility. (I used obs ASQ12COMMTOT, etc. rather than 2 because 2 is a custom obs that I haven't received yet. I'll update the code once the kit is imported).
///To calculate the score:
{DOCUMENT.SCORE2}
{DOCUMENT.SCORE2 =
val(DOCUMENT.ASQ2COMMTOT) +
val(DOCUMENT.ASQ2GMTOT) +
val(DOCUMENT.ASQ2FMTOT) +
val(DOCUMENT.ASQ2PSTOT) +
val(DOCUMENT.ASQ2PERSOC)}
{if (DOCUMENT.SCORE2 <> "") then
obsnow("ASQTOTSCORE", DOCUMENT.SCORE2)
else
""
endif}
///To push the obs:
{if (DOCUMENT.ASQ2COMMTOT <> "") then
obsnow("ASQ12COMMTOT", DOCUMENT.ASQ2COMMTOT)
else
""
endif}
{if (DOCUMENT.ASQ2GMTOT <> "") then
obsnow("ASQ12GMTOT", DOCUMENT.ASQ2GMTOT)
else
""
endif}
{if (DOCUMENT.ASQ2FMTOT <> "") then
obsnow("ASQ12FMTOT", DOCUMENT.ASQ2FMTOT)
else
""
endif}
{if (DOCUMENT.ASQ2PSTOT <> "") then
obsnow("ASQ12PSTOT", DOCUMENT.ASQ2PSTOT)
else
""
endif}
{if (DOCUMENT.ASQ2PERSOC <> "") then
obsnow("ASQ12PERSOC", DOCUMENT.ASQ2PERSOC)
else
""
endif}
Hi Anna,
Did you ever complete this form, if so would you be willing to share? They are asking me to build one and this would save me time.
Stacey @ St. Mary's
Yes, I would be happy to share. Though I'm not quite sure this new upload files function in the new CHUG site is going to attach what I tried to attach.
Were these forms ever uploaded to the CHUG site? We have just finished implementing a series of Pediatric clinics and now have a need for a ASQ3 - like form set. If these are still available, please post a note here or send us an email with more information:
Jim Poulos ([email protected])
Ann Muchina ([email protected])
Thank you in advance for your assistance.