Hello,
Below there is an excerpt of what I am passing to the Rete engine, there
is a deftemplate for an order_item and two facts asserted as order items. I
need to write a rule which will detect if there is more than one line item
with the same patient id asserted. I have looked at the unique and exists
functions and they don't do exactly what I want. If I find two of the same
patients on the same order I want the rule to fire. There could be any
number of line items on the order. Thanks in advance for any help.
Sincerely,
Ryan Withers
(deftemplate order_item (slot order_item_id)(slot order_id)(slot
item_number)(sl
ot script_id)(slot required_field1)(slot required_field2)(slot
required_field3)(
slot required_field4)(slot patient_id)(slot physician_id)(slot
product_id)(slot
quantity)(slot price)(slot discount)(slot dur_status)(slot
dur_auth_override_cod
e)(slot value)(slot progress)(slot success)(slot reason)(slot
timestamp)(slot cr
eated_by)(slot last_mod_by)(slot create_date)(slot last_mod_date)(slot
term_date
)(slot id)(slot order_item_id)(slot dur_response_code)(slot
dur_response_severit
y)(slot dur_response_message)(slot created_by)(slot last_mod_by)(slot
create_dat
e)(slot last_mod_date)(slot term_date)(slot id)(slot order_item_id)(slot
stock_i
d)(slot quantity)(slot created_by)(slot last_mod_by)(slot create_date)(slot
last
_mod_date)(slot term_date))
(assert(order_item (order_item_id 723)(order_id 10244)(patient_id
488)(physician
_id 494)(product_id 21)(quantity 1)(price 0)(discount 100)(value
ORDER-EDIT)(pro
gress IN-PROCESS)(timestamp "2001/07/14 10:19:23")(created_by
JClark)(last_mod_
by JClark)(create_date "2001/07/14 10:19:23")(last_mod_date "2001/07/14
10:19:
23")(id 144)(order_item_id 723)(stock_id 345)(quantity 1)(created_by
InventoryRe
servation)(last_mod_by InventoryReservation)(create_date "2001/07/14
10:42:29")
(last_mod_date "2001/07/14 10:42:29")))
(assert(order_item (order_item_id 724)(order_id 10244)(patient_id
488)(physician
_id 494)(product_id 22)(quantity 1)(price 0)(discount 100)(value
ORDER-EDIT)(pro
gress IN-PROCESS)(timestamp "2001/07/14 10:23:04")(created_by
JClark)(last_mod_
by JClark)(create_date "2001/07/14 10:20:30")(last_mod_date "2001/07/14
10:23:
04")(id 145)(order_item_id 724)(stock_id 348)(quantity 1)(created_by
InventoryRe
servation)(last_mod_by InventoryReservation)(create_date "2001/07/14
10:42:29")
(last_mod_date "2001/07/14 10:42:29")))
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------