getClinics() public method

public getClinics ( AbstractConnection cxn, string target, string direction ) : HospitalLocation[]
cxn AbstractConnection
target string
direction string
return HospitalLocation[]
Example #1
0
        public TaggedHospitalLocationArray getClinics(string sitecode, string target, string direction)
        {
            TaggedHospitalLocationArray result = new TaggedHospitalLocationArray();
            string msg = MdwsUtils.isAuthorizedConnection(mySession, sitecode);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
            }

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

            try
            {
                AbstractConnection cxn = mySession.ConnectionSet.getConnection(sitecode);
                EncounterApi api = new EncounterApi();
                HospitalLocation[] clinics = api.getClinics(cxn, target, direction);
                result = new TaggedHospitalLocationArray(sitecode, clinics);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return result;
        }