예제 #1
0
 public IcdRpt(IcdReport mdo)
 {
     this.title     = mdo.Title;
     this.timestamp = mdo.Timestamp;
     if (mdo.Facility != null)
     {
         this.facility = new TaggedText(mdo.Facility.Id, mdo.Facility.Name);
     }
     this.icdCode = mdo.IcdCode;
 }
예제 #2
0
 public TaggedIcdRptArray(string tag, IcdReport mdo)
 {
     this.tag = tag;
     if (mdo == null)
     {
         this.count = 0;
         return;
     }
     this.rpts    = new IcdRpt[1];
     this.rpts[0] = new IcdRpt(mdo);
     this.count   = 1;
 }
예제 #3
0
 internal IcdReport[] toIcdReports(string response)
 {
     if (response == "")
     {
         return null;
     }
     string[] lines = StringUtils.split(response, StringUtils.CRLF);
     ArrayList lst = new ArrayList();
     IcdReport rpt = null;
     for (int i = 0; i < lines.Length; i++)
     {
         if (lines[i] == "")
         {
             continue;
         }
         string[] flds = StringUtils.split(lines[i], StringUtils.CARET);
         if (flds[0] == "1")
         {
             if (rpt != null)
             {
                 lst.Add(rpt);
             }
             rpt = new IcdReport();
             string[] subflds = StringUtils.split(flds[1], StringUtils.SEMICOLON);
             if (subflds.Length == 2)
             {
                 rpt.Facility = new SiteId(subflds[1], subflds[0]);
             }
             else if (flds[1] != "")
             {
                 rpt.Facility = new SiteId(cxn.DataSource.SiteId.Id, flds[1]);
             }
             else
             {
                 rpt.Facility = cxn.DataSource.SiteId;
             }
         }
         else if (flds[0] == "2")
         {
             rpt.Timestamp = VistaTimestamp.toUtcFromRdv(flds[1]);
         }
         else if (flds[0] == "3")
         {
             rpt.Title = flds[1];
         }
         else if (flds[0] == "4")
         {
             rpt.IcdCode = flds[1];
         }
     }
     if (rpt != null)
     {
         lst.Add(rpt);
     }
     return (IcdReport[])lst.ToArray(typeof(IcdReport));
 }