Exemplo n.º 1
0
 public ConsultTO(Consult mdo)
 {
     this.id = mdo.Id;
     this.timestamp = mdo.Timestamp.ToString("yyyyMMdd.HHmmss");
     this.toService = new TaggedText(mdo.Service);
     this.status = mdo.Status;
     this.title = mdo.Title;
     this.text = mdo.Text;
 }
Exemplo n.º 2
0
 public TaggedConsultArray(string tag, Consult mdo)
 {
     this.tag = tag;
     if (mdo == null)
     {
         this.count = 0;
         return;
     }
     this.consults = new ConsultTO[1];
     this.consults[0] = new ConsultTO(mdo);
     this.count = 1;
 }
Exemplo n.º 3
0
 public TaggedConsultArray(string tag, Consult[] mdos)
 {
     this.tag = tag;
     if (mdos == null)
     {
         this.count = 0;
         return;
     }
     this.consults = new ConsultTO[mdos.Length];
     for (int i = 0; i < mdos.Length; i++)
     {
         this.consults[i] = new ConsultTO(mdos[i]);
     }
     this.count = consults.Length;
 }
Exemplo n.º 4
0
 internal Consult[] toConsults(string response)
 {
     if (String.IsNullOrEmpty(response) || response.StartsWith("< PATIENT DOES NOT HAVE ANY CONSULTS/REQUESTS"))
     {
         return null;
     }
     string[] rex = StringUtils.split(response, StringUtils.CRLF);
     rex = StringUtils.trimArray(rex);
     Consult[] result = new Consult[rex.Length];
     for (int i = 0; i < rex.Length; i++)
     {
         string[] flds = StringUtils.split(rex[i], StringUtils.CARET);
         Consult c = new Consult();
         c.Id = flds[0];
         c.Text = getConsultNote(c.Id);
         c.Timestamp = VistaTimestamp.toDateTime(flds[1]);
         c.Status = VistaOrdersDao.decodeOrderStatus(flds[2]);
         c.Title = flds[6];
         //c.Service = new KeyValuePair<string, string>("", flds[2]);
         result[i] = c;
     }
     return result;
 }