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 TaggedProblemArray(string tag, Problem mdo) { this.tag = tag; if (mdo == null) { this.count = 0; return; } this.problems = new ProblemTO[1]; this.problems[0] = new ProblemTO(mdo); this.count = 1; }
public TaggedProblemArray(string tag, Problem[] mdos) { this.tag = tag; if (mdos == null) { this.count = 0; return; } this.problems = new ProblemTO[mdos.Length]; for (int i = 0; i < mdos.Length; i++) { this.problems[i] = new ProblemTO(mdos[i]); } this.count = problems.Length; }