DigitalState / Service-Discussions

A place to discuss and document service designs, ideas, problems, etc.
The Unlicense
0 stars 1 forks source link

Food Chemistry Samples Submissions - ESR #32

Open StephenOTT opened 6 years ago

StephenOTT commented 6 years ago

BPMN Process:

Version 1: food_chemistry_samples_submissions


Submission / Start Event Form:

Form Schema ```json "schema": [ { "components": [ { "components": [ { "lockKey": true, "tags": [], "type": "textfield", "conditional": { "show": "", "when": null, "eq": "" }, "validate": { "required": true, "minLength": "", "maxLength": "", "pattern": "", "custom": "", "customPrivate": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "business-name", "label": "Name", "inputMask": "", "inputType": "text", "tableView": true, "input": true }, { "description": "This field is pre-populated from the current User's profile/persona", "lockKey": true, "tags": [], "type": "textfield", "conditional": { "show": "", "when": null, "eq": "" }, "validate": { "required": true, "minLength": "", "maxLength": "", "pattern": "", "custom": "", "customPrivate": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "Steve", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "business-contactname", "label": "Contact name", "inputMask": "", "inputType": "text", "tableView": true, "input": true }, { "lockKey": true, "tags": [], "type": "textfield", "conditional": { "show": "", "when": null, "eq": "" }, "validate": { "required": true, "minLength": "", "maxLength": "", "pattern": "", "custom": "", "customPrivate": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "business-address", "label": "Address", "inputMask": "", "inputType": "text", "tableView": true, "input": true }, { "columns": [ { "components": [ { "description": "This field is pre-populated from the current User's profile/persona", "validate": { "required": true }, "lockKey": true, "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "email", "kickbox": { "enabled": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "morgan@site.com", "suffix": "", "prefix": "", "placeholder": "", "key": "business-email", "label": "Email", "inputType": "email", "tableView": true, "input": true } ] }, { "components": [ { "lockKey": true, "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "phoneNumber", "validate": { "required": true }, "clearOnHide": true, "defaultValue": "", "hidden": false, "persistent": true, "unique": false, "protected": false, "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "business-phone", "label": "Phone", "inputMask": "(999) 999-9999", "tableView": true, "input": true } ] } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "columns", "key": "columns", "tableView": true, "input": false } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "breadcrumb": "default", "type": "panel", "theme": "default", "title": "Primary Report Copy", "input": false, "key": "panel3" }, { "components": [ { "lockKey": true, "tags": [], "type": "textfield", "conditional": { "show": "", "when": null, "eq": "" }, "validate": { "required": false, "minLength": "", "maxLength": "", "pattern": "", "custom": "", "customPrivate": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "business-extrareportcopyto", "label": "Extra report copy to", "inputMask": "", "inputType": "text", "tableView": true, "input": true }, { "lockKey": true, "tags": [], "type": "textfield", "conditional": { "show": "", "when": null, "eq": "" }, "validate": { "required": false, "minLength": "", "maxLength": "", "pattern": "", "custom": "", "customPrivate": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "business-extrareportcopy-address", "label": "Address", "inputMask": "", "inputType": "text", "tableView": true, "input": true }, { "lockKey": true, "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "email", "kickbox": { "enabled": false }, "clearOnHide": true, "hidden": false, "persistent": true, "unique": false, "protected": false, "defaultValue": "", "suffix": "", "prefix": "", "placeholder": "", "key": "business-extrareportcopy-email", "label": "Email", "inputType": "email", "tableView": true, "input": true } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "breadcrumb": "default", "type": "panel", "theme": "default", "title": "Secondary Report Copy", "input": false, "key": "panel2" } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "breadcrumb": "default", "type": "panel", "theme": "primary", "title": "Business Name and Address for Reporting", "input": false, "key": "panel" }, { "components": [ { "input": true, "tableView": true, "inputType": "radio", "label": "Is Invoice Address Different than Primary Reporting Address?", "key": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "values": [ { "label": "Yes", "value": "yes" }, { "label": "No", "value": "no" } ], "defaultValue": "", "protected": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "required": true }, "type": "radio", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } }, { "components": [ { "input": true, "tableView": true, "inputType": "text", "inputMask": "", "label": "Name", "key": "invoice-name", "placeholder": "", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": true }, "conditional": { "eq": "yes", "when": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "show": "true" }, "type": "textfield", "tags": [] }, { "input": true, "tableView": true, "inputType": "text", "inputMask": "", "label": "Contact", "key": "invoice-contact", "placeholder": "", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": true }, "conditional": { "eq": "yes", "when": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "show": "true" }, "type": "textfield", "tags": [] }, { "input": true, "tableView": true, "inputType": "text", "inputMask": "", "label": "Address", "key": "invoice-address", "placeholder": "", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": true }, "conditional": { "eq": "yes", "when": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "show": "true" }, "type": "textfield", "tags": [] }, { "input": true, "tableView": true, "inputType": "text", "inputMask": "", "label": "Purchase order number", "key": "invoice-purchaseordernumber", "placeholder": "", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": true }, "conditional": { "eq": "yes", "when": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "show": "true" }, "type": "textfield", "tags": [] }, { "input": true, "tableView": true, "inputType": "email", "label": "Email", "key": "invoice-email", "placeholder": "", "prefix": "", "suffix": "", "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "kickbox": { "enabled": false }, "type": "email", "tags": [], "conditional": { "eq": "yes", "when": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "show": "true" }, "lockKey": true, "validate": { "required": true } } ], "key": "panel5", "input": false, "title": "Invoicing Information", "theme": "default", "type": "panel", "breadcrumb": "default", "tags": [], "conditional": { "eq": "yes", "when": "isInvoiceAddressDifferentthanPrimaryReportingAddress", "show": "true" } } ], "key": "panel4", "input": false, "title": "Invoice To information", "theme": "primary", "type": "panel", "breadcrumb": "default", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } }, { "components": [ { "rows": [], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "textarea", "validate": { "required": false, "minLength": "", "maxLength": "", "pattern": "", "custom": "" }, "clearOnHide": true, "wysiwyg": false, "hidden": false, "persistent": true, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "furtherCommentsandInstructions", "label": "Further Comments and Instructions", "tableView": true, "input": true }, { "components": [ { "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "htmlelement", "content": "If fast or urgent, please contact laboratory to check availability", "className": "", "attrs": [ { "value": "", "attr": "" } ], "tag": "strong", "input": false, "key": "html" }, { "isNew": false, "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "radio", "validate": { "required": true, "custom": "", "customPrivate": false }, "clearOnHide": true, "hidden": false, "persistent": true, "protected": false, "defaultValue": "", "values": [ { "value": "standard", "label": "Standard (Up to 15 working days)" }, { "value": "fast", "label": "Fast (Up to 8 working days)" }, { "value": "urgent", "label": "Urgent (2-3 working days: 100% premium on price)" }, { "value": "other", "label": "Other" } ], "key": "requestedTurnaroundTime", "label": "Requested Turnaround Time", "inputType": "radio", "tableView": true, "input": true }, { "rows": [], "lockKey": true, "conditional": { "show": "true", "when": "requestedTurnaroundTime", "eq": "other" }, "tags": [], "type": "textarea", "validate": { "required": true, "minLength": "", "maxLength": "", "pattern": "", "custom": "" }, "clearOnHide": true, "wysiwyg": false, "hidden": false, "persistent": true, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "requestedTurnAroundTime-other", "label": "Requested Turn Around Time", "tableView": true, "input": true } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "breadcrumb": "default", "type": "panel", "theme": "success", "title": "Turnaround Time", "input": false, "key": "panel7" } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "breadcrumb": "default", "type": "panel", "theme": "primary", "title": "Further Details", "input": false, "key": "panel6" }, { "components": [ { "key": "html2", "input": false, "tag": "p", "attrs": [ { "attr": "", "value": "" } ], "className": "", "content": "Samples are to be sent to:", "type": "htmlelement", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } }, { "key": "html3", "input": false, "tag": "strong", "attrs": [ { "attr": "", "value": "" } ], "className": "", "content": "Food Chemistry Laboratory, ESR,
Christchurch Science Centre,
27 Creyke Road,
Ilam, Christchurch 8041", "type": "htmlelement", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } }, { "input": true, "tableView": true, "label": "Date Samples were sent to ESR Lab", "key": "dateSamplesweresenttoEsrLab", "placeholder": "", "format": "yyyy-MM-dd", "enableDate": true, "enableTime": false, "defaultDate": "", "datepickerMode": "day", "datePicker": { "datepickerMode": "day", "yearColumns": "1", "yearRows": "1", "maxMode": "day", "minMode": "day", "initDate": "", "startingDay": 0, "showWeeks": true }, "timePicker": { "arrowkeys": true, "mousewheel": true, "readonlyInput": false, "showMeridian": true, "minuteStep": 1, "hourStep": 1 }, "protected": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "custom": "", "required": true }, "type": "datetime", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } }, { "input": true, "inputType": "checkbox", "tableView": true, "hideLabel": true, "label": "Confirm Destination Address of Samples", "datagridLabel": true, "key": "confirmDestinationAddressofSamples", "defaultValue": false, "protected": false, "persistent": true, "hidden": false, "name": "", "value": "", "clearOnHide": true, "validate": { "required": true }, "type": "checkbox", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } } ], "key": "panel8", "input": false, "title": "Send Samples To", "theme": "primary", "type": "panel", "breadcrumb": "default", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } }, { "components": [ { "components": [ { "components": [ { "input": true, "tableView": true, "inputType": "text", "inputMask": "", "label": "Sample ID", "key": "sampleId", "placeholder": "", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": true }, "conditional": { "eq": "", "when": null, "show": "" }, "type": "textfield", "tags": [] }, { "input": true, "tableView": true, "inputType": "text", "inputMask": "", "label": "Sample Matrix", "key": "sampleMatrix", "placeholder": "", "prefix": "", "suffix": "", "multiple": false, "defaultValue": "", "protected": false, "unique": false, "persistent": true, "hidden": false, "clearOnHide": true, "validate": { "customPrivate": false, "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": true }, "conditional": { "eq": "", "when": null, "show": "" }, "type": "textfield", "tags": [] }, { "rows": [], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "textarea", "validate": { "required": true, "minLength": "", "maxLength": "", "pattern": "", "custom": "" }, "clearOnHide": true, "wysiwyg": false, "hidden": false, "persistent": true, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "descriptionandFurtherInformation", "label": "Description and Further Information", "tableView": true, "input": true }, { "rows": [], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "textarea", "validate": { "required": true, "minLength": "", "maxLength": "", "pattern": "", "custom": "" }, "clearOnHide": true, "wysiwyg": false, "hidden": false, "persistent": true, "protected": false, "defaultValue": "", "multiple": false, "suffix": "", "prefix": "", "placeholder": "", "key": "sampleinformationrequiredonReport", "label": "Sample information required on Report", "tableView": true, "input": true }, { "rows": [], "isNew": false, "input": true, "tableView": true, "label": "Additional Tests", "key": "additionalTests", "placeholder": "", "prefix": "", "suffix": "", "multiple": true, "defaultValue": "", "protected": false, "persistent": true, "hidden": false, "wysiwyg": false, "clearOnHide": true, "validate": { "custom": "", "pattern": "", "maxLength": "", "minLength": "", "required": false }, "type": "textarea", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } } ], "key": "fieldset", "input": false, "tableView": true, "legend": "Sample", "type": "fieldset", "hideLabel": true, "tags": [], "conditional": { "eq": "", "when": null, "show": "" } } ], "isNew": false, "lockKey": true, "addAnother": "Add additional Sample", "striped": false, "bordered": false, "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "type": "datagrid", "clearOnHide": true, "hidden": false, "persistent": true, "protected": false, "key": "test", "label": "Test Information - Max 10 Samples", "tableView": true, "tree": true, "input": true, "condensed": false, "validate": { "maxLength": 10, "minLength": 1 } } ], "conditional": { "show": "", "when": null, "eq": "" }, "tags": [], "breadcrumb": "default", "type": "panel", "theme": "primary", "title": "Testing Information", "input": false, "key": "panel9" }, { "conditional": { "eq": "", "when": null, "show": "" }, "tags": [], "type": "checkbox", "validate": { "required": true }, "clearOnHide": true, "value": "", "name": "", "hidden": false, "persistent": true, "protected": false, "defaultValue": false, "key": "test2", "datagridLabel": true, "label": "Test", "hideLabel": true, "tableView": true, "inputType": "checkbox", "input": true }, { "type": "button", "theme": "primary", "disableOnInvalid": false, "action": "submit", "block": false, "rightIcon": "", "leftIcon": "", "size": "md", "key": "submit", "tableView": false, "label": "Submit", "input": true }, { "key": "html4", "input": false, "tag": "p", "attrs": [ { "attr": "", "value": "" } ], "className": "", "content": "http://www.esr.cri.nz/assets/Test-Forms/ESR0339-food-chemistry-sample-submission-form-fillable.pdf", "type": "htmlelement", "tags": [], "conditional": { "eq": "", "when": null, "show": "" } } ] ```



Screenshot: form js script sample task priority config tasks camunda-process-cockpit

Based on form from: http://www.esr.cri.nz/assets/Test-Forms/ESR0339-food-chemistry-sample-submission-form-fillable.pdf