(name)
return xform.tostring(pretty_print=True).decode('utf-8')
Return a registration form that mimics OpenClinica subject registration
Return a registration form that mimics OpenClinica subject registration
Return a registration form that mimics OpenClinica subject registration
def get_subject_form_source(name):
        """
        Return a registration form that mimics OpenClinica subject registration
        """
        xform = XFormBuilder(name)
        xform.new_question(CC_SUBJECT_KEY, 'Person ID')  # Unique ID. aka "Screening Number", "Subject Key"
        xform.new_question(CC_STUDY_SUBJECT_ID, 'Subject Study ID')  # Subject number for this study
        xform.new_question(CC_DOB, 'Date of Birth', data_type='date')
        xform.new_question(CC_SEX, 'Sex', data_type='select1', choices={1: 'Male', 2: 'Female'})
        xform.new_question(CC_ENROLLMENT_DATE, 'Enrollment Date', data_type='date')
        return xform.tostring(pretty_print=True).decode('utf-8')
def get_subject_form_source ( name ) : xform = XFormBuilder ( name ) xform . new_question ( CC_SUBJECT_KEY , 'Person ID' ) # Unique ID. aka "Screening Number", "Subject Key" xform . new_question ( CC_STUDY_SUBJECT_ID , 'Subject Study ID' ) # Subject number for this study xform . new_question ( CC_DOB , 'Date of Birth' , data_type = 'date' ) xform . new_question ( CC_SEX , 'Sex' , data_type = 'select1' , choices = { 1 : 'Male' , 2 : 'Female' } ) xform . new_question ( CC_ENROLLMENT_DATE , 'Enrollment Date' , data_type = 'date' ) return xform . tostring ( pretty_print = True ) . decode ( 'utf-8' )