#include <QString>
#include <QDir>
#pragma region 該方法用于建立病人目錄
QString DirectoryController::CreatePatientDirectory(QString patient_id)
{
//建立一個完整的路徑
QString patient_file_path = "D:/Patients/" + patient_id;
QDir* temp = new QDir;
bool exist = temp->exists(patient_file_path);
if (!exist)
{
bool ok = temp->mkpath(patient_file_path);
if (ok)
{
delete temp;
return patient_file_path;
}
}
delete temp;
return patient_file_path;
}
#pragma endregion