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

developers-forum
openmrs
openerp
Tags: #<Tag:0x00007f73fd2154f8> #<Tag:0x00007f73fd215368> #<Tag:0x00007f73fd215228>
(sanjana perera) #1

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?

(Angshuman Sarkar) #2

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

2 Likes
(sanjana perera) #3

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?

(Angshuman Sarkar) #4

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
(sanjana perera) #5

@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?

(Angshuman Sarkar) #6

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
(sanjana perera) #7

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