Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. create a JSON into your omod → module → resources → app → customAddEditPersonInfoName.json
  2. Copy this JSON content into that file, and edit the values for your needs

    Code Block
    firstline1
    titleAdd/Edit person info - custom fragment extension.json
    linenumberstrue
    {
    "id": "${project.parent.groupId}.${project.parent.artifactId}.userAccount.personAttributeEditLocation",
    "extensionPointId": "userAccount.personAttributeEditFragment",
    "extensionParams": {
       "title" : "Location",
       "type": "personAttribute",
       "label": "Select Location",
       "formFieldName": "personLocationId",
       "uuid": "8b5c95ef-103c-41bc-9f24-368b8f77e070",
       "provider": "${project.parent.artifactId}",
       "fragment": "manageAccount/addLocation"
        }
    }


  3. Do not change the "extensionPointId": "userAccount.personAttributeEditFragment", if you need to add this fragment to Add/Edit Person section.
  4. If the "type" is "personAttribute", then replace the "uuid" property with the respected personAttributeType which should added into the person Attribute (you need to create this personAttibuteType before adding this). If not, then no need to add the "uuid" property here.

  5. If the "type" is Person attribute, then it will be automatically updated during the usual save/update though the dashboard. If the custom field type is not person attribute, then the custom fragment should handle those.

  6. Update the other properties as usual way of creating the extensions for OpenMRS.

...