Files
GUI/src/forms/select/PatientInformation.h
2024-04-25 17:01:02 +08:00

66 lines
1.7 KiB
C++

#ifndef GUI_PATIENTINFORMATION_H
#define GUI_PATIENTINFORMATION_H
#define ADD_PATIENT()\
ADD_PATIENT_PROPERTY(ID)\
ADD_PATIENT_PROPERTY(AccessionNumber)\
ADD_PATIENT_PROPERTY(Name)\
ADD_PATIENT_PROPERTY(BirthDate)\
ADD_PATIENT_PROPERTY(Sex)\
ADD_PATIENT_PROPERTY(AddDate)\
ADD_PATIENT_PROPERTY(Comment)
#define EDIT_PATIENT()\
ADD_PATIENT_PROPERTY(PatientUID)\
ADD_PATIENT()
enum PatientInformationEnum{
#define ADD_PATIENT_PROPERTY(val) val,
EDIT_PATIENT()
#undef ADD_PATIENT_PROPERTY
};
#include <QObject>
#include <QSharedPointer>
/**
* @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;
EDIT_PATIENT()
#undef ADD_PATIENT_PROPERTY
PatientInformation()
: QObject()
{
}
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;
this->AddDate = other.AddDate;
}
QString ScheduledStartDate;
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;
n->AccessionNumber = this->AccessionNumber;
n->AddDate = this->AddDate;
return n;
}
};
typedef QSharedPointer<PatientInformation> PatientInformationPointer;
#endif //GUI_PATIENTINFORMATION_H