Replace space to underline in PatientName and PatientID.

This commit is contained in:
Krad
2021-10-21 12:33:49 +08:00
parent 3b9d9f58f5
commit 5216b5cd01

View File

@@ -39,9 +39,9 @@ void PatientInformationForm::setProtocol(int type) {
const char *PatientInformationForm::getCurrentPatientJsonString(bool empty) {
cJSON* root=cJSON_CreateObject();
cJSON_AddItemToObject(root, "PatientName",cJSON_CreateString(ui->lbl_Name->text().replace(' ','.').toStdString().data()));
cJSON_AddItemToObject(root, "PatientID",cJSON_CreateString(ui->lbl_ID->text().replace(' ','.').toStdString().data()));
cJSON_AddItemToObject(root, "PatientSex",cJSON_CreateString(ui->lbl_Sex->text().replace(' ','.').toStdString().data()));
cJSON_AddItemToObject(root, "PatientName",cJSON_CreateString(ui->lbl_Name->text().replace(' ','_').toStdString().data()));
cJSON_AddItemToObject(root, "PatientID",cJSON_CreateString(ui->lbl_ID->text().replace(' ','_').toStdString().data()));
cJSON_AddItemToObject(root, "PatientSex",cJSON_CreateString(ui->lbl_Sex->text().toStdString().data()));
cJSON_AddItemToObject(root, "PatientBirthDate",
cJSON_CreateString(ui->lbl_Date->text().replace("/","").replace("-","").replace(' ','.').toStdString().data()));
cJSON_AddItemToObject(root, "Laterality",cJSON_CreateString(currentProtocol?"R":"L"));