You can design an xform to override the default OpenMRS patient registration short form by doing the following.
...
- Create a special encounter form with the obs you want to enter using the patient registration form. You can read about this under the Creating an Xform section
- Set the value of the "xforms.patientRegEncounterFormId" global property to that of the formId for the encounter form you have created in the step above.
- Go to the Patient Xform Design and refresh the form by either right clicking the form in the forms panel and select refresh or clicking the refresh toolbar icon, in the form designer. You can do this refresh every time you make changes to the encounter form and you want them reflected in the patient registration form.
...
- xforms.autoGeneratePatientIdentifier: Set this to: true
- xforms.new_patient_identifier_type_id: Set this to the value of the patient identifier type id that you want to use for new patients.
Changing the Primary Patient Identifier
To change the primary patient identifier - in the Reference App this shows on the top right of all patient screens preceded by the text "Patient id" - change the global setting emr.primaryIdentifierType to the UUID of the new patient identifier which can be found by picking the new identifier in Advanced Administration/Patient/Manage Identifier Types.
Adding Further Person Attributes to the Registration XForm
Attributes can be defined using the Advanced Administration/Person/Manage Person Attribute Types. In order for the additional attributes to be added to the Patient Registration XForm- open the form from the Advanced Administration/Xforms/Patient XForm Design and then right click on the Patient heading in the left hand pane and pick "Refresh". The new attributes will appear at the foot of the left pane.
Resources
- XForms Module
- XForms Module User Guide
- XForms Module Form Designer
- XForms Module External Applications Guide
- XForms Module Technical Overview
- XReports Module ReportDesigner Technical Overview
- XForms Module Release Notes
- Download Module
- GitHub project (source code)
- XForms was discussed on a May 9th University call. Watch xforms video
- XForms Newbies FAQs