public ObservationTO(Observation mdo) { if (mdo == null) { return; } 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; }
public ProblemTO(Problem mdo) { 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; 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); } }
public VitalSignTO(VitalSign mdo) { 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; this.value1 = mdo.Value1; this.value2 = mdo.Value2; this.units = mdo.Units; this.qualifiers = mdo.Qualifiers; }
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); } } }
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; }
public SymptomTO(Symptom mdo) { this.id = mdo.Id; this.name = mdo.Name; this.isNational = mdo.IsNational; this.vuid = mdo.Vuid; if (mdo.Type != null) { this.type = new ObservationTypeTO(mdo.Type); } if (mdo.Observer != null) { this.observer = new AuthorTO(mdo.Observer); } this.timestamp = mdo.Timestamp; if (mdo.Facility != null) { this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name); } }