Don't even think about hardcoding the number of detail items in a group. That's the kind of thinking that created this bad design in the first place.
There are two aspects to a questionaire - the definition and the recording of answers.
Here's the example if the same question can be used in multiple sections. It takes 5 tables because you have to define the qutstionaire, the groups, the questions. Then you need two junction tables to put them together.
tblQuestionaire
QuestionaireID (autonumber, PK)
QName
tblGroups
GroupID (autonumber, PK)
GName
tblQuestions
QuestionID (autonumber, PK)
QText
tblQuestionaireGroups ''' junction table
QGID (autonumber, PK)
QuestionaireID (FK, UniqueIDX fld1)
GroupID (FK, UniqueIDX fld2)
GroupSeq
tblQuestionaireQuestions ''' junction table
QQID (autonumber, PK)
QGID (FK, UniqueIDX fld1)
QuestionID (FK, UniqueIDX fld2)
QuestionSeq
Now that those are defined, we get to the recording of answers part.
tblPatientQuestionaire
PQID (autonumber, PK)
PatientID (FK)
QuestionaireID (FK)
DateAnswered
tblPatientAnswers
PAID (autonumber, PK)
PQID (FK, UniqueIDX, fld1)
QQID (FK, UniqueIDX, fld2)
PatientAnswer ''' this can be defined as text for simplicity but it could get much more complicated
When you assign a questionnaire to a patient, you use the selected QuestionnaireID to select all the related QQID's and append them to tblPatientAnswers.
This structure will allow you to define an infinite number of questionnaires with an infinite number of reusable questions which are assigned to an infinite number of groups to keep logically related questions together. You use the sequence numbers in the two junction tables to control the order in which the groups and the questions within a group appear.
The data (medical history questions) will be set by the dentist and once set it will rarely change.
The outline above will allow the dentist to define his own questions and create his own questionnaires. You can offer templates to help get them started. But, you will never have to worry about the layout after that.