コード例 #1
0
ファイル: ClinicalLib.cs プロジェクト: OSEHRA/mdws
        public TaggedHealthSummaryArray getHealthSummary(string healthSummaryId, string healthSummaryName)
        {
            TaggedHealthSummaryArray result = new TaggedHealthSummaryArray();
            string msg = MdwsUtils.isAuthorizedConnection(mySession);
            if (msg != "OK")
            {
                result.fault = new FaultTO(msg);
                return result;
            }
            if ((mySession.Patient == null) || (string.IsNullOrEmpty(mySession.Patient.LocalPid)))
            {
                result.fault = new FaultTO("Need to select a patient before calling this method.");
                return result;
            }
            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
            {
                IndexedHashtable hs = ClinicalApi.getHealthSummary(mySession.ConnectionSet, new MdoDocument(healthSummaryId, healthSummaryName));
                result.Init(hs);
            }
            catch (Exception e)
            {

                result.fault = new FaultTO(e.Message);
            }
            return result;
        }