Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Candidate_parameters] Update consent doc #3753

Merged
merged 4 commits into from
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions modules/candidate_parameters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ The following configurations affect the usage of the Candidate Parameters module

- `useConsent`
- This setting displays/hides the _Consent Status_ tab of the module.

The _Consent Status_ tab dynamically displays consents defined under the
`<ConsentModule> <Consent>` tags in the config.xml file (see [setup.md](setup.md) for an example).

- The `<name> </name>` tag defines the field name on the form and is required to
match the name of the sql fields in the `participant_status` and
`consent_info_history` tables of the database.
- The `<label> </label>` tag defines the front-end label displayed in the candidate
parameters module for the consent in question.

The _Candidate Information_ tab dynamically displays customized fields configured in
the database. The following SQL tables affect the behaviour of these fields:
Expand Down
2 changes: 1 addition & 1 deletion modules/candidate_parameters/help/candidate_parameters.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Candidate Parameters

The Candidate Parameters Page provides users an opportunity to add important general information about the candidate. There are three sections of the Candidate Parameters Page that can be updated as required by authorized users: "Candidate Information", "Participant Status", and "Participation Consent Status". To return to the Candidate Profile, please click the "Return to timepoint list" button.
The Candidate Parameters Page provides users an opportunity to add important general information about the candidate. There are three sections of the Candidate Parameters Page that can be updated as required by authorized users: "Candidate Information", "Participant Status", and "Consent Status". To return to the Candidate Profile, please click the "Return to timepoint list" button.
29 changes: 4 additions & 25 deletions modules/candidate_parameters/setup.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@
#### Consent Status Tab - Additional Consents

It is possible to have multiple consent types in the Consent Status tab.
In order to add consents, first make sure the useConsent option is set
to `true`, second follow the instructions below.
In order to add consents, first make sure that the _useConsent_ option in the Configurations module is set
to `true`. Secondly, follow the instructions below:

1. Populate the config file with additional Consent tagsets. For example,
1. Populate the `consent` table with additional consents. For example,
for consent to draw blood:

```xml
<ConsentModule>
<useConsent>true</useConsent>
<Consent>
<name>study_consent</name>
<label>Consent to Study</label>
</Consent>
<Consent>
<name>draw_blood_consent</name>
<label>Consent to draw blood</label>
</Consent>
</ConsentModule>
```
2. Alter both `participant_status` and `consent_info_history` table schemas,
adding 3 columns for each new consent type, to store consent status, date and
withdrawal date. For example:
```sql
ALTER TABLE participant_status ADD COLUMN draw_blood_consent enum('yes','no','not_answered');
ALTER TABLE participant_status ADD COLUMN draw_blood_consent_date date;
ALTER TABLE participant_status ADD COLUMN draw_blood_consent_withdrawal date;
ALTER TABLE consent_info_history ADD COLUMN draw_blood_consent enum('yes','no','not_answered');
ALTER TABLE consent_info_history ADD COLUMN draw_blood_consent_date date;
ALTER TABLE consent_info_history ADD COLUMN draw_blood_consent_withdrawal date;
INSERT INTO consent (Name, Label) VALUES ('draw_blood_consent', 'Consent to Draw Blood');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there already redmine ticket that this needs a front end to configure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@driusan i can make one - it was already in the plans for consent PR 3!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@driusan which branch should it target?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely minor, I just want to be sure it's not lost. The document is fine like this since that's the current state of things, but we shouldn't be forcing people to use raw SQL and should make sure there's a plan in place to fix it...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

```

#### Candidate Information Tab - Additional Parameters
Expand Down
2 changes: 1 addition & 1 deletion modules/candidate_parameters/test/TestPlan.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
25. Check that the consent status tab only shows up if _useConsent_ is set to true in the configuration module.
26. Tab should render with only one consent type.
27. Add a new consent type following [the guide](https://github.com/aces/Loris/wiki/Candidate-Information-Page) on the LORIS Wiki. Does it show up in this tab when you refresh the page?
28. Does the consent info shown in this table match what is stored in the participant_status table?
28. Does the consent info shown in this tab match what is stored in the `consent` table?
29. Check that there is a set of form inputs for each type of consent. Does your new type of consent you just added appear here, with form inputs?
30. Try updating the consent information. Do not fill out all required fields. Ensure that an error appears when you try to save.
31. For each of the date fields, try entering only one part of the date (eg. the year). Make sure there is an error when you try to save.
Expand Down