heart icon indicating copy to clipboard operation
heart copied to clipboard

Audit data types used for participant fields

Open tienyuan opened this issue 5 years ago • 3 comments

There may be a mismatch between the database's data type and the intake form ui.

Please note any fields that should be changed/removed and the data type you recommend.

tienyuan avatar Aug 18 '19 03:08 tienyuan

Two general thoughts:

  1. Do we need lengths on most of the VARCHAR fields? I think PostgreSQL allows varchar fields without lengths. That avoids problems with people with long last names and such.
  2. Do we want enumerated types for radio buttons and similar "select from a fixed list" options? (For instance, gender, race, ethnicity)?

ianbark avatar Aug 20 '19 02:08 ianbark

Other thoughts

  1. Phone # -- "(818) 555-9999" is more than 10 characters; is something translating that to 8185559999? Even more for international phone numbers
  2. veteran should be BOOLEAN
  3. I don't see referral source in database?
  4. "Which onsite obligations did the individual complete?" doesn't seem to correspond to anything in db either

ianbark avatar Aug 20 '19 02:08 ianbark

Checked the database tonight and...

  1. Yes, there are varchar limits on every text field. No action needed.

  2. **Yes, we to replace varchar fields with enumerables when appropriate. Let's make this a new issue to cover updating: age, gender, race, ethnicity, housing status, family status, income source, income range

  3. Yes we should store phone numbers as only 10 digits and formatting the number on the frontend. Let's make a issue

  4. Veteran is boolean. No action needed

  5. Referral source is using the same db field as clinic name, but the field is poorly named. Instead of 'clinic', it should be 'clinic_name_referral_source'

  6. "Which onsite obligations did the individual complete?" is text for the data entry person. I think it's only a bit of text.

tienyuan avatar Oct 08 '19 03:10 tienyuan