Table of Contents |
---|
...
- Navigate to System Administration-->Manage Apps
- Click the square disable button beside "referenceapplication.registrationapp.registerPatient" to disable the integrated Registration App configuration.
- Add a new App Definition by clicking "Add App Definition".
- Give your new App a name, perhaps "referenceapplication.registrationapp.myRegisterPat".
- Copy the latest template for the registration App, found here (note that the square brackets before and after should not be used).
- Paste this into the Definition (required) field.
- Modify the ID to represent the ID you specified in step 4 above. For example, change "id": "referenceapplication.registrationapp.registerPatient", to "id": "referenceapplication.registrationapp.myRegisterPat",
- Modify the URL line to represent the ID you specified in step 4 above. For example, change "url": "registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.registerPatient", to "url": "registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.myRegisterPat",
- If you prefer, you can change the "description" and "label" fields to your liking, for example, name them in your language. You can also change the icon and order to your liking.
Save the new App configuration.
Info | ||
---|---|---|
| ||
|
...
- Find the UUID of the Person Attribute Type (s) that you want to add to the Registration App.
- Go to System Administration --> Advanced Administration --> Manage Person Attribute Types
- Click on the name of the Person Attribute, for example "Mother's Name".
- You will find the UUID listed in grey, for example... 8d871d18-c2cc-11de-8d13-0010c6dffd0f
- Open the App you created in the Initial Steps above.
In the list of sections you can add a new section, or you can simply add the person attribute to an existing section. Sections and fields are separated with a comma. The code to add a question of Mother's Name is...
Code Block language java title Mother Name Person Attribute Field { "type": "personAttribute", "label": "Mother's Name", "formFieldName": "mothersName", "uuid": "8d871d18-c2cc-11de-8d13-0010c6dffd0f", "widget": { "providerName": "uicommons", "fragmentId": "field/text" } }
If you want to add the question in a section of it's own, you would use something like this, placed in the list of sections...
Code Block language java title Person Attribute in own section { "legend": "My Person Attribute", "id": "myPersonAttributeLabel", "fields": [ { "type": "personAttribute", "label": "Mother's Name", "formFieldName": "mothersName", "uuid": "8d871d18-c2cc-11de-8d13-0010c6dffd0f", "widget": { "providerName": "uicommons", "fragmentId": "field/text" } } ] }
- Change the "uuid": value to the UUID of the Person Attribute that you want to appear in the Registration App.
- Save your App and enjoy!
Info | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Code Block | ||||||||
| ||||||||
{
"id": "referenceapplication.registrationapp.myRegisterPat",
"instanceOf": "registrationapp.registerPatient",
"label": "My Register Patient",
"description": "Create MY new Patient Record",
"extensions": [
|
A complete Json configuration with Mother's Name Person Attribute would look like this...
|
A complete Json configuration with Mother's Name Person Attribute would look like this...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "id": "referenceapplication.registrationapp.myRegisterPat", "idinstanceOf": "referenceapplication.registrationapp.myRegisterPat.homepageLinkregisterPatient", "label": "My Register Patient", "extensionPointIddescription": "org.openmrs.referenceapplication.homepageLinkCreate MY new Patient Record", "extensions": [ "type": "link", { "labelid": "My Register Patientreferenceapplication.registrationapp.myRegisterPat.homepageLink", "urlextensionPointId": "registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.myRegisterPatorg.openmrs.referenceapplication.homepageLink", "icontype": "icon-userlink", "orderlabel": 1 "My Register Patient", "requiredPrivilegeurl": "App: registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.registerPatientmyRegisterPat", } "icon": "icon-user", ], "configorder": 1, { "afterCreatedUrlrequiredPrivilege": "/coreapps/App: registrationapp.registerPatient" } ], "config": { "afterCreatedUrl": "/coreapps/clinicianfacing/patient.page?patientId={{patientId}}", "sections": [ { "id": "contactInfo", "label": "registrationapp.patient.contactInfo.label", "questions": [ { "legend": "Person.address", "fields": [ { "type": "personAddress", "label": "registrationapp.patient.address.question", "widget": { "providerName": "uicommons", "fragmentId": "field/personAddress" } } ] }, { "legend": "registrationapp.patient.phone.label", "id": "phoneNumberLabel", "fields": [ { "type": "personAttribute", "label": "registrationapp.patient.phone.question", "formFieldName": "phoneNumber", "uuid": "14d4f066-15f5-102d-96e4-000c29c2a5d7", "widget": { "providerName": "uicommons", "fragmentId": "field/text" }, "cssClasses": ["phone"] } ] }, { "legend": "My Person Attribute", "id": "myPersonAttributeLabel", "fields": [ { "type": "personAttribute", "label": "Mother's Name", "formFieldName": "mothersName", "uuid": "8d871d18-c2cc-11de-8d13-0010c6dffd0f", "widget": { "providerName": "uicommons", "fragmentId": "field/text" } } ] } ] } ] } } |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "id": "referenceapplication.registrationapp.myRegisterPat", "instanceOf": "registrationapp.registerPatient", "label": "My Register Patient", "description": "Create MY new Patient Record", "extensions": [ { "id": "referenceapplication.registrationapp.myRegisterPat.homepageLink", "extensionPointId": "org.openmrs.referenceapplication.homepageLink", "type": "link", "label": "My Register Patient", "url": "registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.myRegisterPat", "icon": "icon-user", "order": 1, "requiredPrivilege": "App: registrationapp.registerPatient" } ], "config": { "afterCreatedUrl": "/coreapps/clinicianfacing/patient.page?patientId={{patientId}}", "sections": [ { "id": "contactInfo", "label": "registrationapp.patient.contactInfo.label", "questions": [ { "legend": "Person.address", "fields": [ { "type": "personAddress", "label": "registrationapp.patient.address.question", "widget": { "providerName": "registrationapp", "fragmentId": "field/personAddressWithHierarchy", "config" : { "shortcutFor": "address1", "manualFields": ["address2"] } } } ] }, { "legend": "registrationapp.patient.phone.label", "id": "phoneNumberLabel", "fields": [ { "type": "personAttribute", "label": "registrationapp.patient.phone.question", "formFieldName": "phoneNumber", "uuid": "14d4f066-15f5-102d-96e4-000c29c2a5d7", "widget": { "providerName": "uicommons", "fragmentId": "field/text" }, "cssClasses": ["phone"] } ] }, { "legend": "My Person Attribute", "id": "myPersonAttributeLabel", "fields": [ { "type": "personAttribute", "label": "Mother's Name", "formFieldName": "mothersName", "uuid": "8d871d18-c2cc-11de-8d13-0010c6dffd0f", "widget": { "providerName": "uicommons", "fragmentId": "field/text" } } ] } ] } ] } } |
Manual Override of Primary Patient Identifier
The registration app allows you to manually override the primary patient identifier. When you set the variable allow manual override to "true", it presents the user with a question that allows them to manually override the primary identifier, which is often the OpenMRS ID.
(This section is not fully documented. There appear to be a number of steps required to expose the primary identifier in the UI
The following line can be added to the config section of the JSON that allows you to manually override the default identifier:
Code Block |
---|
"config": {
"allowManualIdentifier":"true"
} |
Collecting Additional Patient Identifiers in the Registration App
Support for collecting multiple patient identifiers is being introduced in Registration App v1.7, which is scheduled to be released in spring 2017. This support allows users to collect multiple person identifiers by configuring their own application.
What's not supported:
- Patient Identifier Type locations (This means that all location behaviors need to be set to "Not used" in the identifier type form)
Additional identifiers can be collected by adding a section in the config, just as you would when adding person attributes. The primary difference has to do with the field type which is "patientIdentifier" and the UUID is the UUID of the patient identifier, found in grey in the patient Identifier types page for that identifier.
- Find the UUID of the Patient Identifier Type(s) that you want to add to the Registration App.
- Go to System Administration --> Advanced Administration --> Patient Identifier Type Management
- Click on the name of the Patient Identifier Type, for example "Old Identification Number".
- You will find the UUID listed in grey, for example... 8d79403a-c2cc-11de-8d13-0010c6dffd0f
- Make sure to set the Location behavior to "Not Used" as you can see in this screenshot
- Open the App you created in the Initial Steps above.
In the list of sections you can add a new section. Sections and fields are separated with a comma. The code to add a section to collect the Old Identification Number is...
Code Block { "id": "patient-ids", "label": "Patient-Identifier", "questions": [ { "legend": "Old Identification Number", "id": "Old_Identification_Number_patientIdentifier", "fields": [ { "type": "patientIdentifier", "label": "Old Identification Number", "formFieldName": "oldIdentificationNumber", "uuid": "8d79403a-c2cc-11de-8d13-0010c6dffd0f", "widget": { "providerName": "uicommons", "fragmentId": "field/text" }, "cssClasses": ["required"] } ] } ] }
This allows you to collect the patient identifiers in the registration app, but it doesn't allow you to collect them elsewhere in the user interface. To add the ability to edit patient identifiers to the patient header in the clinician facing dashboard, you need to add the UUID of each identifier to the global property "emr.extraPatientIdentifierTypes":
Here's where it's exposed in the UI where users can click on the identifier to edit it.
Integrating with a Master Patient Index
...