How to create a new registration form besides the default patient registration form ?

hello people ! good day. i have some question and i need some solutions from you guys. alright the system im currently implementing is for an animal hospital. i have a pretty idea about how the openmrs works. but i still have some issues about this. bahmni is for human hospitals and the system im implementing is for an animal hospital. all of you know that the clinic module has a patient registration form. so i had to change the registration form labels for animals(i will call it as animal registration form from now on to make it easier for you guys).

still this animal registration form will create a new customer in the openERP but its not right.because the animal registration form is about an animal pet but not a human. so its not ethical. i want to break the link between that animal registration form and the openERP. instead i want to create a new registration form just for the guardian of that animal(like the default patient registration form) and that form should be linked with openERP but not the animal registration form. how can i do this?

I am not sure if we can satisfy this out-of-box

  • Are you registering register animals as “patients”?
  • You want to register owners and have their animals attached to them, and have billing and other processes linked with the owners? Unfortunately, thats not possible. All orders will be raised against the entity which is the primary.

You can achieve what you are doing, but will require some work.

  • Register the owner as patient and establish the owner as relationship (which means the owner must be registered first) – you can use this app with which you can register as person. – from “patient” registration, you can link to the person (animal => person) - we don’t have a relationship type “owner” as such. you will need to change some code to do this. otherwise use “parent”.
  • So you will still identify the animals as “patients” and raise orders etc (You probably have to create the name as ‘Cow of owner’, so that you can search the animal by owner, or if the doctor wants to call out for the owners)
  • Creating customer in ERP: You will have to modify the “openerp-atomfeed-service” to ensure that you create the representative customer in ERP. You can get the owner information from the patient relationship. Most likely you have to modify the code here
  • Creating quotations in ERP: Same logic as above, you will to first identify the “owner” the animal (patient) belongs to, and then the raise orders. Probably modify code here

So doable, but will require custom code


thank you for the reply @angshuonline ! i ll try this ! where i can find the “openerp-atomfeed-service” source files? i cant seem to find it.anyways how can i create a new registration form beside the current registration form? it will be good if i can add a button for owner registration on the above of patient registration form next to “+ create new”. and that button should link to that new form. how can i do this sir?

Checks the link above, which points to the exact source file. You may find the repo here.

Creating a new registration app? Sure, it might make sense for simplification purpose. You can just create a simple webapp to do this, and place within Bahmni apps.

Customising the existing app to do so might require more thoughts and discussions as this is not common. We probably need to introduce a new extension and apis.

1 Like

@angshuonline i have created that person registration app. its working. created a new person and it saved the person without any issue. i added a new field named as “primaryContact” (i still have to add 2 more new fields to it.) and after filling out all the information it gives me an error which is “an error occurred while trying to register this patient.please try again”. i think the new fields data isnt passing to the database. so my question is how to pass the new fields data without any problem?

Difficult to say without the logs. Can you keep the chrome developer tools on, and check the response. whether that tells you something. or check the openmrs log file.

1 Like

we found the solution @angshuonline ! it was an issue with the ssid of the field identifier. thanks for the reply bro !

@angshuonline brother im currently replying to a answer you said before ! "Creating customer in ERP: You will have to modify the “openerp-atomfeed-service” to ensure that you create the representative customer in ERP. You can get the owner information from the patient relationship. Most likely you have to modify the code [here](

i have seen the code and i need to create a new parameter in the private List mapParameters(OpenMRSPatient openMRSPatient, String eventId, String feedUri, boolean isFailedEvent) my new parameter is parameters.add(createParameter(“doctor_uuid”, {value}, “string”)); .

the doctor_uuid is the current doctors uuid. i need to get the value. how can i do it?

I am not sure what you want

  1. Do you mean to capture the provider, who was responsible for registering the patient?
  • note, it might just someone at the registration desk, or a nurse.
  • if you just want to know who created the patient, then you can find out the creator using the patient full representation, you can make a call to get complete profile of the patient, including the “auditInfo”, wherefrom you can find out the creator of this record

http://<ip: port>/openmrs/ws/rest/v1/patient/[uuid identified from the event]?v=full


http://<ip: port>/openmrs/ws/rest/v1/patient/[uuid identified from the event]?v=custom:(auditInfo)

then if you investigate the auditinfo part of the response, you can get further info. for example:

 "auditInfo": {
        "creator": {
            "uuid": "c1c21e11-3f10-11e4-adec-0800271c1b75",
            "display": "superman",
            "links": [
                    "rel": "self",
                    "uri": "http://[server]/openmrs/ws/rest/v1/user/c1c21e11-3f10-11e4-adec-0800271c1b75"
        "dateCreated": "2019-05-24T16:07:00.000+0530",
        "changedBy": null,
        "dateChanged": null
  1. for other things like orders, likely issues by a doctor - and for that you can find out from the encounter provider.

@angshuonline thanks for the reply and sorry for the delay. i think i didnt explain the question well enough for you to understand. sorry about that. i will summerize my question in a simple manner.

so what i need to know is how to pass relationships to openERP when creating a patient and setting their relationships from the clinic module. for an example the patient has an owner(mother or father) and we add the parent in the registration form as a relationship. how this relationship is pass to the openERP? if im about to add a new relationship how to do so?

Relationship is not passed onto ERP as of now. You will have to model that in ERP, and write that yourself. The API for patient can give you the entire information of existing relationship. Thats not the problem, - you will need to modify the openerp-atomfeed-service codebase and also the python module for ERP - openerp-modules.