Inheritance: Observation
Example #1
0
 public AllergyTO(Allergy mdo)
 {
     this.allergenId = mdo.AllergenId;
     this.allergenName = mdo.AllergenName;
     this.allergenType = mdo.AllergenType;
     if (mdo.Reactions != null)
     {
         this.reactions = new SymptomTO[mdo.Reactions.Count];
         for (int i = 0; i < mdo.Reactions.Count; i++)
         {
             this.reactions[i] = new SymptomTO(mdo.Reactions[i]);
         }
     }
     this.severity = mdo.Severity;
     if (mdo.Observer != null)
     {
         this.observer = new AuthorTO(mdo.Observer);
     }
     if (mdo.Recorder != null)
     {
         this.recorder = new AuthorTO(mdo.Recorder);
     }
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     if (mdo.Location != null)
     {
         this.location = new HospitalLocationTO(mdo.Location);
     }
     if (mdo.Type != null)
     {
         this.type = new ObservationTypeTO(mdo.Type);
     }
     this.comment = mdo.Comment;
     if (mdo.DrugIngredients != null)
     {
         this.drugIngredients = new TaggedText[mdo.DrugIngredients.Count];
         int idx = 0;
         foreach (DictionaryEntry de in mdo.DrugIngredients)
         {
             this.drugIngredients[idx++] = new TaggedText(de);
         }
     }
     if (mdo.DrugClasses != null)
     {
         this.drugClasses = new TaggedText[mdo.DrugClasses.Count];
         int idx = 0;
         foreach (DictionaryEntry de in mdo.DrugClasses)
         {
             this.drugClasses[idx++] = new TaggedText(de);
         }
     }
 }
Example #2
0
 public TaggedAllergyArray(string tag, Allergy mdo)
 {
     this.tag = tag;
     if (mdo == null)
     {
         this.count = 0;
         return;
     }
     this.allergies = new AllergyTO[1];
     this.allergies[0] = new AllergyTO(mdo);
     this.count = 1;
 }
Example #3
0
 public TaggedAllergyArray(string tag, Allergy[] mdos)
 {
     this.tag = tag;
     if (mdos == null)
     {
         this.count = 0;
         return;
     }
     this.allergies = new AllergyTO[mdos.Length];
     for (int i = 0; i < mdos.Length; i++)
     {
         this.allergies[i] = new AllergyTO(mdos[i]);
     }
     this.count = allergies.Length;
 }