# Usage ## Initial setup CRFs are always part of a study. So, create study as you would normally do, keep subject identifier to ParticipantId, which is the default. Once you do, you should enable CRF module. See [LabKey documentation][labkeyEnableModule] on how to enable a module. In Study setup, select Edit additional properties. New fields should be: - EudraCTNumber, - StudySponsor, - StudyCoordinator, - RegulatoryNumber, all as strings. It should look like this ![Alt text][studyParameters] The initial set of setup lists is part of the distribution. Copy [archive][listArchive] locally and import list archive to Labkey in the study. You will get list of lists by clicking on setup wheel at the top of the screen and selecting Manage lists. Create demographicData dataset. It can have no fields. Add a tab (Wheel->Page Admin Mode, click on a + tab). Add CRF Portal web part. It should appear empty. This will show all forms that we will create. ## Setting up a form Create a dataset as a list. Go to Wheel->Manage Lists and Create List. Setup fields as you would normally do. Three additional fields are required: - participantCode (String) - submissionDate (DateTime) - crfRef (String) [Here][exampleList] is an example. Open the inputLists list and add the name of the new list as a new entry. Open the Forms list. Add new entry. Some fields can only have the default value: - formUrl: visit0 - reviewFormUrl: reviewVisit0 - viewURL: visit0.view Form name can be any string, including spaces. Setup query is still to be created, but it should name in Setup to distinguish it from others, say demographicsSetup. The last field, master query is to be set to the created dataset list. Master queries must contain a participantCode field, and that is the field that will be used as the assignment field. Finally, create the setup list. It should contain the fields in the image ![setup list][setupList] An example is shown in the next figure ![setup list example][setupListExample] Set Query Name to the dataset list. Title can be any string. For a more complex layout, the dataset might have a flag which indicates a sub-list, say list of medications. The name of the flag, which is a variable in the dataset, must be given as showFlag, the value where list is to be filled is the showFlagValue, and showQuery is the sublist query which will be shown. In our case, this three fields are to be set to a NONE String, which indicates that no sublist is required. [studyParameters]: img/studyParametersSnapshot.png [exampleList]: img/exampleListSnapshot.png [listArchive]: setup/initialLists.zip [labkeyEnableModule]: https://www.labkey.org/Documentation/wiki-page.view?name=enableModuleInFolder [setupList]: img/setupList.png [setupListExample]: img/exampleSetupList.png