Наследование: AbstractTaggedArrayTO
Пример #1
0
 public TaggedNoteArrays(IndexedHashtable t)
 {
     if (t == null || t.Count == 0)
     {
         return;
     }
     arrays = new TaggedNoteArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i));
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i),(Exception)t.GetValue(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Note[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Note)t.GetValue(i));
         }
     }
     count = t.Count;
 }
Пример #2
0
 /// <summary>
 /// Use this contructor for results from the VPR so only the correct note type is built for a request. "documents" for all notes, "dischargeSummaries" for that specific note type
 /// </summary>
 /// <param name="t"></param>
 /// <param name="noteType"></param>
 public TaggedNoteArrays(IndexedHashtable t, string noteType)
 {
     if (t == null || t.Count == 0)
     {
         return;
     }
     count  = t.Count;
     arrays = new TaggedNoteArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i));
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Exception)t.GetValue(i));
         }
         else if (t.GetValue(i).GetType() == typeof(System.Collections.Hashtable))
         {
             if (noteType.Equals("documents"))
             {
                 buildAllNotes(t, i);
             }
             else if (noteType.Equals("dischargeSummaries"))
             {
                 buildDischargeSummaries(t, i);
             }
         }
     }
 }
Пример #3
0
 public TaggedNoteArrays(IndexedHashtable t)
 {
     if (t == null || t.Count == 0)
     {
         return;
     }
     arrays = new TaggedNoteArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i));
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Exception)t.GetValue(i));
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Note[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Note)t.GetValue(i));
         }
     }
     count = t.Count;
 }
Пример #4
0
        internal void buildAllNotes(IndexedHashtable ihs, int index)
        {
            IList <Note> temp = ((System.Collections.Hashtable)ihs.GetValue(index))["documents"] as IList <Note>;

            if (temp == null || temp.Count == 0)
            {
                arrays[index] = new TaggedNoteArray((string)ihs.GetKey(index));
            }
            else
            {
                Note[] ary = new Note[temp.Count];
                temp.CopyTo(ary, 0);
                arrays[index] = new TaggedNoteArray((string)ihs.GetKey(index), ary);
            }
        }
Пример #5
0
 public ProblemTO(Problem mdo)
 {
     if (mdo == null)
     {
         return;
     }
     this.resolvedDate = mdo.ResolvedDate;
     this.removed      = mdo.Removed;
     this.verified     = mdo.Verified;
     if (mdo.Comments != null && mdo.Comments.Count > 0)
     {
         Note[] noteComments = new Note[mdo.Comments.Count];
         mdo.Comments.CopyTo(noteComments, 0);
         this.comments = new TaggedNoteArray("comments", noteComments);
     }
     this.acuity            = new TaggedText(mdo.Acuity);
     this.id                = mdo.Id;
     this.status            = mdo.Status;
     this.providerNarrative = mdo.ProviderNarrative;
     this.onsetDate         = mdo.OnsetDate;
     this.modifiedDate      = mdo.ModifiedDate;
     this.exposures         = mdo.Exposures;
     this.noteNarrative     = mdo.NoteNarrative;
     this.priority          = mdo.Priority;
     this.resolvedDate      = mdo.ResolvedDate;
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
     if (mdo.OrganizationProperties != null && mdo.OrganizationProperties.Count > 0)
     {
         this.organizationalProperties = new TaggedTextArray(mdo.OrganizationProperties);
     }
     this.timestamp = mdo.Timestamp;
 }
Пример #6
0
 public TaggedNoteArrays(IndexedHashtable t)
 {
     if (t == null || t.Count == 0)
     {
         return;
     }
     arrays = new TaggedNoteArray[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) == null)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i));
         }
         else if (MdwsUtils.isException(t.GetValue(i)))
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Exception)t.GetValue(i));
         }
         else if (t.GetValue(i).GetType() == typeof(System.Collections.Hashtable))
         {
             IList <Note> temp = ((System.Collections.Hashtable)t.GetValue(i))["documents"] as IList <Note>;
             if (temp == null || temp.Count == 0)
             {
                 arrays[i] = new TaggedNoteArray((string)t.GetKey(i));
             }
             else
             {
                 Note[] ary = new Note[temp.Count];
                 temp.CopyTo(ary, 0);
                 arrays[i] = new TaggedNoteArray((string)t.GetKey(i), ary);
             }
         }
         else if (t.GetValue(i).GetType().IsArray)
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Note[])t.GetValue(i));
         }
         else
         {
             arrays[i] = new TaggedNoteArray((string)t.GetKey(i), (Note)t.GetValue(i));
         }
     }
     count = t.Count;
 }