gov.va.medora.mdo.api.PatientApi.getPatientsBySpecialty C# (CSharp) Method

getPatientsBySpecialty() public method

public getPatientsBySpecialty ( AbstractConnection cxn, string specialtyId ) : Patient[]
cxn AbstractConnection
specialtyId string
return Patient[]
        public Patient[] getPatientsBySpecialty(AbstractConnection cxn, string specialtyId)
        {
            return ((IPatientDao)cxn.getDao(DAO_NAME)).getPatientsBySpecialty(specialtyId);
        }

Usage Example

Ejemplo n.º 1
0
        public TaggedPatientArray getPatientsBySpecialty(string sitecode, string specialtyId)
        {
            TaggedPatientArray result = new TaggedPatientArray();
            string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }
            else if (specialtyId == "")
            {
                result.fault = new FaultTO("Missing specialtyId");
            }
            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.getPatientsBySpecialty(cxn, specialtyId);
                result = new TaggedPatientArray(sitecode, matches);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }