private void TransferStudy(ServerEntityKey studyKey, PatientInfo oldPatient, Patient newPatient)
{
Platform.Log(LogLevel.Info, "Transferring study from {0} [ID={1}] to {2} [ID={3}]",
oldPatient.PatientsName, oldPatient.PatientId, newPatient.PatientsName, newPatient.PatientId);
var attachStudyToPatientBroker = UpdateContext.GetBroker<IAttachStudyToPatient>();
var parms = new AttachStudyToPatientParamaters
{
StudyKey = studyKey,
NewPatientKey = newPatient.GetKey()
};
attachStudyToPatientBroker.Execute(parms);
}