.. _data_capture: Data Capture System ************************************************************ .. TODO figure:: https://ipsumimage.appspot.com/640x360 :align: center :alt: Data Capture System Figure 1, Data Capture System diagram. Overview ============================================================ The Data-Capture System is a module that facilitates the capture and modification of data elements associated to a participant (eg. gender, age, height, medical history, etc.). These data elements are managed through the Questionnaire subsystem via a Codebook, a data structure that acts as both a data-dictionary and a data-model for questions, answers, and questionnaire concepts. Physical measurements and electronic health records (EHRs) for a participant are also included in this system, however this data is not managed by the Questionnaire subsystem. View the RDR `Data Dictionary `_ Components ============================================================ Questionnaire Subsystem ------------------------------------------------------------ The Questionnaire subsystem facilitates the association of personal, medical, and demographic data to a participant. Questionnaire concepts, questions, and relevant answer choices are defined in Code books. Code books contain a list of codes that are referenced by QuestionnaireConcept objects, QuestionnaireQuestion objects, and questionnaire response answers. They are also used in participant summaries and metrics, in place of where an enum field might go otherwise. Code ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The Code object describes the organizational heirarchy of the components in the Questionnaire Subsystem. In the database, the `code` table is a self-joining heirarchical table. A Code object has a code_type attribute that can be a module, a question, or an answer. These objects are structured such that Modules have Topics as children, and Topics have Questions as children and Questions have Answers as children. Questionnaire ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The Questionnaire object is the primary object that represents a collection of questions to eventually present to a participant. The questionnaire table contains versioning data and has a history table associated to it. QuestionnaireConcept ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The QuestionnaireConcept object relates Concepts (a Code instance with code_type = 1) to Questionnaire instances. Note that the terms "Concept" and "Module" are used in the code synonymously. QuestionnaireQuestion ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The QuestionnaireQuestion object associates a question (a Code instance with code_type = 3) in a questionnaire. Each question has a concept system and code defining what the question is about. Questions on different questionnaires can share the same concept code, but concept code is unique within a given questionnaire. QuestionnaireResponse ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The QuestionnaireResponse object represents a participant's response to a questionnaire. This object associates a questionnaire instance with a participant ID. QuestionnaireResponseAnswer ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The QuestionnaireResponseAnswer object represents an answer found in a questionnaire response. Note that there could be multiple answers to the same question, if the questionnaire allows for multiple answers. An answer is given to a particular question which has a particular concept code. The answer is the current answer for a participant from the time period between its parent response's creation field and the endTime field (or now, if endTime is not set.) Physical Measurement Subsystem ------------------------------------------------------------ Physical measurements are created by clinicians and enter the RDR through the HealthPro client. They are not part of the Questionnaire Subsystem because the data is not driven by the Codebook. PhysicalMeasurements ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The PhysicalMeasurements object associates multiple measurements to a participant ID. This object also contains metadata such as which HealthPro user and site created and finalized the measurements. There are also attributes related to status of the physical measurements. Measurement ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ The Measurement object represents an individual measurement and is a child of PhysicalMeasurements. Attributes include value fields for the measurement and codes for where and how the measurement was taken (bodySiteCodeSystem). These fields are generally populated by the HealthPro client. .. TODO: need more info regarding measurements Electronic Health Records (EHR) ------------------------------------------------------------ Electronic health records are given a receipt when an HPO provides EHR data. The EHR receipt is logged in the ehr_receipt table. .. TODO: get any additional information regarding this. The EhrReceipt object logs when HPOs submit EHR data. Workflows ============================================================ .. TODO: define workflows here. Associating data from the Data Capture system to participants uses the API workflows covered in this section: :ref:`Creating and Updating Participant Data `.