Change how you store treatment attached to an appointment
Currently ( 8.0.7 ) in the database, treatment is stored as an encoded string in the appointment record. This prevents easy retrieval of procedures that have not been scheduled. It would be far more useful if there were a separate table which link...