public interface OrderService extends OpenmrsService
Modifier and Type | Field and Description |
---|---|
static String |
PARALLEL_ORDERS |
Modifier and Type | Method and Description |
---|---|
Order |
discontinueOrder(Order orderToDiscontinue,
Concept reasonCoded,
Date discontinueDate,
Provider orderer,
Encounter encounter)
Discontinues an order.
|
Order |
discontinueOrder(Order orderToDiscontinue,
String reasonNonCoded,
Date discontinueDate,
Provider orderer,
Encounter encounter)
Discontinues an order.
|
List<Order> |
getActiveOrders(Patient patient,
OrderType orderType,
CareSetting careSetting,
Date asOfDate)
Gets all active orders for the specified patient matching the specified CareSetting,
OrderType as of the specified date.
|
List<Order> |
getActiveOrders(Patient patient,
Visit visit,
OrderType orderType,
CareSetting careSetting,
Date asOfDate) |
List<OrderAttributeType> |
getAllOrderAttributeTypes()
Returns all order attribute types
|
List<OrderGroupAttributeType> |
getAllOrderGroupAttributeTypes()
Returns all order group attribute types
|
List<Order> |
getAllOrdersByPatient(Patient patient)
Gets all orders for the specified patient including discontinuation orders
|
CareSetting |
getCareSetting(Integer careSettingId)
Retrieve care setting
|
CareSetting |
getCareSettingByName(String name)
Gets the CareSetting with the specified name
|
CareSetting |
getCareSettingByUuid(String uuid)
Gets the CareSetting with the specified uuid
|
List<CareSetting> |
getCareSettings(boolean includeRetired)
Gets all non retired CareSettings if includeRetired is set to true otherwise retired ones are
included too
|
Order |
getDiscontinuationOrder(Order order)
Get discontinuation order for the given order, it is the un voided discontinuation order with
a previousOrder that matches the specified order.
|
List<Concept> |
getDrugDispensingUnits()
Gets the possible units of dispensing, i.e the set members for the concept that matches the
uuid specified as the value for the global property
OpenmrsConstants.GP_DRUG_DISPENSING_UNITS_CONCEPT_UUID |
List<Concept> |
getDrugDosingUnits()
Gets the possible drug dosing units, i.e the set members for the concept that matches the
uuid specified as the value for the global property
OpenmrsConstants.GP_DRUG_DOSING_UNITS_CONCEPT_UUID |
List<Concept> |
getDrugRoutes()
Gets the possible drug routes, i.e the set members for the concept that matches the uuid
specified as the value for the global property
OpenmrsConstants.GP_DRUG_ROUTES_CONCEPT_UUID |
List<Concept> |
getDurationUnits()
Gets the possible units of duration, i.e the set members for the concept that matches the
uuid specified as the value for the global property
OpenmrsConstants.GP_DURATION_UNITS_CONCEPT_UUID |
Long |
getNextOrderNumberSeedSequenceValue()
Gets the next available order number seed
|
Concept |
getNonCodedDrugConcept()
Gets the non coded drug concept, i.e the concept that matches the uuid specified as the value
for the global property {@link OpenmrsConstants#GP_DRUG_ORDER_DRUG_OTHER
|
Order |
getOrder(Integer orderId)
Get order by internal primary key identifier
|
OrderAttribute |
getOrderAttributeByUuid(String uuid)
Fetches a given order attribute using the provided uuid
|
OrderAttributeType |
getOrderAttributeTypeById(Integer orderAttributeTypeId)
Fetches order attribute type using provided Id
|
OrderAttributeType |
getOrderAttributeTypeByName(String orderAttributeTypeName)
Retrieves an order attribute type object based on the name provided
|
OrderAttributeType |
getOrderAttributeTypeByUuid(String uuid)
Fetches order attribute type using provided uuid
|
Order |
getOrderByOrderNumber(String orderNumber)
Gets the order identified by a given order number
|
Order |
getOrderByUuid(String uuid)
Get Order by its UUID
|
List<OrderFrequency> |
getOrderFrequencies(boolean includeRetired)
Gets all order frequencies
|
List<OrderFrequency> |
getOrderFrequencies(String searchPhrase,
Locale locale,
boolean exactLocale,
boolean includeRetired)
Gets all non retired order frequencies associated to concepts that match the specified search
phrase
|
OrderFrequency |
getOrderFrequency(Integer orderFrequencyId)
Gets OrderFrequency that matches the specified orderFrequencyId
|
OrderFrequency |
getOrderFrequencyByConcept(Concept concept)
Gets an OrderFrequency that matches the specified concept
|
OrderFrequency |
getOrderFrequencyByUuid(String uuid)
Gets OrderFrequency that matches the specified uuid
|
OrderGroup |
getOrderGroup(Integer orderGroupId)
Fetches the OrderGroup by Id.
|
OrderGroupAttribute |
getOrderGroupAttributeByUuid(String uuid)
Fetches a given order group attribute using the provided uuid
|
OrderGroupAttributeType |
getOrderGroupAttributeType(Integer orderGroupAttributeTypeId)
Fetches order group attribute type using provided Id
|
OrderGroupAttributeType |
getOrderGroupAttributeTypeByName(String orderGroupAttributeTypeName)
Retrieves an order group attribute type object based on the name provided
|
OrderGroupAttributeType |
getOrderGroupAttributeTypeByUuid(String uuid)
Fetches order group attribute type using provided uuid
|
OrderGroup |
getOrderGroupByUuid(String uuid)
Fetches the OrderGroup By Uuid.
|
List<OrderGroup> |
getOrderGroupsByEncounter(Encounter encounter)
Fetches all order groups for the specified encounter
|
List<OrderGroup> |
getOrderGroupsByPatient(Patient patient)
Fetches all order groups for the specified patient
|
List<Order> |
getOrderHistoryByConcept(Patient patient,
Concept concept)
Gets all Order objects that use this Concept for a given patient.
|
List<Order> |
getOrderHistoryByOrderNumber(String orderNumber)
Gets the order matching the specified order number and its previous orders in the ordering
they occurred, i.e if this order has a previous order, fetch it and if it also has a previous
order then fetch it until the original one with no previous order is reached
|
List<Order> |
getOrders(OrderSearchCriteria orderSearchCriteria)
Get all orders that match a variety of (nullable) criteria contained in the parameter object.
|
List<Order> |
getOrders(Patient patient,
CareSetting careSetting,
OrderType orderType,
boolean includeVoided)
Gets all Orders that match the specified parameters excluding discontinuation orders
|
List<Order> |
getOrders(Patient patient,
Visit visit,
CareSetting careSetting,
OrderType orderType,
boolean includeVoided) |
OrderType |
getOrderType(Integer orderTypeId)
Get OrderType by orderTypeId
|
OrderType |
getOrderTypeByConcept(Concept concept)
Gets the order type mapped to a given concept
|
OrderType |
getOrderTypeByConceptClass(ConceptClass conceptClass)
Gets the order type mapped to a given concept class
|
OrderType |
getOrderTypeByName(String orderTypeName)
Gets OrderType that matches the specified name
|
OrderType |
getOrderTypeByUuid(String uuid)
Get OrderType by uuid
|
List<OrderType> |
getOrderTypes(boolean includeRetired)
Get all order types, if includeRetired is set to true then retired ones will be included
otherwise not
|
Order |
getRevisionOrder(Order order)
Get revision order for the given order, it is the order with the changes that was created as
a replacement for the specified order.
|
List<OrderType> |
getSubtypes(OrderType orderType,
boolean includeRetired)
Returns all descendants of a given order type for example Given TEST will get back LAB TEST
and RADIOLOGY TEST; and Given LAB TEST, will might get back SEROLOGY, MICROBIOLOGY, and
CHEMISTRY
|
List<Concept> |
getTestSpecimenSources()
Gets the possible test specimen sources, i.e the set members for the concept that matches the
uuid specified as the value for the global property
OpenmrsConstants.GP_TEST_SPECIMEN_SOURCES_CONCEPT_UUID |
void |
purgeOrder(Order order)
Completely delete an order from the database.
|
void |
purgeOrder(Order order,
boolean cascade)
Completely delete an order from the database.
|
void |
purgeOrderAttributeType(OrderAttributeType orderAttributeType)
Completely removes an order attribute type from the database
|
void |
purgeOrderFrequency(OrderFrequency orderFrequency)
Completely removes an order frequency from the database
|
void |
purgeOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType)
Completely removes an order group attribute type from the database
|
void |
purgeOrderType(OrderType orderType)
Completely removes an order type from the database
|
OrderAttributeType |
retireOrderAttributeType(OrderAttributeType orderAttributeType,
String reason)
Retires the given order attribute type in the database
|
OrderFrequency |
retireOrderFrequency(OrderFrequency orderFrequency,
String reason)
Retires the given order frequency in the database
|
OrderGroupAttributeType |
retireOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType,
String reason)
Retires the given order group attribute type in the database
|
OrderType |
retireOrderType(OrderType orderType,
String reason)
Retires the given order type in the database
|
Order |
saveOrder(Order order,
OrderContext orderContext)
Save or update the given
order in the database. |
OrderAttributeType |
saveOrderAttributeType(OrderAttributeType orderAttributeType)
Creates or updates the given order attribute type in the database
|
OrderFrequency |
saveOrderFrequency(OrderFrequency orderFrequency)
Creates or updates the given order frequency in the database
|
OrderGroup |
saveOrderGroup(OrderGroup orderGroup)
Saves the orderGroup.
|
OrderGroup |
saveOrderGroup(OrderGroup orderGroup,
OrderContext orderContext)
Saves an order group with a specific order context
|
OrderGroupAttributeType |
saveOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType)
Creates or updates the given order group attribute type in the database
|
OrderType |
saveOrderType(OrderType orderType)
Creates or updates the given order type in the database
|
Order |
saveRetrospectiveOrder(Order order,
OrderContext orderContext)
Save or update the given retrospective
order in the database. |
void |
setOrderDAO(OrderDAO dao)
Setter for the Order data access object.
|
OrderAttributeType |
unretireOrderAttributeType(OrderAttributeType orderAttributeType)
Restores an order attribute type that was previously retired in the database
|
OrderFrequency |
unretireOrderFrequency(OrderFrequency orderFrequency)
Restores an order frequency that was previously retired in the database
|
OrderGroupAttributeType |
unretireOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType)
Restores an order group attribute type that was previously retired in the database
|
OrderType |
unretireOrderType(OrderType orderType)
Restores an order type that was previously retired in the database
|
Order |
unvoidOrder(Order order)
Unvoid order record.
|
Order |
updateOrderFulfillerStatus(Order order,
Order.FulfillerStatus orderFulfillerStatus,
String fullFillerComment)
Updates the fulfillerStatus of an order and the related comment and finally persists it
|
Order |
updateOrderFulfillerStatus(Order order,
Order.FulfillerStatus orderFulfillerStatus,
String fullFillerComment,
String accessionNumber)
Updates the fulfillerStatus of an order and the related comment and finally persists it
|
Order |
voidOrder(Order order,
String voidReason)
Mark an order as voided.
|
onShutdown, onStartup
static final String PARALLEL_ORDERS
void setOrderDAO(OrderDAO dao)
dao
- The data access object to use@Authorized(value={"Edit Orders","Add Orders"}) Order saveOrder(Order order, OrderContext orderContext) throws APIException
order
in the database. If the OrderType for the order
is not specified, then it will be set to the one set on the OrderContext if any, if none
exists on the orderContext, then it will be set to the one associated to the ConceptClass of
the ordered concept otherwise the save fails. If the CareSetting field of the order is not
specified then it will default to the one set on the passed in OrderContext if any otherwise
the save fails.order
- the Order to saveorderContext
- the OrderContext objectAPIException
- Should not save order if order doesnt validate
Should discontinue existing active order if new order being saved with action to discontinue
Should pass if the existing drug order matches the concept and drug of the DC order
Should fail if the existing drug order matches the concept and not drug of the DC order
Should discontinue previousOrder if it is not already discontinued
Should fail if concept in previous order does not match this concept
Should not allow editing an existing order
Should not allow revising a voided order
Should not allow revising a stopped order
Should not allow revising an expired order
Should not allow revising an order with no previous order
Should save a revised order
Should save a revised order for a scheduled order which is not started
Should set order number specified in the context if specified
Should set the order number returned by the configured generator
Should set order type if null but mapped to the concept class
Should fail if order type is null and not mapped to the concept class
Should default to care setting and order type defined in the order context if null
Should not allow changing the patient of the previous order when revising an order
Should not allow changing the careSetting of the previous order when revising an order
Should not allow changing the concept of the previous order when revising an order
Should not allow changing the drug of the previous drug order when revising an order
Should fail if concept in previous order does not match that of the revised order
Should fail if the existing drug order matches the concept and not drug of the revised order
Should fail if the order type of the previous order does not match
Should fail if the java type of the previous order does not match
Should fail if the careSetting of the previous order does not match
Should set concept for drug orders if null
Should pass for a discontinuation order with no previous order
Should fail if an active drug order for the same concept and care setting exists
Should pass if an active test order for the same concept and care setting exists
Should pass if an active order for the same concept exists in a different care setting
Should set Order type of Drug Order to drug order if not set and concept not mapped
Should set Order type of Test Order to test order if not set and concept not mapped
Should throw AmbiguousOrderException if an active drug order for the same drug formulation
exists
Should pass if an active order for the same concept exists in a different care setting
Should fail for revision order if an active drug order for the same concept and care
settings exists
Should pass for revision order if an active test order for the same concept and care
settings exists
Should roll the autoExpireDate to the end of the day if it has no time component
Should not change the autoExpireDate if it has a time component
Should throw AmbiguousOrderException if disconnecting multiple active orders for the given
concept
Should throw AmbiguousOrderException if disconnecting multiple active drug orders with the
same drug@Authorized(value={"Edit Orders","Add Orders"}) Order saveRetrospectiveOrder(Order order, OrderContext orderContext)
order
in the database. If the OrderType
for the order is not specified, then it will be set to the one set on the OrderContext if
any, if none exists on the orderContext, then it will be set to the one associated to the
ConceptClass of the ordered concept otherwise the save fails. If the CareSetting field of the
order is not specified then it will default to the one set on the passed in OrderContext if
any otherwise the save fails. Retrospective entry of orders can affect downstream systems
that acts on orders created. Orders cannot be stopped if they are already stopped in
retrospective entry.order
- the Order to saveorderContext
- the OrderContext objectAPIException
saveOrder(Order, OrderContext)
@Authorized(value="Purge Orders") void purgeOrder(Order order) throws APIException
voidOrder(Order, String)
order
- The Order to remove from the systemAPIException
- Should delete order from the database@Authorized(value="Purge Orders") void purgeOrder(Order order, boolean cascade) throws APIException
voidOrder(Order, String)
This method is different from purgeOrder(Order order) above: If param cascade is false will
completely delete an order from the database period If param cascade is true will completely
delete an order from the database and delete any Obs that references the Order.order
- The Order to remove from the systemcascade
- APIException
@Authorized(value="Delete Orders") Order voidOrder(Order order, String voidReason) throws APIException
voidReason
- String reasonorder
- Order to voidAPIException
- Should void an order
Should unset dateStopped of the previous order if the specified order is a discontinuation
Should unset dateStopped of the previous order if the specified order is a revision@Authorized(value="Get Orders") Order getOrder(Integer orderId) throws APIException
orderId
- internal order identifierAPIException
@Authorized(value="Get Orders") Order getOrderByUuid(String uuid) throws APIException
uuid
- APIException
@Authorized(value="Get Orders") Order getDiscontinuationOrder(Order order) throws APIException
order
- APIException
@Authorized(value="Get Orders") Order getRevisionOrder(Order order) throws APIException
order
- APIException
@Authorized(value="Get Orders") List<Order> getOrders(Patient patient, CareSetting careSetting, OrderType orderType, boolean includeVoided)
patient
- the patient to match oncareSetting
- the CareSetting to match onorderType
- The OrderType to match onincludeVoided
- Specifies whether voided orders should be included or not@Authorized(value="Get Orders") List<Order> getAllOrdersByPatient(Patient patient)
patient
- the patient to match onOrder
@Authorized(value="Get Orders") List<Order> getOrders(OrderSearchCriteria orderSearchCriteria)
orderSearchCriteria
- the object containing search parameters@Authorized(value="Delete Orders") Order unvoidOrder(Order order) throws APIException
voidOrder(Order, String)
order
- order to be unvoidedAPIException
@Authorized(value="Edit Orders") Order updateOrderFulfillerStatus(Order order, Order.FulfillerStatus orderFulfillerStatus, String fullFillerComment)
order
- order whose fulfillerStatus should be changedorderFulfillerStatus
- describes the new Order.FulfillerStatus the order should be set tofullFillerComment
- is a string which describes a comment that is set while changing the FulfillerStatus@Authorized(value="Edit Orders") Order updateOrderFulfillerStatus(Order order, Order.FulfillerStatus orderFulfillerStatus, String fullFillerComment, String accessionNumber)
order
- order whose fulfillerStatus should be changedorderFulfillerStatus
- describes the new Order.FulfillerStatus the order should be set tofullFillerComment
- is a string which describes a comment that is set while changing the FulfillerStatusaccessionNumber
- is the accession number to set@Authorized(value="Get Orders") Order getOrderByOrderNumber(String orderNumber)
orderNumber
- the order number@Authorized(value="Get Orders") List<Order> getOrderHistoryByConcept(Patient patient, Concept concept)
patient
- the patient.concept
- the concept.@Authorized(value="Add Orders") Long getNextOrderNumberSeedSequenceValue()
@Authorized(value="Get Orders") List<Order> getOrderHistoryByOrderNumber(String orderNumber)
orderNumber
- the order number whose history to get@Authorized(value="Get Orders") List<Order> getActiveOrders(Patient patient, OrderType orderType, CareSetting careSetting, Date asOfDate)
- Not voided - Not a discontinuation Order i.e one where action != Action#DISCONTINUE - dateActivated is before or equal to asOfDate - dateStopped and autoExpireDate are both null OR if it has dateStopped, then it should be after asOfDate OR if it has autoExpireDate, then it should be after asOfDate. NOTE: If both dateStopped and autoExpireDate are set then dateStopped wins because an order can never expire and then stopped later i.e. you stop an order that hasn't yet expired
patient
- the patientorderType
- The OrderType to matchcareSetting
- the care setting, returns all ignoring care setting if value is nullasOfDate
- defaults to current time@Authorized(value="Get Care Settings") CareSetting getCareSetting(Integer careSettingId)
careSettingId
- @Authorized(value="Get Care Settings") CareSetting getCareSettingByUuid(String uuid)
uuid
- the uuid to match on@Authorized(value="Get Care Settings") CareSetting getCareSettingByName(String name)
name
- the name to match on@Authorized(value="Get Care Settings") List<CareSetting> getCareSettings(boolean includeRetired)
includeRetired
- specifies whether retired care settings should be returned or not@Authorized(value="Get Order Types") OrderType getOrderTypeByName(String orderTypeName)
orderTypeName
- the name to match against@Authorized(value="Get Order Frequencies") OrderFrequency getOrderFrequency(Integer orderFrequencyId)
orderFrequencyId
- the id to match against@Authorized(value="Get Order Frequencies") OrderFrequency getOrderFrequencyByUuid(String uuid)
uuid
- the uuid to match against@Authorized(value="Get Order Frequencies") OrderFrequency getOrderFrequencyByConcept(Concept concept)
concept
- the concept to match against@Authorized(value="Get Order Frequencies") List<OrderFrequency> getOrderFrequencies(boolean includeRetired)
includeRetired
- specifies whether retired ones should be included or not
Should return only non retired order frequencies if includeRetired is set to false
Should return all the order frequencies if includeRetired is set to true@Authorized(value="Get Order Frequencies") List<OrderFrequency> getOrderFrequencies(String searchPhrase, Locale locale, boolean exactLocale, boolean includeRetired)
searchPhrase
- The string to match onlocale
- The locale to match on when searching in associated concept namesexactLocale
- If false then order frequencies associated to concepts with names in a
broader locale will be matched e.g in case en_GB is passed in then en will be
matchedincludeRetired
- Specifies if retired order frequencies that match should be included or
not@Authorized(value={"Add Orders","Edit Orders"}) Order discontinueOrder(Order orderToDiscontinue, Concept reasonCoded, Date discontinueDate, Provider orderer, Encounter encounter)
orderToDiscontinue
- reasonCoded
- discontinueDate
- orderer
- encounter
- APIException
- if the action
of orderToDiscontinue is
Order.Action.DISCONTINUE
@Authorized(value={"Add Orders","Edit Orders"}) Order discontinueOrder(Order orderToDiscontinue, String reasonNonCoded, Date discontinueDate, Provider orderer, Encounter encounter)
orderToDiscontinue
- reasonNonCoded
- discontinueDate
- orderer
- encounter
- APIException
- if the action
of orderToDiscontinue is
Order.Action.DISCONTINUE
@Authorized(value="Manage Order Frequencies") OrderFrequency saveOrderFrequency(OrderFrequency orderFrequency) throws APIException
orderFrequency
- the order frequency to saveAPIException
@Authorized(value="Manage Order Frequencies") OrderFrequency retireOrderFrequency(OrderFrequency orderFrequency, String reason)
orderFrequency
- the order frequency to retirereason
- the retire reason@Authorized(value="Manage Order Frequencies") OrderFrequency unretireOrderFrequency(OrderFrequency orderFrequency)
orderFrequency
- the order frequency to unretire@Authorized(value="Purge Order Frequencies") void purgeOrderFrequency(OrderFrequency orderFrequency) throws APIException
orderFrequency
- the order frequency to purgeAPIException
@Authorized(value="Get Order Types") OrderType getOrderType(Integer orderTypeId)
orderTypeId
- the orderTypeId to match on@Authorized(value="Get Order Types") OrderType getOrderTypeByUuid(String uuid)
uuid
- the uuid to match on@Authorized(value="Get Order Types") List<OrderType> getOrderTypes(boolean includeRetired)
includeRetired
- boolean flag which indicate search needs to look at retired order types
or not
Should get all order types if includeRetired is set to true
Should get all non retired order types if includeRetired is set to false@Authorized(value="Manage Order Types") OrderType saveOrderType(OrderType orderType)
orderType
- the order type to save@Authorized(value="Purge Order Types") void purgeOrderType(OrderType orderType) throws APIException
orderType
- the order type to purgeAPIException
@Authorized(value="Manage Order Types") OrderType retireOrderType(OrderType orderType, String reason)
orderType
- the order type to retirereason
- the retire reason@Authorized(value="Manage Order Types") OrderType unretireOrderType(OrderType orderType)
orderType
- the order type to unretire@Authorized(value="Get Order Types") List<OrderType> getSubtypes(OrderType orderType, boolean includeRetired)
orderType
- the order type which needs to search for its' dependenciesincludeRetired
- boolean flag for include retired order types or not@Authorized(value="Get Order Types") OrderType getOrderTypeByConceptClass(ConceptClass conceptClass)
conceptClass
- the concept class@Authorized(value="Get Order Types") OrderType getOrderTypeByConcept(Concept concept)
concept
- the concept@Authorized(value="Get Concepts") List<Concept> getDrugRoutes()
OpenmrsConstants.GP_DRUG_ROUTES_CONCEPT_UUID
@Authorized(value="Get Concepts") List<Concept> getDrugDosingUnits()
OpenmrsConstants.GP_DRUG_DOSING_UNITS_CONCEPT_UUID
@Authorized(value="Get Concepts") List<Concept> getDrugDispensingUnits()
OpenmrsConstants.GP_DRUG_DISPENSING_UNITS_CONCEPT_UUID
@Authorized(value="Get Concepts") List<Concept> getDurationUnits()
OpenmrsConstants.GP_DURATION_UNITS_CONCEPT_UUID
@Authorized(value="Get Concepts") List<Concept> getTestSpecimenSources()
OpenmrsConstants.GP_TEST_SPECIMEN_SOURCES_CONCEPT_UUID
@Authorized(value="Get Concepts") Concept getNonCodedDrugConcept()
@Authorized(value="Get Orders") OrderGroup getOrderGroupByUuid(String uuid) throws APIException
uuid
- Uuid Of the OrderGroupAPIException
@Authorized(value="Get Orders") OrderGroup getOrderGroup(Integer orderGroupId) throws APIException
orderGroupId
- Id of the OrderGroupAPIException
@Authorized(value={"Edit Orders","Add Orders"}) OrderGroup saveOrderGroup(OrderGroup orderGroup) throws APIException
orderGroup
- the orderGroup to be savedAPIException
@Authorized(value={"Edit Orders","Add Orders"}) OrderGroup saveOrderGroup(OrderGroup orderGroup, OrderContext orderContext) throws APIException
orderGroup
- the order group to be savedorderContext
- the order context data transfer object containing care setting and
the order type to save with the order groupAPIException
@Authorized(value="Get Orders") List<OrderGroup> getOrderGroupsByPatient(Patient patient) throws APIException
patient
- the patient to match onAPIException
@Authorized(value="Get Orders") List<OrderGroup> getOrderGroupsByEncounter(Encounter encounter) throws APIException
encounter
- the encounter to match onAPIException
@Authorized(value="Get Orders") List<OrderGroupAttributeType> getAllOrderGroupAttributeTypes() throws APIException
OrderGroupAttributeType
sAPIException
@Authorized(value="Get Orders") OrderGroupAttributeType getOrderGroupAttributeType(Integer orderGroupAttributeTypeId) throws APIException
id
- The Id of the order group attribute type to fetch from the databaseOrderGroupAttributeType
with the given internal idAPIException
OrderGroupAttributeType getOrderGroupAttributeTypeByUuid(String uuid) throws APIException
uuid
- The uuid of the order group attribute type to fetch from the databaseOrderGroupAttributeType
with the given uuidAPIException
@Authorized(value={"Edit Orders","Add Orders"}) OrderGroupAttributeType saveOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType) throws APIException
orderGroupAttributeType
- The order group attribute type to save in the databaseAPIException
@Authorized(value="Manage Order Types") OrderGroupAttributeType retireOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType, String reason) throws APIException
orderGroupAttributeType
- The order group attribute type to retirereason
- The reason why the order group attribute type is being retiredAPIException
@Authorized(value="Manage Order Types") OrderGroupAttributeType unretireOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType) throws APIException
orderGroupAttributeType
- The order group attribute type to unretireAPIException
@Authorized(value="Purge Orders") void purgeOrderGroupAttributeType(OrderGroupAttributeType orderGroupAttributeType) throws APIException
orderGroupAttributeType
- The order group attribute type to purgeAPIException
@Authorized(value="Get Orders") OrderGroupAttributeType getOrderGroupAttributeTypeByName(String orderGroupAttributeTypeName) throws APIException
orderGroupAttributeTypeName
- The name of the order group attribute type to fetchOrderGroupAttributeType
with the specified nameAPIException
@Authorized(value="Get Orders") OrderGroupAttribute getOrderGroupAttributeByUuid(String uuid) throws APIException
uuid
- The uuid of the order group attribute to fetchOrderGroupAttribute
with the given uuidAPIException
@Authorized(value="Get Orders") List<OrderAttributeType> getAllOrderAttributeTypes() throws APIException
OrderAttributeType
sAPIException
@Authorized(value="Get Orders") OrderAttributeType getOrderAttributeTypeById(Integer orderAttributeTypeId) throws APIException
id
- The Id of the order attribute type to fetch from the databaseOrderAttributeType
with the given internal idAPIException
OrderAttributeType getOrderAttributeTypeByUuid(String uuid) throws APIException
uuid
- The uuid of the order attribute type to fetch from the databaseOrderAttributeType
with the given uuidAPIException
@Authorized(value={"Edit Orders","Add Orders"}) OrderAttributeType saveOrderAttributeType(OrderAttributeType orderAttributeType) throws APIException
orderAttributeType
- The order attribute type to save in the databaseAPIException
@Authorized(value="Manage Order Types") OrderAttributeType retireOrderAttributeType(OrderAttributeType orderAttributeType, String reason) throws APIException
orderAttributeType
- The order attribute type to retirereason
- The reason why the order attribute type is being retiredAPIException
@Authorized(value="Manage Order Types") OrderAttributeType unretireOrderAttributeType(OrderAttributeType orderAttributeType) throws APIException
orderAttributeType
- The order attribute type to unretireAPIException
@Authorized(value="Purge Orders") void purgeOrderAttributeType(OrderAttributeType orderAttributeType) throws APIException
orderAttributeType
- The order attribute type to purgeAPIException
@Authorized(value="Get Orders") OrderAttributeType getOrderAttributeTypeByName(String orderAttributeTypeName) throws APIException
orderAttributeTypeName
- The name of the order attribute type to fetchOrderAttributeType
with the specified nameAPIException
@Authorized(value="Get Orders") OrderAttribute getOrderAttributeByUuid(String uuid) throws APIException
uuid
- The uuid of the order attribute to fetchOrderAttribute
with the given uuidAPIException
@Authorized(value="Get Orders") List<Order> getActiveOrders(Patient patient, Visit visit, OrderType orderType, CareSetting careSetting, Date asOfDate)
visit
- the Visit
to restrict active orders (optional)This method works exactly the same; it only adds visit to the search criteria.
It effectively surpasses the above method; the old one is however kept for backward
compatibility reasons.
@Authorized(value="Get Orders") List<Order> getOrders(Patient patient, Visit visit, CareSetting careSetting, OrderType orderType, boolean includeVoided)
visit
- the Visit
to restrict orders (optional)This method works exactly the same; it only adds visit to the search criteria.
It effectively surpasses the above method; the old one is however kept for backward
compatibility reasons.
Copyright © 2024 OpenMRS Inc.. All rights reserved.