Add start scan process from worklist and add scan protocal display in scan page.

This commit is contained in:
sunwen
2024-05-10 15:23:39 +08:00
parent 1f362d0340
commit 2c2b20ee55
7 changed files with 56 additions and 15 deletions

View File

@@ -23,7 +23,7 @@ PatientInformationForm::~PatientInformationForm()
delete mJsonStr;
}
void PatientInformationForm::setPatientInformation(PatientInformationPointer information) {
void PatientInformationForm::setPatientInformation(PatientInformationPointer information, ScanProtocal aProtocal) {
if(information)
{
mUI->mPatientID->setText(information->ID);
@@ -31,6 +31,7 @@ void PatientInformationForm::setPatientInformation(PatientInformationPointer inf
mUI->mPatientName->setText(information->Name);
mUI->mPatientGender->setText(information->Sex);
mUI->mPaitenAccessionNumber->setText(information->AccessionNumber);
mUI->mScanProtocol->setText(getProtocolString(aProtocal));
}
else
{
@@ -39,11 +40,9 @@ void PatientInformationForm::setPatientInformation(PatientInformationPointer inf
mUI->mPatientName->clear();
mUI->mPatientGender->clear();
mUI->mPaitenAccessionNumber->clear();
mUI->mScanProtocol->clear();
}
if (mInfo)
{
mInfo->deleteLater();
}
mInfo = information;
}
@@ -57,6 +56,17 @@ int PatientInformationForm::getProtocol()
return mCurrentProtocol;
}
QString PatientInformationForm::getProtocolString(ScanProtocal aProtocal)
{
switch (aProtocal)
{
case RSTAND: return tr("RSTAND");
case LSTAND: return tr("LSTAND");
case LONE: return tr("LONE");
case RONE: return tr("RONE");
}
}
QString PatientInformationForm::getPatientID()
{
return mUI->mPatientID->text();

View File

@@ -7,6 +7,11 @@ namespace Ui {
class PatientInformationForm;
}
enum ScanProtocal
{
LSTAND = 0, RSTAND, LONE, RONE
};
class PatientInformationForm : public QWidget
{
Q_OBJECT
@@ -14,17 +19,18 @@ class PatientInformationForm : public QWidget
public:
explicit PatientInformationForm(QWidget *parent = nullptr);
~PatientInformationForm() override;
void setPatientInformation(PatientInformationPointer information);
void setPatientInformation(PatientInformationPointer information, ScanProtocal aProtocal);
PatientInformationPointer getPatientInformation();
int getProtocol();
QString getProtocolString(ScanProtocal aProtocal);
const char * getCurrentPatientJsonString(bool emptyScan);
QString getPatientID();
QString getPatientID();
private:
Ui::PatientInformationForm *mUI;
PatientInformationPointer mInfo;
int mCurrentProtocol = 0;
ScanProtocal mCurrentProtocol = LSTAND;
char * mJsonStr = nullptr;
};

View File

@@ -329,7 +329,7 @@ void ScanFormWidget::initEvents()
DialogResult result = DialogManager::Default()->reuqestConfirmStartScan(patientInfo);
if(result.ResultCode == QDialog::Accepted)
{
mPatInf->setPatientInformation(patientInfo->Copy());
mPatInf->setPatientInformation(patientInfo->Copy(), static_cast<ScanProtocal>(result.ResultData.toInt()));
LOG_USER_OPERATION(QString("Select Patient, ID: %1").arg(patientInfo->ID))
EventCenter::Default()->triggerEvent(StartScanProcess, nullptr, patientInfo);
}