Added PatientID field to printed reports

This commit is contained in:
Mark Watkins 2012-01-02 03:10:37 +10:00
parent 254f035ac2
commit 057f14c759
3 changed files with 6 additions and 5 deletions

View File

@ -178,14 +178,14 @@ public:
const QString email() { return (*m_profile)[DI_STR_Email].toString(); }
const QString practiceName() { return (*m_profile)[DI_STR_Practice].toString(); }
const QString address() { return (*m_profile)[DI_STR_Address].toString(); }
const QString patiendID() { return (*m_profile)[DI_STR_PatientID].toString(); }
const QString patientID() { return (*m_profile)[DI_STR_PatientID].toString(); }
void setName(QString name) { (*m_profile)[DI_STR_Name]=name; }
void setPhone(QString phone) { (*m_profile)[DI_STR_Phone]=phone; }
void setEmail(QString phone) { (*m_profile)[DI_STR_Email]=phone; }
void setPracticeName(QString practice) { (*m_profile)[DI_STR_Practice]=practice; }
void setAddress(QString address) { (*m_profile)[DI_STR_Address]=address; }
void setPatiendID(QString pid) { (*m_profile)[DI_STR_PatientID]=pid; }
void setPatientID(QString pid) { (*m_profile)[DI_STR_PatientID]=pid; }
Profile *m_profile;
};

View File

@ -1547,6 +1547,7 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date)
if (!PROFILE.user->firstName().isEmpty()) {
QString userinfo=tr("Name:\t %1, %2\n").arg(PROFILE.user->lastName()).arg(PROFILE.user->firstName());
userinfo+=tr("DOB:\t%1\n").arg(PROFILE.user->DOB().toString(Qt::SystemLocaleShortDate));
if (!PROFILE.doctor->patientID().isEmpty()) userinfo+=tr("Patient ID:\t%1\n").arg(PROFILE.doctor->patientID());
userinfo+=tr("Phone:\t%1\n").arg(PROFILE.user->phone());
userinfo+=tr("Email:\t%1\n").arg(PROFILE.user->email());
if (!PROFILE.user->address().isEmpty()) userinfo+=tr("\nAddress:\n%1").arg(PROFILE.user->address());
@ -1695,7 +1696,7 @@ void MainWindow::PrintReport(gGraphView *gv,QString name, QDate date)
QTextDocument doc;
doc.setHtml(journal->settings[Journal_Notes].toString());
stats=doc.toPlainText();
//doc.drawContents(&painter);
//doc.drawContents(&painter); // doesn't work as intended..
bounds=painter.boundingRect(QRectF(0,top+ttop,virt_width,0),stats,QTextOption(Qt::AlignHCenter));
painter.drawText(bounds,stats,QTextOption(Qt::AlignHCenter));

View File

@ -156,7 +156,7 @@ void NewProfile::on_nextButton_clicked()
profile->doctor->setAddress(ui->doctorAddressEdit->toPlainText());
profile->doctor->setPhone(ui->doctorPhoneEdit->text());
profile->doctor->setEmail(ui->doctorEmailEdit->text());
profile->doctor->setPatiendID(ui->doctorPatientIDEdit->text());
profile->doctor->setPatientID(ui->doctorPatientIDEdit->text());
profile->user->setLanguage(ui->languageCombo->currentText());
profile->user->setTimeZone(ui->timezoneCombo->itemData(ui->timezoneCombo->currentIndex()).toString());
profile->user->setCountry(ui->countryCombo->currentText());
@ -277,7 +277,7 @@ void NewProfile::edit(const QString name)
ui->doctorPhoneEdit->setText(profile->doctor->phone());
ui->doctorEmailEdit->setText(profile->doctor->email());
ui->doctorAddressEdit->setText(profile->doctor->address());
ui->doctorPatientIDEdit->setText(profile->doctor->patiendID());
ui->doctorPatientIDEdit->setText(profile->doctor->patientID());
ui->DSTcheckbox->setChecked(profile->user->daylightSaving());
int i=ui->timezoneCombo->findData(profile->user->timeZone());