Package ehealth.ts
Class DispensedDrugWriter
java.lang.Object
ehealth.ts.DispensedDrugWriter
Manages insert operations into the table dispensed_drugs
ensuring that no integrity constraints will be violated.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidwrite(DispensedDrug dispensedDrug, Patient patient) Inserts a new record about a dispensed drug.
-
Method Details
-
write
public static void write(DispensedDrug dispensedDrug, Patient patient) throws DBException, NotFoundException, UniquenessViolationException, IntegrityViolationException Inserts a new record about a dispensed drug.- Parameters:
dispensedDrug- the rocord to storepatient- the patient to whom the drug was dispensed- Throws:
DBException- thrown on any database access or transaction related errorNotFoundException- thrown if the prescription could not be foundUniquenessViolationException- thrown if a record for this prescription already existsIntegrityViolationException- thrown if (1) no drugs can be dispensed for the provided prescription, (2) patient is allergic to an ingredient contained in the drug, (3) drug does not cure the relevant diagnosis
-