Beispiel #1
0
        private PatientConsentDisplay MapConsent(PatientConsent pc)
        {
            ILookupManager        mgr         = (ILookupManager)ObjectFactory.CreateInstance("BusinessProcess.CCC.BLookupManager, BusinessProcess.CCC");
            string                consentType = "";
            List <LookupItemView> type        = mgr.GetLookItemByGroup("ConsentType");
            var s = type.FirstOrDefault(n => n.ItemId == pc.ConsentType);

            if (s != null)
            {
                consentType = s.ItemDisplayName;
            }

            PatientConsentDisplay patientConsentDisplay = new PatientConsentDisplay()
            {
                ConsentDate = pc.ConsentDate,
                ConsentType = consentType
            };

            return(patientConsentDisplay);
        }
Beispiel #2
0
        public List <PatientConsentDisplay> GetpatientConsent(string patientId)
        {
            List <PatientConsentDisplay> consentDisplays = new List <PatientConsentDisplay>();
            List <PatientConsent>        consents        = new List <PatientConsent>();

            try
            {
                var patientConsent = new PatientConsentManager();
                int id             = Convert.ToInt32(patientId);
                consents = patientConsent.GetByPatientId(id);
                foreach (var consent in consents)
                {
                    PatientConsentDisplay consentDisplay = MapConsent(consent);
                    consentDisplays.Add(consentDisplay);
                }
            }
            catch (Exception e)
            {
                Msg = e.Message;
            }
            return(consentDisplays);
        }