public TaggedMentalHealthResultSetArray(string tag, List <MentalHealthInstrumentResultSet> mdoItems) { this.tag = tag; if (mdoItems == null) { this.count = 0; return; } items = new MentalHealthInstrumentResultSetTO[mdoItems.Count]; for (int i = 0; i < mdoItems.Count; i++) { items[i] = new MentalHealthInstrumentResultSetTO(mdoItems[i]); } this.count = items.Length; }
public MentalHealthInstrumentAdministrationTO(MentalHealthInstrumentAdministration mdo) { this.id = mdo.Id; this.patient = new TaggedText(mdo.Patient); this.instrument = new TaggedText(mdo.Instrument); this.dateAdministered = mdo.DateAdministered; this.dateSaved = mdo.DateSaved; this.orderedBy = new TaggedText(mdo.OrderedBy); this.administeredBy = new TaggedText(mdo.AdministeredBy); this.isSigned = mdo.IsSigned; this.isComplete = mdo.IsComplete; this.numberOfQuestionsAnswered = mdo.NumberOfQuestionsAnswered; this.transmitStatus = mdo.TransmissionStatus; this.transmitTime = mdo.TransmissionTime; this.hospitalLocation = new TaggedText(mdo.HospitalLocation); if (mdo.ResultSet != null) { this.results = new MentalHealthInstrumentResultSetTO(mdo.ResultSet); } }
public MentalHealthInstrumentAdministrationTO(MentalHealthInstrumentAdministration mdo) { this.id = mdo.Id; this.patient = new TaggedText(mdo.Patient); this.instrument = new TaggedText(mdo.Instrument); this.dateAdministered = mdo.DateAdministered; this.dateSaved = mdo.DateSaved; this.orderedBy = new TaggedText(mdo.OrderedBy); this.administeredBy = new TaggedText(mdo.AdministeredBy); this.isSigned = mdo.IsSigned; this.isComplete = mdo.IsComplete; this.numberOfQuestionsAnswered = mdo.NumberOfQuestionsAnswered; this.transmitStatus = mdo.TransmissionStatus; this.transmitTime = mdo.TransmissionTime; this.hospitalLocation = new TaggedText(mdo.HospitalLocation); if (mdo.ResultSet != null) { this.results = new MentalHealthInstrumentResultSetTO(mdo.ResultSet); } }
public MentalHealthInstrumentResultSetTO getMentalHealthInstrumentResultSet(string siteId, string administrationId) { MentalHealthInstrumentResultSetTO result = new MentalHealthInstrumentResultSetTO(); if (!mySession.ConnectionSet.IsAuthorized) { result.fault = new FaultTO("Connections not ready for operation", "Need to login?"); } else if (String.IsNullOrEmpty(siteId)) { result.fault = new FaultTO("Missing siteId"); } else if (String.IsNullOrEmpty(administrationId)) { result.fault = new FaultTO("Missing administrationId"); } if (result.fault != null) { return result; } try { MentalHealthInstrumentResultSet rs = MentalHealthInstrumentAdministration.getMentalHealthInstrumentResultSet(mySession.ConnectionSet.getConnection(siteId), administrationId); result = new MentalHealthInstrumentResultSetTO(rs); } catch (Exception e) { result.fault = new FaultTO(e); } return result; }