...
- For discontinuation orders, concept and its previous order's concept must be the same
- The dateStopped of a previous order should be the same as the start date of the revised or discontinued order
- Unit concepts(quantity, duration and dose units) should be of units concept class(es)
- Frequency concepts should be of frequency concept class
order.startDate can't be before its encounter's encounterDatetime
the order being revised or the previous can't be a DC order
Java Class and order type for DC and drug a dicontinuation or revision should match that of its previous order should match, same for revision
scheduled_date can only be specified with the correct urgency, currently the only supported urgency is ON_SCHEDULED_DATE but there could be others added
order.startDate can't be in the future
- order.concept.conceptClass should be in order.orderType.conceptClasses respecting order type hierarchy i.e the check should happen recursively for all ancestors if not found on the immediate order type.
- order.orderType.javaClassName should match order.class.name, taking into consideration class hierarchy.
- For any field that has a corresponding units field, if it is specified then automatically the matching units field becomes required, i.e. if quantity is provided, quantityUnits becomes required, if duration is provided, durationUnits becomes required etc.
...