Inheritance: AbstractTaggedArrayTO
Exemple #1
0
 public TaggedAdtArrays(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     arrays = new TaggedAdtArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (MdwsUtils.isException(t.GetValue(i)))
         {
             fault = new FaultTO((Exception)t.GetValue(i));
         }
         else if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedAdtArray((string)t.GetKey(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedAdtArray((string)t.GetKey(i), (Adt[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedAdtArray((string)t.GetKey(i), (Adt)t.GetValue(i));
         }
     }
     count = t.Count;
 }
Exemple #2
0
 public TaggedAdtArrays(IndexedHashtable t)
 {
     if (t.Count == 0)
     {
         return;
     }
     arrays = new TaggedAdtArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (MdwsUtils.isException(t.GetValue(i)))
         {
             fault = new FaultTO((Exception)t.GetValue(i));
         }
         else if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedAdtArray((string)t.GetKey(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedAdtArray((string)t.GetKey(i), (Adt[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedAdtArray((string)t.GetKey(i), (Adt)t.GetValue(i));
         }
     }
     count = t.Count;
 }
Exemple #3
0
        public TaggedAdtArray getInpatientDischarges(string sitecode, string pid)
        {
            TaggedAdtArray result = new TaggedAdtArray();

            if (!mySession.ConnectionSet.IsAuthorized)
            {
                result.fault = new FaultTO("Connections not ready for operation", "Need to login?");
            }
            if (result.fault != null)
            {
                return result;
            }

            try
            {
                EncounterApi api = new EncounterApi();
                Adt[] adts = api.getInpatientDischarges(mySession.ConnectionSet.getConnection(sitecode), pid);
                result = new TaggedAdtArray(sitecode, adts);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e);
            }
            return result;
        }