2022-06-14 13:52:42 +08:00
|
|
|
#ifndef GUI_PATIENTINFORMATION_H
|
|
|
|
|
#define GUI_PATIENTINFORMATION_H
|
|
|
|
|
#define ADD_PATIENT()\
|
|
|
|
|
ADD_PATIENT_PROPERTY(ID)\
|
2023-08-23 16:49:56 +08:00
|
|
|
ADD_PATIENT_PROPERTY(AccessionNumber)\
|
2022-06-14 13:52:42 +08:00
|
|
|
ADD_PATIENT_PROPERTY(Name)\
|
|
|
|
|
ADD_PATIENT_PROPERTY(BirthDate)\
|
|
|
|
|
ADD_PATIENT_PROPERTY(Sex)\
|
|
|
|
|
ADD_PATIENT_PROPERTY(AddDate)\
|
2023-08-23 16:49:56 +08:00
|
|
|
ADD_PATIENT_PROPERTY(Comment)
|
2022-06-14 13:52:42 +08:00
|
|
|
|
|
|
|
|
#define EDIT_PATIENT()\
|
|
|
|
|
ADD_PATIENT_PROPERTY(PatientUID)\
|
|
|
|
|
ADD_PATIENT()
|
|
|
|
|
|
|
|
|
|
enum PatientInformationEnum{
|
|
|
|
|
#define ADD_PATIENT_PROPERTY(val) val,
|
|
|
|
|
EDIT_PATIENT()
|
|
|
|
|
#undef ADD_PATIENT_PROPERTY
|
|
|
|
|
};
|
|
|
|
|
|
2022-09-29 17:36:55 +08:00
|
|
|
#include <QObject>
|
|
|
|
|
#include <QSharedPointer>
|
|
|
|
|
|
2022-06-14 13:52:42 +08:00
|
|
|
/**
|
|
|
|
|
* @brief this class was designed to be a edit form,
|
|
|
|
|
* but now has been change to a detail display class.
|
|
|
|
|
*/
|
|
|
|
|
class PatientInformation:public QObject{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
#define ADD_PATIENT_PROPERTY(val) QString val;
|
2023-08-23 16:49:56 +08:00
|
|
|
EDIT_PATIENT()
|
2022-06-14 13:52:42 +08:00
|
|
|
#undef ADD_PATIENT_PROPERTY
|
2022-09-29 17:36:55 +08:00
|
|
|
PatientInformation()
|
|
|
|
|
: QObject()
|
|
|
|
|
{
|
2022-06-14 13:52:42 +08:00
|
|
|
}
|
2023-09-07 11:17:47 +08:00
|
|
|
void operator=(const PatientInformation& other){
|
|
|
|
|
this->PatientUID = other.PatientUID;
|
|
|
|
|
this->ID = other.ID;
|
|
|
|
|
this->Name = other.Name;
|
|
|
|
|
this->BirthDate = other.BirthDate;
|
|
|
|
|
this->Sex = other.Sex;
|
|
|
|
|
this->Comment = other.Comment;
|
|
|
|
|
this->AccessionNumber = other.AccessionNumber;
|
2023-11-13 10:22:10 +08:00
|
|
|
this->AddDate = other.AddDate;
|
2023-09-07 11:17:47 +08:00
|
|
|
}
|
2023-08-28 16:31:52 +08:00
|
|
|
QString ScheduledStartDate;
|
2022-06-14 13:52:42 +08:00
|
|
|
PatientInformation* Copy()
|
|
|
|
|
{
|
|
|
|
|
PatientInformation* n=new PatientInformation;
|
|
|
|
|
n->PatientUID = this->PatientUID;
|
|
|
|
|
n->ID = this->ID;
|
|
|
|
|
n->Name = this->Name;
|
|
|
|
|
n->BirthDate = this->BirthDate;
|
|
|
|
|
n->Sex = this->Sex;
|
|
|
|
|
n->Comment = this->Comment;
|
2023-08-23 16:49:56 +08:00
|
|
|
n->AccessionNumber = this->AccessionNumber;
|
2023-11-13 10:22:10 +08:00
|
|
|
n->AddDate = this->AddDate;
|
2022-06-14 13:52:42 +08:00
|
|
|
return n;
|
|
|
|
|
}
|
|
|
|
|
};
|
2022-09-29 17:36:55 +08:00
|
|
|
typedef QSharedPointer<PatientInformation> PatientInformationPointer;
|
2022-06-14 13:52:42 +08:00
|
|
|
#endif //GUI_PATIENTINFORMATION_H
|