Inheritance: AbstractTO
Ejemplo n.º 1
0
 private void setProps(Person[] mdo)
 {
     if (mdo == null)
     {
         return;
     }
     persons = new PersonTO[mdo.Length];
     for (int i = 0; i < mdo.Length; i++)
     {
         persons[i] = new PersonTO(mdo[i]);
     }
     count = mdo.Length;
 }
Ejemplo n.º 2
0
 public DemographicsRecord(PersonTO person, string source)
 {
     this.name   = person.name;
     this.gender = person.gender;
     this.dob    = person.dob;
     if (person.demographics != null)
     {
         setAddressProperties(person.demographics[0]);
         setPhone(person.demographics[0]);
         setEmail(person.demographics[0]);
     }
     this.source = source;
 }
Ejemplo n.º 3
0
 public DemographicsRecord(PersonTO person, string source)
 {
     this.name = person.name;
     this.gender = person.gender;
     this.dob = person.dob;
     if (person.demographics != null)
     {
         setAddressProperties(person.demographics[0]);
         setPhone(person.demographics[0]);
         setEmail(person.demographics[0]);
     }
     this.source = source;
 }
Ejemplo n.º 4
0
 public PatientCareTeamMemberTO(PatientCareTeamMember member)
 {
     teamName                  = member.TeamName;
     teamStartDate             = member.TeamStartDate;
     teamEndDate               = member.TeamEndDate;
     currentProviderFlag       = member.CurrentProviderFlag;
     associateProviderFlag     = member.AssociateProviderFlag;
     teamPurpose               = member.TeamPurpose;
     providerRole              = member.ProviderRole;
     primaryPosition           = member.PrimaryPosition;
     primaryStandardPosition   = member.PrimaryStandardPosition;
     associatePosition         = member.AssociatePosition;
     associateStandardPosition = member.AssociateStandardPosition;
     person = new PersonTO(member.Person);
 }
Ejemplo n.º 5
0
 public PersonArray(SortedList lst)
 {
     if (lst == null || lst.Count == 0)
     {
         count = 0;
         return;
     }
     persons = new PersonTO[lst.Count];
     IDictionaryEnumerator e = lst.GetEnumerator();
     int i = 0;
     while (e.MoveNext())
     {
         persons[i++] = new PersonTO((Person)e.Value);
     }
     count = lst.Count;
 }
Ejemplo n.º 6
0
 public PersonArray(IndexedHashtable t)
 {
     if (t == null || t.Count == 0)
     {
         count = 0;
         return;
     }
     persons = new PersonTO[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) != null)
         {
             persons[i] = new PersonTO((Person)t.GetValue(i));
         }
     }
     count = t.Count;
 }
Ejemplo n.º 7
0
        public PersonArray(SortedList lst)
        {
            if (lst == null || lst.Count == 0)
            {
                count = 0;
                return;
            }
            persons = new PersonTO[lst.Count];
            IDictionaryEnumerator e = lst.GetEnumerator();
            int i = 0;

            while (e.MoveNext())
            {
                persons[i++] = new PersonTO((Person)e.Value);
            }
            count = lst.Count;
        }
Ejemplo n.º 8
0
 public PersonArray(IndexedHashtable t)
 {
     if (t == null || t.Count == 0)
     {
         count = 0;
         return;
     }
     persons = new PersonTO[t.Count];
     for (int i = 0; i < t.Count; i++)
     {
         if (t.GetValue(i) != null)
         {
             persons[i] = new PersonTO((Person)t.GetValue(i));
         }
     }
     count = t.Count;
 }
Ejemplo n.º 9
0
 internal IndexedHashtable removeDups(IndexedHashtable t)
 {
     IndexedHashtable result = new IndexedHashtable();
     for (int i = 0; i < t.Count; i++)
     {
         string source = (string)t.GetKey(i);
         if (t.GetValue(i) == null)
         {
             result.Add(source, null);
             continue;
         }
         if (t.GetValue(i).GetType().Name.EndsWith("Exception"))
         {
             gov.va.medora.mdo.exceptions.MdoException e = new gov.va.medora.mdo.exceptions.MdoException(
                 gov.va.medora.mdo.exceptions.MdoExceptionCode.DATA_INVALID, (Exception)t.GetValue(i));
             result.Add(source,e);
             continue;
         }
         List<Person> persons = (List<Person>)t.GetValue(i);
         List<DemographicsRecord> rex = new List<DemographicsRecord>(persons.Count);
         Hashtable ht = new Hashtable(persons.Count);
         foreach (Person p in persons)
         {
             PersonTO pto = new PersonTO(p);
             DemographicsRecord rec = new DemographicsRecord(pto, source);
             long hashcode = new TOReflection.TOEqualizer(rec).HashCode;
             if (!ht.ContainsKey(hashcode))
             {
                 ht.Add(hashcode, rec);
                 rex.Add(rec);
             }
         }
         result.Add(source, rex);
     }
     return result;
 }
Ejemplo n.º 10
0
 private void setProps(Person[] mdo)
 {
     if (mdo == null)
     {
         return;
     }
     persons = new PersonTO[mdo.Length];
     for (int i = 0; i < mdo.Length; i++)
     {
         persons[i] = new PersonTO(mdo[i]);
     }
     count = mdo.Length;
 }