diff --git a/pwa/src/components/DiagnosisForm.tsx b/pwa/src/components/DiagnosisForm.tsx index 5807dac..f707741 100644 --- a/pwa/src/components/DiagnosisForm.tsx +++ b/pwa/src/components/DiagnosisForm.tsx @@ -33,7 +33,7 @@ var diagnosisFields = data.diagnoses export default function Form(): ReactElement { return (
- 'Patient Diagnosis'}> + {/* 'Patient Diagnosis'}> */} {diagnosisFields.map((field) => { const formElements: ReactElement[] = [] @@ -63,16 +63,11 @@ export default function Form(): ReactElement { } if (field.group != null) { - if(field["group-title"] != null){ - formElements.push( - field['group-title']} - > - - ) - } + const groupElements: ReactElement[] = [] + + // add each group element to the internalElement arrat field.group.forEach((ele) => { - formElements.push( + groupElements.push( ) }) + + // Render the entire list with the internal elements + if(field["group-title"] != null){ + formElements.push( + field['group-title']} + >{groupElements} + + ) + } + formElements.push() } return <> {formElements} })} - + {/* */}
) }