Module: AllscriptsApi::Orders::OrderingMethods
- Included in:
- Client
- Defined in:
- lib/allscripts_api/orders/ordering_methods.rb
Overview
A collection convenience methods for ordering that map to Allscripts magic actions. Some of these methods wrap multiple actions. These methods are included in Client and can be accessed from instances of that class.
Instance Method Summary collapse
-
#get_order_workflow(patient_id, xml_string, order_trans_id = "0", order_category = "ProcedureOrder", problem_id = "", problem_trans_id = "") ⇒ Array<Hash>, ...
a wrapper around GetOrderWorkflow.
-
#save_order(patient_id, xml, order_category, dictionary_id, problem_id = nil, trans_id = nil) ⇒ Hash|MagicError
a wrapper around SaveOrder, which save and order of the sepcified category, among: AdministeredMedication, Immunization, InstructionOrder, ProcedureOrder, Referral, SuppliesOrder.
Instance Method Details
#get_order_workflow(patient_id, xml_string, order_trans_id = "0", order_category = "ProcedureOrder", problem_id = "", problem_trans_id = "") ⇒ Array<Hash>, ...
a wrapper around GetOrderWorkflow
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/allscripts_api/orders/ordering_methods.rb', line 52 def get_order_workflow(patient_id, xml_string, order_trans_id = "0", order_category = "ProcedureOrder", problem_id = "", problem_trans_id = "") params = MagicParams.format( user_id: @allscripts_username, patient_id: patient_id, parameter1: xml_string, parameter2: order_trans_id, parameter3: order_category, parameter4: problem_id, parameter5: problem_trans_id ) results = magic("GetOrderWorkflow", magic_params: params) results["getorderworkflow"] end |
#save_order(patient_id, xml, order_category, dictionary_id, problem_id = nil, trans_id = nil) ⇒ Hash|MagicError
a wrapper around SaveOrder, which save and order of the sepcified category, among: AdministeredMedication, Immunization, InstructionOrder, ProcedureOrder, Referral, SuppliesOrder.
xml can be constructed with AllscriptsApi::Orders::Order.build_xml
Immunization, InstructionOrder, ProcedureOrder, Referral, SuppliesOrder. may be passed in as part of the xml necessary when updating a past order
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/allscripts_api/orders/ordering_methods.rb', line 29 def save_order(patient_id, xml, order_category, dictionary_id, problem_id = nil, trans_id = nil) params = MagicParams.format( user_id: @allscripts_username, patient_id: patient_id, parameter1: xml, parameter2: order_category, parameter3: dictionary_id, parameter4: problem_id, parameter5: trans_id ) magic("SaveOrder", magic_params: params) end |