Пример #1
0
    def perform_tx(self):
        pt = self.om_gui.pt
        if pt.serialno == 0:
            self.om_gui.advise(_("no patient selected"), 1)
            return

        if "N" in pt.cset:
            self.db_radioButton.hide()
            self.extsp_radioButton.hide()
        else:
            self.extsp_radioButton.setChecked(
                "SP+" in pt.treatment_course.periopl)

        result = self.getInput()

        if result:
            courseno = pt.treatment_course.courseno
            if self.trt in pt.treatment_course.periopl:
                n_txs = pt.treatment_course.periocmp.split(" ").count(
                    self.trt) + 1
                hash_ = localsettings.hash_func("%sperio%s%s" %
                                                (courseno, n_txs, self.trt))
                tx_hash = TXHash(hash_)
                manipulate_plan.tx_hash_complete(self.om_gui, tx_hash)
            else:
                trts = (("perio", "%s" % self.trt), )
                manipulate_plan.add_treatments_to_plan(self.om_gui, trts, True)

            note = "%s %s %s\n" % (self.trt, _("performed by"), self.dent)
            self.om_gui.addNewNote(note)
            return True
        else:
            self.om_gui.advise("Hyg Treatment not applied", 2)

        return False
Пример #2
0
    def perform_tx(self):
        pt = self.om_gui.pt
        if pt.serialno == 0:
            self.om_gui.advise(_("no patient selected"), 1)
            return

        if "N" in pt.cset:
            self.db_radioButton.hide()
            self.extsp_radioButton.hide()
        else:
            self.extsp_radioButton.setChecked("SP+" in pt.treatment_course.periopl)

        result = self.getInput()

        if result:
            courseno = pt.treatment_course.courseno
            if self.trt in pt.treatment_course.periopl:
                n_txs = pt.treatment_course.periocmp.split(" ").count(self.trt) + 1
                hash_ = localsettings.hash_func("%sperio%s%s" % (courseno, n_txs, self.trt))
                tx_hash = TXHash(hash_)
                manipulate_plan.tx_hash_complete(self.om_gui, tx_hash)
            else:
                trts = (("perio", "%s" % self.trt),)
                manipulate_plan.add_treatments_to_plan(self.om_gui, trts, True)

            newnotes = unicode(self.om_gui.ui.notesEnter_textEdit.toPlainText().toUtf8())
            if newnotes != "" and newnotes[-1] != "\n":
                newnotes += "\n"
            newnotes += "%s %s %s\n" % (self.trt, _("performed by"), self.dent)
            self.om_gui.ui.notesEnter_textEdit.setText(newnotes)
            return True
        else:
            self.om_gui.advise("Hyg Treatment not applied", 2)

        return False
Пример #3
0
 def tx_hash_complete(self, tx_hash):
     LOGGER.debug("EstimateWidget.tx_hash_complete, %s" % tx_hash)
     if tx_hash.completed:
         manipulate_plan.tx_hash_complete(self.om_gui, tx_hash)
     else:
         manipulate_plan.tx_hash_reverse(self.om_gui, tx_hash)
Пример #4
0
 def tx_hash_complete(self, tx_hash):
     LOGGER.debug("EstimateWidget.tx_hash_complete, %s"% tx_hash)
     if tx_hash.completed:
         manipulate_plan.tx_hash_complete(self.om_gui, tx_hash)
     else:
         manipulate_plan.tx_hash_reverse(self.om_gui, tx_hash)