Author: | Neil Wallace (neil@openmolar.com) |
---|---|
Release: | 2.0.906~hg207 |
Date: | April 18, 2013 |
The Treatment Item Class is a custom data type to decribe an item of treatment.
An enumeration system is in place (as class attributes) to describe exactly what type of treatment the object refers to. Those types are
- TreatmentItem.SIMPLE
- TreatmentItem.TOOTH
- TreatmentItem.ROOT
- TreatmentItem.FILL
- TreatmentItem.CROWN
- TreatmentItem.BRIDGE
- TreatmentItem.PROSTHETICS
- TreatmentItem.OTHER
See also
Bases: object
Note
this custom data object represents an item of treatment. the underlying procedure code can be accessed with TreatmentItem.code
raises a TreatmentItemException if errors are encountered
overloaded function
Param : | QSql.QSqlrecord |
---|
will load values from the Record
Param : | string |
---|
string should be of the form “A01” ie. uniquely identify a proc code
Param : | ProcCode |
---|
pass in a ProcCode object directly
create a new TreatmentItemMetadata object and append to this treatment item. note - returns the item so that values can be set
True if this treatment can related to multiple teeth
Note
an example would be a periodontal splint
which teeth are acceptable as pontics eg upper partial pontics should be in range(1,18)
a tuple (valid, errors), where valid is a boolean, and errors a list of errors
check to see that the item has all the attributes required by the underlying procedure code
Note
our 3 surface filling will need to know tooth and surfaces returns a tuple (valid, errors), where valid is a boolean, and errors a list of errors
Param : | database |
---|
write this item to the database
will raise an exception if item is not is_valid()
returns the primary key of the treatments table for this item, or None if the item is not in the database
returns true if the item is in the database if it is, then it will have a valid qsql_record .
a bool indicating whether this treatment item can be represented on a dental chart. example, an examination is not, but a filling in the UR5 is
returns a list of all TreatmentItemMetadata objects
how many units should this be if it is to be a bridge? returns an integer or None
Param : | list of pontics [int, int, int...] |
---|
ints should comply with Tooth Notation
Param : | date |
---|
sets the item as completed, on date date
Param : | list of pontics [int, int, int...] |
---|
ints should comply with Tooth Notation
Param : | clinician_id (int) |
---|
Note
who prescribed this treatment int should be the unique id of a clinician
Param : | [int, int, int...] |
---|
ints should comply with Tooth Notation