Patient Registeration Module

Hi Team,

I was looking into the patient registeration module and seen that when we open this below link

http://localhost:8081/openmrs-standalone/registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.registerPatient

It displays a page for patient registeration page.

But if we see “registrationapp/registerPatient.page?” in the link, this “registerPatient.page” is nowhere in the code.

Can someone explain me how this page is getting generated?

I want to understand the architecture of Registeration Module.

Plus I want to understand how this below json file works in registeration mode, as the documentation given is not fully helpful. :tired_face:

{
  "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": "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"
                }
              }
            ]
          }
        ]
      }
    ]
  }
}

@dkayiwa, do u have any idea on this?

Here: omod/src/main/webapp/pages/registerPatient.gsp The UI Framework processes GSP (Groovy Server Pages) files under omod/src/main/webapp/ into .page files. So the code in fact contains only .gsp files, that’s why you can’t find this registerPatient.page file that you were looking for.

Regarding the Reg App configuration, I can point you to a custom JSON configuration that we have designed for a specific implementation. It’s useful as an example as it mixes a bit of everything: new sections, use of person attributes, use of obs… etc. Have a look here. Hopefully comparing that one to yours will help you understand the mechanisms behind it and help you converge towards a working version.

Hi @mksd, I want to add patient identifer in patient registeration page , what changes I should do?

Do you want to change the way patient identifiers are generated, or do you want to assign patient identifiers manually via the registration form?

Hi @mksd can I use this url http://localhost:8081/openmrs-standalone/registrationapp/registerPatient.page?appId=referenceapplication.registrationapp.registerPatient as the api url to register the patient from other client.

Because On web I configured the LBAC module and the respective registration app definition. When I use /patient api to create patient its works but this patient is not accessible to non admin account belong to same location as patient but accessible with admin.

@atiq I’m not familiar with the LBAC module, but perhaps @suthagar23 could help you out if you are still facing your issue?

Hey @mksd , thanks for the response. I got the solution for this . Thanks to @ibacher .

@atiq great to read. Maybe you could outline the steps you have taken, just in case someone else stumbles on it.

1 Like

Yah I will frame it up for the people. Thanks