Exemplo n.º 1
0
 public void Init(HealthSummary mdo, string siteCode)
 {
     this.id       = mdo.Id;
     this.title    = mdo.Title;
     this.text     = mdo.Text;
     this.siteCode = siteCode;
 }
Exemplo n.º 2
0
        public HealthSummaryTO getHealthSummary(string healthSummaryId, string healthSummaryName)
        {
            HealthSummaryTO result = new HealthSummaryTO();

            if (string.IsNullOrEmpty(healthSummaryId) && string.IsNullOrEmpty(healthSummaryName))
            {
                result.fault = new FaultTO("Missing health summary Id OR health summary name. Please provide one of the parameters.");
                return(result);
            }

            try
            {
                HealthSummary hs = ClinicalApi.getHealthSummary(mySession.ConnectionSet.BaseConnection, new MdoDocument(healthSummaryId, healthSummaryName));
                result.Init(hs);
            }
            catch (Exception e)
            {
                result.fault = new FaultTO(e.Message);
            }
            return(result);
        }
Exemplo n.º 3
0
 public HealthSummaryTO(HealthSummary mdo, string siteCode)
 {
     Init(mdo, siteCode);
 }
Exemplo n.º 4
0
 internal HealthSummary toHealthSummary(MdoDocument md, string response)
 {
     HealthSummary hs = new HealthSummary();
     hs.Id = md.Id;
     hs.Title = md.Title;
     hs.Text = response;
     return hs;
 }
Exemplo n.º 5
0
        internal IList<HealthSummary> toHealthSummariesFromXmlNode(XmlNode node)
        {
            IList<HealthSummary> summaries = new List<HealthSummary>();

            int total = verifyTopLevelNode(node);
            if (total == 0)
            {
                return summaries;
            }

            XmlNodeList summaryNodes = node.SelectNodes("/factor");
            if (summaryNodes == null || summaryNodes.Count == 0)
            {
                return summaries;
            }

            foreach (XmlNode summaryNode in summaryNodes)
            {
                HealthSummary summary = new HealthSummary();
                summary.Id = XmlUtils.getXmlAttributeValue(summaryNode, "id", "value");
                summary.Text = XmlUtils.getXmlAttributeValue(summaryNode, "comment", "value");
                summary.Title = XmlUtils.getXmlAttributeValue(summaryNode, "name", "value");

                summaries.Add(summary);
            }

            return summaries;
        }