Scan Json create and save.

This commit is contained in:
Krad
2022-05-11 15:44:43 +08:00
parent 8f6ddc6119
commit fb38907d3c
5 changed files with 89 additions and 8 deletions

View File

@@ -2,17 +2,13 @@
#include "ui_patientinformationform.h"
#include "json/cJSON.h"
#include "event/EventCenter.h"
#include "json/ScanJson.h"
PatientInformationForm::PatientInformationForm(QWidget* parent) :
QWidget(parent),
ui(new Ui::PatientInformationForm)
{
ui->setupUi(this);
//ui->lbl_ID->setText(tr(""));
//ui->lbl_Date->setText(tr(""));
//ui->lbl_Name->setText(tr(""));
//ui->lbl_Sex->setText(tr(""));
//ui->lbl_Acc->setText(tr(""));
connect(EventCenter::Default(), &EventCenter::ReloadLanguage, [=]() {
ui->retranslateUi(this);
@@ -63,6 +59,6 @@ const char* PatientInformationForm::getCurrentPatientJsonString(bool empty) {
cJSON_AddItemToObject(root, "InstitutionAddress", cJSON_CreateString("HZ"));
delete jsonstr;
jsonstr = cJSON_Print(root);
cJSON_Delete(root);
ScanJson::Current()->store(root);
return jsonstr;
}