Beispiel #1
0
        private void UpdateCurrentPatient()
        {
            Platform.Log(LogLevel.Info, "Update current patient record...");
            IPatientEntityBroker patientUpdateBroker = UpdateContext.GetBroker <IPatientEntityBroker>();

            patientUpdateBroker.Update(_curPatient);
        }
Beispiel #2
0
        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);
                }
            }
        }