TRUNK-4834 | Support for orderSets and orderGroups
Creating OrderSet, OrderSetMember metadata,
Corresponding tables order_set, order_set_meber,
Services OrderSetService for operations on the metadata.
Creating OrderGroup
Adding extra methods in OrderService for saving the OrderGroup,
Updating the Order model to have new fields for OrderGroup
Used a List for putting the orderSetMembers in OrderSet,
(Hibernate internally sets the sequenceNumber)
Added functionality in OrderSet to add a member at a particular position
Used a List for putting the orders in the OrderGroup,
(Used a bag for mapping the list of orders in hibernate mapping file)
Added functionality in OrderGroup to add an order at a particular postion.
Added functionality for the API to handle negative position values for adding orderSetMembers and Orders
Added validation for illegal position values for adding orderSetMembers and Orders
Added a parameter to the OrderSetMember model to take in a templateType.
(This template type is a name which will decide the schema of the orderTemplate
to be generated)
OrderSet-Implementation:
Added two utility methods to Encounter model
a. to getOrderGroups within a list of orders
b. to get the orders which are not associated with orderGroups
EncounterSave iterates through the list of orderGroups and saves them one by one.
EncounterSave iterates through a list of order not having orderGroups for saving them.
OrderService saves an orderGroup and the orders within it.
(cherry picked from commit 008b101aaae07cb61006beec703b3cc4e7f05a6b)