i’m creating a procedure order module so i’m extending class order and adding my module to openmrs so that the the context of the ProcedureOrder class can be loaded as an order type once the app loads
when I try to do a getAllOrdersByPatientUuid i’m getting the following error
“error”: {
“message”: “[could not resolve property: patient of: org.openmrs.module.procedureorder.models.ProcedureOrder]”,
“code”: “org.hibernate.persister.entity.AbstractPropertyMapping:83”,
“detail”: "org.hibernate.QueryException: could not resolve property: patient of: org.openmrs.module.procedureorder.models.ProcedureOrder\n\tat org.hibernate.persister.entity.AbstractPropertyMapping.propertyException
Is it possible that my ProcedureOrder class is not being loaded as an ordertype?
If its being loaded, why is the request searching for property patient in the ProcedureOrder whereas it is a property of base class Order [could not resolve property: patient of: org.openmrs.module.procedureorder.models.ProcedureOrder]
@jecihjoy i do not know how your code looks like ,but does the field or property "patient " that you are trying to reference exist in this Class "org.openmrs.module.procedureorder.models.ProcedureOrder " ?
i’m trying to create a new type of order, ProcedureOrder but all the methods i could override while saving are declared private, this means i’ll have to transfer all the orders functionality to my module?! Is editing core an option?
for each type of test in a given procedure, I would require to collect the above data as indicated by the class ProcedureTest properties. I would also like to think that this ProcedureTest class would be best achieved by extending the properties to the OrderSetMembers property. This will enable grouping together of tests to be done in a procedure as an order set
these properties are in TestOrder class a subclass of order, beside that i wanted for orders of type procedures to be ordetType Procedure, the big challenge is whenever i try to post a payload of ordertype:testorder with concept of type Procedure i’m getting the following error
ordertype testorders only accept concepts from concept class Test, can these be configured so that it can also accept concepts from concept class Procedure
if i do a post of ordertype: testorder, it is saved successfully but a post of ordertype: procedureorder i’m getting this error https://pastebin.com/yWm4LrLc
what is causing this yet i have defined a subclass resource handler for the class ProcedureOrder