Written forms to sql including multiple yes, no other -


i designing database written forms filled out each time person visits office. have:

patient: patient_id, fname, lname, gender etc

adult *patient_id*, occupation etc

child *patient_id*, school etc

i'm supposed store form data written each time person visits approximately 20 questions.

e.g: written form has questions like:

yes / no - indication of hearing difficulty? if yes, ear involved? r___ l___ both___

yes / no - head injury? ________________

yes / no - scheduled surgery? if yes type , when?


what best way implement it's normalized , structured? suggestions column names lot of data? i'm figuring far may need 2 tables child_info , adult_info foreign key person, store data

first, have 'questions' table;

  • question_id
  • question_text
  • answer_type (this may foreign key question_types table)

this makes easy add or update questions in future.

to hold answers given patient, have 'answers' table;

  • patient_id
  • question_id
  • answer
  • notes

this means answers separate adult or child info, still linked patient.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -