gov.va.medora.mdo.api.PatientApi.getPatientsByProvider C# (CSharp) Метод

getPatientsByProvider() публичный Метод

public getPatientsByProvider ( AbstractConnection cxn, string duz ) : Patient[]
cxn AbstractConnection
duz string
Результат Patient[]
        public Patient[] getPatientsByProvider(AbstractConnection cxn, string duz)
        {
            return ((IPatientDao)cxn.getDao(DAO_NAME)).getPatientsByProvider(duz);
        }

Usage Example

Пример #1
0
        public TaggedPatientArray getPatientsByProvider(string sitecode, string duz)
        {
            TaggedPatientArray result = new TaggedPatientArray();
            string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (duz == "")
            {
                result.fault = new FaultTO("Missing duz");
            }
            if (result.fault != null)
            {
                return result;
            }

            if (sitecode == null)
            {
                sitecode = mySession.ConnectionSet.BaseSiteId;
            }

            try
            {
                AbstractConnection cxn = mySession.ConnectionSet.getConnection(sitecode);
                PatientApi patientApi = new PatientApi();
                Patient[] matches = patientApi.getPatientsByProvider(cxn, duz);
                result = new TaggedPatientArray(sitecode, matches);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }