Other than the "PHI Authorization for Trainings" (which appears for all patients added before 3/6/17 and disappears as soon as they've completed it), CCFM manages their own questionnaires using a custom tool.


The manager can be accessed from My Links > Manage Questionnaire Rules. These rules determine who will see a form in the portal questionnaires page. If a form rule doesn't exist yet, the form will show for everyone.


ADDING A NEW FORM FOR CCFM


1. Add the following to the list of forms in questionnaires.php BUT DONT UPLOAD YET


<?php if (!custom_form_rule_hides_this('Sample Form')){ $form_count++; ?>
    <h2><button class="button add short launcher" target_form="/custom/forms/questionnaires/sample_form.php?">+ Take Questionnaire</button> 
    Sample Form Display Name <?=date_of_last_completion(array("%Sample Form%"));?></h2>
    <? ;} ?>


2. Log into the EMR and go to My Links > Manage Questionnaire Rules > click here (link to add a new rule)


3. Creating the rule:


3a. For the example above, you would enter the "Questionnaire System Name" as "Sample Form" (i.e. this must match the name used in custom_form_rule_hides_this AND date_of_last_completion). If this matches the display name (what it actually appears as to the patient), leave "Questionnaire Nickname" blank, otherwise use this field for the patient-facing name (i.e., in the above example, this would be "Sample Form Display Name")


3b. Set the rule to be "Show if patient has AGE OLDER THAN 200". This will ensure it's hidden (CCFM likes to review the quetsionnaire before changing the rules to make it available to patients)


4. Now that the rule is created, backup the older questionnaires.php and upload your modified version. Now test it for John Doe and make sure it doesn't appear (i.e., you set up the rule in (3) correctly). You can also change JD's age to be older than 200 so you can look at the form and make sure it looks good/submits correctly.