fix: PatientDataReader can not read null patient information.

This commit is contained in:
sunwen
2025-03-24 19:30:20 +08:00
parent 7783fcee38
commit 0a9bb829c3

View File

@@ -96,6 +96,11 @@ PatientData PatientDataReader::getPatientDataFromHJ(const std::string& aFilePath
{ {
return result; return result;
} }
if(!jsonObj.at("Patient Info").is_string())
{
return result;
}
patientJsonString = jsonObj.at("Patient Info").get<std::string>(); patientJsonString = jsonObj.at("Patient Info").get<std::string>();
patientJsonString = AESEncryptHelper::decrypt(patientJsonString); patientJsonString = AESEncryptHelper::decrypt(patientJsonString);
if(patientJsonString.empty()) if(patientJsonString.empty())