@Override public InputFieldGroupMap createFieldGroups(SubmitExpeditedAdverseEventCommand command) { InputFieldGroupMap map = new InputFieldGroupMap(); InputFieldGroup ccReport = new DefaultInputFieldGroup("ccReport"); InputField cc = InputFieldFactory.createTextArea("report.lastVersion.ccEmails", "Cc"); InputFieldAttributes.setColumns(cc, 50); ccReport.getFields().add(cc); map.addInputFieldGroup(ccReport); return map; }
@Override protected void createFieldGroups( AeInputFieldCreator creator, ExpeditedAdverseEventInputCommand command) { String baseProp = "responseDescription"; InputField desc = createTextArea( baseProp + ".eventDescription", "Description & treatment of event(s)", new TextSizeValidator(4000)); InputFieldAttributes.setColumns(desc, 70); InputFieldAttributes.setRows(desc, 8); Map<Object, Object> postEventStatusOpts = new LinkedHashMap<Object, Object>(); postEventStatusOpts.put("", "Please select"); postEventStatusOpts.putAll( WebUtils.collectOptions( Arrays.asList(PostAdverseEventStatus.values()), null, "displayName")); Map<Object, Object> eventStatusOpts = new LinkedHashMap<Object, Object>(); eventStatusOpts.put("", "Please select"); eventStatusOpts.putAll( WebUtils.collectOptions(Arrays.asList(EventStatus.values()), null, "displayName")); InputField removedDateField = createPastDateField( baseProp + ".dateRemovedFromProtocol", "Date removed from protocol", false); InputField treatmentTimeField = createTimeField( baseProp + ".primaryTreatmentApproximateTime", "Event treatment, approximate time"); treatmentTimeField .getAttributes() .put( InputField.HELP, "ae.treatment.aeReport.treatmentInformation.primaryTreatmentApproximateTime"); creator.createFieldGroup( "desc", desc, treatmentTimeField, createSelectField( baseProp + ".presentStatus", "Present status", false, postEventStatusOpts), createPastDateField(baseProp + ".recoveryDate", "Date of recovery or death", false), createBooleanSelectField( baseProp + ".retreated", "Has the participant been re-treated?", false), removedDateField); InputField reducedDose = InputFieldFactory.createTextField( baseProp + ".reducedDose", "If reduced, specify: New dose", false); creator.createFieldGroup( "DCP_INFO", createSelectField( baseProp + ".blindBroken", "Was blind broken due to event?", false, createBooleanOptions()), createSelectField( baseProp + ".studyDrugInterrupted", "Was study agent stopped/interrupted/reduced in response to event?", false, createBooleanOptions()), reducedDose, createPastDateField(baseProp + ".reducedDate", "Date dose reduced", false), InputFieldFactory.createTextField( baseProp + ".daysNotGiven", "If interrupted, specify total number of days not given", false), InputFieldFactory.createCheckboxField(baseProp + ".autopsyPerformed", "Autopsy performed?"), InputFieldFactory.createTextField(baseProp + ".causeOfDeath", "Cause of death"), createSelectField( baseProp + ".eventAbate", "Did event abate after study drug was stopped or dose reduced?", false, eventStatusOpts), createSelectField( baseProp + ".eventReappear", "Did event reappear after study drug was reintroduced?", false, eventStatusOpts)); }