コード例 #1
0
        //public PatientEntityIdentifier GetPatientByCardSerialNumber(string cardSerialNumber)
        //{
        //    return _mgr.GetPatientByCardSerialNumber(cardSerialNumber);
        //}
        public PatientEntity GetPatientEntityByIdentifier(string identifierCode, string identifierValue)
        {
            IIdentifiersManager      _idMgr     = (IIdentifiersManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.Enrollment.BIdentifier, BusinessProcess.CCC");
            IPersonIdentifierManager _personmgr = (IPersonIdentifierManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.Enrollment.BPersonIdentifier, BusinessProcess.CCC");
            PatientEntity            patient    = null;
            IPatientManager          _patMgr    = (IPatientManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.Patient.BPatient, BusinessProcess.CCC");
            var identifier = _idMgr.GetIdentifierByCode(identifierCode);

            if (identifier == null)
            {
                return(patient);
            }
            if ((IdentifierType)identifier.IdentifierType == IdentifierType.Patient)
            {
                var retVal = CheckIfIdentifierNumberIsUsed(identifierValue, identifier.Id);
                if (retVal != null && retVal.Count > 0)
                {
                    patient = PatientEntityHelper.MapFromPatientPersonView(_patMgr.GetPatient(retVal[0].PatientId));
                }
            }
            else if ((IdentifierType)identifier.IdentifierType == IdentifierType.Person)
            {
                var retVal = _personmgr.CheckIfPersonIdentifierExists(identifierValue, identifier.Id);
                if (retVal != null && retVal.Count > 0)
                {
                    patient = PatientEntityHelper.MapFromPatientPersonView(_patMgr.GetPatientEntityByPersonId(retVal[0].PersonId));
                }
            }
            return(patient);
        }
コード例 #2
0
        public PatientEntity GetPatientByCardSerialNumber(string cardSerialNumber)
        {
            IIdentifiersManager      _idMgr     = (IIdentifiersManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.Enrollment.BIdentifier, BusinessProcess.CCC");
            IPersonIdentifierManager _personmgr = (IPersonIdentifierManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.Enrollment.BPersonIdentifier, BusinessProcess.CCC");
            //  IPatientLookupmanager _patientLookupmanager = (IPatientLookupmanager)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientLookupManager, BusinessProcess.CCC");
            PatientEntity   patient = null;
            IPatientManager _patMgr = (IPatientManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.Patient.BPatient, BusinessProcess.CCC");

            var identifier = _idMgr.GetIdentifierByCode("CARD_SERIAL_NUMBER");

            if (identifier != null)
            {
                var retVal = _personmgr.CheckIfPersonIdentifierExists(cardSerialNumber, identifier.Id);
                if (retVal != null && retVal.Count > 0)
                {
                    patient = PatientEntityHelper.MapFromPatientPersonView(_patMgr.GetPatientEntityByPersonId(retVal[0].PersonId));
                }
            }

            return(patient);
        }
コード例 #3
0
 public PatientEntity CheckPersonEnrolled(int personId)
 {
     return(PatientEntityHelper.MapFromPatientPersonView(_mgr.CheckPersonEnrolled(personId)));
 }
コード例 #4
0
 public PatientEntity GetPatientEntity(int patientId)
 {
     return(PatientEntityHelper.MapFromPatientPersonView(_mgr.GetPatient(patientId)));
 }
コード例 #5
0
 public PatientEntity GetPatientEntityByPersonId(int personId)
 {
     return(PatientEntityHelper.MapFromPatientPersonView(_mgr.GetPatientEntityByPersonId(personId)));
 }