class HivTestedAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = HivTestedForm

    conditional_fieldlists = {
        T1: Remove(*fields),
        T2: Remove(*fields),
        T3: Remove(*fields),
        E0: Remove(*fields),
    }

    fieldsets = (
        (None, {
            'fields': ('subject_visit', 'num_hiv_tests', 'where_hiv_test',
                       'where_hiv_test_other', 'why_hiv_test', 'hiv_pills',
                       'arvs_hiv_test'),
        }),
        audit_fieldset_tuple,
    )

    radio_fields = {
        'where_hiv_test': admin.VERTICAL,
        'why_hiv_test': admin.VERTICAL,
        'hiv_pills': admin.VERTICAL,
        'arvs_hiv_test': admin.VERTICAL,
    }
class UncircumcisedAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = UncircumcisedForm

    conditional_fieldlists = {
        T1: Remove(*fields),
        T2: Remove(*fields),
        T3: Remove(*fields),
    }

    fieldsets = ((None, {
        'fields': [
            'subject_visit',
            'circumcised',
            'health_benefits_smc',
            'reason_circ',
            'reason_circ_other',
            'future_circ',
            'future_reasons_smc',
            'service_facilities',
            'aware_free',
        ]
    }), audit_fieldset_tuple)

    radio_fields = {
        'circumcised': admin.VERTICAL,
        'reason_circ': admin.VERTICAL,
        'future_circ': admin.VERTICAL,
        'future_reasons_smc': admin.VERTICAL,
        'service_facilities': admin.VERTICAL,
        'aware_free': admin.VERTICAL
    }
    filter_horizontal = ('health_benefits_smc', )
예제 #3
0
class ReproductiveHealthAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = ReproductiveHealthForm

    custom_form_labels = [
        FormLabel(
            field='given_birth',
            label='Have you given birth since we last spoke in {previous}'),
        FormLabel(
            field='menopause',
            label=
            ('Have you reached menopause (more than 12 months without a period) '
             'since we last spoke in {previous}?'))
    ]

    conditional_fieldlists = {
        T0:
        Remove('when_pregnant', 'gestational_weeks', 'pregnancy_hiv_tested',
               'pregnancy_hiv_retested', 'given_birth', 'more_children'),
        E0:
        Remove('given_birth', 'more_children', 'when_pregnant'),
    }

    fieldsets = (
        (None, {
            'fields':
            ('subject_visit', 'number_children', 'given_birth', 'menopause',
             'more_children', 'family_planning', 'family_planning_other',
             'currently_pregnant', 'when_pregnant', 'gestational_weeks',
             'pregnancy_hiv_tested', 'pregnancy_hiv_retested')
        }),
        audit_fieldset_tuple,
    )

    radio_fields = {
        'given_birth': admin.VERTICAL,
        'menopause': admin.VERTICAL,
        'more_children': admin.VERTICAL,
        'currently_pregnant': admin.VERTICAL,
        'when_pregnant': admin.VERTICAL,
        'pregnancy_hiv_tested': admin.VERTICAL,
        'pregnancy_hiv_retested': admin.VERTICAL
    }

    filter_horizontal = ('family_planning', )

    additional_instructions = mark_safe(
        '<h5>Note to Interviewer</h5> This section is to be'
        'completed by female participants. SKIP for male participants.'
        '<H5><span style="color:orange;">Read to Participant</span></H5>'
        'I am now going to ask you questions '
        'about reproductive health and pregnancy')
class HivUntestedAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    conditional_fieldlists = {
        E0: Remove('hiv_pills', 'arvs_hiv_test'),
    }

    fieldsets = (
        (None, {
            'fields': (
                'subject_visit',
                'why_no_hiv_test',
                'hiv_pills',
                'arvs_hiv_test',
            ),
        }),
        audit_fieldset_tuple,
    )

    form = HivUntestedForm

    radio_fields = {
        "why_no_hiv_test": admin.VERTICAL,
        "hiv_pills": admin.VERTICAL,
        "arvs_hiv_test": admin.VERTICAL,
    }
예제 #5
0
class SexualBehaviourAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = SexualBehaviourForm

    conditional_fieldlists = {
        T0: Remove('first_sex_partner_age', 'first_sex_partner_age_other'),
    }

    custom_form_labels = [
        FormLabel(
            field='ever_sex',
            label=(
                'In your lifetime, have you ever had sex with anyone?<br>'
                '<span style="color:orange;">Interviewer</span>. '
                '<span style="font-weight:normal;">On {previous} subject '
                'reported <B>YES</B>. Select <B>YES</B> to continue.</span>'),
            callback=lambda obj, appointment: True
            if obj.ever_sex == YES else False)
    ]

    fieldsets = (
        (None, {
            'fields': (
                'subject_visit',
                'ever_sex',
                'lifetime_sex_partners',
                'last_year_partners',
                'more_sex',
                'first_sex',
                'first_sex_partner_age',
                'first_sex_partner_age_other',
                'condom',
                'alcohol_sex',
            )
        }),
        audit_fieldset_tuple,
    )

    radio_fields = {
        'ever_sex': admin.VERTICAL,
        'more_sex': admin.VERTICAL,
        'condom': admin.VERTICAL,
        'first_sex_partner_age': admin.VERTICAL,
        'alcohol_sex': admin.VERTICAL
    }

    additional_instructions = mark_safe(
        '<H5><span style="color:orange;">Read to Participant</span></H5>'
        'In this part of the interview, '
        'I will be asking you some questions about your '
        'sexual relationships that you might have had, '
        'and about sexual practices that you might have '
        'engaged in. Please let me know if you feel '
        'comfortable answering these questions now or if '
        'we should move to a different location. '
        'Some of these questions may make you feel uncomfortable; '
        'however, it is really important for us to get the '
        'most honest answer that you can give us. Please '
        'remember that all of your answers are confidential.')
예제 #6
0
class LabourMarketWagesAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = LabourMarketWagesForm

    inlines = [
        GrantInlineAdmin,
    ]

    conditional_fieldlists = {
        T1: Remove('occupation', 'monthly_income'),
        T2: Remove('occupation', 'monthly_income'),
        T3: Remove('occupation', 'monthly_income'),
    }

    fieldsets = (
        (None, {
            'fields':
            ('subject_visit', 'employed', 'occupation', 'occupation_other',
             'job_description_change', 'days_worked', 'monthly_income',
             'salary_payment', 'household_income', 'other_occupation',
             'other_occupation_other', 'govt_grant', 'nights_out', 'weeks_out',
             'days_not_worked', 'days_inactivite')
        }),
        audit_fieldset_tuple,
    )

    radio_fields = {
        'employed': admin.VERTICAL,
        'occupation': admin.VERTICAL,
        'monthly_income': admin.VERTICAL,
        'salary_payment': admin.VERTICAL,
        'household_income': admin.VERTICAL,
        'other_occupation': admin.VERTICAL,
        'govt_grant': admin.VERTICAL,
        'weeks_out': admin.VERTICAL,
    }
예제 #7
0
class ResidencyMobilityAdmin(CrfModelAdminMixin, admin.ModelAdmin):

    form = ResidencyMobilityForm

    conditional_fieldlists = {
        E0: Remove('intend_residency'),
    }

    custom_form_labels = [
        FormLabel(
            field='permanent_resident',
            label=('We last visited you in {previous}. Since then, have you '
                   'typically spent 14 or more nights per month in this '
                   'community?'),
            previous_appointment=True),
        FormLabel(
            field='nights_away',
            label=('We last visited you in {previous}. Since then, in total '
                   'how many nights did you spend away from this community, '
                   'including visits to cattle post and lands? (If you don\'t '
                   'know exactly, give your best guess).'),
            previous_appointment=True),
        FormLabel(
            field='cattle_postlands',
            label=('We last visited you in {previous}. Since then, during '
                   'the times you were away from this community, where were '
                   'you primarily staying?'),
            previous_appointment=True)
    ]

    fieldsets = (
        (None, {
            'fields': ('subject_visit', 'length_residence',
                       'permanent_resident', 'intend_residency', 'nights_away',
                       'cattle_postlands', 'cattle_postlands_other')
        }),
        audit_fieldset_tuple,
    )

    radio_fields = {
        'length_residence': admin.VERTICAL,
        'permanent_resident': admin.VERTICAL,
        'intend_residency': admin.VERTICAL,
        'nights_away': admin.VERTICAL,
        'cattle_postlands': admin.VERTICAL
    }

    additional_instructions = mark_safe(
        '<H5><span style="color:orange;">Read to Participant</span></H5>'
        'To start, I will be asking '
        'you some questions about yourself, your living '
        'situation, and about the people that you live with.'
        'Your answers are very important to our research and '
        'will help us understand how to develop better health '
        'programs in your community. Some of these questions '
        'may be embarrassing and make you feel uncomfortable; '
        'however, it is really important that you give the most '
        'honest answer that you can. Please remember that all of '
        'your answers are confidential. If you do not wish to '
        'answer, you can skip any question.'
        '<H5><span style="color:orange;">Special note for non-citizen participants</span></H5>'
        '<B>(For non-citizens only)</B> '
        'We will not ask your name, the name of others living with you, '
        'or record any identifiable information about you. The information '
        'you give will be anonymous.')