Esempio n. 1
0
 def OnPrint(self, event):
     if self.educNote.IsShown():
         note = self.educNote.GetValue()
     else:
         note = self.neweducNote.GetValue()
     qry = 'SELECT firstname, lastname \
             FROM demographics \
             WHERE patient_ID = "%s";' % self.PtID
     print_data = EMR_utilities.getDictData(qry)
     print_data['date'] = self.textctrl['Date'].GetValue()
     print_data['note'] = EMR_utilities.wrapper(note, 80)
     lt = "%s/EMR_outputs/educNote.html" % settings.LINUXPATH
     at = "%s/EMR_outputs/educNote.html" % settings.APPLEPATH
     wt = "%s\EMR_outputs\educNote.html" % settings.WINPATH
     form = open(EMR_utilities.platformText(lt, at, wt), 'r')
     s = form.read()
     form.close()
     note_text = s % (print_data)
     printer = EMR_utilities.Printer()
     printer.PreviewText(note_text)
Esempio n. 2
0
    def OnPrint(self, event):
        if self.soapNote.IsShown():
            note = self.soapNote.GetValue() 
        else:
            note = self.newsoapNote.GetValue()
        qry = 'SELECT firstname, lastname \
                FROM demographics \
                WHERE patient_ID = "%s";' % self.PtID
        print_data = EMR_utilities.getDictData(qry)
        print_data['date'] = self.textctrl['Date'].GetValue()
        print_data['soap'] = EMR_utilities.wrapper(note, 80)
	print print_data['soap']
	lt = "%s/EMR_outputs/SoapNote.html" % settings.LINUXPATH
	at = "%s/EMR_outputs/SoapNote.html" % settings.APPLEPATH
	wt = "%s\EMR_outputs\SoapNote.html" % settings.WINPATH
        form = open(EMR_utilities.platformText(lt, at, wt), 'r')
        s = form.read()
        form.close()        
        note_text = s % (print_data)
        printer = EMR_utilities.Printer()
	printer.PreviewText(note_text)