Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void setupFormResources() {
- // diagnosis
- FormService formService = Context.getFormService();
- Form diagnosis = formService.getFormByUuid("9aa9594b-79d1-4ec6-bf8e-c02ed36a666b");
- FormResource formResource = new FormResource();
- formResource.setForm(diagnosis);
- formResource.setName("formentryapp.patientDashboard.visitActions.form." + diagnosis.getId());
- formResource.setValueReferenceInternal("{ "
- + '"'
- + "id"
- + '"'
- + ": "
- + '"'
- + "patientDashboard.visitActions.form.8"
- + '"'
- + ", "
- + '"'
- + "appId"
- + '"'
- + ": null, "
- + '"'
- + "extensionPointId"
- + '"'
- + ": "
- + '"'
- + "patientDashboard.visitActions"
- + '"'
- + ", "
- + '"'
- + "type"
- + '"'
- + ": "
- + '"'
- + "link"
- + '"'
- + ", "
- + '"'
- + "label"
- + '"'
- + ": "
- + '"'
- + "Dermatology Diagnosis"
- + '"'
- + ", "
- + '"'
- + "url"
- + '"'
- + ": "
- + '"'
- + "htmlformentryui/htmlform/enterHtmlFormWithStandardUi.page?patientId={{patient.uuid}}&visitId={{visit.uuid}}&formUuid=9aa9594b-79d1-4ec6-bf8e-c02ed36a666b"
- + '"' + ", " + '"' + "icon" + '"' + ": " + '"' + "icon-file-alt" + '"' + ", " + '"' + "order" + '"'
- + ": 15, " + '"' + "requiredPrivilege" + '"' + ": " + '"' + "" + '"' + ", " + '"' + "featureToggle"
- + '"' + ": null, " + '"' + "require" + '"' + ": " + '"' + "" + '"' + ", " + '"' + "script" + '"'
- + ": null, " + '"' + "extensionParams" + '"' + ": { " + '"' + "displayStyle" + '"' + ": " + '"'
- + "Standard" + '"' + " } }");
- formResource.setDatatypeClassname("org.openmrs.module.formentryapp.ExtensionFormResource");
- formService.saveFormResource(formResource);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement