class Circumcised (CircumcisionModelMixin, CrfModelMixin):

    circ_date = models.DateField(
        verbose_name='When were you circumcised?',
        null=True,
        blank=True,)

    when_circ = models.IntegerField(
        verbose_name="At what age were you circumcised?",
        null=True,
        blank=True,
        help_text="Note: Leave blank if participant does not want to respond.")

    age_unit_circ = models.CharField(
        verbose_name="The unit of age of circumcision is?",
        max_length=25,
        choices=TIME_UNIT_CHOICE,
        null=True,
        blank=True,
        help_text="")

    where_circ = models.CharField(
        verbose_name="Where were you circumcised?",
        max_length=45,
        choices=PLACE_CIRC,
        null=True,
        help_text="")

    where_circ_other = OtherCharField(
        null=True)

    why_circ = models.CharField(
        verbose_name="What was the main reason why you were circumcised?",
        max_length=55,
        choices=WHYCIRC_CHOICE,
        null=True,
        help_text="")

    why_circ_other = OtherCharField(
        null=True)

    objects = CrfModelManager()

    history = HistoricalRecords()

    def __str__(self):
        return 'circumcised'

    class Meta(CrfModelMixin.Meta):
        app_label = 'bcpp_subject'
        verbose_name = "Circumcised"
        verbose_name_plural = "Circumcised"
class HeartAttack(CrfModelMixin):
    """A model completed by the user to record any heart conditions
    in the past 12 months.
    """

    date_heart_attack = models.DateField(
        verbose_name="Date of the heart disease or stroke diagnosis:",
        validators=[date_not_future],
        help_text="",
    )

    dx_heart_attack = models.ManyToManyField(
        HeartDisease,
        verbose_name=
        "[Interviewer:] What is the heart disease or stroke diagnosis as recorded?",
        help_text=("(tick all that apply)"),
    )

    dx_heart_attack_other = OtherCharField()

    history = HistoricalRecords()

    class Meta(CrfModelMixin.Meta):
        app_label = 'bcpp_subject'
        verbose_name = "Heart Attack or Stroke"
        verbose_name_plural = "Heart Attack or Stroke"
Esempio n. 3
0
class InfantMouthUpGi(BaseCnsItem):

    mouth_up_gi = models.CharField(
        max_length=250,
        choices=MOUTH_UP_GASTROINT_DISORDER,
        verbose_name="Mouth and upper gastrointestinal disorders",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    mouth_up_gi_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True
    )

    def natural_key(self):
        return (self.mouth_up_gi, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies:MouthUp"
        verbose_name_plural = "Congenital Anomalies:MouthUp"
        unique_together = ('mouth_up_gi', 'congenital_anomalies')
class Tuberculosis(CrfModelMixin):
    """A model completed by the user to record any diagnosis of
    Tuberculosis in the past 12 months."""

    tb_date = models.DateField(
        verbose_name="Date of the diagnosis of tuberculosis:",
        validators=[date_not_future],
        help_text="",
    )

    tb_dx = models.CharField(
        verbose_name=
        "[Interviewer:]What is the tuberculosis diagnosis as recorded?",
        max_length=50,
        choices=DX_TB_CHOICE,
        help_text="",
    )
    tb_dx_other = OtherCharField(null=True, )

    history = HistoricalRecords()

    class Meta(CrfModelMixin.Meta):
        app_label = 'bcpp_subject'
        verbose_name = "Tuberculosis"
        verbose_name_plural = "Tuberculosis"
class CommunityQuestionnaire(CrfModelMixin):

    community_activities = models.CharField(
        verbose_name='How active are you in community activities? ',
        max_length=50,
        help_text='Such as burial society, Motshelo, Syndicate, PTA, '
                  'VDC(Village Development Committee), Mophato and'
                  ' development of the community that surrounds you? ',
        choices=ACTIVENESS)

    election = models.CharField(
        verbose_name='Did you vote in the last local government election? ',
        max_length=50,
        choices=DID_YOU_VOTE)

#    major_problems = MultiSelectField(
#        verbose_name='What are the major problems in this neighborhood? ',
#        choices=NEIGHBORHOOD_PROBLEMS)

    problems = models.ManyToManyField(
        Problems,
        verbose_name='What are the major problems in this neighborhood? ',
        max_length=20,
        blank=True,
        help_text='',
    )

    problems_other = OtherCharField()

    collaboration = models.CharField(
        blank=True,
        verbose_name='If there is a problem in this neighborhood, '
                     'do the adults work together in solving it? ',
        max_length=50,
        choices=ADULTS_WORK_TOGETHER)
class VaccinesMissed(CrfInlineModelMixin, BaseUuidModel):
    """ALL vaccines missed by infant"""

    parent_model_attr = 'infant_fu_immunizations'

    infant_fu_immunizations = models.ForeignKey(InfantFuImmunizations,
                                                on_delete=models.CASCADE)

    missed_vaccine_name = models.CharField(verbose_name="Missed vaccine name",
                                           choices=IMMUNIZATIONS,
                                           max_length=100,
                                           null=True,
                                           blank=True)

    reason_missed = models.CharField(
        verbose_name="Reasons infant missed vaccines",
        choices=REASONS_VACCINES_MISSED,
        max_length=100,
        null=True,
        blank=True)

    reason_missed_other = OtherCharField()

    def natural_key(self):
        return (self.missed_vaccine_name,
                ) + self.infant_fu_immunizations.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = 'Missed Vaccines'
        verbose_name_plural = 'Missed Vaccines'
        unique_together = ('missed_vaccine_name', 'infant_fu_immunizations',
                           'reason_missed')
class InfantMaleGenital(BaseCnsItem):

    male_genital = models.CharField(
        max_length=250,
        choices=MALE_GENITAL_ANOMALY,
        verbose_name="Male genital anomaly",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    male_genital_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.male_genital, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'flourish_child'
        verbose_name = "Congenital Anomalies: Male Genital"
        verbose_name_plural = "Congenital Anomalies: Male Genital"
        unique_together = ('male_genital', 'congenital_anomalies')
Esempio n. 8
0
class InfantLowerGi(BaseCnsItem):

    lower_gi = models.CharField(
        max_length=250,
        choices=LOWER_GASTROINTESTINAL_ABNORMALITY,
        verbose_name="Lower gastrointestinal abnormalities",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    lower_gi_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.lower_gi, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies:Lower GI"
        verbose_name_plural = "Congenital Anomalies:Lower GI"
        unique_together = ('lower_gi', 'congenital_anomalies')
Esempio n. 9
0
class MaternalPostPartumFu(CrfModelMixin, DiagnosesMixin):

    hospitalized = models.CharField(
        max_length=25,
        verbose_name="Has the mother been hospitalized since the last"
        " study visit?",
        choices=YES_NO,
    )

    hospitalization_reason = models.ManyToManyField(
        MaternalHospitalization,
        verbose_name="Was the hospitalization for any of the following "
        "reasons?",
        blank=True,
    )

    hospitalization_reason_other = OtherCharField(
        max_length=35,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    hospitalization_days = models.IntegerField(
        verbose_name="How many days was the mother hospitalized?",
        validators=[MinValueValidator(1)],
        blank=True,
        null=True,
    )

    class Meta(CrfModelMixin.Meta):
        app_label = 'td_maternal'
        verbose_name = "Maternal Post Partum Fu"
Esempio n. 10
0
class InfantTrisomies(BaseCnsItem):

    trisomies = models.CharField(
        max_length=250,
        choices=TRISOME_CHROSOMESOME_ABNORMALITY,
        verbose_name="Trisomies / chromosomes abnormalities",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    trisomies_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.trisomies, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies: Trisomes"
        verbose_name_plural = "Congenital Anomalies: Trisomes"
        unique_together = ('trisomies', 'congenital_anomalies')
Esempio n. 11
0
class InfantMusculoskeletal(BaseCnsItem):

    musculo_skeletal = models.CharField(
        max_length=250,
        choices=MUSCULOSKELETAL_ABNORMALITY,
        verbose_name="Musculo-skeletal abnomalities",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    musculo_skeletal_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.musculo_skeletal, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies: Musculo-sk"
        unique_together = ('musculo_skeletal', 'congenital_anomalies')
Esempio n. 12
0
class InfantSkin(BaseCnsItem):

    skin = models.CharField(
        max_length=250,
        choices=SKIN_ABNORMALITY,
        verbose_name="Skin abnormalities",
        help_text="Excludes cafe au lait spots, Mongolian spots, port wine stains, "
        "nevus, hemangloma <4 cm in diameter. If hemangloma is >4 cm, specify",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    skin_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.skin, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies: Skin"
        unique_together = ('skin', 'congenital_anomalies')
Esempio n. 13
0
class InfantCns(BaseCnsItem):

    cns = models.CharField(
        max_length=250,
        choices=CNS_ABNORMALITIES,
        verbose_name="Central nervous system abnormality",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    cns_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.cns, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies:Cns"
        verbose_name_plural = "Congenital Anomalies:Cns"
        unique_together = ('cns', 'congenital_anomalies')
Esempio n. 14
0
class InfantFacialDefect(BaseCnsItem):

    facial_defect = models.CharField(
        max_length=250,
        choices=FACIAL_DEFECT,
        verbose_name="Facial defects",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    facial_defects_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.facial_defect, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies:Facial"
        verbose_name_plural = "Congenital Anomalies:Facial"
        unique_together = ('facial_defect', 'congenital_anomalies')
Esempio n. 15
0
class InfantRespiratoryDefect(BaseCnsItem):

    respiratory_defect = models.CharField(
        max_length=250,
        choices=RESPIRATORY_DEFECT,
        verbose_name="Respiratory defects",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    respiratory_defects_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.respiratory_defect, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies:Respiratory"
        verbose_name_plural = "Congenital Anomalies:Respiratory"
        unique_together = ('respiratory_defect', 'congenital_anomalies')
class InfantCardioDisorder(BaseCnsItem):

    cardio_disorder = models.CharField(
        max_length=250,
        choices=CARDIOVASCULAR_DISORDER,
        verbose_name="Cardiovascular disorders",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    cardiovascular_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (
            self.cardio_disorder, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'flourish_child'
        verbose_name = "Congenital Anomalies: Cardio"
        verbose_name_plural = "Congenital Anomalies: Cardio"
        unique_together = ('cardio_disorder', 'congenital_anomalies')
Esempio n. 17
0
class InfantCleftDisorder(BaseCnsItem):

    cleft_disorder = models.CharField(
        max_length=250,
        choices=CLEFT_DISORDER,
        verbose_name="Cleft disorders",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    cleft_disorders_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.cleft_disorder, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies:Cleft"
        verbose_name_plural = "Congenital Anomalies:Cleft"
        unique_together = ('cleft_disorder', 'congenital_anomalies')
Esempio n. 18
0
class HIVDisclosureStatusMixin(CrfModelMixin):

    associated_child_identifier = models.CharField(
        max_length=25)

    disclosed_status = models.CharField(
        verbose_name='Have you disclosed your HIV status to your child?',
        max_length=7,
        choices=YES_NO)

    plan_to_disclose = models.CharField(
        verbose_name='Do you plan on disclosing your HIV status to your '
                     'child?',
        max_length=7,
        blank=True,
        null=True,
        choices=YES_NO)

    reason_not_disclosed = models.CharField(
        verbose_name='What is the reason you have not disclosed your HIV '
                     'status to your child?',
        max_length=50,
        blank=True,
        null=True,
        choices=REASONS_NOT_DISCLOSED)

    reason_not_disclosed_other = OtherCharField()

    class Meta(CrfModelMixin.Meta):
        abstract = True
class InfantFuNewMedItems(CrfInlineModelMixin, BaseUuidModel):
    """A model completed by the user on the infant's follow up medication items."""

    infant_fu_med = models.ForeignKey(InfantFuNewMed, on_delete=models.CASCADE)

    medication = models.CharField(
        max_length=100,
        choices=MEDICATIONS,
        verbose_name="Medication",
    )

    other_medication = OtherCharField()

    date_first_medication = models.DateField(
        verbose_name="Date of first medication use", )

    stop_date = models.DateField(
        verbose_name="Date medication was stopped",
        blank=True,
        null=True,
    )

    drug_route = models.CharField(
        max_length=20,
        choices=DRUG_ROUTE,
        verbose_name="Drug route",
    )

    def natural_key(self):
        return (self.medication, ) + self.infant_fu_med.natural_key()

    class Meta:
        verbose_name = "Infant FollowUp: New Med Items"
        verbose_name_plural = "Infant FollowUp: New Med Items"
class VaccinesMissed(CrfInlineModelMixin, BaseUuidModel):
    """All vaccines missed by Infant/Child/Adolescent"""

    parent_model_attr = 'child_immunization_history'

    child_immunization_history = models.ForeignKey(ChildImmunizationHistory,
                                                   on_delete=models.CASCADE)

    missed_vaccine_name = models.CharField(verbose_name="Missed vaccine name",
                                           choices=IMMUNIZATIONS,
                                           max_length=100,
                                           null=True,
                                           blank=True)

    reason_missed = models.CharField(
        verbose_name="Reasons infant/child/adolescent missed vaccines",
        choices=REASONS_VACCINES_MISSED,
        max_length=100,
        null=True,
        blank=True)

    reason_missed_other = OtherCharField()

    def natural_key(self):
        return (self.missed_vaccine_name,
                ) + self.child_immunization_history.natural_key()

    class Meta:
        app_label = 'flourish_child'
        verbose_name = 'Missed Vaccines'
        verbose_name_plural = 'Missed Vaccines'
        unique_together = ('missed_vaccine_name', 'child_immunization_history',
                           'reason_missed')
Esempio n. 21
0
class ChildMedicalHistory(ChildCrfModelMixin):

    """A model completed by the user on Medical History for all children."""

    chronic_since = models.CharField(
        max_length=25,
        choices=YES_NO,
        verbose_name='Does the Child/Adolescent have any chronic conditions?',)

    child_chronic = models.ManyToManyField(
        ChronicConditions,
        related_name='child',
        verbose_name=('Does the Child/Adolescent have any of the above. '
                      'Tick all that apply'),)

    child_chronic_other = OtherCharField(
        max_length=35,
        verbose_name='If other, specify.',
        blank=True,
        null=True)

    """Quartely phone calls stem question"""
    med_history_changed = models.CharField(
        verbose_name='Has any of your following medical history changed?',
        max_length=20,
        choices=YES_NO,
        null=True)

    class Meta(ChildCrfModelMixin.Meta):
        app_label = 'flourish_child'
        verbose_name = 'Children/Adolescents Medical History'
        verbose_name_plural = 'Children/Adolescents Medical History'
Esempio n. 22
0
class InfantOtherAbnormalityItems(BaseCnsItem):

    other_abnormalities = models.CharField(
        max_length=250,
        choices=OTHER_DEFECT,
        verbose_name="Other",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    other_abnormalities_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.other_abnormalities, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies: Other"
        unique_together = ('other_abnormalities', 'congenital_anomalies')
Esempio n. 23
0
class InfantRenal(BaseCnsItem):

    renal = models.CharField(
        max_length=250,
        choices=RENAL_ANOMALY,
        verbose_name="Renal anomalies",
    )

    abnormality_status = models.CharField(
        max_length=35,
        choices=CONFIRMED_SUSPECTED,
        verbose_name="Abnormality status",
    )

    renal_other = OtherCharField(
        max_length=250,
        verbose_name="if other specify...",
        blank=True,
        null=True,
    )

    def natural_key(self):
        return (self.renal, ) + self.congenital_anomalies.natural_key()

    class Meta:
        app_label = 'td_infant'
        verbose_name = "Congenital Anomalies: Renal"
        verbose_name_plural = "Congenital Anomalies: Renal"
        unique_together = ('renal', 'congenital_anomalies')
class MemberEntryMixin(SurveyScheduleModelMixin,
                       RequiresHouseholdLogEntryMixin, models.Model):
    """For absentee and undecided log models.
    """

    household_member = models.ForeignKey(HouseholdMember,
                                         on_delete=models.PROTECT)

    report_date = models.DateField(editable=False)

    report_datetime = models.DateTimeField(verbose_name='Report date',
                                           validators=[datetime_not_future],
                                           default=get_utcnow)

    reason_other = OtherCharField()

    next_appt_datetime = models.DateTimeField(
        verbose_name='Follow-up appointment',
        help_text='The date and time to meet with the subject')

    next_appt_datetime_source = models.CharField(
        verbose_name='Appointment date suggested by?',
        max_length=25,
        choices=NEXT_APPOINTMENT_SOURCE,
        help_text='')

    contact_details = EncryptedCharField(
        null=True,
        blank=True,
        help_text='Information that can be used to contact someone, '
        'preferrably the subject, to confirm the appointment')

    comment = EncryptedTextField(
        verbose_name='Comments',
        max_length=250,
        blank=True,
        null=True,
        help_text=('IMPORTANT: Do not include any names or other personally '
                   'identifying information in this comment'))

    def save(self, *args, **kwargs):
        self.survey_schedule = (
            self.household_member.survey_schedule_object.field_value)
        if not self.id and self.report_date:
            raise ValueError(
                'Expected report_date to be None. Got {}. Set report datetime, '
                'not report_date.'.format(self.report_date))
        self.report_date = arrow.Arrow.fromdatetime(
            self.report_datetime,
            tzinfo=self.report_datetime.tzinfo).to('UTC').date()
        super().save(*args, **kwargs)

    class Meta:
        abstract = True
        unique_together = ('household_member', 'report_date')
class Uncircumcised (CircumcisionModelMixin, CrfModelMixin):

    reason_circ = models.CharField(
        verbose_name="What is the main reason that you have not yet been circumcised?",
        max_length=65,
        null=True,
        choices=REASON_CIRC_CHOICE,
        help_text="",
    )

    reason_circ_other = OtherCharField(
        null=True,)

    future_circ = models.CharField(
        verbose_name="Would you ever consider being circumcised in the future?",
        max_length=25,
        choices=YES_NO_UNSURE,
        null=True,
        help_text="",
    )

    future_reasons_smc = models.CharField(
        verbose_name="Which of the following might increase your willingness to"
                     " be circumcised the most?",
        max_length=75,
        choices=FUTURE_REASONS_SMC_CHOICE,
        null=True,
        help_text="",
    )

    service_facilities = models.CharField(
        verbose_name="Were you aware that circumcision services are provided "
                     "free of charge at most health facilities?",
        max_length=35,
        choices=YES_NO_DWTA,
        null=True,
        help_text="",
    )

    aware_free = models.CharField(
        verbose_name="Where did you learn that circumcision services were "
                     "available free at most health facilities?",
        max_length=85,
        null=True,
        choices=AWARE_FREE_CHOICE,
        default=NOT_APPLICABLE,
        help_text="",
    )

    history = HistoricalRecords()

    class Meta(CrfModelMixin.Meta):
        app_label = 'bcpp_subject'
        verbose_name = "Uncircumcised"
        verbose_name_plural = "Uncircumcised"
Esempio n. 26
0
class ReferralFormMixin(models.Model):

    referred_to = models.CharField(
        verbose_name='Referred To',
        choices=REFERRED_TO,
        max_length=50)

    referred_to_other = OtherCharField()

    class Meta:
        app_label = 'flourish_caregiver'
class ReferralFormMixin(models.Model):

    referred_to = models.CharField(
        verbose_name='Referred To',
        choices=REFERRED_TO,
        max_length=50)

    referred_to_other = OtherCharField()

    class Meta:
        abstract = True
Esempio n. 28
0
class HivTested(CrfModelMixin):

    num_hiv_tests = models.IntegerField(
        verbose_name='How many times before today have you had an HIV test?',
        validators=[MinValueValidator(1)],
        null=True,
        blank=False,
        help_text='')

    where_hiv_test = models.CharField(
        verbose_name='Where were you tested for HIV, the last '
        'most recent time you were tested?',
        max_length=85,
        choices=WHERE_HIV_TEST_CHOICE,
        help_text='')

    where_hiv_test_other = OtherCharField()

    why_hiv_test = models.CharField(
        verbose_name='Not including today\'s HIV test, which of the following '
        'statements best describes the reason you were tested the last '
        'most recent time you were tested before today?',
        max_length=105,
        choices=WHY_HIV_TEST_CHOICE,
        null=True,
        blank=False,
        help_text='')

    hiv_pills = models.CharField(
        verbose_name='Have you ever heard about treatment for'
        ' HIV with pills called antiretroviral therapy or ARVs [or HAART]?',
        max_length=25,
        choices=YES_NO_UNSURE,
        null=True,
        blank=False)

    arvs_hiv_test = models.CharField(
        verbose_name='Do you believe that treatment for HIV with '
        'antiretroviral therapy (or ARVs) can help HIV-positive people'
        ' to live longer?',
        max_length=25,
        choices=YES_NO_UNSURE,
        null=True,
        blank=False)

    history = HistoricalRecords()

    class Meta(CrfModelMixin.Meta):
        app_label = 'bcpp_subject'
        verbose_name = 'HIV Tested'
        verbose_name_plural = 'HIV Tested'
Esempio n. 29
0
class MaternalInterimIdcc(CrfModelMixin):

    info_since_lastvisit = models.CharField(
        max_length=25,
        verbose_name="Is there new laboratory information available on the "
        "mother since last visit",
        choices=YES_NO)

    recent_cd4 = models.DecimalField(max_digits=8,
                                     decimal_places=2,
                                     blank=True,
                                     null=True,
                                     verbose_name="Most recent CD4 available")

    recent_cd4_date = models.DateField(verbose_name="Date of recent CD4",
                                       validators=[date_not_future],
                                       blank=True,
                                       null=True)

    value_vl_size = models.CharField(
        max_length=25,
        verbose_name="Is the value for the most recent VL available “=” ,"
        "“<”, or “>” a number? ",
        choices=SIZE_CHECK,
        blank=True,
        null=True)

    value_vl = models.DecimalField(max_digits=10,
                                   decimal_places=2,
                                   blank=True,
                                   null=True,
                                   verbose_name="Value of VL ")

    recent_vl_date = models.DateField(verbose_name="Date of recent VL",
                                      validators=[date_not_future],
                                      blank=True,
                                      null=True)

    other_diagnoses = OtherCharField(
        max_length=25,
        verbose_name="Please specify any other diagnoses found in the IDCC "
        "since the last visit ",
        blank=True,
        null=True)

    class Meta(CrfModelMixin.Meta):
        app_label = 'td_maternal'
        verbose_name = "Maternal Interim Idcc Data"
        verbose_name_plural = "Maternal Interim Idcc Data"
class CommunityEngagement(CrfModelMixin):
    """A model completed by the user on the participant's engagement in the community."""

    community_engagement = models.CharField(
        verbose_name="How active are you in community activities such as"
        " burial society, Motshelo, Syndicate, PTA, "
        "VDC(Village Developement Committee), Mophato"
        " and development of the community that surrounds you??",
        max_length=25,
        null=True,
        choices=COMMUNITY_ENGAGEMENT_CHOICE,
        help_text="")

    vote_engagement = models.CharField(
        verbose_name="Did you vote in the last local government election?",
        max_length=50,
        null=True,
        choices=VOTE_ENGAGEMENT_CHOICE,
        help_text="")

    problems_engagement = models.ManyToManyField(
        NeighbourhoodProblems,
        verbose_name="What are the major problems in this neighbourhood??",
        help_text=
        ("Note:Interviewer to read question but NOT the responses. Check the boxes of"
         " any of problems mentioned."))

    problems_engagement_other = OtherCharField(null=True, )

    solve_engagement = models.CharField(
        verbose_name="If there is a problem in this neighbourhood, do the"
        " adults work together in solving it?",
        max_length=25,
        null=True,
        choices=SOLVE_ENGAGEMENT_CHOICE,
        help_text="")

    objects = CrfModelManager()

    history = HistoricalRecords()

    class Meta(CrfModelMixin.Meta):
        app_label = 'bcpp_subject'
        verbose_name = "Community Engagement"
        verbose_name_plural = "Community Engagement"