-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRUNK-4287: Add order_type column to orders table #731
Conversation
coldcue
commented
Mar 6, 2014
- Add a required order_type column to the orders table
- Add orderType field to Order class and update Order.hbm.xml file
- Set order_type column for existing orders, use the order types added by TRUNK-4292
- Update OrderService.getOrders(...) and OrderService.getActiveOrders(...) should use OrderType as a parameter, not a java class
- Change the equivalent methods in the DAO to filter on orderType because to prior to this we ere passing in the Order class object to the DAO to be the root entity for the criteria object.
- Add a test to Database1_9To1_10UpgradeTest to ensure the changesets are doing the right thing
@@ -152,8 +144,8 @@ | |||
* @return list of Orders matching the parameters | |||
*/ | |||
@Authorized(PrivilegeConstants.VIEW_ORDERS) | |||
public <Ord extends Order> List<Ord> getOrders(Class<Ord> orderClassType, List<Patient> patients, | |||
List<Concept> concepts, List<User> orderers, List<Encounter> encounters); | |||
public <Ord extends Order> List<Ord> getOrders(OrderType orderType, List<Patient> patients, List<Concept> concepts, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to declare the type boundary anymore, should return a list of Orders
The rest of changes looks fine to me for now |
…ctiveOrders(...) that should use OrderType as a parameter, not a java class
…rService.getActiveOrders(...) and OrderService.getOrder(...)
…nateOrderDAO.java implementation
Now, I have time to do it today, but there's one thing not clear to me, how should I decide, that which |
Should I be more precise with the |
… orders with a matching row in the test_order or drug_order table of their type
|
||
<changeSet id="201403111039-TRUNK-4287-2" author="andras-szell" failOnError="true"> | ||
<preConditions onFail="MARK_RAN"> | ||
<not><columnExists tableName="orders" columnName="order_type_id"/></not> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this column is named order_type in the changeset above, did you test it?
This code isn't compiling |
Yes, because I had to update the |
Merged at 3303068 |