private void UpdatePatientEncoding(Patient patient) { // Note: patient can be an existing one or a new one // set the SpecificCharacterSet of the patient and study record. This will update the database // and force Patient/Study/Series level query response to be encoded in UTF8. Image level responses // will be encoded using the character set in the image (see QueryScpExtension) // if (atLeastOneFileUpdatedToUTF8) { // Only update the db if necessary if (!IsUTF8(patient.SpecificCharacterSet)) { Platform.Log(LogLevel.Info, "Updating encoding for patient information in the database to UTF8 [ Name={0}, ID={1} ]", patient.Name, patient.PatientId); // update to UTF8 patient.SpecificCharacterSet = UTF8; // This method is called at the very end of UpdateDatabase(), update the database now IPatientEntityBroker broker = UpdateContext.GetBroker <IPatientEntityBroker>(); PatientUpdateColumns columns = new PatientUpdateColumns() { SpecificCharacterSet = UTF8 }; broker.Update(patient.Key, columns); } } }
private void UpdateCurrentPatient() { Platform.Log(LogLevel.Info, "Update current patient record..."); IPatientEntityBroker patientUpdateBroker = UpdateContext.GetBroker <IPatientEntityBroker>(); patientUpdateBroker.Update(_curPatient); }
private static Patient FindPatient(PatientInfo patientInfo, IPersistenceContext context) { IPatientEntityBroker patientFindBroker = context.GetBroker <IPatientEntityBroker>(); PatientSelectCriteria criteria = new PatientSelectCriteria(); if (!String.IsNullOrEmpty(patientInfo.PatientId)) { criteria.PatientId.EqualTo(patientInfo.PatientId); } else { criteria.PatientId.IsNull(); } if (!String.IsNullOrEmpty(patientInfo.Name)) { criteria.PatientsName.EqualTo(patientInfo.Name); } else { criteria.PatientsName.IsNull(); } return(patientFindBroker.FindOne(criteria)); }