コード例 #1
0
        public void Dispose()
        {
            if (!_isDisposed)
            {
                _locker.Dispose();

                _inToEHRConverter                  = null;
                _outToEHRConverter                 = null;
                _plannedToEHRConverter             = null;
                _commissionAprToEHRConverter       = null;
                _dispObservationToEHRConverter     = null;
                _inClinicProcedureToEHRConverter   = null;
                _pathProcedureToEHRConverter       = null;
                _protocolDrugTherapyToEHRConverter = null;
                _patientToEHRConverter             = null;

                _isDisposed = !_isDisposed;

                GC.SuppressFinalize(this);
            }
        }
コード例 #2
0
        public EhrExtract Convert(PatientViewModel model, string name, string systemId)
        {
            if (model == default)
            {
                throw new ArgumentNullException(nameof(model));
            }

            if (_patientToEHRConverter == default)
            {
                _locker.EnterWriteLock();

                if (_patientToEHRConverter == default)
                {
                    _patientToEHRConverter = new PatientToEHRConverter(EhrManager);
                }

                _locker.ExitWriteLock();
            }

            return(_patientToEHRConverter.Convert(model, name, systemId));
        }