Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Temporary tables

The following information needs to be extracted from the questionnaire.

Please find the explanation for Archivist Elements

  1. Sequence
  2. Statement
  3. Question item
  4. Question grid
  5. Code list
  6. Response
  7. Condition
  8. Loop

The table structure and example are given below, but please see https://gitlab.com/jli755/archivist_insert_workaround/-/tree/master/template for the latest version.

The checklist will also help with finding any potential problems. 

Naming

LabelStarts WithExampleLabel Note
Statements_qs_qQual
Question item qi_qi_Smoker

Question grid 

qg_qg_Qual
Code list cs_cs_Yes_No
Conditionc_qc_qSmoker

Labelled after the question in the condition logic.

If there isn't logic then it should be labelled after the first question inside the condition.

In case of duplicated labels: c_qSmoker_i, c_qSmoker_ii etc.

Loopl_ql_qSmokerLabelled after the first question inside the loop.


  • Branch in conditions 0 is true 1 is else.  i.e. if the parent_type is condition, and it if a true branch, then branch = 0 for that question/statement ..



Format of each table

This is a sample questionnaire:

Input temp tables: 


  1. Sequence 

    LabelParent_TypeParent_NameBranchPosition
    Example_1CcSequence

    1
    Section1CcSequenceExample_1
    1
    SubSection1CcSequenceSection1
    1
    Section2CcSequenceExample_1
    2
  2. Statement 

    LabelLiteralParent_TypeParent_NameBranchPosition
    s_qQualFirst I'd like to ask you a few things about your qualification.CcSequenceSection2
    1
  3. Question item 

    LabelLiteralInstructionsResponseParent_TypeParent_NameBranchPositionmin_responsesmax_responses
    qi_SmokerHave you ever been a smoker?Please tick one boxcs_Yes_NoCcLoopl_qSmoker
    111
    qi_NumberHow many cigarettes a day?
    How many ICcConditionc_qSmoker01

    qi_DurationHow long have you been smoking?
    Months YearsCcConditionc_qSmoker02

  4. Question grid 

    LabelLiteralInstructionsHorizontal_Codelist_NameVertical_Codelist_NameResponse_DomainParent_TypeParent_NameBranchPositionHorizontal_min_responsesHorizontal_max_responsesVertical_min_responsesVertical_max_responses
    qg_QualWhich qualifications do you have?INTERVIEWER: CODE ALL THAT APPLYcs_dashcs_qQual_Ycs_Yes_NoCcSequenceSection2
    21111
  5. Response 

    LabelTypeType2FormatMinMax
    Generic textText


    255
    How many INumericInteger
    0
    Generic timeDateTime


    How many FNumericFloat
    0
    Months YearsDateDurationPnnYnnM

    Generic dateDateDate


  6. Code list 

    LabelCode_OrderCode_ValueCategory
    cs_Yes_No11Yes
    cs_Yes_No22No
    cs_qQual_Y11O level (obtained before 1975)
    cs_qQual_Y22O level A-C (1975 or later)
    cs_qQual_Y33O level D,E (1975 or later)
    cs_qQual_Y44GCSE grades A-C
    cs_qQual_Y55GCSE grades D-G
    cs_qQual_Y66CSE grade 1
    cs_qQual_Y77CSE grade 2-5
    cs_dash11-
  7. Condition 

    LabelLiteralLogicParent_TypeParent_NameBranchPosition
    c_qSmokerIf yes.qc_Smoker == 1CcLoopl_qSmoker
    2
  8. Loop 

    LabelLoop_WhileStart_valueEnd_ValueVariableParent_TypeParent_NameBranchPosition
    l_qSmoker
    110_eligiblepersonsCcSequenceSubSection1
    1


  • No labels