gov.va.medora.mdo.api.PatientApi.getPatientsBySpecialty C# (CSharp) 메소드

getPatientsBySpecialty() 공개 메소드

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

Usage Example

예제 #1
0
파일: PatientLib.cs 프로젝트: OSEHRA/mdws
        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;
        }