Hello, I am finally getting back to this request and seem to still be running into issues. I inserted new order_types into order_types table and then followed the steps (minus the fulfillment steps at this point). I am trying to use these types to match up with OpenERP and ensure that all items as set for billing.
I looked through the OpenMRS.log file which I am attaching a partial log, but I am not seeing why I am unable to save a Consultation_Order.
savepartiallog.txt (135.8 KB)
Hi @dnelson,
To save a concept of particular ConceptClass as an Order, we need to map the ConceptClass to OrderType in the OpenMRS database table order_type_class_map.
This is the one causing the issue.
Thanks @Swathivarkala, Am I missing that in the documentation? I originally thought the following:
order_type_id concept_class_id
2 Drug Order ---- 3 Drug
3 Lab Order ------ 8 LabSet
3 Lab Order ----- 26 LabTest
4 Radiology Order ---- 27 Radiology
5 Consultation Order ----- 15 Misc Order
6 Procedure Order ---- 15 Misc Order
7 Supplies Order ----- 15 Misc Order
8 Surgical Procedure Order ------15 Misc Order
But the concept_id_class can not be duplicated. So I need to make new concept_id_classes?
Is this documented? I just want to make sure Iâm not going to cause any problems.
Thanks you!
UPDATE order_type SET name=âProcedure Orderâ WHERE order_type_id=6;
INSERT INTO order_type_class_map (order_type_id, concept_class_id) VALUES (5,15)
@swathivarkala, I was able to figure it out using the openMRS administration to add the new concept_class_idâs. Then inserted them into the table:
order_type_id concept_class_id
2 Drug Order ---- 3
3 Lab Order ---- 8 LabSet
3 Lab Order ----- 26 LabTest
4 Radiology Order ---- 27
5 Consultation Order ---- 34 Consult_Order
6 Procedure Order ----- 35 Procedure_Order
7 Supplies Order ----- 36 Supply_Order
8 Surgical Procedure Order ---- 37 Surgery_Order
I am still interested if there is further documentation on this as I truly want to know the ins and outs so in the future i can truly support the hospital and be able to help others.
I also, need to understand how I now get the items to be ATOM fed to openERP once ordered. Additional help is appreciated!
As of now the existing documentation doesnât have Configuring new Order Type. For the existing OrderTypes supported in Bahmni i.e Lab, Drug, Radiology Order Types we have configuration.
Continuing from your previous post on this topic [quote=âswathivarkala, post:2, topic:9123â]
Set up automatic creation of Product in ERP for the Concept of Order Type created in OpenMRS or Create Manually the Product but make sure the Uuid is same for the concept and the Product. [Will update you more on this clearly.]
[/quote]
The update is right now only Drug, Lab, Radiology Order Types are supported in Bahmni. Please look take a look at the code.
Supporting other OrderType might involve some code changes. For example when Radiology Order type was introduced, below were code changes done.
Basically, you canât have the same type of an Orderable cannot be out under multiple orderTypes which is completely logical. Because in your case when you order something of Misc Order, what order would you expect to be created if you map it to multiple types.
And ideally you should be having different Concept Classes for Orderables of different types just as you see below example :
Thanks @swathivarkala. I guess my struggle here is this, for being such a configurable system database wise, it seems this would be a standard request to be able to have a physician âorderâ a procedure, surgery, consultation and thus, connect to OpenERP for billing? Iâm really struggling to understand why this is a difficult request. I am trying to think of a work-around, but it doesnât make sense to make them a âLabTestâ or âLabSetâ and no need to send them to OpenELIS. That leaves me with making them a âRadiology Orderâ but even those donât seem to populate in OpenERP. Can someone help me understand? Has anyone solved this without extensive outside of Bahmni code? I have a very short timeframe and this is essential to the use of this product.
Hi Denise,
As swathi pointed out only a few order types right now get synced with erp. I think they are drug, radiology, lab test and lab panel. I think itâs a limitation that needs to be fixed in product and itâs there in product backlog somewhere.
As an implementer, even i have encountered this need in the past a couple of times. And given your short timeframe, i can suggest you a workaround that we applied in the past and got this working fine.
Say, if we have to create surgery orders and have them synced with erp. We created openmrs concepts with one of the class that syncs, say Radiology. The concepts then get synced under Radiology category in erp. We then rectify the class and category of these concepts in mrs and erp (from UI only) respectively. Thereon, everything works fine.
I think you gave this a try, but in your case radiology is not getting synced. So i think that is something that you need to fix first. May be some small setup problem. Also Radiology gets synced as a Service and not product in ERP. Just in case you missed that one out.
Have a look at demo mrs and erp, that might give you some clue as to where the gap is in your setup https://erp-demo.mybahmni.org/#page=0&limit=80&view_type=list&model=product.category&menu_id=258&action=116
I understand there could be gaps in documentation with respect to this functionality. We will work in this week to improve it.
Thank you @arjun! That sounds great that you have successfully implemented the work around. When I go into openERP, Products by Category, All products, Services, Radiology in the DEMO site, I see a listing of all of the openMRS Radiology items. Of course in mine, they are not there. So my question is, do I manually need to enter them all in or if my ATOM feed is working, are they created upon entering them into openMRS? Secondly, if I need to manually enter them (or import them) is there a format available of all the feeds and order required? I apologize for such basic questions, I have tried to find documentation and now Iâm in rush and really need guidance.
You donât have to manually enter the Radiology orders in OpenERP. They will get synced from OpenMRS once you add the order under âRadiology Orderâ concept in openMRS. Those orders are already added in OpenMRS but they didnât get synced to ERP. We have fixed this issue in v0.86 Bahmni release.
So one way of adding it to openERP is,
Add âRadiology Orderâ type in Sales->Configuration->Order Type - Shop Mapping section in OpenERP.
Open any one Radiology order(eg: Chest, 1 view (X-ray) ) in openMRS and press Edit button and then press Save Concept button then that order will get synced to ERP. Then you can see them in Sales->Products->Products by Category section
There are more than 110 radiology orders in MRS. You can either choose to do that manually or you can run some migration script. Hope this helps.
Currently I am using OpenERP to input surgical and OPD procedures to the system. However the users complain because they have to toggle between OpenERP and Bahmni. Will this feature be incorporated to the next release of Bahmni ? if it wonât, why not ?
@abiieez could you be a bit more specific? Are you talking about the lists of available procedures, or the actual surgeries/procedures carried out on patients that should be billed for?
Hi @darius, may I know what is the difference between available procedures and actual surgeries/procedures? I thought they are the same. The hospital that I work would like to have the capability to assign procedures in Bahmni (just like how we add medication) which will show up in OpenERP sales order for billing purpose. Do we have anything similar like this ?
Hi @abiieez,
Bahmni allows setting up an Orders tab with different Order types. Have you seen this wiki page here
https://bahmni.atlassian.net/wiki/spaces/BAH/pages/32014568/Configure+Orders+Tab+for+Lab+and+Radiology
Even though it describes only lab and radiology orders, you can setup surgical orders also over there. Currently Bahmni syncs only drugs, lab and radiology orders. So the users either will have to manually enter them in erp or you can use a workaround/hack discussed and described in other threads in this forum to get the autosync work for the surgical orders.
The feature to support other orders is being discussed currently to include for development. Refer this thread here :