Ещё часть...
This commit is contained in:
parent
c67e4fb479
commit
78baf302c2
|
@ -152,6 +152,13 @@ def save_reception_observe(reception, observe_id_list):
|
||||||
to_add = list(new_symptoms - exist_symptoms)
|
to_add = list(new_symptoms - exist_symptoms)
|
||||||
delete_reception_observe_symptoms(reception, to_del)
|
delete_reception_observe_symptoms(reception, to_del)
|
||||||
add_reception_observe_symptoms(reception, to_add)
|
add_reception_observe_symptoms(reception, to_add)
|
||||||
|
def save_reception_medicine(reception, medicine_id_list):
|
||||||
|
exist_medicines = set(map(lambda x: x.medicine.id, get_reception_medicine_items(reception)))
|
||||||
|
new_medicines = set(medicine_id_list)
|
||||||
|
to_del = list(exist_medicines - new_medicines)
|
||||||
|
to_add = list(new_medicines - exist_medicines)
|
||||||
|
delete_reception_medicines(reception, to_del)
|
||||||
|
add_reception_medicines(reception, to_add)
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
def build_reception_row(reception_datetime):
|
def build_reception_row(reception_datetime):
|
||||||
|
|
Loading…
Reference in New Issue