Add accession number and fix a problem with create recon record automaticly.

This commit is contained in:
sunwen
2023-08-23 16:49:56 +08:00
parent a94269c487
commit 2aa6541085
15 changed files with 123 additions and 77 deletions

View File

@@ -29,6 +29,7 @@ void PatientInformationForm::setPatientInformation(PatientInformation* informati
mUI->lbl_Date->setText(information->BirthDate);
mUI->lbl_Name->setText(information->Name);
mUI->lbl_Sex->setText(information->Sex);
mUI->lbl_Acc->setText(information->AccessionNumber);
mInfo = information;
}
@@ -49,8 +50,9 @@ void PatientInformationForm::setProtocol(int type) {
const char* PatientInformationForm::getCurrentPatientJsonString(bool empty)
{
cJSON* patientInfoObject = cJSON_CreateObject();
cJSON_AddItemToObject(patientInfoObject, "PatientName", cJSON_CreateString(mUI->lbl_Name->text().replace(' ', '_').toStdString().data()));
cJSON_AddItemToObject(patientInfoObject, "PatientID", cJSON_CreateString(mUI->lbl_ID->text().replace(' ', '_').toStdString().data()));
cJSON_AddItemToObject(patientInfoObject, "PatientName", cJSON_CreateString(mUI->lbl_Name->text().toStdString().data()));
cJSON_AddItemToObject(patientInfoObject, "PatientID", cJSON_CreateString(mUI->lbl_ID->text().toStdString().data()));
cJSON_AddItemToObject(patientInfoObject, "AccessionNumber", cJSON_CreateString(mUI->lbl_Acc->text().toStdString().data()));
cJSON_AddItemToObject(patientInfoObject, "PatientSex", cJSON_CreateString(mUI->lbl_Sex->text().toStdString().data()));
cJSON_AddItemToObject(patientInfoObject, "PatientBirthDate",
cJSON_CreateString(mUI->lbl_Date->text().replace("/", "").replace("-", "").replace(' ', '.').toStdString().data()));