gov.va.medora.mdo.api.PatientApi.getPatientsByTeam C# (CSharp) Méthode

getPatientsByTeam() public méthode

public getPatientsByTeam ( AbstractConnection cxn, string teamId ) : Patient[]
cxn AbstractConnection
teamId string
Résultat Patient[]
        public Patient[] getPatientsByTeam(AbstractConnection cxn, string teamId)
        {
            return ((IPatientDao)cxn.getDao(DAO_NAME)).getPatientsByTeam(teamId);
        }

Usage Example

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