/** * Creates a new HTML Form Entry session (in "Enter" mode) for the specified Patient, using the * specified xml string to create the HTML Form object * * @param patient * @param xml * @param httpSession * @throws Exception */ public FormEntrySession(Patient patient, String xml, HttpSession httpSession) throws Exception { this(patient, Mode.ENTER, null, httpSession); submissionController = new FormSubmissionController(); this.xmlDefinition = xml; }
/** * Creates a new HTML Form Entry session (in "Enter" mode) for the specified patient and using * the HTML Form associated with the specified Form * * @param patient * @param form * @param httpSession * @throws Exception */ public FormEntrySession(Patient patient, Form form, HttpSession httpSession) throws Exception { this(patient, Mode.ENTER, null, httpSession); this.form = form; velocityContext.put("form", form); submissionController = new FormSubmissionController(); HtmlForm temp = HtmlFormEntryUtil.getService().getHtmlFormByForm(form); this.formModifiedTimestamp = (temp.getDateChanged() == null ? temp.getDateCreated() : temp.getDateChanged()) .getTime(); xmlDefinition = temp.getXmlData(); }
public FormEntrySession(Patient patient, HtmlForm htmlForm, Mode mode, Location defaultLocation, HttpSession httpSession, boolean automaticClientSideValidation, boolean clientSideValidationHints) throws Exception { this(patient, mode, defaultLocation, httpSession); this.context.setAutomaticClientSideValidation(automaticClientSideValidation); this.context.setClientSideValidationHints(clientSideValidationHints); this.htmlForm = htmlForm; this.formModifiedTimestamp = (htmlForm.getDateChanged() == null ? htmlForm.getDateCreated() : htmlForm .getDateChanged()).getTime(); form = htmlForm.getForm(); velocityContext.put("form", form); submissionController = new FormSubmissionController(); // avoid lazy initialization exceptions later if (form.getEncounterType() != null) form.getEncounterType().getName(); xmlDefinition = htmlForm.getXmlData(); }
submissionController = new FormSubmissionController(); context.setupExistingData(encounter); this.xmlDefinition = htmlForm.getXmlData();