Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.37 KB | None | 0 0
  1. private void setupFormResources() {
  2. // diagnosis
  3. FormService formService = Context.getFormService();
  4. Form diagnosis = formService.getFormByUuid("9aa9594b-79d1-4ec6-bf8e-c02ed36a666b");
  5. FormResource formResource = new FormResource();
  6. formResource.setForm(diagnosis);
  7. formResource.setName("formentryapp.patientDashboard.visitActions.form." + diagnosis.getId());
  8. formResource.setValueReferenceInternal("{ "
  9. + '"'
  10. + "id"
  11. + '"'
  12. + ": "
  13. + '"'
  14. + "patientDashboard.visitActions.form.8"
  15. + '"'
  16. + ", "
  17. + '"'
  18. + "appId"
  19. + '"'
  20. + ": null, "
  21. + '"'
  22. + "extensionPointId"
  23. + '"'
  24. + ": "
  25. + '"'
  26. + "patientDashboard.visitActions"
  27. + '"'
  28. + ", "
  29. + '"'
  30. + "type"
  31. + '"'
  32. + ": "
  33. + '"'
  34. + "link"
  35. + '"'
  36. + ", "
  37. + '"'
  38. + "label"
  39. + '"'
  40. + ": "
  41. + '"'
  42. + "Dermatology Diagnosis"
  43. + '"'
  44. + ", "
  45. + '"'
  46. + "url"
  47. + '"'
  48. + ": "
  49. + '"'
  50. + "htmlformentryui/htmlform/enterHtmlFormWithStandardUi.page?patientId={{patient.uuid}}&visitId={{visit.uuid}}&formUuid=9aa9594b-79d1-4ec6-bf8e-c02ed36a666b"
  51. + '"' + ", " + '"' + "icon" + '"' + ": " + '"' + "icon-file-alt" + '"' + ", " + '"' + "order" + '"'
  52. + ": 15, " + '"' + "requiredPrivilege" + '"' + ": " + '"' + "" + '"' + ", " + '"' + "featureToggle"
  53. + '"' + ": null, " + '"' + "require" + '"' + ": " + '"' + "" + '"' + ", " + '"' + "script" + '"'
  54. + ": null, " + '"' + "extensionParams" + '"' + ": { " + '"' + "displayStyle" + '"' + ": " + '"'
  55. + "Standard" + '"' + " } }");
  56. formResource.setDatatypeClassname("org.openmrs.module.formentryapp.ExtensionFormResource");
  57. formService.saveFormResource(formResource);
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement